christoph ender's

blog

monday the 18th of march, 2024

smtp: dsn versus mdn

There are two ways to get information about successful e-mail deliveries: DSN and MDN.

dsn

DSN ist the “Delivery Status Notification”. Most have already encountered some of these in form of bounce messages which inform the sender that an e-mail is delayed or could not have been delivered, and by default these are the only events that are reported. However, it's also possible to request “success” delivery status notifications. These have to be explicitely requested, which means for Thunderbird one has to check the “Delivery Status Notifications” in the Options menu when composing a new message or, for a permanent solution, set mail.identity.default.dsn_always_request_on to true. In Outlook, check “Delivery receipt confirming the message was delivered to the recipient's mail server” in the “Tracking” section in the Outlook Mail options.

Mail servers may not always report successful deliveries. This may be due to missing DSN support, or deliberately disabling DSN support. In postfix, for example, DSN may be disabled by stating:

smtpd_discard_ehlo_keywords = silent-discard, dsn

In case the server encounters missing DSN support from a delivery target server, it sends a DSN notification by itself, stating that the message has been delivered to the target system. When DSN support is present on the recipient's machine, the destination server will send this message by itself, usually stating that the mail has been delivered to the target mailbox.

On the technical side, the type of requested DSNs for a message can be specified using the NOTIFY keyword as an parameter to the RCPT TO: line in the SMTP dialog. Furthermore, there's theORCPT parameter for the RCPT TO: command, this defines the address of the original mail recipient's address if, for example, it's forwarded to another address.

RCPT TO: bob@mail-02.com NOTIFY=FAILURE,DELAY ORCPT=alice@mail-02.com
mdn

MDN, on the other hand, is the “Message Disposition Notification”. Contrary to DSNs, MDNs are handled by the MUA – Thunderbird, Outlook, etc, whereas DSNs are managed by the MTA – postfix, exim, etc. In order to request a MDN for a mail in Thunderbird, check the “Return Receipt” option in Thunderbird – alternatively, set mail.receipt.request_return_receipt_on to true – in Outlook, check “Read receipt confirming the recipient viewed the message” in the “Tracking” mail options.

Technically, MDNs are requested by adding a header field named Disposition-Notification-To:, followed by one or more mail addresses. The receiving MUA, however, is not obligated to send a confirmation. As section 2.1 of RFC 9098 states:

The presence of a Disposition-Notification-To header field in a message is merely a request for an MDN. The recipients' user agents are always free to silently ignore such a request.