With Postfix version 2.1 and later you can ask Postfix to
produce mail delivery reports for debugging purposes. These reports
not only show sender/recipient addresses after address rewriting
and alias expansion or forwarding, they also show information about
delivery to mailbox, delivery to non-Postfix command, responses
from remote SMTP servers, and so on.
Postfix can produce two types of mail delivery reports for
debugging:
-
What-if: report what would happen, but do not actually
deliver mail. This mode of operation is requested with:
% /usr/sbin/sendmail -bv address...
Mail Delivery Status Report will be mailed to <your login name>.
-
What happened: deliver mail and report successes and/or
failures, including replies from remote SMTP servers. This mode
of operation is requested with:
% /usr/sbin/sendmail -v address...
Mail Delivery Status Report will be mailed to <your login name>.
These reports contain information that is generated by Postfix
delivery agents. Since these run as daemon processes and do not
interact with users directly, the result is sent as mail to the
sender of the test message. The format of these reports is practically
identical to that of ordinary non-delivery notifications.
For a detailed example of a mail delivery status report, see
the
debugging
section at the end of the
ADDRESS_REWRITING_README document.