Vincenzo Romano:
> 2011/11/25 Wietse Venema <wie...@porcupine.org>:
> > The Postfix sendmail command creates a temporary queue file that
> > is deleted as soon as the local mail pickup daemon has read the
> > file. So, that queue file ID is useless.
> >
> > You can specify your own envelope ID on the Postfix sendmail command
> > line. This will be returned in delivery status notifications (as
> > long as the remote MTA implements the DSN RFCs).
> >
> > Postfix does not log the DSN envelope ID information, but code for
> > that could be added to the cleanup daemon.
> >
> > There is also RFC 3885 which builds a tracking mechanism on top of
> > the aforementioned DSN envelope ID information. But this is of limited
> > interest, since qmail, exim and some other MTAs don't implement DSN.
> 
> Thanks Wietse (also for the honor).
> Maybe I've been not clear enough and I apologyze for that.
> I'll try to describe a real life case.
> Once I do the submission with sendmail tool, I need to check on my
> machine whether the message actually left the system for the delivery
> (which can access the Internet) or if it got queued or trashed for
> some reason.
> As far as I remember I can link the various lines in the log only
> thanks to the queue ID.
> This is what I do, step by step, within the logs:
> 
> 0. First restrict the search field to a "reasonable" time period in
> the logs. Usually one day.
> 
> 1. I look for "postfix/qmgr" and the destination email address to
> extract che queue ID (something like 42DF66C96E).
> 
> 2. I look then for both that queue ID and "postfix/smtp" in order to
> extract the status (something like "status=sent") and the remote SMTP
> response (something like "(250 2.0.0 OK 1322295987
> b11si12544560fak.190)" ).
> 
> 3. I look then for both that queue ID and "postfix/cleanup" in order
> to extract the local message-ID (something like
> "message-id=<20111126082624.42DF66C96E@system.domain>")
> 
> The step #2 is needed in order to know whether the message actually
> left the system (status=sent) or bounced or got deferred. I can also
> get the actual response from the remore server.
> Steps #2 and #3 are needed in order to be able to look for the message
> on either side.
> 
> The steps #0 and #1 are approximate, especially when I send several
> distinct messages in the same second to the same destination. Which
> can easily happen.
> I understood that I cannot grab the local message ID straight from
> sendmail, this is why I focused on the queue ID.
> 
> But, is it possible to know the queue ID from the sendmail tool (or
> whatever other submission tool) to be reasonably precise on the
> subsequent email tracking lookups?
 
I answered that in the FIRST paragraph of my reply.

        Wietse

Reply via email to