On Wed, Jun 12, 2019 at 03:52:10PM -0300, Rafael Azevedo wrote:

> Its the communication between the servers.
> 
> [client] >>> [server] >>> [final destination's server]
> 
> So this is the part they want me to store:
> 
> [server] > EHLO > MAIL FROM > RCPT TO > DATA > RESULT (ACCEPTED OR
> REJECTED)    [final destination's server]
> 
> They need to have the confirmation of the acceptance of the message by
> the final destination's provider.

The final confirmation "RESULT" is logged by Postfix in the
postfix/smtp log entry.  For example (with "--->" in front of the
"RESULT" text):

    Jun 12 14:18:35 amnesiac postfix/smtp[6184]: CE26572115:
        to=<postfix-users@postfix.org>, relay=mail.cloud9.net[168.100.1.4]:25,
        delay=4.3, delays=0.03/0.02/0.34/3.9, dsn=2.0.0, status=sent
  --->  (250 2.0.0 Ok: queued as 119D933B042)

The "RCPT TO" is in the "to=" field, and the "MAIL FROM" is in the
associated qmgr log entry:

    Jun 12 14:18:30 amnesiac postfix/qmgr[61815]: CE26572115:
        from=<postfix-us...@dukhovni.org>, size=1528, nrcpt=1
        (queue active)

The rest they don't need.  Postfix default logging is sufficient
to track messages and determine delivery success/failure without
jumping through hoops with SMTP session logging.

-- 
        Viktor.

Reply via email to