Michael Munger:
> This seems to get me about 80% of the way there. I can send from
> a specific mailbox, so the response will be delivered to that
> mailbox, and I can check it programmatically. So that's great.
>
> It still leaves me with the question of: how do I associate this
> particular reply with a notification that I sent? My initial idea
> was to use X-Header and stuff a unique ID in that header, so I
> could make the association, but this documentation appears to say:
> "I'm not going to send you X-Headers back... or body content".

The documentation shows that Postfix sends the message HEADERS back. 

You can also specify an Envelope-ID on submission, and then you get
it back via the delivery status notification.

SENDMAIL(1)                 General Commands Manual                SENDMAIL(1)
        ...
       -f sender
              Set the envelope sender  address.  This  is  the  address  where
              delivery problems are sent to. With Postfix versions before 2.1,
              the  Errors-To:  message  header  overrides  the  error   return
              address.
        ...
       -V envid
              Specify the envelope ID for notification by servers that support
              DSN.

See RFC 3461 for more information about the envelope ID.

Note that remote MTAs will report non-delivery or delays to the
same sender address that you use for reporting remote SMTP server
replies, though not all MTAs use the standardized format.

        Wietse

Reply via email to