ietf-corpus

rfc-3461

Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs)

K. Moore
date2003-01 streamIETF wgnon working group statusDRAFT STANDARD pages38 canonicalhttps://www.rfc-editor.org/rfc/rfc3461 doi10.17487/RFC3461 errataview
This memo defines an extension to the Simple Mail Transfer Protocol (SMTP) service, which allows an SMTP client to specify (a) that Delivery Status Notifications (DSNs) should be generated under certain conditions, (b) whether such notifications should return the contents of the message, and (c) additional information, to be returned with a DSN, that allows the sender to identify both the recipient(s) for which the DSN was issued, and the transaction in which the original message was sent. [STANDARDS-TRACK]

obsoletes

updated by

Extracted elements (29)

design-rationale §1

The DSN service was designed to be (a) reliable—DSN requests are honored or an error is returned, (b) unambiguous—success and failure are mutually exclusive, (c) stable—failed DSN delivery never triggers additional DSNs, (d) information-preserving through forwarding and gatewaying, and (e) interoperable with non-SMTP environments.

email

design-rationale §3

The ORCPT parameter exists because the RCPT TO address may differ from the original recipient address (e.g., after forwarding A@B.C to A@D.E), and the original sender needs to identify which recipient caused the notification. This also supports messages gatewayed from non-Internet-style address environments.

email

interoperability-note §4.1

For compatibility with SMTP clients that do not use the NOTIFY facility, the absence of a NOTIFY parameter in a RCPT command may be interpreted as either NOTIFY=FAILURE or NOTIFY=FAILURE,DELAY. This preserves backward-compatible behavior with legacy SMTP clients.

email

interoperability-note §5.2.3

The 'delivery' point for IMAP/POP mailboxes is when the message is made available to the IMAP/POP service, not when it is retrieved by the user agent. For mailing list exploders, 'delivery' is when the message is made available to the exploder, even if the exploder rejects the message.

email

interoperability-note §5.2.4

When gatewaying to a foreign environment that cannot return positive delivery notifications, the MTA SHOULD issue a 'relayed' DSN for SUCCESS-requesting recipients. The return-of-content conditions from RET are nonbinding in foreign environments but SHOULD be honored using available mechanisms.

email

normative-requirement §5.1 MUST NOT

A conforming SMTP server MUST NOT refuse a MAIL command based on the presence or absence of valid ENVID or RET parameters, and MUST NOT refuse a RCPT command based on the presence or absence of NOTIFY or ORCPT parameters. Invalid parameter values or duplicate parameters MUST result in a 501 reply.

email

normative-requirement §5.2 MUST NOT

A DSN MUST NOT be returned to the sender for any message whose SMTP MAIL command used a NULL return address ('<>'), even if the sender's address is available elsewhere. The MTA SHOULD notify the local postmaster of delivery failures via a mechanism that will not itself generate DSNs.

email

normative-requirement §5.3 MUST

If any DSN-related requests are transmitted within the message itself (e.g., in message headers) rather than via SMTP extensions, those requests MUST be removed from the message before it is transmitted via SMTP.

email

normative-requirement §5.2.2 MUST NOT

If NOTIFY=NEVER was specified for a recipient, a DSN MUST NOT be issued regardless of delivery outcome. When relaying to a non-conforming server with NOTIFY=NEVER, the client MAY use a separate SMTP transaction with an empty reverse-path to prevent DSN generation by the downstream MTA.

email

normative-requirement §5.4 MUST

Implementation limits: a conforming MTA MUST accept ENVID of at least 100 chars, NOTIFY of at least 28 chars, ORCPT of at least 500 chars, and RET of at least 8 chars. It MUST accept SMTP command lines of at least 1036 characters.

email

normative-requirement §6.1 MUST

The DSN sender address in the SMTP MAIL command MUST be a null reverse-path ('<>'). When transmitting a DSN via SMTP, the RET parameter MUST NOT be used. If NOTIFY is used, its value MUST be NEVER.

email

normative-requirement §6.3 MUST

The message/delivery-status body part MUST include: Original-Envelope-ID (if ENVID was present), Reporting-MTA (with mta-name-type 'dns' if FQDN is known), Original-Recipient (if ORCPT was provided), Final-Recipient, Action, Status (using codes from RFC 3463), and for SMTP relay attempts, Remote-MTA and Diagnostic-Code with diagnostic-type 'smtp'.

email

normative-requirement §4.5 MUST NOT

The RET and ENVID parameters MUST NOT appear more than once each in any single MAIL command. The NOTIFY and ORCPT parameters MUST NOT appear more than once in any RCPT command. The ESMTP server SHOULD respond with '501 syntax error in parameters or arguments' if duplicates are present.

email

normative-requirement §5.2.3 MUST

Upon local delivery, if NOTIFY=SUCCESS was specified the MTA MUST issue a 'delivered' DSN. If NOTIFY was specified without SUCCESS, the MTA MUST NOT issue a DSN. If NOTIFY was not supplied, the MTA MUST NOT issue a DSN.

email

normative-requirement §5.2.6 MUST

When a conforming MTA fails to deliver a message, it MUST issue a 'failed' DSN if NOTIFY=FAILURE was specified. If NOTIFY was specified without FAILURE, a DSN MUST NOT be issued. If no NOTIFY was supplied, a 'failed' DSN MUST be issued.

email

normative-requirement §5.2.7.1 MUST NOT

When a message is redistributed to a mailing list, the ENVID, NOTIFY, RET, and ORCPT parameters of the redistributed message MUST NOT be derived from those of the original message. The envelope return address is rewritten to point to the list maintainer.

email

normative-requirement §4.2 MUST

When initially submitting a message via SMTP, if the ORCPT parameter is used it MUST contain the same address as the RCPT TO address (encoded as xtext). When a mailing list redistributes a message, the ORCPT parameter MUST match the new RCPT TO address for each recipient.

email

normative-requirement §5.2.1 MUST

When relaying to a conforming SMTP server, the ENVID, RET, NOTIFY, and ORCPT parameters MUST be propagated unchanged with their original esmtp-values. If a parameter was absent on receipt, it MUST NOT be added when relaying. An ORCPT parameter MUST NOT have its alphabetic characters case-changed.

email

normative-requirement §5.2.2 MUST NOT

When relaying to a non-conforming SMTP server, ENVID, NOTIFY, RET, and ORCPT parameters MUST NOT be issued. The relaying MTA must itself generate 'relayed' or 'failed' DSNs as appropriate based on the NOTIFY value and the SMTP reply code received.

email

protocol-element §6.2

A DSN is transmitted as a MIME multipart/report message with report-type='delivery-status'. The first part is human-readable text, the second is message/delivery-status (RFC 3464), and the third contains the original message or its headers.

email

protocol-element §2

The DSN SMTP service extension is advertised via the EHLO keyword 'DSN'. It adds two optional parameters to RCPT (NOTIFY, ORCPT) and two to MAIL (RET, ENVID), enabling senders to specify conditions for delivery status notification generation.

email, diameter

protocol-element §4.4

The ENVID parameter on MAIL carries an envelope identifier (up to 100 characters, encoded as xtext) that is propagated through the delivery chain and returned in any DSNs, allowing the sender to correlate notifications with the original transaction.

email

protocol-element §4.1

The NOTIFY parameter on RCPT specifies when DSNs should be generated. Values are NEVER (no DSN under any conditions), SUCCESS (on successful delivery), FAILURE (on delivery failure), and DELAY (if delivery is delayed for an unusual time). Multiple keywords may be combined with commas; NEVER must appear alone.

email

protocol-element §4.2

The ORCPT parameter on RCPT conveys the original recipient address as 'addr-type;xtext', preserving the sender-specified address through relaying and gatewaying. The entire ORCPT parameter MAY be up to 500 characters in length.

email

protocol-element §4.3

The RET parameter on MAIL specifies whether failed DSNs should return FULL (entire message) or HDRS (headers only). If omitted, the MTA MAY return either. For DSNs with no delivery failures, only headers should be returned regardless.

email

protocol-element §9

The 'rfc822' address-type is used for Internet email addresses in Original-Recipient and Final-Recipient DSN fields. The 'smtp' diagnostic-type carries SMTP reply codes as Diagnostic-Code values. The 'dns' MTA-name-type carries fully-qualified domain names in Reporting-MTA fields.

email, dns

security-consideration §8

The DSN extension does not create new security exposures but adds implementation complexity and thus increases risk of implementation errors. Previous ad-hoc notification mechanisms sometimes produced notification storms due to unanticipated interactions with mailing list expansion; this specification carefully designs success notification to prevent such storms.

email, security

security-consideration §5.2

When a message arrives with both non-functional recipient addresses and a null return address, a failed DSN delivery attempt would see a null return path. To avoid silent message loss, the MTA SHOULD inform the local postmaster rather than silently discarding, since a non-functional return address often indicates a configuration problem.

email, security

wire-format §4

ENVID and ORCPT parameter values are encoded as 'xtext': printable ASCII characters '!' (33) through '~' (126) except '+' and '=' may appear as-is; all other octets must be encoded as '+XX' where XX is two uppercase hexadecimal digits. This allows transmission of values outside the normal esmtp-value character range.

email