Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

closing sendmail error

by BzBeauty (Sexton)
on Jun 07, 2004 at 21:02 UTC ( #362108=perlquestion: print w/replies, xml ) Need Help??

BzBeauty has asked for the wisdom of the Perl Monks concerning the following question:

Ok, so I have a mailing script (NMS Formmail) that works. I upload and test it. It works fine! Months later, I now get this error from the line

$self->{Pipe}->close or die "close sendmail pipe failed, mailprog=[$self->{Mailprog}]";

Yup it dies!
The error message I get is

close sendmail pipe failed, mailprog=[/usr/sbin/sendmail -oi -t] at (eval 8) line 108.

Any ideas on how this could have happened? And yes the mailprog is /usr/sbin/sendmail. I double checked that. And more importantly, how can I fix this?

Thanks,
BzBeauty

Replies are listed 'Best First'.
Re: closing sendmail error
by liz (Monsignor) on Jun 07, 2004 at 21:54 UTC
    The pod for close() states:

    If the file handle came from a piped open, "close" will additionally return false if one of the other system calls involved fails, or if the program exits with non-zero status. (If the only problem was that the program exited non-zero, $! will be set to 0.) Closing a pipe also waits for the process executing on the pipe to complete, in case you want to look at the output of the pipe afterwards, and implicitly puts the exit status value of that command into $?.

    So maybe checking $? would give you more info?

    From experience, getting errors on closing of sendmail pipes, usually indicates something is wrong with the queuing and/or sending of mail. I would also check the partitions on which queue or log files reside, and make sure there is room there.

    Hope this helps.

    Liz

      How would I go about checking the partitions on which queue or log files reside? Also, I tried $? and got back 18176, whatever that means?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://362108]
Approved by Paladin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2019-12-12 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?