in reply to Create "Sent"-like reference for Sendmail mails.

Write my own log - not bad. 'Cause this is on a shared server and the odds of me getting access to the raw email server logs are....

BUT - Before I make an entry in my home-made log, I need to know that the message was actually sent by the email server. I'm not talking about receipt by the other party, but does Sendmail return some sort of confirmation that at least the email was in fact dispatched from the outgoing email server? I need somthing more than "my script processed this request". I need "the outgoing email server confirms that this request was received from my script and the email dispatched". Or at the very least, "this request was successfully submitted to the outgoing email server and the email is in queue to be dispatched".

  • Comment on Re: Create "Sent"-like reference for Sendmail mails.

Replies are listed 'Best First'.
Re^2: Create "Sent"-like reference for Sendmail mails.
by dwm042 (Priest) on Oct 19, 2007 at 16:43 UTC
    Sendmail, set up properly, will log the status of a mail it tried to send. An experienced email admin can read the log and tell you what the status of your file is, whether it was sent, or is waiting to be sent, etc. So could an appropriately written Perl script.

    What sendmail cannot do is guarantee the integrity of the file once transmitted. If the receiving server decides to eat the file on the other end, that can't be logged.

    That the SMTP protocol doesn't support "guaranteed delivery" is pretty easy to see. The Wikipedia article on SMTP shows a manual SMTP session. And any protocol whose basic outbound steps are:

    HELO (or EHLO)
    MAIL FROM
    RCPT TO
    DATA
    QUIT

    Doesn't have a whole lot of room for, "Oh yeah, I just sent the file you sent me." Understand that SMTP was written in the days of expensive communications, when dialup was common. These servers had to live with imprecise delivery and often longish delays. Servers weren't wired to one another then.

    Update: SMTP doesn't guarantee delivery