<?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 Re: perl script won't send any mails in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896262#M771689</link>
    <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;First, look at '/var/adm/syslog/mail.log' for clues.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Fri, 10 Nov 2006 11:22:17 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2006-11-10T11:22:17Z</dc:date>
    <item>
      <title>perl script won't send any mails</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896261#M771688</link>
      <description>hi&lt;BR /&gt;&lt;BR /&gt;I have this perl script, but it won't send any mails:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;&lt;BR /&gt;my $PingHost = "192.168.0.11";&lt;BR /&gt;my $ExpectedRedirect = "192.168.0.1";&lt;BR /&gt;my $mailto = "admin\@mydomain.net";&lt;BR /&gt;&lt;BR /&gt;my $ip = 'ip route flush cache';&lt;BR /&gt;&lt;BR /&gt;open( INPING, "ping -c 4 $PingHost|" ) || die "ping open failed";&lt;BR /&gt;while( my $line = &lt;INPING&gt; ) {&lt;BR /&gt;  next unless( $line =~ /Redirect Host\(New nexthop: (.*)\)/ );&lt;BR /&gt;  next if( $1 eq $ExpectedRedirect );&lt;BR /&gt;&lt;BR /&gt;   open( OUTMAIL, "| mailx -s 'CH Branch VPN Unexpected Redirect: $1' $mailto" ) || die "pipe to mail failed";&lt;BR /&gt;   print OUTMAIL scalar localtime();&lt;BR /&gt;   print OUTMAIL "\n\n";&lt;BR /&gt;   print OUTMAIL "Received an unexpected redirect \n";&lt;BR /&gt;   print OUTMAIL "\n";&lt;BR /&gt;   print OUTMAIL "have a nice day\n";   &lt;BR /&gt;}&lt;BR /&gt;close(INPING) || warn "bad pipe close";&lt;BR /&gt;&lt;BR /&gt;exit;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;knows someone what's wrong and howto solve this problem ?&lt;/INPING&gt;</description>
      <pubDate>Fri, 10 Nov 2006 11:15:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896261#M771688</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2006-11-10T11:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: perl script won't send any mails</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896262#M771689</link>
      <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;First, look at '/var/adm/syslog/mail.log' for clues.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 10 Nov 2006 11:22:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896262#M771689</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-11-10T11:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: perl script won't send any mails</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896263#M771690</link>
      <description>Chris,&lt;BR /&gt;&lt;BR /&gt;As pointed out by JR check the mail log first.&lt;BR /&gt;&lt;BR /&gt;Also Check if u r not tring to send mail behind a firewall.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Siva&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Nov 2006 11:26:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896263#M771690</guid>
      <dc:creator>siva0123</dc:creator>
      <dc:date>2006-11-10T11:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: perl script won't send any mails</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896264#M771691</link>
      <description>I checked at '/var/adm/syslog/mail.log' and don't have any entries at this time when I start the perl script.&lt;BR /&gt;&lt;BR /&gt;test mail from the Konsole using:&lt;BR /&gt;&lt;BR /&gt;echo "Message" | mailx -s "just a test"  admin@mydomain.net &lt;BR /&gt;&lt;BR /&gt;works without any problems.</description>
      <pubDate>Fri, 10 Nov 2006 12:29:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896264#M771691</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2006-11-10T12:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: perl script won't send any mails</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896265#M771692</link>
      <description>Hi (again) Chris:&lt;BR /&gt;&lt;BR /&gt;If you are running this on HP-UX your 'ping' syntax is wrong.  What you show works for AIX.&lt;BR /&gt;&lt;BR /&gt;If this is HP-UX, change:&lt;BR /&gt;&lt;BR /&gt;# ping -c 4 $PingHost&lt;BR /&gt;&lt;BR /&gt;...to:&lt;BR /&gt;&lt;BR /&gt;# ping $PingHost -n 4&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 10 Nov 2006 13:22:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896265#M771692</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-11-10T13:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: perl script won't send any mails</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896266#M771693</link>
      <description>&lt;!--!*#--&gt;Why not use perl Modules in the first place?&lt;BR /&gt;&lt;BR /&gt;It is portable!&lt;BR /&gt;&lt;BR /&gt;Some other remarks.&lt;BR /&gt;* -w and use warnings is double (though still better than none)&lt;BR /&gt;* the success or failure of ping is no guarantee at all about availability of a (mail)host&lt;BR /&gt;&lt;BR /&gt;--8&amp;lt;---&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;&lt;BR /&gt;use Mail::Sendmail;&lt;BR /&gt;&lt;BR /&gt;sendmail ({&lt;BR /&gt;    To      =&amp;gt; "admin\@mydomain.net",&lt;BR /&gt;    From    =&amp;gt; "me\@here.com",&lt;BR /&gt;    Subject =&amp;gt; "CH Branch VPN Unexpected Redirect: $1",&lt;BR /&gt;    Message =&amp;gt; join "\n",&lt;BR /&gt;        scalar localtime (),&lt;BR /&gt;        "\n",&lt;BR /&gt;        "Received an unexpected redirect",&lt;BR /&gt;        "",&lt;BR /&gt;        "have a nice day",&lt;BR /&gt;    }) or die $Mail::Sendmail::error;</description>
      <pubDate>Fri, 10 Nov 2006 13:38:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-script-won-t-send-any-mails/m-p/3896266#M771693</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2006-11-10T13:38:27Z</dc:date>
    </item>
  </channel>
</rss>

