RE: [Exim] Solaris 2.6, Perl 5.6.1, exim 3.22 - Can't open p…

Top Page
Delete this message
Reply to this message
Author: Gustav H Meyer
Date:  
To: Philip Hazel
CC: exim-users, Tamas TEVESZ
Subject: RE: [Exim] Solaris 2.6, Perl 5.6.1, exim 3.22 - Can't open pipe
>> The close statement is as follows:
>>     85  close(MAIL) or die "Can't close pipe to $sendmail: $!\n";

>>
>> As you can see the value of $! is passed on to the browser together
>> with the message. But unfortunately I can see no value to speak of.
>> In other words the value must be blank.
>
> Aarrgghh!! is all I can say.
>
>> The strange thing to me is
>> that it worked 100% on Solaris 2.7. Has any body else tested this
>> specific perl code on Solaris 2.6? What else could be the difference?
>
> Sorry, I'm completely mystified.
>
> Have you tried running an entirely separate Perl script that just opens
> MAIL and writes to it? If that works, then it's something in the
> environment in which you are running it live.


To be honest I'm not sure how I should do that. Will have to search for
examples.

Have tried another mail script from www.unimelb.edu.au but it also works
through using the pipe.

458 if( ! -e "$sendmail") { &error("Couldn't find sendmail
[$sendmail]: $!"); }
459 open(MAIL,"| $sendmail -t") or &error("Couldn't
open sendmail process: $!");
460 select MAIL;
461 print "To: $destination\n";
462 print "Subject: $subject\n";
463 print "From: $from_addr\n" if $from_addr;
464 print "Reply-to: $reply_to\n" if $reply_to;
465 foreach $header (keys(%headers)) {
466 print "$header: $headers{$header}\n";
467 }
468 print "X-Generated-By: CGI-Mailer v$version:
http://www.unimelb.edu.au/cgi-mailer/\n";
469 print "X-Form: $ENV{'HTTP_REFERER'}\n";
470 print "\n";
471 print "$format";
472 close(MAIL);

This script as you can see has no error checking on the close
statement so when I ran it for the first time it looked to be
working perfectly but I never received the test message. So I
added the error checking as follows:

472 close(MAIL) or &error("Can't close pipe to $send mail: $!");

And when doing this I get the same result as in my small script. Now
this cgi-mailer has some nifty features like mailing diretly through
SMTP but then I bypass exim completely as far as I understand it.

Regards,
Gustav