Sendmail "ok" signal?

Dan Stromberg strombrg at dcs.nac.uci.edu
Thu Feb 16 23:39:20 EST 2006


On Thu, 16 Feb 2006 07:36:18 -0800, Gaz wrote:

> Hey. I looked at the Sendmail help and did not find a property where i
> can get an "ok" signal when the email is finally sent. I need something
> like that to show a "Processing, please stand by" screen when the
> server is sending an email, and when the email is out, another screen
> appears with an "Email sent" message.
> 
> Do you know an alternative to the "ok" from the sendmail to do this?

It depends on how you're talking to the mail server.

If you're opening a pipe to "/usr/lib/sendmail recipient-list" or
"/usr/sbin/sendmail recipient-list" (some *ix hosts have one, or the
other, or both - few have neither), then I believe about all you have to
go on is the exit status from the subprocess.

If you're connecting to host:25/tcp, then you get an informative return
code each time you issue an SMTP command.  You can get this same effect,
more or less, by opening a pipe to /usr/lib/sendmail -bs or
/usr/sbin/sendmail -bs as well.

And yes, sendmail and other MTA's that speak SMTP will accept
responsibility for a message well before it gets to its final destination.
However, once they accept the message, they are to do everything in their
power to make sure the message doesn't get lost, even if it means having
to deliver it twice instead of 0 times.  They'll write things to disk even
when it'd be faster to just leave it in memory and past it along via the
network, for example - because otherwise a power failure might mean a
message would get lost.






More information about the Python-list mailing list