On Tue, Nov 05, 2024 at 12:46:42PM +0100, Thomas Landauer via Postfix-users 
wrote:

> A detail first:
> At http://www.postfix.org/postconf.5.html#smtpd_delay_open_until_valid_rcpt
> please change "mail transaction ID" to "queue ID" for consistency here:
> > The downside is that rejected recipients are logged with NOQUEUE instead of 
> > a mail transaction ID.
> 
> Viktor's logfile collation tool:
> Wow, sounds cool! But it isn't suited for real-time processing, or is it? If
> I pass every single line through rsyslog omprog, I don't have a file which I
> could hand over to the collation tool.

The Perl code in the collation tool processes a stream of log lines by
reading a file, it can be modified to process a stream of log lines
coming in one at a time.

But to really track deliveries, implement client-side DSN.

> Request DSN's from recipient servers:
> I already tried this, but it's not really working in practice, since not all
> mailservers support DSN :-(

You only need *your* server to support DSN, in fact you'd probably want
to turn off client-side DSN support in your MTA (I always did), so that
delivery notifications were never delegated to remote systems, but
rather confirmed only that the message was transfered to the resposible
remote system successfully.

    smtp_discard_ehlo_keywords = dsn,silent-discard

> So coming back to my initial suggestion, after thinking some more about it:

It isn't better than DSN

> some meaning to it?  Like prefixing all invoices with "inv", all
> newsletters with "news", etc.?  This way, whenever somebody sees a
> queue ID (in some error message, or queue, or wherever) they'd
> immediately know which kind of mail it is.  Since you're creating the
> queue ID only after `RCPT TO`, we have the sender's and the main
> recipient's address at hand - that would be enough to set up something
> like a `queue_id_prefix_map` :-)

The envelope sender address or message-id can tag messages for you, and
log collation can reassemble all the related logs for a given message's
time in the queue.

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to