The format for the reporting of administrative messages is defined by
RFC 6522. A DSN may be a MIME multipart/report message composed of
three parts:
a human readable explanation; a machine parsable
message/delivery-status, a list of "name: type; value" lines that
state several possible fields; and the original message, or a portion
thereof, as an entity of type message/rfc822. The second part of a DSN
is also quite readable. It is essential to understand which MTA played
which role. The Reporting-MTA is responsible for composing and sending
the DSN.
When a Remote-MTA rejects a message during an SMTP transaction, a
field Diagnostic-Code of type smtp may be used to report that value.
Note that beside the numerical 3-digit value, the SMTP response
contains itself a human readable part. The information
Remote-MTA: dns; smtp.store.example [192.0.2.3] Diagnostic-Code: smtp;
550 No such user here is sometimes reported as, e.g., while talking to
smtp.store.example [192.0.2.3]
RCPT TO: <<< 550 No such user here