<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic telnet to mail server no interactive in automatic shell in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-to-mail-server-no-interactive-in-automatic-shell/m-p/3516485#M219129</link>
    <description>I've read many examples about using a shell script to test a mail server&lt;BR /&gt;&amp;gt; (sendmail, postfix, etc) such as:&lt;BR /&gt;&amp;gt;     #!/bin/bash&lt;BR /&gt;&amp;gt;     telnet 1.2.3.4 25 &amp;lt;&amp;lt; _EOF_&lt;BR /&gt;&amp;gt;     HELO abc.com&lt;BR /&gt;&amp;gt;              &amp;lt;- smtp conversation here (mail from, rcpt to, data, etc)&lt;BR /&gt;&amp;gt;     _EOF_&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; When I execute it, I get:&lt;BR /&gt;&amp;gt;     220 xyz.com ESMTP Sendmail 8.11.6/8.11.6; Fri, 11 Oct 2002&lt;BR /&gt;&amp;gt; 19:59:20 -0400&lt;BR /&gt;&amp;gt;     Connection closed by foreign host.&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; I've tried many ways to do it but it doesn't work. I've read somewhere that&lt;BR /&gt;&amp;gt; "telnet is not interactive so it will not work". I know Perl is much better&lt;BR /&gt;&amp;gt; and gives more control, but I want to do it first en bash script just for&lt;BR /&gt;&amp;gt; fun :)  Any suggestion?&lt;BR /&gt;</description>
    <pubDate>Fri, 01 Apr 2005 15:56:15 GMT</pubDate>
    <dc:creator>Jairo Campana</dc:creator>
    <dc:date>2005-04-01T15:56:15Z</dc:date>
    <item>
      <title>telnet to mail server no interactive in automatic shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-to-mail-server-no-interactive-in-automatic-shell/m-p/3516485#M219129</link>
      <description>I've read many examples about using a shell script to test a mail server&lt;BR /&gt;&amp;gt; (sendmail, postfix, etc) such as:&lt;BR /&gt;&amp;gt;     #!/bin/bash&lt;BR /&gt;&amp;gt;     telnet 1.2.3.4 25 &amp;lt;&amp;lt; _EOF_&lt;BR /&gt;&amp;gt;     HELO abc.com&lt;BR /&gt;&amp;gt;              &amp;lt;- smtp conversation here (mail from, rcpt to, data, etc)&lt;BR /&gt;&amp;gt;     _EOF_&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; When I execute it, I get:&lt;BR /&gt;&amp;gt;     220 xyz.com ESMTP Sendmail 8.11.6/8.11.6; Fri, 11 Oct 2002&lt;BR /&gt;&amp;gt; 19:59:20 -0400&lt;BR /&gt;&amp;gt;     Connection closed by foreign host.&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; I've tried many ways to do it but it doesn't work. I've read somewhere that&lt;BR /&gt;&amp;gt; "telnet is not interactive so it will not work". I know Perl is much better&lt;BR /&gt;&amp;gt; and gives more control, but I want to do it first en bash script just for&lt;BR /&gt;&amp;gt; fun :)  Any suggestion?&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Apr 2005 15:56:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-to-mail-server-no-interactive-in-automatic-shell/m-p/3516485#M219129</guid>
      <dc:creator>Jairo Campana</dc:creator>
      <dc:date>2005-04-01T15:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: telnet to mail server no interactive in automatic shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-to-mail-server-no-interactive-in-automatic-shell/m-p/3516486#M219130</link>
      <description>If the service (telnet) and the port (25) is enabled to accept the connections, you should be able to interact with SMTP. &lt;BR /&gt;&lt;BR /&gt;It may be set to deny logins outside of the SNMP services.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Apr 2005 16:06:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-to-mail-server-no-interactive-in-automatic-shell/m-p/3516486#M219130</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-04-01T16:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: telnet to mail server no interactive in automatic shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-to-mail-server-no-interactive-in-automatic-shell/m-p/3516487#M219131</link>
      <description>Hi Jairo,&lt;BR /&gt;&lt;BR /&gt;Check the /etc/mail/sendmail.cf on that system.&lt;BR /&gt;Look for PrivacyOptions and IF it's set to "goaway" then almost all SMTP status queries are disallowed.&lt;BR /&gt;If it's needmailhelo then the system will insist on an HELO or EHLO before it will allow any mail commands.&lt;BR /&gt;&lt;BR /&gt;Also sendmail is *very* picky about name resolution. Make sure both the server &amp;amp; client are resolvable both forward (by name) &amp;amp; reverse (by IP). Sendmail will shoot you down if you're not.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Apr 2005 16:18:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-to-mail-server-no-interactive-in-automatic-shell/m-p/3516487#M219131</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2005-04-01T16:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: telnet to mail server no interactive in automatic shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-to-mail-server-no-interactive-in-automatic-shell/m-p/3516488#M219132</link>
      <description>can you do it MANUALLY?? &lt;BR /&gt;&lt;BR /&gt;If so, then the problem is your script.&lt;BR /&gt;&lt;BR /&gt;Stuff like this should be done in perl.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=209253" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=209253&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=696550" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=696550&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Sat, 02 Apr 2005 07:00:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-to-mail-server-no-interactive-in-automatic-shell/m-p/3516488#M219132</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-04-02T07:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: telnet to mail server no interactive in automatic shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-to-mail-server-no-interactive-in-automatic-shell/m-p/3516489#M219133</link>
      <description>FWIW, here's how I do it via perl.  I don't use telnet but setup a real smpt connection instead.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;&lt;BR /&gt;Chuck Davis&lt;BR /&gt;#####&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;&lt;BR /&gt;use Net::SMTP;&lt;BR /&gt;&lt;BR /&gt;$usage =&amp;lt;&lt;EOF&gt;&lt;/EOF&gt;&lt;BR /&gt;this script checks if an SMTP server is available on a server.  run like this:&lt;BR /&gt;&lt;BR /&gt; $0 &lt;HOST&gt;&lt;BR /&gt;&lt;BR /&gt;script exits with 0 if SMTP is running, exits with 1 if SMTP not running.&lt;BR /&gt;&lt;BR /&gt;EOF&lt;BR /&gt;;&lt;BR /&gt; &lt;BR /&gt;if (@ARGV != 1)&lt;BR /&gt;{ print $usage;&lt;BR /&gt;  exit;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;$server = $ARGV[0];&lt;BR /&gt;&lt;BR /&gt;if (Net::SMTP-&amp;gt;new( $server, Timeout=&amp;gt;5))&lt;BR /&gt;{ print "SMTP on $server is UP\n"; &lt;BR /&gt;  exit 0&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{ print "SMTP on $server is DOWN\n"; &lt;BR /&gt;  exit 1&lt;BR /&gt;}&lt;BR /&gt;&lt;/HOST&gt;</description>
      <pubDate>Mon, 04 Apr 2005 09:14:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-to-mail-server-no-interactive-in-automatic-shell/m-p/3516489#M219133</guid>
      <dc:creator>Daryl Much</dc:creator>
      <dc:date>2005-04-04T09:14:40Z</dc:date>
    </item>
  </channel>
</rss>

