Commit bf99501b bf99501b3d3dcf39754e68b242383e574533b5a8 by Sam Roberts

Added RFCs related to delivery and message status notification.

1 parent 51a36f86
Network Working Group K. Moore
Request for Comments: 1891 University of Tennessee
Category: Standards Track January 1996
SMTP Service Extension
for Delivery Status Notifications
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
1. Abstract
This memo defines an extension to the 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.
Any questions, comments, and reports of defects or ambiguities in
this specification may be sent to the mailing list for the NOTARY
working group of the IETF, using the address
<notifications@cs.utk.edu>. Requests to subscribe to the mailing
list should be addressed to <notifications-request@cs.utk.edu>.
Implementors of this specification are encouraged to subscribe to the
mailing list, so that they will quickly be informed of any problems
which might hinder interoperability.
NOTE: This document is a Proposed Standard. If and when this
protocol is submitted for Draft Standard status, any normative text
(phrases containing SHOULD, SHOULD NOT, MUST, MUST NOT, or MAY) in
this document will be re-evaluated in light of implementation
experience, and are thus subject to change.
2. Introduction
The SMTP protocol [1] requires that an SMTP server provide
notification of delivery failure, if it determines that a message
cannot be delivered to one or more recipients. Traditionally, such
notification consists of an ordinary Internet mail message (format
defined by [2]), sent to the envelope sender address (the argument of
Moore Standards Track [Page 1]
RFC 1891 SMTP Delivery Status Notifications January 1996
the SMTP MAIL command), containing an explanation of the error and at
least the headers of the failed message.
Experience with large mail distribution lists [3] indicates that such
messages are often insufficient to diagnose problems, or even to
determine at which host or for which recipients a problem occurred.
In addition, the lack of a standardized format for delivery
notifications in Internet mail makes it difficult to exchange such
notifications with other message handling systems.
Such experience has demonstrated a need for a delivery status
notification service for Internet electronic mail, which:
(a) is reliable, in the sense that any DSN request will either be
honored at the time of final delivery, or result in a response
that indicates that the request cannot be honored,
(b) when both success and failure notifications are requested,
provides an unambiguous and nonconflicting indication of whether
delivery of a message to a recipient succeeded or failed,
(c) is stable, in that a failed attempt to deliver a DSN should never
result in the transmission of another DSN over the network,
(d) preserves sufficient information to allow the sender to identify
both the mail transaction and the recipient address which caused
the notification, even when mail is forwarded or gatewayed to
foreign environments, and
(e) interfaces acceptably with non-SMTP and non-822-based mail
systems, both so that notifications returned from foreign mail
systems may be useful to Internet users, and so that the
notification requests from foreign environments may be honored.
Among the requirements implied by this goal are the ability to
request non-return-of-content, and the ability to specify whether
positive delivery notifications, negative delivery notifications,
both, or neither, should be issued.
In an attempt to provide such a service, this memo uses the mechanism
defined in [4] to define an extension to the SMTP protocol. Using
this mechanism, an SMTP client may request that an SMTP server issue
or not issue a delivery status notification (DSN) under certain
conditions. The format of a DSN is defined in [5].
Moore Standards Track [Page 2]
RFC 1891 SMTP Delivery Status Notifications January 1996
3. Framework for the Delivery Status Notification Extension
The following service extension is therefore defined:
(1) The name of the SMTP service extension is "Delivery Status
Notification";
(2) the EHLO keyword value associated with this extension is "DSN",
the meaning of which is defined in section 4 of this memo;
(3) no parameters are allowed with this EHLO keyword value;
(4) two optional parameters are added to the RCPT command, and two
optional parameters are added to the MAIL command:
An optional parameter for the RCPT command, using the
esmtp-keyword "NOTIFY", (to specify the conditions under which a
delivery status notification should be generated), is defined in
section 5.1,
An optional parameter for the RCPT command, using the
esmtp-keyword "ORCPT", (used to convey the "original"
(sender-specified) recipient address), is defined in section 5.2,
and
An optional parameter for the MAIL command, using the
esmtp-keyword "RET", (to request that DSNs containing an
indication of delivery failure either return the entire contents
of a message or only the message headers), is defined in section
5.3,
An optional parameter for the MAIL command, using the
esmtp-keyword "ENVID", (used to propagate an identifier for this
message transmission envelope, which is also known to the sender
and will, if present, be returned in any DSNs issued for this
transmission), is defined in section 5.4;
(5) no additional SMTP verbs are defined by this extension.
The remainder of this memo specifies how support for the extension
effects the behavior of a message transfer agent.
4. The Delivery Status Notification service extension
An SMTP client wishing to request a DSN for a message may issue the
EHLO command to start an SMTP session, to determine if the server
supports any of several service extensions. If the server responds
with code 250 to the EHLO command, and the response includes the EHLO
Moore Standards Track [Page 3]
RFC 1891 SMTP Delivery Status Notifications January 1996
keyword DSN, then the Delivery Status Notification extension (as
described in this memo) is supported.
Ordinarily, when an SMTP server returns a positive (2xx) reply code
in response to a RCPT command, it agrees to accept responsibility for
either delivering the message to the named recipient, or sending a
notification to the sender of the message indicating that delivery
has failed. However, an extended SMTP ("ESMTP") server which
implements this service extension will accept an optional NOTIFY
parameter with the RCPT command. If present, the NOTIFY parameter
alters the conditions for generation of delivery status notifications
from the default (issue notifications only on failure) specified in
[1]. The ESMTP client may also request (via the RET parameter)
whether the entire contents of the original message should be
returned (as opposed to just the headers of that message), along with
the DSN.
In general, an ESMTP server which implements this service extension
will propagate delivery status notification requests when relaying
mail to other SMTP-based MTAs which also support this extension, and
make a "best effort" to ensure that such requests are honored when
messages are passed into other environments.
In order that any delivery status notifications thus generated will
be meaningful to the sender, any ESMTP server which supports this
extension will attempt to propagate the following information to any
other MTAs that are used to relay the message, for use in generating
DSNs:
(a) for each recipient, a copy of the original recipient address, as
used by the sender of the message.
This address need not be the same as the mailbox specified in the
RCPT command. For example, if a message was originally addressed
to A@B.C and later forwarded to A@D.E, after such forwarding has
taken place, the RCPT command will specify a mailbox of A@D.E.
However, the original recipient address remains A@B.C.
Also, if the message originated from an environment which does not
use Internet-style user@domain addresses, and was gatewayed into
SMTP, the original recipient address will preserve the original
form of the recipient address.
(b) for the entire SMTP transaction, an envelope identification
string, which may be used by the sender to associate any delivery
status notifications with the transaction used to send the
original message.
Moore Standards Track [Page 4]
RFC 1891 SMTP Delivery Status Notifications January 1996
5. Additional parameters for RCPT and MAIL commands
The extended RCPT and MAIL commands are issued by a client when it
wishes to request a DSN from the server, under certain conditions,
for a particular recipient. The extended RCPT and MAIL commands are
identical to the RCPT and MAIL commands defined in [1], except that
one or more of the following parameters appear after the sender or
recipient address, respectively. The general syntax for extended
SMTP commands is defined in [4].
NOTE: Although RFC 822 ABNF is used to describe the syntax of these
parameters, they are not, in the language of that document,
"structured field bodies". Therefore, while parentheses MAY appear
within an emstp-value, they are not recognized as comment delimiters.
The syntax for "esmtp-value" in [4] does not allow SP, "=", control
characters, or characters outside the traditional ASCII range of 1-
127 decimal to be transmitted in an esmtp-value. Because the ENVID
and ORCPT parameters may need to convey values outside this range,
the esmtp-values for these parameters are encoded as "xtext".
"xtext" is formally defined as follows:
xtext = *( xchar / hexchar )
xchar = any ASCII CHAR between "!" (33) and "~" (126) inclusive,
except for "+" and "=".
; "hexchar"s are intended to encode octets that cannot appear
; as ASCII characters within an esmtp-value.
hexchar = ASCII "+" immediately followed by two upper case
hexadecimal digits
When encoding an octet sequence as xtext:
+ Any ASCII CHAR between "!" and "~" inclusive, except for "+" and "=",
MAY be encoded as itself. (A CHAR in this range MAY instead be
encoded as a "hexchar", at the implementor's discretion.)
+ ASCII CHARs that fall outside the range above must be encoded as
"hexchar".
5.1 The NOTIFY parameter of the ESMTP RCPT command
A RCPT command issued by a client may contain the optional esmtp-
keyword "NOTIFY", to specify the conditions under which the SMTP
server should generate DSNs for that recipient. If the NOTIFY
esmtp-keyword is used, it MUST have an associated esmtp-value,
Moore Standards Track [Page 5]
RFC 1891 SMTP Delivery Status Notifications January 1996
formatted according to the following rules, using the ABNF of RFC
822:
notify-esmtp-value = "NEVER" / 1#notify-list-element
notify-list-element = "SUCCESS" / "FAILURE" / "DELAY"
Notes:
a. Multiple notify-list-elements, separated by commas, MAY appear in a
NOTIFY parameter; however, the NEVER keyword MUST appear by itself.
b. Any of the keywords NEVER, SUCCESS, FAILURE, or DELAY may be spelled
in any combination of upper and lower case letters.
The meaning of the NOTIFY parameter values is generally as follows:
+ A NOTIFY parameter value of "NEVER" requests that a DSN not be
returned to the sender under any conditions.
+ A NOTIFY parameter value containing the "SUCCESS" or "FAILURE"
keywords requests that a DSN be issued on successful delivery or
delivery failure, respectively.
+ A NOTIFY parameter value containing the keyword "DELAY" indicates the
sender's willingness to receive "delayed" DSNs. Delayed DSNs may be
issued if delivery of a message has been delayed for an unusual amount
of time (as determined by the MTA at which the message is delayed),
but the final delivery status (whether successful or failure) cannot
be determined. The absence of the DELAY keyword in a NOTIFY parameter
requests that a "delayed" DSN NOT be issued under any conditions.
The actual rules governing interpretation of the NOTIFY parameter are
given in section 6.
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.
5.2 The ORCPT parameter to the ESMTP RCPT command
The ORCPT esmtp-keyword of the RCPT command is used to specify an
"original" recipient address that corresponds to the actual recipient
to which the message is to be delivered. If the ORCPT esmtp-keyword
is used, it MUST have an associated esmtp-value, which consists of
the original recipient address, encoded according to the rules below.
The ABNF for the ORCPT parameter is:
Moore Standards Track [Page 6]
RFC 1891 SMTP Delivery Status Notifications January 1996
orcpt-parameter = "ORCPT=" original-recipient-address
original-recipient-address = addr-type ";" xtext
addr-type = atom
The "addr-type" portion MUST be an IANA-registered electronic mail
address-type (as defined in [5]), while the "xtext" portion contains
an encoded representation of the original recipient address using the
rules in section 5 of this document. The entire ORCPT parameter MAY
be up to 500 characters in length.
When initially submitting a message via SMTP, if the ORCPT parameter
is used, it MUST contain the same address as the RCPT TO address
(unlike the RCPT TO address, the ORCPT parameter will be encoded as
xtext). Likewise, when a mailing list submits a message via SMTP to
be distributed to the list subscribers, if ORCPT is used, the ORCPT
parameter MUST match the new RCPT TO address of each recipient, not
the address specified by the original sender of the message.)
The "addr-type" portion of the original-recipient-address is used to
indicate the "type" of the address which appears in the ORCPT
parameter value. However, the address associated with the ORCPT
keyword is NOT constrained to conform to the syntax rules for that
"addr-type".
Ideally, the "xtext" portion of the original-recipient-address should
contain, in encoded form, the same sequence of characters that the
sender used to specify the recipient. However, for a message
gatewayed from an environment (such as X.400) in which a recipient
address is not a simple string of printable characters, the
representation of recipient address must be defined by a
specification for gatewaying between DSNs and that environment.
5.3 The RET parameter of the ESMTP MAIL command
The RET esmtp-keyword on the extended MAIL command specifies whether
or not the message should be included in any failed DSN issued for
this message transmission. If the RET esmtp-keyword is used, it MUST
have an associated esmtp-value, which is one of the following
keywords:
FULL requests that the entire message be returned in any "failed"
delivery status notification issued for this recipient.
HDRS requests that only the headers of the message be returned.
Moore Standards Track [Page 7]
RFC 1891 SMTP Delivery Status Notifications January 1996
The FULL and HDRS keywords may be spelled in any combination of upper
and lower case letters.
If no RET parameter is supplied, the MTA MAY return either the
headers of the message or the entire message for any DSN containing
indication of failed deliveries.
Note that the RET parameter only applies to DSNs that indicate
delivery failure for at least one recipient. If a DSN contains no
indications of delivery failure, only the headers of the message
should be returned.
5.4 The ENVID parameter to the ESMTP MAIL command
The ENVID esmtp-keyword of the SMTP MAIL command is used to specify
an "envelope identifier" to be transmitted along with the message and
included in any DSNs issued for any of the recipients named in this
SMTP transaction. The purpose of the envelope identifier is to allow
the sender of a message to identify the transaction for which the DSN
was issued.
The ABNF for the ENVID parameter is:
envid-parameter = "ENVID=" xtext
The ENVID esmtp-keyword MUST have an associated esmtp-value. No
meaning is assigned by the mail system to the presence or absence of
this parameter or to any esmtp-value associated with this parameter;
the information is used only by the sender or his user agent. The
ENVID parameter MAY be up to 100 characters in length.
5.5 Restrictions on the use of Delivery Status Notification parameters
The RET and ENVID parameters MUST NOT appear more than once each in
any single MAIL command. If more than one of either of these
parameters appears in a MAIL command, the ESMTP server SHOULD respond
with "501 syntax error in parameters or arguments".
The NOTIFY and ORCPT parameters MUST NOT appear more than once in any
RCPT command. If more than one of either of these parameters appears
in a RCPT command, the ESMTP server SHOULD respond with "501 syntax
error in parameters or arguments".
6. Conformance requirements
The Simple Mail Transfer Protocol (SMTP) is used by Message Transfer
Agents (MTAs) when accepting, relaying, or gatewaying mail, as well
as User Agents (UAs) when submitting mail to the mail transport
Moore Standards Track [Page 8]
RFC 1891 SMTP Delivery Status Notifications January 1996
system. The DSN extension to SMTP may be used to allow UAs to convey
the sender's requests as to when DSNs should be issued. A UA which
claims to conform to this specification must meet certain
requirements as described below.
Typically, a message transfer agent (MTA) which supports SMTP will
assume, at different times, both the role of a SMTP client and an
SMTP server, and may also provide local delivery, gatewaying to
foreign environments, forwarding, and mailing list expansion. An MTA
which, when acting as an SMTP server, issues the DSN keyword in
response to the EHLO command, MUST obey the rules below for a
"conforming SMTP client" when acting as a client, and a "conforming
SMTP server" when acting as a server. The term "conforming MTA"
refers to an MTA which conforms to this specification, independent of
its role of client or server.
6.1 SMTP protocol interactions
The following rules apply to SMTP transactions in which any of the
ENVID, NOTIFY, RET, or ORCPT keywords are used:
(a) If an SMTP client issues a MAIL command containing a valid ENVID
parameter and associated esmtp-value and/or a valid RET parameter
and associated esmtp-value, a conforming SMTP server MUST return
the same reply-code as it would to the same MAIL command without
the ENVID and/or RET parameters. A conforming SMTP server MUST
NOT refuse a MAIL command based on the absence or presence of
valid ENVID or RET parameters, or on their associated
esmtp-values.
However, if the associated esmtp-value is not valid (i.e. contains
illegal characters), or if there is more than one ENVID or RET
parameter in a particular MAIL command, the server MUST issue the
reply-code 501 with an appropriate message (e.g. "syntax error in
parameter").
(b) If an SMTP client issues a RCPT command containing any valid
NOTIFY and/or ORCPT parameters, a conforming SMTP server MUST
return the same response as it would to the same RCPT command
without those NOTIFY and/or ORCPT parameters. A conforming SMTP
server MUST NOT refuse a RCPT command based on the presence or
absence of any of these parameters.
However, if any of the associated esmtp-values are not valid, or
if there is more than one of any of these parameters in a
particular RCPT command, the server SHOULD issue the response "501
syntax error in parameter".
Moore Standards Track [Page 9]
RFC 1891 SMTP Delivery Status Notifications January 1996
6.2 Handling of messages received via SMTP
This section describes how a conforming MTA should handle any
messages received via SMTP.
NOTE: A DSN MUST NOT be returned to the sender for any message for
which the return address from the SMTP MAIL command was NULL ("<>"),
even if the sender's address is available from other sources (e.g.
the message header). However, the MTA which would otherwise issue a
DSN SHOULD inform the local postmaster of delivery failures through
some appropriate mechanism that will not itself result in the
generation of DSNs.
DISCUSSION: RFC 1123, section 2.3.3 requires error notifications to
be sent with a NULL return address ("reverse-path"). This creates an
interesting situation when a message arrives with one or more
nonfunctional recipient addresses in addition to a nonfunctional
return address. When delivery to one of the recipient addresses
fails, the MTA will attempt to send a nondelivery notification to the
return address, setting the return address on the notification to
NULL. When the delivery of this notification fails, the MTA
attempting delivery of that notification sees a NULL return address.
If that MTA were not to inform anyone of the situation, the original
message would be silently lost. Furthermore, a nonfunctional return
address is often indicative of a configuration problem in the
sender's MTA. Reporting the condition to the local postmaster may
help to speed correction of such errors.
6.2.1 Relay of messages to other conforming SMTP servers
The following rules govern the behavior of a conforming MTA, when
relaying a message which was received via the SMTP protocol, to an
SMTP server that supports the Delivery Status Notification service
extension:
(a) Any ENVID parameter included in the MAIL command when a message was
received, MUST also appear on the MAIL command with which the
message is relayed, with the same associated esmtp-value. If no
ENVID parameter was included in the MAIL command when the message
was received, the ENVID parameter MUST NOT be supplied when the
message is relayed.
(b) Any RET parameter included in the MAIL command when a message was
received, MUST also appear on the MAIL command with which the
message is relayed, with the same associated esmtp-value. If no RET
parameter was included in the MAIL command when the message was
received, the RET parameter MUST NOT supplied when the message is
relayed.
Moore Standards Track [Page 10]
RFC 1891 SMTP Delivery Status Notifications January 1996
(c) If the NOTIFY parameter was supplied for a recipient when the
message was received, the RCPT command issued when the message is
relayed MUST also contain the NOTIFY parameter along with its
associated esmtp-value. If the NOTIFY parameter was not supplied
for a recipient when the message was received, the NOTIFY parameter
MUST NOT be supplied for that recipient when the message is relayed.
(d) If any ORCPT parameter was present in the RCPT command for a
recipient when the message was received, an ORCPT parameter with the
identical original-recipient-address MUST appear in the RCPT command
issued for that recipient when relaying the message. (For example,
the MTA therefore MUST NOT change the case of any alphabetic
characters in an ORCPT parameter.)
If no ORCPT parameter was present in the RCPT command when the
message was received, an ORCPT parameter MAY be added to the RCPT
command when the message is relayed. If an ORCPT parameter is added
by the relaying MTA, it MUST contain the recipient address from the
RCPT command used when the message was received by that MTA.
6.2.2 Relay of messages to non-conforming SMTP servers
The following rules govern the behavior of a conforming MTA (in the
role of client), when relaying a message which was received via the
SMTP protocol, to an SMTP server that does not support the Delivery
Status Notification service extension:
(a) ENVID, NOTIFY, RET, or ORCPT parameters MUST NOT be issued when
relaying the message.
(b) If the NOTIFY parameter was supplied for a recipient, with an esmtp-
value containing the keyword SUCCESS, and the SMTP server returns a
success (2xx) reply-code in response to the RCPT command, the client
MUST issue a "relayed" DSN for that recipient.
(c) If the NOTIFY parameter was supplied for a recipient with an esmtp-
value containing the keyword FAILURE, and the SMTP server returns a
permanent failure (5xx) reply-code in response to the RCPT command,
the client MUST issue a "failed" DSN for that recipient.
(d) If the NOTIFY parameter was supplied for a recipient with an esmtp-
value of NEVER, the client MUST NOT issue a DSN for that recipient,
regardless of the reply-code returned by the SMTP server. However,
if the server returned a failure (5xx) reply-code, the client MAY
inform the local postmaster of the delivery failure via an
appropriate mechanism that will not itself result in the generation
of DSNs.
Moore Standards Track [Page 11]
RFC 1891 SMTP Delivery Status Notifications January 1996
When attempting to relay a message to an SMTP server that does not
support this extension, and if NOTIFY=NEVER was specified for some
recipients of that message, a conforming SMTP client MAY relay the
message for those recipients in a separate SMTP transaction, using
an empty reverse-path in the MAIL command. This will prevent DSNs
from being issued for those recipients by MTAs that conform to [1].
(e) If a NOTIFY parameter was not supplied for a recipient, and the SMTP
server returns a success (2xx) reply-code in response to a RCPT
command, the client MUST NOT issue any DSN for that recipient.
(f) If a NOTIFY parameter was not supplied for a recipient, and the SMTP
server returns a permanent failure (5xx) reply-code in response to a
RCPT command, the client MUST issue a "failed" DSN for that
recipient.
6.2.3 Local delivery of messages
The following rules govern the behavior of a conforming MTA upon
successful delivery of a message that was received via the SMTP
protocol, to a local recipient's mailbox:
"Delivery" means that the message has been placed in the recipient's
mailbox. For messages which are transmitted to a mailbox for later
retrieval via IMAP [6], POP [7] or a similar message access protocol,
"delivery" occurs when the message is made available to the IMAP
(POP, etc.) service, rather than when the message is retrieved by the
recipient's user agent.
Similarly, for a recipient address which corresponds to a mailing
list exploder, "delivery" occurs when the message is made available
to that list exploder, even though the list exploder might refuse to
deliver that message to the list recipients.
(a) If the NOTIFY parameter was supplied for that recipient, with an
esmtp-value containing the SUCCESS keyword, the MTA MUST issue a
"delivered" DSN for that recipient.
(b) If the NOTIFY parameter was supplied for that recipient which did
not contain the SUCCESS keyword, the MTA MUST NOT issue a DSN for
that recipient.
(c) If the NOTIFY parameter was not supplied for that recipient, the MTA
MUST NOT issue a DSN.
Moore Standards Track [Page 12]
RFC 1891 SMTP Delivery Status Notifications January 1996
6.2.4 Gatewaying a message into a foreign environment
The following rules govern the behavior of a conforming MTA, when
gatewaying a message that was received via the SMTP protocol, into a
foreign (non-SMTP) environment:
(a) If the the foreign environment is capable of issuing appropriate
notifications under the conditions requested by the NOTIFY
parameter, and the conforming MTA can ensure that any notification
thus issued will be translated into a DSN and delivered to the
original sender, then the MTA SHOULD gateway the message into the
foreign environment, requesting notification under the desired
conditions, without itself issuing a DSN.
(b) If a NOTIFY parameter was supplied with the SUCCESS keyword, but the
destination environment cannot return an appropriate notification on
successful delivery, the MTA SHOULD issue a "relayed" DSN for that
recipient.
(c) If a NOTIFY parameter was supplied with an esmtp-keyword of NEVER, a
DSN MUST NOT be issued. If possible, the MTA SHOULD direct the
destination environment to not issue delivery notifications for that
recipient.
(d) If the NOTIFY parameter was not supplied for a particular recipient,
a DSN SHOULD NOT be issued by the gateway. The gateway SHOULD
attempt to ensure that appropriate notification will be provided by
the foreign mail environment if eventual delivery failure occurs,
and that no notification will be issued on successful delivery.
(e) When gatewaying a message into a foreign environment, the return-of-
content conditions specified by any RET parameter are nonbinding;
however, the MTA SHOULD attempt to honor the request using whatever
mechanisms exist in the foreign environment.
6.2.5 Delays in delivery
If a conforming MTA receives a message via the SMTP protocol, and is
unable to deliver or relay the message to one or more recipients for
an extended length of time (to be determined by the MTA), it MAY
issue a "delayed" DSN for those recipients, subject to the following
conditions:
(a) If the NOTIFY parameter was supplied for a recipient and its value
included the DELAY keyword, a "delayed" DSN MAY be issued.
(b) If the NOTIFY parameter was not supplied for a recipient, a
"delayed" DSN MAY be issued.
Moore Standards Track [Page 13]
RFC 1891 SMTP Delivery Status Notifications January 1996
(c) If the NOTIFY parameter was supplied which did not contain the DELAY
keyword, a "delayed" DSN MUST NOT be issued.
NOTE: Although delay notifications are common in present-day
electronic mail, a conforming MTA is never required to issue
"delayed" DSNs. The DELAY keyword of the NOTIFY parameter is
provided to allow the SMTP client to specifically request (by
omitting the DELAY parameter) that "delayed" DSNs NOT be issued.
6.2.6 Failure of a conforming MTA to deliver a message
The following rules govern the behavior of a conforming MTA which
received a message via the SMTP protocol, and is unable to deliver a
message to a recipient specified in the SMTP transaction:
(a) If a NOTIFY parameter was supplied for the recipient with an esmtp-
keyword containing the value FAILURE, a "failed" DSN MUST be issued
by the MTA.
(b) If a NOTIFY parameter was supplied for the recipient which did not
contain the value FAILURE, a DSN MUST NOT be issued for that
recipient. However, the MTA MAY inform the local postmaster of the
delivery failure via some appropriate mechanism which does not
itself result in the generation of DSNs.
(c) If no NOTIFY parameter was supplied for the recipient, a "failed"
DSN MUST be issued.
NOTE: Some MTAs are known to forward undeliverable messages to the
local postmaster or "dead letter" mailbox. This is still considered
delivery failure, and does not diminish the requirement to issue a
"failed" DSN under the conditions defined elsewhere in this memo. If
a DSN is issued for such a recipient, the Action value MUST be
"failed".
6.2.7 Forwarding, aliases, and mailing lists
Delivery of a message to a local email address usually causes the
message to be stored in the recipient's mailbox. However, MTAs
commonly provide a facility where a local email address can be
designated as an "alias" or "mailing list"; delivery to that address
then causes the message to be forwarded to each of the (local or
remote) recipient addresses associated with the alias or list. It is
also common to allow a user to optionally "forward" her mail to one
or more alternate addresses. If this feature is enabled, her mail is
redistributed to those addresses instead of being deposited in her
mailbox.
Moore Standards Track [Page 14]
RFC 1891 SMTP Delivery Status Notifications January 1996
Following the example of [9] (section 5.3.6), this document defines
the difference between an "alias" and "mailing list" as follows: When
forwarding a message to the addresses associated with an "alias", the
envelope return address (e.g. SMTP MAIL FROM) remains intact.
However, when forwarding a message to the addresses associated with a
"mailing list", the envelope return address is changed to that of the
administrator of the mailing list. This causes DSNs and other
nondelivery reports resulting from delivery to the list members to be
sent to the list administrator rather than the sender of the original
message.
The DSN processing for aliases and mailing lists is as follows:
6.2.7.1 mailing lists
When a message is delivered to a list submission address (i.e. placed
in the list's mailbox for incoming mail, or accepted by the process
that redistributes the message to the list subscribers), this is
considered final delivery for the original message. If the NOTIFY
parameter for the list submission address contained the SUCCESS
keyword, a "delivered" DSN MUST be returned to the sender of the
original message.
NOTE: Some mailing lists are able to reject message submissions,
based on the content of the message, the sender's address, or some
other criteria. While the interface between such a mailing list and
its MTA is not well-defined, it is important that DSNs NOT be issued
by both the MTA (to report successful delivery to the list), and the
list (to report message rejection using a "failure" DSN.)
However, even if a "delivered" DSN was issued by the MTA, a mailing
list which rejects a message submission MAY notify the sender that
the message was rejected using an ordinary message instead of a DSN.
Whenever a message is redistributed to an mailing list,
(a) The envelope return address is rewritten to point to the list
maintainer. This address MAY be that of a process that recognizes
DSNs and processes them automatically, but it MUST forward
unrecognized messages to the human responsible for the list.
(b) The ENVID, NOTIFY, RET, and ORCPT parameters which accompany the
redistributed message MUST NOT be derived from those of the original
message.
(c) The NOTIFY and RET parameters MAY be specified by the local
postmaster or the list administrator. If ORCPT parameters are
supplied during redistribution to the list subscribers, they SHOULD
Moore Standards Track [Page 15]
RFC 1891 SMTP Delivery Status Notifications January 1996
contain the addresses of the list subscribers in the format used by
the mailing list.
6.2.7.2 single-recipient aliases
Under normal circumstances, when a message arrives for an "alias"
which has a single forwarding address, a DSN SHOULD NOT be issued.
Any ENVID, NOTIFY, RET, or ORCPT parameters SHOULD be propagated with
the message as it is redistributed to the forwarding address.
6.2.7.3 multiple-recipient aliases
An "alias" with multiple recipient addresses may be handled in any of
the following ways:
(a) Any ENVID, NOTIFY, RET, or ORCPT parameters are NOT propagated when
relaying the message to any of the forwarding addresses. If the
NOTIFY parameter for the alias contained the SUCCESS keyword, the
MTA issues a "relayed" DSN. (In effect, the MTA treats the message
as if it were being relayed into an environment that does not
support DSNs.)
(b) Any ENVID, NOTIFY, RET, or ORCPT parameters (or the equivalent
requests if the message is gatewayed) are propagated to EXACTLY one
of the forwarding addresses. No DSN is issued. (This is
appropriate when aliasing is used to forward a message to a
"vacation" auto-responder program in addition to the local mailbox.)
(c) Any ENVID, RET, or ORCPT parameters are propagated to all forwarding
addresses associated with that alias. The NOTIFY parameter is
propagated to the forwarding addresses, except that it any SUCCESS
keyword is removed. If the original NOTIFY parameter for the alias
contained the SUCCESS keyword, an "expanded" DSN is issued for the
alias. If the NOTIFY parameter for the alias did not contain the
SUCCESS keyword, no DSN is issued for the alias.
6.2.7.4 confidential forwarding addresses
If it is desired to maintain the confidentiality of a recipient's
forwarding address, the forwarding may be treated as if it were a
mailing list. A DSN will be issued, if appropriate, upon "delivery"
to the recipient address specified by the sender. When the message
is forwarded it will have a new envelope return address. Any DSNs
which result from delivery failure of the forwarded message will not
be returned to the original sender of the message and thus not expose
the recipient's forwarding address.
Moore Standards Track [Page 16]
RFC 1891 SMTP Delivery Status Notifications January 1996
6.2.8 DSNs describing delivery to multiple recipients
A single DSN may describe attempts to deliver a message to multiple
recipients of that message. If a DSN is issued for some recipients
in an SMTP transaction and not for others according to the rules
above, the DSN SHOULD NOT contain information for recipients for whom
DSNs would not otherwise have been issued.
6.3 Handling of messages from other sources
For messages which originated from "local" users (whatever that
means), the specifications under which DSNs should be generated can
be communicated to the MTA via any protocol agreed on between the
sender's mail composer (user agent) and the MTA. The local MTA can
then either relay the message, or issue appropriate delivery status
notifications. However, if such requests are transmitted within the
message itself (for example in the message headers), the requests
MUST be removed from the message before it is transmitted via SMTP.
For messages gatewayed from non-SMTP sources and further relayed by
SMTP, the gateway SHOULD, using the SMTP extensions described here,
attempt to provide the delivery reporting conditions expected by the
source mail environment. If appropriate, any DSNs returned to the
source environment SHOULD be translated into the format expected in
that environment.
6.4 Implementation limits
A conforming MTA MUST accept ESMTP parameters of at least the
following sizes:
(a) ENVID parameter: 100 characters.
(b) NOTIFY parameter: 28 characters.
(c) ORCPT parameter: 500 characters.
(d) RET parameter: 8 characters.
The maximum sizes for the ENVID and ORCPT parameters are intended to
be adequate for the transmission of "foreign" envelope identifier and
original recipient addresses. However, user agents which use SMTP as
a message submission protocol SHOULD NOT generate ENVID parameters
which are longer than 38 characters in length.
A conforming MTA MUST be able to accept SMTP command-lines which are
at least 1036 characters long (530 characters for the ORCPT and
NOTIFY parameters of the RCPT command, in addition to the 512
Moore Standards Track [Page 17]
RFC 1891 SMTP Delivery Status Notifications January 1996
characters required by [1]). If other SMTP extensions are supported
by the MTA, the MTA MUST be able to accept a command-line large
enough for each SMTP command and any combination of ESMTP parameters
which may be used with that command.
7. Format of delivery notifications
The format of delivery status notifications is defined in [5], which
uses the framework defined in [8]. Delivery status notifications are
to be returned to the sender of the original message as outlined
below.
7.1 SMTP Envelope to be used with delivery status notifications
The DSN sender address (in the SMTP MAIL command) MUST be a null
reverse-path ("<>"), as required by section 5.3.3 of [9]. The DSN
recipient address (in the RCPT command) is copied from the MAIL
command which accompanied the message for which the DSN is being
issued. When transmitting a DSN via SMTP, the RET parameter MUST NOT
be used. The NOTIFY parameter MAY be used, but its value MUST be
NEVER. The ENVID parameter (with a newly generated envelope-id)
and/or ORCPT parameter MAY be used.
7.2 Contents of the DSN
A DSN is transmitted as a MIME message with a top-level content-type
of multipart/report (as defined in [5]).
The multipart/report content-type may be used for any of several
kinds of reports generated by the mail system. When multipart/report
is used to convey a DSN, the report-type parameter of the
multipart/report content-type is "delivery-status".
As described in [8], the first component of a multipart/report
content-type is a human readable explanation of the report. For a
DSN, the second component of the multipart/report is of content-type
message/delivery-status (defined in [5]). The third component of the
multipart/report consists of the original message or some portion
thereof. When the value of the RET parameter is FULL, the full
message SHOULD be returned for any DSN which conveys notification of
delivery failure. (However, if the length of the message is greater
than some implementation-specified length, the MTA MAY return only
the headers even if the RET parameter specified FULL.) If a DSN
contains no notifications of delivery failure, the MTA SHOULD return
only the headers.
The third component must have an appropriate content-type label.
Issues concerning selection of the content-type are discussed in [8].
Moore Standards Track [Page 18]
RFC 1891 SMTP Delivery Status Notifications January 1996
7.3 Message/delivery-status fields
The message/delivery-status content-type defines a number of fields,
with general specifications for their contents. The following
requirements for any DSNs generated in response to a message received
by the SMTP protocol by a conforming SMTP server, are in addition to
the requirements defined in [5] for the message/delivery-status type.
When generating a DSN for a message which was received via the SMTP
protocol, a conforming MTA will generate the following fields of the
message/delivery-status body part:
(a) if an ENVID parameter was present on the MAIL command, an Original-
Envelope-ID field MUST be supplied, and the value associated with
the ENVID parameter must appear in that field. If the message was
received via SMTP with no ENVID parameter, the Original-Envelope-ID
field MUST NOT be supplied.
Since the ENVID parameter is encoded as xtext, but the Original-
Envelope-ID header is NOT encoded as xtext, the MTA must decode the
xtext encoding when copying the ENVID value to the Original-
Envelope-ID field.
(b) The Reporting-MTA field MUST be supplied. If Reporting MTA can
determine its fully-qualified Internet domain name, the MTA-name-
type subfield MUST be "dns", and the field MUST contain the fully-
qualified domain name of the Reporting MTA. If the fully-qualified
Internet domain name of the Reporting MTA is not known (for example,
for an SMTP server which is not directly connected to the Internet),
the Reporting-MTA field may contain any string identifying the MTA,
however, in this case the MTA-name-type subfield MUST NOT be "dns".
A MTA-name-type subfield value of "x-local-hostname" is suggested.
(c) Other per-message fields as defined in [5] MAY be supplied as
appropriate.
(d) If the ORCPT parameter was provided for this recipient, the
Original-Recipient field MUST be supplied, with its value taken from
the ORCPT parameter. If no ORCPT parameter was provided for this
recipient, the Original-Recipient field MUST NOT appear.
(e) The Final-Recipient field MUST be supplied. It MUST contain the
recipient address from the message envelope. If the message was
received via SMTP, the address-type will be "rfc822".
(f) The Action field MUST be supplied.
Moore Standards Track [Page 19]
RFC 1891 SMTP Delivery Status Notifications January 1996
(g) The Status field MUST be supplied, using a status-code from [10].
If there is no specific code which suitably describes a delivery
failure, either 4.0.0 (temporary failure), or 5.0.0 (permanent
failure) MUST be used.
(h) For DSNs resulting from attempts to relay a message to one or more
recipients via SMTP, the Remote-MTA field MUST be supplied for each
of those recipients. The mta-name-type subfields of those Remote-
MTA fields will be "dns".
(i) For DSNs resulting from attempts to relay a message to one or more
recipients via SMTP, the Diagnostic-Code MUST be supplied for each
of those recipients. The diagnostic-type subfield will be "smtp".
See section 9.2(a) of this document for a description of the "smtp"
diagnostic-code.
(j) For DSNs resulting from attempts to relay a message to one or more
recipients via SMTP, an SMTP-Remote-Recipient extension field MAY be
supplied for each recipient, which contains the address of that
recpient which was presented to the remote SMTP server.
(k) Other per-recipient fields defined in [5] MAY appear, as
appropriate.
8. Acknowledgments
The author wishes to thank Eric Allman, Harald Alvestrand, Jim
Conklin, Bryan Costales, Peter Cowen, Dave Crocker, Roger Fajman, Ned
Freed, Marko Kaittola, Steve Kille, John Klensin, Anastasios
Kotsikonas, John Gardiner Myers, Julian Onions, Jacob Palme, Marshall
Rose, Greg Vaudreuil, and Klaus Weide for their suggestions for
improvement of this document.
Moore Standards Track [Page 20]
RFC 1891 SMTP Delivery Status Notifications January 1996
9. Appendix - Type-Name Definitions
The following type names are defined for use in DSN fields generated
by conforming SMTP-based MTAs:
9.1 "rfc822" address-type
The "rfc822" address-type is to be used when reporting Internet
electronic mail address in the Original-Recipient and Final-Recipient
DSN fields.
(a) address-type name: rfc822
(b) syntax for mailbox addresses
RFC822 mailbox addresses are generally expected to be of the form
[route] addr-spec
where "route" and "addr-spec" are defined in [2], and the "domain"
portions of both "route" and "addr-spec" are fully-qualified domain
names that are registered in the DNS. However, an MTA MUST NOT
modify an address obtained from the message envelope to force it to
conform to syntax rules.
(c) If addresses of this type are not composed entirely of graphic
characters from the US-ASCII repertoire, a specification for how they
are to be encoded as graphic US-ASCII characters in a DSN Original-
Recipient or Final-Recipient DSN field.
RFC822 addresses consist entirely of graphic characters from the US-
ASCII repertoire, so no translation is necessary.
9.2 "smtp" diagnostic-type
The "smtp" diagnostic-type is to be used when reporting SMTP reply-
codes in Diagnostic-Code DSN fields.
(a) diagnostic-type name: SMTP
(b) A description of the syntax to be used for expressing diagnostic
codes of this type as graphic characters from the US-ASCII repertoire.
An SMTP diagnostic-code is of the form
*( 3*DIGIT "-" *text ) 3*DIGIT SPACE *text
Moore Standards Track [Page 21]
RFC 1891 SMTP Delivery Status Notifications January 1996
For a single-line SMTP reply to an SMTP command, the diagnostic-code
SHOULD be an exact transcription of the reply. For multi-line SMTP
replies, it is necessary to insert a SPACE before each line after
the first. For example, an SMTP reply of:
550-mailbox unavailable
550 user has moved with no forwarding address
could appear as follows in a Diagnostic-Code DSN field:
Diagnostic-Code: smtp ; 550-mailbox unavailable
550 user has moved with no forwarding address
(c) A list of valid diagnostic codes of this type and the meaning of
each code.
SMTP reply-codes are currently defined in [1], [4], and [9].
Additional codes may be defined by other RFCs.
9.3 "dns" MTA-name-type
The "dns" MTA-name-type should be used in the Reporting-MTA field.
An MTA-name of type "dns" is a fully-qualified domain name. The name
must be registered in the DNS, and the address Postmaster@{mta-name}
must be valid.
(a) MTA-name-type name: dns
(b) A description of the syntax of MTA names of this type, using BNF,
regular expressions, ASN.1, or other non-ambiguous language.
MTA names of type "dns" SHOULD be valid Internet domain names. If
such domain names are not available, a domain-literal containing the
internet protocol address is acceptable. Such domain names
generally conform to the following syntax:
domain = real-domain / domain-literal
real-domain = sub-domain *("." sub-domain)
sub-domain = atom
domain-literal = "[" 1*3DIGIT 3("." 1*3DIGIT) "]"
where "atom" and "DIGIT" are defined in [2].
Moore Standards Track [Page 22]
RFC 1891 SMTP Delivery Status Notifications January 1996
(c) If MTA names of this type do not consist entirely of graphic
characters from the US-ASCII repertoire, a specification for how an MTA
name of this type should be expressed as a sequence of graphic US-ASCII
characters.
MTA names of type "dns" consist entirely of graphic US-ASCII
characters, so no translation is needed.
10. Appendix - Example
This example traces the flow of a single message addressed to
multiple recipients. The message is sent by Alice@Pure-Heart.ORG to
Bob@Big-Bucks.COM, Carol@Ivory.EDU, Dana@Ivory.EDU,
Eric@Bombs.AF.MIL, Fred@Bombs.AF.MIL, and George@Tax-ME.GOV, with a
variety of per-recipient options. The message is successfully
delivered to Bob, Dana (via a gateway), Eric, and Fred. Delivery
fails for Carol and George.
NOTE: Formatting rules for RFCs require that no line be longer than
72 characters. Therefore, in the following examples, some SMTP
commands longer than 72 characters are printed on two lines, with the
first line ending in "\". In an actual SMTP transaction, such a
command would be sent as a single line (i.e. with no embedded CRLFs),
and without the "\" character that appears in these examples.
10.1 Submission
Alice's user agent sends the message to the SMTP server at Pure-
Heart.ORG. Note that while this example uses SMTP as a mail
submission protocol, other protocols could also be used.
<<< 220 Pure-Heart.ORG SMTP server here
>>> EHLO Pure-Heart.ORG
<<< 250-Pure-Heart.ORG
<<< 250-DSN
<<< 250-EXPN
<<< 250 SIZE
>>> MAIL FROM:<Alice@Pure-Heart.ORG> RET=HDRS ENVID=QQ314159
<<< 250 <Alice@Pure-Heart.ORG> sender ok
>>> RCPT TO:<Bob@Big-Bucks.COM> NOTIFY=SUCCESS \
ORCPT=rfc822;Bob@Big-Bucks.COM
<<< 250 <Bob@Big-Bucks.COM> recipient ok
>>> RCPT TO:<Carol@Ivory.EDU> NOTIFY=FAILURE \
ORCPT=rfc822;Carol@Ivory.EDU
<<< 250 <Carol@Ivory.EDU> recipient ok
>>> RCPT TO:<Dana@Ivory.EDU> NOTIFY=SUCCESS,FAILURE \
ORCPT=rfc822;Dana@Ivory.EDU
<<< 250 <Dana@Ivory.EDU> recipient ok
Moore Standards Track [Page 23]
RFC 1891 SMTP Delivery Status Notifications January 1996
>>> RCPT TO:<Eric@Bombs.AF.MIL> NOTIFY=FAILURE \
ORCPT=rfc822;Eric@Bombs.AF.MIL
<<< 250 <Eric@Bombs.AF.MIL> recipient ok
>>> RCPT TO:<Fred@Bombs.AF.MIL> NOTIFY=NEVER
<<< 250 <Fred@Bombs.AF.MIL> recipient ok
>>> RCPT TO:<George@Tax-ME.GOV> NOTIFY=FAILURE \
ORCPT=rfc822;George@Tax-ME.GOV
<<< 250 <George@Tax-ME.GOV> recipient ok
>>> DATA
<<< 354 okay, send message
>>> (message goes here)
>>> .
<<< 250 message accepted
>>> QUIT
<<< 221 goodbye
10.2 Relay to Big-Bucks.COM
The SMTP at Pure-Heart.ORG then relays the message to Big-Bucks.COM.
(For the purpose of this example, mail.Big-Bucks.COM is the primary
mail exchanger for Big-Bucks.COM).
<<< 220 mail.Big-Bucks.COM says hello
>>> EHLO Pure-Heart.ORG
<<< 250-mail.Big-Bucks.COM
<<< 250 DSN
>>> MAIL FROM:<Alice@Pure-Heart.ORG> RET=HDRS ENVID=QQ314159
<<< 250 sender okay
>>> RCPT TO:<Bob@Big-Bucks.COM> NOTIFY=SUCCESS \
ORCPT=rfc822;Bob@Big-Bucks.COM
<<< 250 recipient okay
>>> DATA
<<< 354 send message
>>> (message goes here)
>>> .
<<< 250 message received
>>> QUIT
<<< 221 bcnu
10.3 Relay to Ivory.EDU
The SMTP at Pure-Heart.ORG relays the message to Ivory.EDU, which (as
it happens) is a gateway to a LAN-based mail system that accepts SMTP
mail and supports the DSN extension.
<<< 220 Ivory.EDU gateway to FooMail(tm) here
>>> EHLO Pure-Heart.ORG
<<< 250-Ivory.EDU
Moore Standards Track [Page 24]
RFC 1891 SMTP Delivery Status Notifications January 1996
<<< 250 DSN
>>> MAIL FROM:<Alice@Pure-Heart.ORG> RET=HDRS ENVID=QQ314159
<<< 250 ok
>>> RCPT TO:<Carol@Ivory.EDU> NOTIFY=FAILURE \
ORCPT=rfc822;Carol@Ivory.EDU
<<< 550 error - no such recipient
>>> RCPT TO:<Dana@Ivory.EDU> NOTIFY=SUCCESS,FAILURE \
ORCPT=rfc822;Dana@Ivory.EDU
<<< 250 recipient ok
>>> DATA
<<< 354 send message, end with '.'
>>> (message goes here)
>>> .
<<< 250 message received
>>> QUIT
<<< 221 bye
Note that since the Ivory.EDU refused to accept mail for
Carol@Ivory.EDU, and the sender specified NOTIFY=FAILURE, the
sender-SMTP (in this case Pure-Heart.ORG) must generate a DSN.
10.4 Relay to Bombs.AF.MIL
The SMTP at Pure-Heart.ORG relays the message to Bombs.AF.MIL, which
does not support the SMTP extension. Because the sender specified
NOTIFY=NEVER for recipient Fred@Bombs.AF.MIL, the SMTP at Pure-
Heart.ORG chooses to send the message for that recipient in a
separate transaction with a reverse-path of <>.
<<< 220-Bombs.AF.MIL reporting for duty.
<<< 220 Electronic mail is to be used for official business only.
>>> EHLO Pure-Heart.ORG
<<< 502 command not implemented
>>> RSET
<<< 250 reset
>>> HELO Pure-Heart.ORG
<<< 250 Bombs.AF.MIL
>>> MAIL FROM:<Alice@Pure-Heart.ORG>
<<< 250 ok
>>> RCPT TO:<Eric@Bombs.AF.MIL>
<<< 250 ok
>>> DATA
<<< 354 send message
>>> (message goes here)
>>> .
<<< 250 message accepted
>>> MAIL FROM:<>
<<< 250 ok
Moore Standards Track [Page 25]
RFC 1891 SMTP Delivery Status Notifications January 1996
>>> RCPT TO:<Fred@Bombs.AF.MIL>
<<< 250 ok
>>> DATA
<<< 354 send message
>>> (message goes here)
>>> .
<<< 250 message accepted
>>> QUIT
<<< 221 Bombs.AF.MIL closing connection
10.5 Forward from George@Tax-ME.GOV to Sam@Boondoggle.GOV
The SMTP at Pure-Heart.ORG relays the message to Tax-ME.GOV. (this
step is not shown). MTA Tax-ME.GOV then forwards the message to
Sam@Boondoggle.GOV (shown below). Both Tax-ME.GOV and Pure-Heart.ORG
support the SMTP DSN extension. Note that RET, ENVID, and ORCPT all
retain their original values.
<<< 220 BoonDoggle.GOV says hello
>>> EHLO Pure-Heart.ORG
<<< 250-mail.Big-Bucks.COM
<<< 250 DSN
>>> MAIL FROM:<Alice@Pure-Heart.ORG> RET=HDRS ENVID=QQ314159
<<< 250 sender okay
>>> RCPT TO:<Sam@Boondoggle.GOV> NOTIFY=SUCCESS \
ORCPT=rfc822;George@Tax-ME.GOV
<<< 250 recipient okay
>>> DATA
<<< 354 send message
>>> (message goes here)
>>> .
<<< 250 message received
>>> QUIT
<<< 221 bcnu
Moore Standards Track [Page 26]
RFC 1891 SMTP Delivery Status Notifications January 1996
10.6 "Delivered" DSN for Bob@Big-Bucks.COM
MTA mail.Big-Bucks.COM successfully delivers the message to Bob@Big-
Bucks.COM. Because the sender specified NOTIFY=SUCCESS, mail.Big-
Bucks.COM issues the following DSN, and sends it to Alice@Pure-
Heart.ORG.
To: Alice@Pure-Heart.ORG
From: postmaster@mail.Big-Bucks.COM
Subject: Delivery Notification (success) for Bob@Big-Bucks.COM
Content-Type: multipart/report; report-type=delivery-status;
boundary=abcde
MIME-Version: 1.0
--abcde
Content-type: text/plain; charset=us-ascii
Your message (id QQ314159) was successfully delivered to
Bob@Big-Bucks.COM.
--abcde
Content-type: message/delivery-status
Reporting-MTA: dns; mail.Big-Bucks.COM
Original-Envelope-ID: QQ314159
Original-Recipient: rfc822;Bob@Big-Bucks.COM
Final-Recipient: rfc822;Bob@Big-Bucks.COM
Action: delivered
Status: 2.0.0
--abcde
Content-type: message/rfc822
(headers of returned message go here)
--abcde--
Moore Standards Track [Page 27]
RFC 1891 SMTP Delivery Status Notifications January 1996
10.7 Failed DSN for Carol@Ivory.EDU
Because delivery to Carol failed and the sender specified
NOTIFY=FAILURE for Carol@Ivory.EDU, MTA Pure-Heart.ORG (the SMTP
client to which the failure was reported via SMTP) issues the
following DSN.
To: Alice@Pure-Heart.ORG
From: postmaster@Pure-Heart.ORG
Subject: Delivery Notification (failure) for Carol@Ivory.EDU
Content-Type: multipart/report; report-type=delivery-status;
boundary=bcdef
MIME-Version: 1.0
--bcdef
Content-type: text/plain; charset=us-ascii
Your message (id QQ314159) could not be delivered to
Carol@Ivory.EDU.
A transcript of the session follows:
(while talking to Ivory.EDU)
>>> RCPT TO:<Carol@Ivory.EDU> NOTIFY=FAILURE
<<< 550 error - no such recipient
--bcdef
Content-type: message/delivery-status
Reporting-MTA: dns; Pure-Heart.ORG
Original-Envelope-ID: QQ314159
Original-Recipient: rfc822;Carol@Ivory.EDU
Final-Recipient: rfc822;Carol@Ivory.EDU
SMTP-Remote-Recipient: Carol@Ivory.EDU
Diagnostic-Code: smtp; 550 error - no such recipient
Action: failed
Status: 5.0.0
--bcdef
Content-type: message/rfc822
(headers of returned message go here)
--bcdef--
Moore Standards Track [Page 28]
RFC 1891 SMTP Delivery Status Notifications January 1996
10.8 Relayed DSN For Dana@Ivory.EDU
Although the mail gateway Ivory.EDU supports the DSN SMTP extension,
the LAN mail system attached to its other side does not generate
positive delivery confirmations. So Ivory.EDU issues a "relayed"
DSN:
To: Alice@Pure-Heart.ORG
From: postmaster@Ivory.EDU
Subject: mail relayed for Dana@Ivory.EDU
Content-Type: multipart/report; report-type=delivery-status;
boundary=cdefg
MIME-Version: 1.0
--cdefg
Content-type: text/plain; charset=us-ascii
Your message (addressed to Dana@Ivory.EDU) was successfully
relayed to:
ymail!Dana
by the FooMail gateway at Ivory.EDU.
Unfortunately, the remote mail system does not support
confirmation of actual delivery. Unless delivery to ymail!Dana
fails, this will be the only delivery status notification sent.
--cdefg
Content-type: message/delivery-status
Reporting-MTA: dns; Ivory.EDU
Original-Envelope-ID: QQ314159
Original-Recipient: rfc822;Dana@Ivory.EDU
Final-Recipient: rfc822;Dana@Ivory.EDU
Action: relayed
Status: 2.0.0
--cdefg
Content-type: message/rfc822
(headers of returned message go here)
--cdefg--
Moore Standards Track [Page 29]
RFC 1891 SMTP Delivery Status Notifications January 1996
10.9 Failure notification for Sam@Boondoggle.GOV
The message originally addressed to George@Tax-ME.GOV was forwarded
to Sam@Boondoggle.GOV, but the MTA for Boondoggle.GOV was unable to
deliver the message due to a lack of disk space in Sam's mailbox.
After trying for several days, Boondoggle.GOV returned the following
DSN:
To: Alice@BigHeart.ORG
From: Postmaster@Boondoggle.GOV
Subject: Delivery failure for Sam@Boondoggle.GOV
Content-Type: multipart/report; report-type=delivery-status;
boundary=defgh
MIME-Version: 1.0
--defgh
Your message, originally addressed to George@Tax-ME.GOV, and forwarded
from there to Sam@Boondoggle.GOV could not be delivered, for the
following reason:
write error to mailbox, disk quota exceeded
--defgh
Content-type: message/delivery-status
Reporting-MTA: Boondoggle.GOV
Original-Envelope-ID: QQ314159
Original-Recipient: rfc822;George@Tax-ME.GOV
Final-Recipient: rfc822;Sam@Boondoggle.GOV
Action: failed
Status: 4.2.2 (disk quota exceeded)
--defgh
Content-type: message/rfc822
(headers of returned message go here)
--defgh--
Moore Standards Track [Page 30]
RFC 1891 SMTP Delivery Status Notifications January 1996
11. References
[1] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821,
USC/Information Sciences Institute, August 1982.
[2] Crocker, D., "Standard for the Format of ARPA Internet Text
Messages", STD 11, RFC 822, UDEL, August 1982.
[3] Westine, A., and J. Postel, "Problems with the Maintenance of
Large Mailing Lists.", RFC 1211, USC/Information Sciences
Institute, March 1991.
[4] Klensin, J., Freed, N., Rose, M., Stefferud, E., and D. Crocker,
"SMTP Service Extensions", RFC 1651, MCI, Innosoft, Dover Beach
Consulting, Inc., Network Management Associates, Inc., Silicon
Graphics, Inc., July 1994.
[5] Moore, K., and G. Vaudreuil, "An Extensible Message Format for
Delivery Status Notifications", RFC 1894, University of Tennessee,
Octel Network Services, January 1996.
[6] Crispin, M., "Internet Message Access Protocol - Version 4", RFC
1730, University of Washington, 20 December 1994.
[7] Myers, J., and M. Rose, "Post Office Protocol - Version 3", RFC
1725, Carnegie Mellon, Dover Beach Consulting, November 1994.
[8] Vaudreuil, G., "The Multipart/Report Content Type for the
Reporting of Mail System Administrative Messages", RFC 1892, Octel
Network Services, January 1996.
[9] Braden, R., Editor, "Requirements for Internet Hosts - Application
and Support", STD 3, RFC 1123, IETF, October 1989.
[10] Vaudreuil, G., "Enhanced Mail System Status Codes", RFC 1893,
Octel Network Services, January 1996.
12. Author's Address
Keith Moore
University of Tennessee
107 Ayres Hall
Knoxville, TN 37996-1301
USA
EMail: moore@cs.utk.edu
Moore Standards Track [Page 31]
Network Working Group G. Vaudreuil
Request for Comments: 1892 Octel Network Services
Category: Standards Track January 1996
The Multipart/Report Content Type
for the Reporting of
Mail System Administrative Messages
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
1. The Multipart/Report MIME content-type
The Multipart/Report MIME content-type is a general "family" or
"container" type for electronic mail reports of any kind. Although
this memo defines only the use of the Multipart/Report content-type
with respect to delivery status reports, mail processing programs
will benefit if a single content-type is used to for all kinds of
reports.
The Multipart/Report content-type is defined as follows:
MIME type name: multipart
MIME subtype name: report
Required parameters: boundary, report-type
Optional parameters: none
Encoding considerations: 7bit should always be adequate
Security considerations: see section 4 of this memo.
The syntax of Multipart/Report is identical to the Multipart/Mixed
content type defined in [MIME]. When used to send a report, the
Multipart/Report content-type must be the top-level MIME content type
for any report message. The report-type parameter identifies the
type of report. The parameter is the MIME content sub-type of the
second body part of the Multipart/Report.
User agents and gateways must be able to automatically determine
that a message is a mail system report and should be processed as
such. Placing the Multipart/Report as the outermost content
provides a mechanism whereby an auto-processor may detect through
parsing the RFC 822 headers that the message is a report.
Vaudreuil Standards Track [Page 1]
RFC 1892 Multipart/Report January 1996
The Multipart/Report content-type contains either two or three sub-
parts, in the following order:
(1) [required] The first body part contains human readable message.
The purpose of this message is to provide an easily-understood
description of the condition(s) that caused the report to be
generated, for a human reader who may not have an user agent
capable of interpreting the second section of the
Multipart/Report.
The text in the first section may be in any MIME standards-track
content-type, charset, or language. Where a description of the
error is desired in several languages or several media, a
Multipart/Alternative construct may be used.
This body part may also be used to send detailed information
that cannot be easily formatted into a Message/Report body part.
(2) [required] A machine parsable body part containing an account
of the reported message handling event. The purpose of this body
part is to provide a machine-readable description of the
condition(s) which caused the report to be generated, along with
details not present in the first body part that may be useful to
human experts. An initial body part, Message/delivery-status is
defined in [DSN]
(3) [optional] A body part containing the returned message or a
portion thereof. This information may be useful to aid human
experts in diagnosing problems. (Although it may also be useful
to allow the sender to identify the message which the report was
issued, it is hoped that the envelope-id and original-recipient-
address returned in the Message/Report body part will replace
the traditional use of the returned content for this purpose.)
Return of content may be wasteful of network bandwidth and a variety
of implementation strategies can be used. Generally the sender
should choose the appropriate strategy and inform the recipient of
the required level of returned content required. In the absence of
an explicit request for level of return of content such as that
provided in [DRPT], the agent which generated the delivery service
report should return the full message content.
When data not encoded in 7 bits is to be returned, and the return
path is not guaranteed to be 8-bit capable, two options are
available. The origional message MAY be reencoded into a legal 7 bit
MIME message or the Text/RFC822-Headers content-type MAY be used to
return only the origional message headers.
Vaudreuil Standards Track [Page 2]
RFC 1892 Multipart/Report January 1996
2. The Text/RFC822-Headers MIME content-type
The Text/RFC822-Headers MIME content-type provides a mechanism to
label and return only the RFC 822 headers of a failed message. These
headers are not the complete message and should not be returned as a
Message/RFC822. The returned headers are useful for identifying the
failed message and for diagnostics based on the received: lines.
The Text/RFC822-Headers content-type is defined as follows:
MIME type name: Text
MIME subtype name: RFC822-Headers
Required parameters: None
Optional parameters: none
Encoding considerations: 7 bit is sufficient for normal RFC822
headers, however, if the headers are broken and require
encoding, they may be encoded in quoted-printable.
Security considerations: see section 4 of this memo.
The Text/RFC822-headers body part should contain all the RFC822
header lines from the message which caused the report. The RFC822
headers include all lines prior to the blank line in the message.
They include the MIME-Version and MIME Content- headers.
3. References
[DSN] Moore, K., and G. Vaudreuil, "An Extensible Message Format for
Delivery Status Notifications", RFC 1894, University of
Tennessee, Octel Network Services, January 1996.
[RFC822] Crocker, D., "Standard for the format of ARPA Internet Text
Messages", STD 11, RFC 822, UDEL, August 1982.
[MIME] Borenstein, N., and N. Freed, "Multipurpose Internet Mail
Extensions", RFC 1521, Bellcore, Innosoft, June 1992.
[DRPT] Moore, K., "SMTP Service Extension for Delivery Status
Notifications", RFC 1891, University of Tennessee, January 1996.
4. Security Considerations
Automated use of report types without authentication presents several
security issues. Forging negative reports presents the opportunity
for denial-of-service attacks when the reports are used for automated
maintenance of directories or mailing lists. Forging positive
reports may cause the sender to incorrectly believe a message was
delivered when it was not.
Vaudreuil Standards Track [Page 3]
RFC 1892 Multipart/Report January 1996
5. Author's Address
Gregory M. Vaudreuil
Octel Network Services
17060 Dallas Parkway
Dallas, TX 75248-1905
Phone: +1-214-733-2722
EMail: Greg.Vaudreuil@Octel.com
Vaudreuil Standards Track [Page 4]
Network Working Group G. Vaudreuil
Request for Comments: 1893 Octel Network Services
Category: Standards Track January 1996
Enhanced Mail System Status Codes
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
1. Overview
There currently is not a standard mechanism for the reporting of mail
system errors except for the limited set offered by SMTP and the
system specific text descriptions sent in mail messages. There is a
pressing need for a rich machine readable status code for use in
delivery status notifications [DSN]. This document proposes a new
set of status codes for this purpose.
SMTP [SMTP] error codes have historically been used for reporting
mail system errors. Because of limitations in the SMTP code design,
these are not suitable for use in delivery status notifications.
SMTP provides about 12 useful codes for delivery reports. The
majority of the codes are protocol specific response codes such as
the 354 response to the SMTP data command. Each of the 12 useful
codes are each overloaded to indicate several error conditions each.
SMTP suffers some scars from history, most notably the unfortunate
damage to the reply code extension mechanism by uncontrolled use.
This proposal facilitates future extensibility by requiring the
client to interpret unknown error codes according to the theory of
codes while requiring servers to register new response codes.
The SMTP theory of reply codes partitioned in the number space such a
manner that the remaining available codes will not provide the space
needed. The most critical example is the existence of only 5
remaining codes for mail system errors. The mail system
classification includes both host and mailbox error conditions. The
remaining third digit space would be completely consumed as needed to
indicate MIME and media conversion errors and security system errors.
A revision to the SMTP theory of reply codes to better distribute the
error conditions in the number space will necessarily be incompatible
with SMTP. Further, consumption of the remaining reply-code number
Vaudreuil Standards Track [Page 1]
RFC 1893 Mail System Status Codes January 1996
space for delivery notification reporting will reduce the available
codes for new ESMTP extensions.
The following proposal is based on the SMTP theory of reply codes.
It adopts the success, permanent error, and transient error semantics
of the first value, with a further description and classification in
the second. This proposal re-distributes the classifications to
better distribute the error conditions, such as separating mailbox
from host errors.
2. Status Codes
This document defines a new set of status codes to report mail system
conditions. These status codes are intended to be used for media and
language independent status reporting. They are not intended for
system specific diagnostics.
The syntax of the new status codes is defined as:
status-code = class "." subject "." detail
class = "2"/"4"/"5"
subject = 1*3digit
detail = 1*3digit
White-space characters and comments are NOT allowed within a status-
code. Each numeric sub-code within the status-code MUST be expressed
without leading zero digits.
Status codes consist of three numerical fields separated by ".". The
first sub-code indicates whether the delivery attempt was successful.
The second sub-code indicates the probable source of any delivery
anomalies, and the third sub-code indicates a precise error
condition.
The codes space defined is intended to be extensible only by
standards track documents. Mail system specific status codes should
be mapped as close as possible to the standard status codes. Servers
should send only defined, registered status codes. System specific
errors and diagnostics should be carried by means other than status
codes.
New subject and detail codes will be added over time. Because the
number space is large, it is not intended that published status codes
will ever be redefined or eliminated. Clients should preserve the
extensibility of the code space by reporting the general error
described in the subject sub-code when the specific detail is
unrecognized.
Vaudreuil Standards Track [Page 2]
RFC 1893 Mail System Status Codes January 1996
The class sub-code provides a broad classification of the status.
The enumerated values the class are defined as:
2.X.X Success
Success specifies that the DSN is reporting a positive delivery
action. Detail sub-codes may provide notification of
transformations required for delivery.
4.X.X Persistent Transient Failure
A persistent transient failure is one in which the message as
sent is valid, but some temporary event prevents the successful
sending of the message. Sending in the future may be successful.
5.X.X Permanent Failure
A permanent failure is one which is not likely to be resolved by
resending the message in the current form. Some change to the
message or the destination must be made for successful delivery.
A client must recognize and report class sub-code even where
subsequent subject sub-codes are unrecognized.
The subject sub-code classifies the status. This value applies to
each of the three classifications. The subject sub-code, if
recognized, must be reported even if the additional detail provided
by the detail sub-code is not recognized. The enumerated values for
the subject sub-code are:
X.0.X Other or Undefined Status
There is no additional subject information available.
X.1.X Addressing Status
The address status reports on the originator or destination
address. It may include address syntax or validity. These
errors can generally be corrected by the sender and retried.
X.2.X Mailbox Status
Mailbox status indicates that something having to do with the
mailbox has cause this DSN. Mailbox issues are assumed to be
under the general control of the recipient.
Vaudreuil Standards Track [Page 3]
RFC 1893 Mail System Status Codes January 1996
X.3.X Mail System Status
Mail system status indicates that something having to do
with the destination system has caused this DSN. System
issues are assumed to be under the general control of the
destination system administrator.
X.4.X Network and Routing Status
The networking or routing codes report status about the
delivery system itself. These system components include any
necessary infrastructure such as directory and routing
services. Network issues are assumed to be under the
control of the destination or intermediate system
administrator.
X.5.X Mail Delivery Protocol Status
The mail delivery protocol status codes report failures
involving the message delivery protocol. These failures
include the full range of problems resulting from
implementation errors or an unreliable connection. Mail
delivery protocol issues may be controlled by many parties
including the originating system, destination system, or
intermediate system administrators.
X.6.X Message Content or Media Status
The message content or media status codes report failures
involving the content of the message. These codes report
failures due to translation, transcoding, or otherwise
unsupported message media. Message content or media issues
are under the control of both the sender and the receiver,
both of whom must support a common set of supported
content-types.
X.7.X Security or Policy Status
The security or policy status codes report failures
involving policies such as per-recipient or per-host
filtering and cryptographic operations. Security and policy
status issues are assumed to be under the control of either
or both the sender and recipient. Both the sender and
recipient must permit the exchange of messages and arrange
the exchange of necessary keys and certificates for
cryptographic operations.
Vaudreuil Standards Track [Page 4]
RFC 1893 Mail System Status Codes January 1996
3. Enumerated Status Codes
The following section defines and describes the detail sub-code. The
detail value provides more information about the status and is
defined relative to the subject of the status.
3.1 Other or Undefined Status
X.0.0 Other undefined Status
Other undefined status is the only undefined error code. It
should be used for all errors for which only the class of the
error is known.
3.2 Address Status
X.1.0 Other address status
Something about the address specified in the message caused
this DSN.
X.1.1 Bad destination mailbox address
The mailbox specified in the address does not exist. For
Internet mail names, this means the address portion to the
left of the "@" sign is invalid. This code is only useful
for permanent failures.
X.1.2 Bad destination system address
The destination system specified in the address does not
exist or is incapable of accepting mail. For Internet mail
names, this means the address portion to the right of the
"@" is invalid for mail. This codes is only useful for
permanent failures.
X.1.3 Bad destination mailbox address syntax
The destination address was syntactically invalid. This can
apply to any field in the address. This code is only useful
for permanent failures.
X.1.4 Destination mailbox address ambiguous
The mailbox address as specified matches one or more
recipients on the destination system. This may result if a
heuristic address mapping algorithm is used to map the
specified address to a local mailbox name.
Vaudreuil Standards Track [Page 5]
RFC 1893 Mail System Status Codes January 1996
X.1.5 Destination address valid
This mailbox address as specified was valid. This status
code should be used for positive delivery reports.
X.1.6 Destination mailbox has moved, No forwarding address
The mailbox address provided was at one time valid, but mail
is no longer being accepted for that address. This code is
only useful for permanent failures.
X.1.7 Bad sender's mailbox address syntax
The sender's address was syntactically invalid. This can
apply to any field in the address.
X.1.8 Bad sender's system address
The sender's system specified in the address does not exist
or is incapable of accepting return mail. For domain names,
this means the address portion to the right of the "@" is
invalid for mail.
3.3 Mailbox Status
X.2.0 Other or undefined mailbox status
The mailbox exists, but something about the destination
mailbox has caused the sending of this DSN.
X.2.1 Mailbox disabled, not accepting messages
The mailbox exists, but is not accepting messages. This may
be a permanent error if the mailbox will never be re-enabled
or a transient error if the mailbox is only temporarily
disabled.
X.2.2 Mailbox full
The mailbox is full because the user has exceeded a
per-mailbox administrative quota or physical capacity. The
general semantics implies that the recipient can delete
messages to make more space available. This code should be
used as a persistent transient failure.
Vaudreuil Standards Track [Page 6]
RFC 1893 Mail System Status Codes January 1996
X.2.3 Message length exceeds administrative limit
A per-mailbox administrative message length limit has been
exceeded. This status code should be used when the
per-mailbox message length limit is less than the general
system limit. This code should be used as a permanent
failure.
X.2.4 Mailing list expansion problem
The mailbox is a mailing list address and the mailing list
was unable to be expanded. This code may represent a
permanent failure or a persistent transient failure.
3.4 Mail system status
X.3.0 Other or undefined mail system status
The destination system exists and normally accepts mail, but
something about the system has caused the generation of this
DSN.
X.3.1 Mail system full
Mail system storage has been exceeded. The general
semantics imply that the individual recipient may not be
able to delete material to make room for additional
messages. This is useful only as a persistent transient
error.
X.3.2 System not accepting network messages
The host on which the mailbox is resident is not accepting
messages. Examples of such conditions include an immanent
shutdown, excessive load, or system maintenance. This is
useful for both permanent and permanent transient errors.
X.3.3 System not capable of selected features
Selected features specified for the message are not
supported by the destination system. This can occur in
gateways when features from one domain cannot be mapped onto
the supported feature in another.
Vaudreuil Standards Track [Page 7]
RFC 1893 Mail System Status Codes January 1996
X.3.4 Message too big for system
The message is larger than per-message size limit. This
limit may either be for physical or administrative reasons.
This is useful only as a permanent error.
X.3.5 System incorrectly configured
The system is not configured in a manner which will permit
it to accept this message.
3.5 Network and Routing Status
X.4.0 Other or undefined network or routing status
Something went wrong with the networking, but it is not
clear what the problem is, or the problem cannot be well
expressed with any of the other provided detail codes.
X.4.1 No answer from host
The outbound connection attempt was not answered, either
because the remote system was busy, or otherwise unable to
take a call. This is useful only as a persistent transient
error.
X.4.2 Bad connection
The outbound connection was established, but was otherwise
unable to complete the message transaction, either because
of time-out, or inadequate connection quality. This is
useful only as a persistent transient error.
X.4.3 Directory server failure
The network system was unable to forward the message,
because a directory server was unavailable. This is useful
only as a persistent transient error.
The inability to connect to an Internet DNS server is one
example of the directory server failure error.
X.4.4 Unable to route
The mail system was unable to determine the next hop for the
message because the necessary routing information was
unavailable from the directory server. This is useful for
both permanent and persistent transient errors.
Vaudreuil Standards Track [Page 8]
RFC 1893 Mail System Status Codes January 1996
A DNS lookup returning only an SOA (Start of Administration)
record for a domain name is one example of the unable to
route error.
X.4.5 Mail system congestion
The mail system was unable to deliver the message because
the mail system was congested. This is useful only as a
persistent transient error.
X.4.6 Routing loop detected
A routing loop caused the message to be forwarded too many
times, either because of incorrect routing tables or a user
forwarding loop. This is useful only as a persistent
transient error.
X.4.7 Delivery time expired
The message was considered too old by the rejecting system,
either because it remained on that host too long or because
the time-to-live value specified by the sender of the
message was exceeded. If possible, the code for the actual
problem found when delivery was attempted should be returned
rather than this code. This is useful only as a persistent
transient error.
3.6 Mail Delivery Protocol Status
X.5.0 Other or undefined protocol status
Something was wrong with the protocol necessary to deliver
the message to the next hop and the problem cannot be well
expressed with any of the other provided detail codes.
X.5.1 Invalid command
A mail transaction protocol command was issued which was
either out of sequence or unsupported. This is useful only
as a permanent error.
X.5.2 Syntax error
A mail transaction protocol command was issued which could
not be interpreted, either because the syntax was wrong or
the command is unrecognized. This is useful only as a
permanent error.
Vaudreuil Standards Track [Page 9]
RFC 1893 Mail System Status Codes January 1996
X.5.3 Too many recipients
More recipients were specified for the message than could
have been delivered by the protocol. This error should
normally result in the segmentation of the message into two,
the remainder of the recipients to be delivered on a
subsequent delivery attempt. It is included in this list in
the event that such segmentation is not possible.
X.5.4 Invalid command arguments
A valid mail transaction protocol command was issued with
invalid arguments, either because the arguments were out of
range or represented unrecognized features. This is useful
only as a permanent error.
X.5.5 Wrong protocol version
A protocol version mis-match existed which could not be
automatically resolved by the communicating parties.
3.7 Message Content or Message Media Status
X.6.0 Other or undefined media error
Something about the content of a message caused it to be
considered undeliverable and the problem cannot be well
expressed with any of the other provided detail codes.
X.6.1 Media not supported
The media of the message is not supported by either the
delivery protocol or the next system in the forwarding path.
This is useful only as a permanent error.
X.6.2 Conversion required and prohibited
The content of the message must be converted before it can
be delivered and such conversion is not permitted. Such
prohibitions may be the expression of the sender in the
message itself or the policy of the sending host.
X.6.3 Conversion required but not supported
The message content must be converted to be forwarded but
such conversion is not possible or is not practical by a
host in the forwarding path. This condition may result when
an ESMTP gateway supports 8bit transport but is not able to
Vaudreuil Standards Track [Page 10]
RFC 1893 Mail System Status Codes January 1996
downgrade the message to 7 bit as required for the next hop.
X.6.4 Conversion with loss performed
This is a warning sent to the sender when message delivery
was successfully but when the delivery required a conversion
in which some data was lost. This may also be a permanant
error if the sender has indicated that conversion with loss
is prohibited for the message.
X.6.5 Conversion Failed
A conversion was required but was unsuccessful. This may be
useful as a permanent or persistent temporary notification.
3.8 Security or Policy Status
X.7.0 Other or undefined security status
Something related to security caused the message to be
returned, and the problem cannot be well expressed with any
of the other provided detail codes. This status code may
also be used when the condition cannot be further described
because of security policies in force.
X.7.1 Delivery not authorized, message refused
The sender is not authorized to send to the destination.
This can be the result of per-host or per-recipient
filtering. This memo does not discuss the merits of any
such filtering, but provides a mechanism to report such.
This is useful only as a permanent error.
X.7.2 Mailing list expansion prohibited
The sender is not authorized to send a message to the
intended mailing list. This is useful only as a permanent
error.
X.7.3 Security conversion required but not possible
A conversion from one secure messaging protocol to another
was required for delivery and such conversion was not
possible. This is useful only as a permanent error.
Vaudreuil Standards Track [Page 11]
RFC 1893 Mail System Status Codes January 1996
X.7.4 Security features not supported
A message contained security features such as secure
authentication which could not be supported on the delivery
protocol. This is useful only as a permanent error.
X.7.5 Cryptographic failure
A transport system otherwise authorized to validate or
decrypt a message in transport was unable to do so because
necessary information such as key was not available or such
information was invalid.
X.7.6 Cryptographic algorithm not supported
A transport system otherwise authorized to validate or
decrypt a message was unable to do so because the necessary
algorithm was not supported.
X.7.7 Message integrity failure
A transport system otherwise authorized to validate a
message was unable to do so because the message was
corrupted or altered. This may be useful as a permanent,
transient persistent, or successful delivery code.
4. References
[SMTP] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821,
USC/Information Sciences Institute, August 1982.
[DSN] Moore, K., and G. Vaudreuil, "An Extensible Message Format for
Delivery Status Notifications", RFC 1894, University of
Tennessee, Octel Network Services, January 1996.
5. Security Considerations
This document describes a status code system with increased
precision. Use of these status codes may disclose additional
information about how an internal mail system is implemented beyond
that currently available.
6. Acknowledgments
The author wishes to offer special thanks to Harald Alvestrand, Marko
Kaittola, and Keith Moore for their extensive review and constructive
suggestions.
Vaudreuil Standards Track [Page 12]
RFC 1893 Mail System Status Codes January 1996
7. Author's Address
Gregory M. Vaudreuil
Octel Network Services
17060 Dallas Parkway
Suite 214
Dallas, TX 75248-1905
Voice/Fax: +1-214-733-2722
EMail: Greg.Vaudreuil@Octel.com
Vaudreuil Standards Track [Page 13]
RFC 1893 Mail System Status Codes January 1996
8. Appendix - Collected Status Codes
X.1.0 Other address status
X.1.1 Bad destination mailbox address
X.1.2 Bad destination system address
X.1.3 Bad destination mailbox address syntax
X.1.4 Destination mailbox address ambiguous
X.1.5 Destination mailbox address valid
X.1.6 Mailbox has moved
X.1.7 Bad sender's mailbox address syntax
X.1.8 Bad sender's system address
X.2.0 Other or undefined mailbox status
X.2.1 Mailbox disabled, not accepting messages
X.2.2 Mailbox full
X.2.3 Message length exceeds administrative limit.
X.2.4 Mailing list expansion problem
X.3.0 Other or undefined mail system status
X.3.1 Mail system full
X.3.2 System not accepting network messages
X.3.3 System not capable of selected features
X.3.4 Message too big for system
X.4.0 Other or undefined network or routing status
X.4.1 No answer from host
X.4.2 Bad connection
X.4.3 Routing server failure
X.4.4 Unable to route
X.4.5 Network congestion
X.4.6 Routing loop detected
X.4.7 Delivery time expired
X.5.0 Other or undefined protocol status
X.5.1 Invalid command
X.5.2 Syntax error
X.5.3 Too many recipients
X.5.4 Invalid command arguments
X.5.5 Wrong protocol version
X.6.0 Other or undefined media error
X.6.1 Media not supported
X.6.2 Conversion required and prohibited
X.6.3 Conversion required but not supported
X.6.4 Conversion with loss performed
X.6.5 Conversion failed
Vaudreuil Standards Track [Page 14]
RFC 1893 Mail System Status Codes January 1996
X.7.0 Other or undefined security status
X.7.1 Delivery not authorized, message refused
X.7.2 Mailing list expansion prohibited
X.7.3 Security conversion required but not possible
X.7.4 Security features not supported
X.7.5 Cryptographic failure
X.7.6 Cryptographic algorithm not supported
X.7.7 Message integrity failure
Vaudreuil Standards Track [Page 15]
Network Working Group K. Moore
Request for Comments: 1894 University of Tennessee
Category: Standards Track G. Vaudreuil
Octel Network Services
January 1996
An Extensible Message Format for Delivery Status Notifications
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Abstract
This memo defines a MIME content-type that may be used by a message
transfer agent (MTA) or electronic mail gateway to report the result
of an attempt to deliver a message to one or more recipients. This
content-type is intended as a machine-processable replacement for the
various types of delivery status notifications currently used in
Internet electronic mail.
Because many messages are sent between the Internet and other
messaging systems (such as X.400 or the so-called "LAN-based"
systems), the DSN protocol is designed to be useful in a multi-
protocol messaging environment. To this end, the protocol described
in this memo provides for the carriage of "foreign" addresses and
error codes, in addition to those normally used in Internet mail.
Additional attributes may also be defined to support "tunneling" of
foreign notifications through Internet mail.
Any questions, comments, and reports of defects or ambiguities in
this specification may be sent to the mailing list for the NOTARY
working group of the IETF, using the address
<notifications@cs.utk.edu>. Requests to subscribe to the mailing
list should be addressed to <notifications-request@cs.utk.edu>.
Implementors of this specification are encouraged to subscribe to the
mailing list, so that they will quickly be informed of any problems
which might hinder interoperability.
NOTE: This document is a Proposed Standard. If and when this
protocol is submitted for Draft Standard status, any normative text
(phrases containing SHOULD, SHOULD NOT, MUST, MUST NOT, or MAY) in
this document will be re-evaluated in light of implementation
Moore & Vaudreuil Standards Track [Page 1]
RFC 1894 Delivery Status Notifications January 1996
experience, and are thus subject to change.
1. Introduction
This memo defines a MIME [1] content-type for delivery status
notifications (DSNs). A DSN can be used to notify the sender of a
message of any of several conditions: failed delivery, delayed
delivery, successful delivery, or the gatewaying of a message into an
environment that may not support DSNs. The "message/delivery-status"
content-type defined herein is intended for use within the framework
of the "multipart/report" content type defined in [2].
This memo defines only the format of the notifications. An extension
to the Simple Message Transfer Protocol (SMTP) [3] to fully support
such notifications is the subject of a separate memo [4].
1.1 Purposes
The DSNs defined in this memo are expected to serve several purposes:
(a) Inform human beings of the status of message delivery processing, as
well as the reasons for any delivery problems or outright failures,
in a manner which is largely independent of human language;
(b) Allow mail user agents to keep track of the delivery status of
messages sent, by associating returned DSNs with earlier message
transmissions;
(c) Allow mailing list exploders to automatically maintain their
subscriber lists when delivery attempts repeatedly fail;
(d) Convey delivery and non-delivery notifications resulting from
attempts to deliver messages to "foreign" mail systems via a
gateway;
(e) Allow "foreign" notifications to be tunneled through a MIME-capable
message system and back into the original messaging system that
issued the original notification, or even to a third messaging
system;
(f) Allow language-independent, yet reasonably precise, indications of
the reason for the failure of a message to be delivered (once status
codes of sufficient precision are defined); and
(g) Provide sufficient information to remote MTA maintainers (via
"trouble tickets") so that they can understand the nature of
reported errors. This feature is used in the case that failure to
deliver a message is due to the malfunction of a remote MTA and the
Moore & Vaudreuil Standards Track [Page 2]
RFC 1894 Delivery Status Notifications January 1996
sender wants to report the problem to the remote MTA administrator.
1.2 Requirements
These purposes place the following constraints on the notification
protocol:
(a) It must be readable by humans as well as being machine-parsable.
(b) It must provide enough information to allow message senders (or the
user agents) to unambiguously associate a DSN with the message that
was sent and the original recipient address for which the DSN is
issued (if such information is available), even if the message was
forwarded to another recipient address.
(c) It must be able to preserve the reason for the success or failure of
a delivery attempt in a remote messaging system, using the
"language" (mailbox addresses and status codes) of that remote
system.
(d) It must also be able to describe the reason for the success or
failure of a delivery attempt, independent of any particular human
language or of the "language" of any particular mail system.
(e) It must preserve enough information to allow the maintainer of a
remote MTA to understand (and if possible, reproduce) the conditions
that caused a delivery failure at that MTA.
(f) For any notifications issued by foreign mail systems, which are
translated by a mail gateway to the DSN format, the DSN must
preserve the "type" of the foreign addresses and error codes, so
that these may be correctly interpreted by gateways.
A DSN contains a set of per-message fields which identify the message
and the transaction during which the message was submitted, along
with other fields that apply to all delivery attempts described by
the DSN. The DSN also includes a set of per-recipient fields to
convey the result of the attempt to deliver the message to each of
one or more recipients.
1.3 Terminology
A message may be transmitted through several message transfer agents
(MTAs) on its way to a recipient. For a variety of reasons,
recipient addresses may be rewritten during this process, so each MTA
may potentially see a different recipient address. Depending on the
purpose for which a DSN is used, different formats of a particular
recipient address will be needed.
Moore & Vaudreuil Standards Track [Page 3]
RFC 1894 Delivery Status Notifications January 1996
Several DSN fields are defined in terms of the view from a particular
MTA in the transmission. The MTAs are assigned the following names:
(a) Original MTA
The Original MTA is the one to which the message is submitted for
delivery by the sender of the message.
(b) Reporting MTA
For any DSN, the Reporting MTA is the one which is reporting the
results of delivery attempts described in the DSN.
If the delivery attempts described occurred in a "foreign" (non-
Internet) mail system, and the DSN was produced by translating the
foreign notice into DSN format, the Reporting MTA will still identify
the "foreign" MTA where the delivery attempts occurred.
(c) Received-From MTA
The Received-From MTA is the MTA from which the Reporting MTA
received the message, and accepted responsibility for delivery of the
message.
(d) Remote MTA
If an MTA determines that it must relay a message to one or more
recipients, but the message cannot be transferred to its "next hop"
MTA, or if the "next hop" MTA refuses to accept responsibility for
delivery of the message to one or more of its intended recipients,
the relaying MTA may need to issue a DSN on behalf of the recipients
for whom the message cannot be delivered. In this case the relaying
MTA is the Reporting MTA, and the "next hop" MTA is known as the
Remote MTA.
Moore & Vaudreuil Standards Track [Page 4]
RFC 1894 Delivery Status Notifications January 1996
Figure 1 illustrates the relationship between the various MTAs.
+-----+ +--------+ +---------+ +---------+ +------+
| | | | |Received-| | | | |
| | => |Original| => ... => | From | => |Reporting| ===> |Remote|
| user| | MTA | | MTA | | MTA | <No! | MTA |
|agent| +--------+ +---------+ +----v----+ +------+
| | |
| | <-------------------------------------------+
+-----+ (DSN returned to sender by Reporting MTA)
Figure 1. Original, Received-From, Reporting and Remote MTAs
Each of these MTAs may provide information which is useful in a DSN:
+ Ideally, the DSN will contain the address of each recipient as
originally specified to the Original MTA by the sender of the message.
This version of the address is needed (rather than a forwarding
address or some modified version of the original address) so that the
sender may compare the recipient address in the DSN with the address
in the sender's records (e.g. an address book for an individual, the
list of subscribers for a mailing list) and take appropriate action.
Similarly, the DSN might contain an "envelope identifier" that was
known to both the sender's user agent and the Original MTA at the time
of message submission, and which, if included in the DSN, can be used
by the sender to keep track of which messages were or were not
delivered.
+ If a message was (a) forwarded to a different address than that
specified by the sender, (b) gatewayed to a different mail system than
that used by the sender, or (c) subjected to address rewriting during
transmission, the "final" form of the recipient address (i.e. the one
seen by the Reporting MTA) will be different than the original
(sender-specified) recipient address. Just as the sender's user agent
(or the sender) prefers the original recipient address, so the "final"
address is needed when reporting a problem to the postmaster of the
site where message delivery failed, because only the final recipient
address will allow her to reproduce the conditions that caused the
failure.
+ A "failed" DSN should contain the most accurate explanation for the
delivery failure that is available. For ease of interpretation, this
information should be a format which is independent of the mail
transport system that issued the DSN. However, if a foreign error
Moore & Vaudreuil Standards Track [Page 5]
RFC 1894 Delivery Status Notifications January 1996
code is translated into some transport-independent format, some
information may be lost. It is therefore desirable to provide both a
transport-independent status code and a mechanism for reporting
transport-specific codes. Depending on the circumstances that
produced delivery failure, the transport-specific code might be
obtained from either the Reporting MTA or the Remote MTA.
Since different values for "recipient address" and "delivery status
code" are needed according to the circumstance in which a DSN will be
used, and since the MTA that issues the DSN cannot anticipate those
circumstances, the DSN format described here may contain both the
original and final forms of a recipient address, and both a
transport-independent and a transport-specific indication of delivery
status.
Extension fields may also be added by the Reporting MTA as needed to
provide additional information for use in a trouble ticket or to
preserve information for tunneling of foreign delivery reports
through Internet DSNs.
The Original, Reporting, and Remote MTAs may exist in very different
environments and use dissimilar transport protocols, MTA names,
address formats, and delivery status codes. DSNs therefore do not
assume any particular format for mailbox addresses, MTA names, or
transport-specific status codes. Instead, the various DSN fields
that carry such quantities consist of a "type" subfield followed by a
subfield whose contents are ordinary text characters, and the format
of which is indicated by the "type" subfield. This allows a DSN to
convey these quantities regardless of format.
2. Format of a Delivery Status Notification
A DSN is a MIME message with a top-level content-type of
multipart/report (defined in [2]). When a multipart/report content
is used to transmit a DSN:
(a) The report-type parameter of the multipart/report content is
"delivery-status".
(b) The first component of the multipart/report contains a human-
readable explanation of the DSN, as described in [2].
(c) The second component of the multipart/report is of content-type
message/delivery-status, described in section 2.1 of this document.
(d) If the original message or a portion of the message is to be
returned to the sender, it appears as the third component of the
multipart/report.
Moore & Vaudreuil Standards Track [Page 6]
RFC 1894 Delivery Status Notifications January 1996
NOTE: For delivery status notifications gatewayed from foreign
systems, the headers of the original message may not be available.
In this case the third component of the DSN may be omitted, or it
may contain "simulated" RFC 822 headers which contain equivalent
information. In particular, it is very desirable to preserve the
subject, date, and message-id (or equivalent) fields from the
original message.
The DSN MUST be addressed (in both the message header and the
transport envelope) to the return address from the transport envelope
which accompanied the original message for which the DSN was
generated. (For a message that arrived via SMTP, the envelope return
address appears in the MAIL FROM command.)
The From field of the message header of the DSN SHOULD contain the
address of a human who is responsible for maintaining the mail system
at the Reporting MTA site (e.g. Postmaster), so that a reply to the
DSN will reach that person. Exception: if a DSN is translated from a
foreign delivery report, and the gateway performing the translation
cannot determine the appropriate address, the From field of the DSN
MAY be the address of a human who is responsible for maintaining the
gateway.
The envelope sender address of the DSN SHOULD be chosen to ensure
that no delivery status reports will be issued in response to the DSN
itself, and MUST be chosen so that DSNs will not generate mail loops.
Whenever an SMTP transaction is used to send a DSN, the MAIL FROM
command MUST use a NULL return address, i.e. "MAIL FROM:<>".
A particular DSN describes the delivery status for exactly one
message. However, an MTA MAY report on the delivery status for
several recipients of the same message in a single DSN. Due to the
nature of the mail transport system (where responsibility for
delivery of a message to its recipients may be split among several
MTAs, and delivery to any particular recipient may be delayed),
multiple DSNs may be still be issued in response to a single message
submission.
Moore & Vaudreuil Standards Track [Page 7]
RFC 1894 Delivery Status Notifications January 1996
2.1 The message/delivery-status content-type
The message/delivery-status content-type is defined as follows:
MIME type name: message
MIME subtype name: delivery-status
Optional parameters: none
Encoding considerations: "7bit" encoding is sufficient and
MUST be used to maintain readability
when viewed by non-MIME mail
readers.
Security considerations: discussed in section 4 of this memo.
The message/delivery-status report type for use in the
multipart/report is "delivery-status".
The body of a message/delivery-status consists of one or more
"fields" formatted according to the ABNF of RFC 822 header "fields"
(see [6]). The per-message fields appear first, followed by a blank
line. Following the per-message fields are one or more groups of
per-recipient fields. Each group of per-recipient fields is preceded
by a blank line. Using the ABNF of RFC 822, the syntax of the
message/delivery-status content is as follows:
delivery-status-content =
per-message-fields 1*( CRLF per-recipient-fields )
The per-message fields are described in section 2.2. The per-
recipient fields are described in section 2.3.
2.1.1 General conventions for DSN fields
Since these fields are defined according to the rules of RFC 822, the
same conventions for continuation lines and comments apply.
Notification fields may be continued onto multiple lines by beginning
each additional line with a SPACE or HTAB. Text which appears in
parentheses is considered a comment and not part of the contents of
that notification field. Field names are case-insensitive, so the
names of notification fields may be spelled in any combination of
upper and lower case letters. Comments in DSN fields may use the
"encoded-word" construct defined in [7].
A number of DSN fields are defined to have a portion of a field body
of "xtext". "xtext" is used to allow encoding sequences of octets
which contain values outside the range [1-127 decimal] of traditional
ASCII characters, and also to allow comments to be inserted in the
data. Any octet may be encoded as "+" followed by two upper case
Moore & Vaudreuil Standards Track [Page 8]
RFC 1894 Delivery Status Notifications January 1996
hexadecimal digits. (The "+" character MUST be encoded as "+2B".)
With certain exceptions, octets that correspond to ASCII characters
may be represented as themselves. SPACE and HTAB characters are
ignored. Comments may be included by enclosing them in parenthesis.
Except within comments, encoded-words such as defined in [7] may NOT
be used in xtext.
"xtext" is formally defined as follows:
xtext = *( xchar / hexchar / linear-white-space / comment )
xchar = any ASCII CHAR between "!" (33) and "~" (126) inclusive,
except for "+", "\" and "(".
"hexchar"s are intended to encode octets that cannot be represented
as plain text, either because they are reserved, or because they are
non-printable. However, any octet value may be represented by a
"hexchar".
hexchar = ASCII "+" immediately followed by two upper case
hexadecimal digits
When encoding an octet sequence as xtext:
+ Any ASCII CHAR between "!" and "~" inclusive, except for "+", "\",
and "(", MAY be encoded as itself. (Some CHARs in this range may
also be encoded as "hexchar"s, at the implementor's discretion.)
+ ASCII CHARs that fall outside the range above must be encoded as
"hexchar".
+ Line breaks (CR LF SPACE) MAY be inserted as necessary to keep line
lengths from becoming excessive.
+ Comments MAY be added to clarify the meaning for human readers.
2.1.2 "*-type" subfields
Several DSN fields consist of a "-type" subfield, followed by a
semicolon, followed by "*text". For these fields, the keyword used
in the address-type, diagnostic-type, or MTA-name-type subfield
indicates the expected format of the address, status-code, or MTA-
name which follows.
Moore & Vaudreuil Standards Track [Page 9]
RFC 1894 Delivery Status Notifications January 1996
The "-type" subfields are defined as follows:
(a) An "address-type" specifies the format of a mailbox address. For
example, Internet mail addresses use the "rfc822" address-type.
address-type = atom
(b) A "diagnostic-type" specifies the format of a status code. For
example, when a DSN field contains a reply code reported via the
Simple Mail Transfer Protocol [3], the "smtp" diagnostic-type is
used.
diagnostic-type = atom
(c) An "MTA-name-type" specifies the format of an MTA name. For
example, for an SMTP server on an Internet host, the MTA name is the
domain name of that host, and the "dns" MTA-name-type is used.
mta-name-type = atom
Values for address-type, diagnostic-type, and MTA-name-type are
case-insensitive. Thus address-type values of "RFC822" and "rfc822"
are equivalent.
The Internet Assigned Numbers Authority (IANA) will maintain a
registry of address-types, diagnostic-types, and MTA-name-types,
along with descriptions of the meanings and acceptable values of
each, or a reference to a one or more specifications that provide
such descriptions. (The "rfc822" address-type, "smtp" diagnostic-
type, and "dns" MTA-name-type are defined in [4].) Registration
forms for address-type, diagnostic-type, and MTA-name-type appear in
section 8 of this document.
IANA will not accept registrations for any address-type, diagnostic-
type, or MTA-name-type name that begins with "X-". These type names
are reserved for experimental use.
2.1.3 Lexical tokens imported from RFC 822
The following lexical tokens, defined in [6], are used in the ABNF
grammar for DSNs: atom, CHAR, comment, CR, CRLF, DIGIT, LF, linear-
white-space, SPACE, text. The date-time lexical token is defined in
[8].
Moore & Vaudreuil Standards Track [Page 10]
RFC 1894 Delivery Status Notifications January 1996
2.2 Per-Message DSN Fields
Some fields of a DSN apply to all of the delivery attempts described
by that DSN. These fields may appear at most once in any DSN. These
fields are used to correlate the DSN with the original message
transaction and to provide additional information which may be useful
to gateways.
per-message-fields =
[ original-envelope-id-field CRLF ]
reporting-mta-field CRLF
[ dsn-gateway-field CRLF ]
[ received-from-mta-field CRLF ]
[ arrival-date-field CRLF ]
*( extension-field CRLF )
2.2.1 The Original-Envelope-Id field
The optional Original-Envelope-Id field contains an "envelope
identifier" which uniquely identifies the transaction during which
the message was submitted, and was either (a) specified by the sender
and supplied to the sender's MTA, or (b) generated by the sender's
MTA and made available to the sender when the message was submitted.
Its purpose is to allow the sender (or her user agent) to associate
the returned DSN with the specific transaction in which the message
was sent.
If such an envelope identifier was present in the envelope which
accompanied the message when it arrived at the Reporting MTA, it
SHOULD be supplied in the Original-Envelope-Id field of any DSNs
issued as a result of an attempt to deliver the message. Except when
a DSN is issued by the sender's MTA, an MTA MUST NOT supply this
field unless there is an envelope-identifier field in the envelope
which accompanied this message on its arrival at the Reporting MTA.
The Original-Envelope-Id field is defined as follows:
original-envelope-id-field =
"Original-Envelope-Id" ":" envelope-id
envelope-id = *text
There may be at most one Original-Envelope-Id field per DSN.
The envelope-id is CASE-SENSITIVE. The DSN MUST preserve the
original case and spelling of the envelope-id.
Moore & Vaudreuil Standards Track [Page 11]
RFC 1894 Delivery Status Notifications January 1996
NOTE: The Original-Envelope-Id is NOT the same as the Message-Id from
the message header. The Message-Id identifies the content of the
message, while the Original-Envelope-Id identifies the transaction in
which the message is sent.
2.2.2 The Reporting-MTA DSN field
reporting-mta-field =
"Reporting-MTA" ":" mta-name-type ";" mta-name
mta-name = *text
The Reporting-MTA field is defined as follows:
A DSN describes the results of attempts to deliver, relay, or gateway
a message to one or more recipients. In all cases, the Reporting-MTA
is the MTA which attempted to perform the delivery, relay, or gateway
operation described in the DSN. This field is required.
Note that if an SMTP client attempts to relay a message to an SMTP
server and receives an error reply to a RCPT command, the client is
responsible for generating the DSN, and the client's domain name will
appear in the Reporting-MTA field. (The server's domain name will
appear in the Remote-MTA field.)
Note that the Reporting-MTA is not necessarily the MTA which actually
issued the DSN. For example, if an attempt to deliver a message
outside of the Internet resulted in a nondelivery notification which
was gatewayed back into Internet mail, the Reporting-MTA field of the
resulting DSN would be that of the MTA that originally reported the
delivery failure, not that of the gateway which converted the foreign
notification into a DSN. See Figure 2.
Moore & Vaudreuil Standards Track [Page 12]
RFC 1894 Delivery Status Notifications January 1996
sender's environment recipient's environment
............................ ..........................................
: :
(1) : : (2)
+-----+ +--------+ +--------+ +---------+ +---------+ +------+
| | | | | | |Received-| | | | |
| |=>|Original|=>| |->| From |->|Reporting|-->|Remote|
| user| | MTA | | | | MTA | | MTA |<No| MTA |
|agent| +--------+ |Gateway | +---------+ +----v----+ +------+
| | | | |
| | <============| |<-------------------+
+-----+ | |(4) (3)
+--------+
: :
...........................: :.........................................
Figure 2. DSNs in the presence of gateways
(1) message is gatewayed into recipient's environment
(2) attempt to relay message fails
(3) reporting-mta (in recipient's environment) returns nondelivery
notification
(4) gateway translates foreign notification into a DSN
The mta-name portion of the Reporting-MTA field is formatted
according to the conventions indicated by the mta-name-type subfield.
If an MTA functions as a gateway between dissimilar mail environments
and thus is known by multiple names depending on the environment, the
mta-name subfield SHOULD contain the name used by the environment
from which the message was accepted by the Reporting-MTA.
Because the exact spelling of an MTA name may be significant in a
particular environment, MTA names are CASE-SENSITIVE.
2.2.3 The DSN-Gateway field
The DSN-Gateway field indicates the name of the gateway or MTA which
translated a foreign (non-Internet) delivery status notification into
this DSN. This field MUST appear in any DSN which was translated by
a gateway from a foreign system into DSN format, and MUST NOT appear
otherwise.
dsn-gateway-field = "DSN-Gateway" ":" mta-name-type ";" mta-name
Moore & Vaudreuil Standards Track [Page 13]
RFC 1894 Delivery Status Notifications January 1996
For gateways into Internet mail, the MTA-name-type will normally be
"smtp", and the mta-name will be the Internet domain name of the
gateway.
2.2.4 The Received-From-MTA DSN field
The optional Received-From-MTA field indicates the name of the MTA
from which the message was received.
received-from-mta-field =
"Received-From-MTA" ":" mta-name-type ";" mta-name
If the message was received from an Internet host via SMTP, the
contents of the mta-name subfield SHOULD be the Internet domain name
supplied in the HELO or EHLO command, and the network address used by
the SMTP client SHOULD be included as a comment enclosed in
parentheses. (In this case, the MTA-name-type will be "smtp".)
The mta-name portion of the Received-From-MTA field is formatted
according to the conventions indicated by the MTA-name-type subfield.
Since case is significant in some mail systems, the exact spelling,
including case, of the MTA name SHOULD be preserved.
2.2.5 The Arrival-Date DSN field
The optional Arrival-Date field indicates the date and time at which
the message arrived at the Reporting MTA. If the Last-Attempt-Date
field is also provided in a per-recipient field, this can be used to
determine the interval between when the message arrived at the
Reporting MTA and when the report was issued for that recipient.
arrival-date-field = "Arrival-Date" ":" date-time
The date and time are expressed in RFC 822 'date-time' format, as
modified by [8]. Numeric timezones ([+/-]HHMM format) MUST be used.
2.3 Per-Recipient DSN fields
A DSN contains information about attempts to deliver a message to one
or more recipients. The delivery information for any particular
recipient is contained in a group of contiguous per-recipient fields.
Each group of per-recipient fields is preceded by a blank line.
Moore & Vaudreuil Standards Track [Page 14]
RFC 1894 Delivery Status Notifications January 1996
The syntax for the group of per-recipient fields is as follows:
per-recipient-fields =
[ original-recipient-field CRLF ]
final-recipient-field CRLF
action-field CRLF
status-field CRLF
[ remote-mta-field CRLF ]
[ diagnostic-code-field CRLF ]
[ last-attempt-date-field CRLF ]
[ will-retry-until-field CRLF ]
*( extension-field CRLF )
2.3.1 Original-Recipient field
The Original-Recipient field indicates the original recipient address
as specified by the sender of the message for which the DSN is being
issued.
original-recipient-field =
"Original-Recipient" ":" address-type ";" generic-address
generic-address = *text
The address-type field indicates the type of the original recipient
address. If the message originated within the Internet, the
address-type field field will normally be "rfc822", and the address
will be according to the syntax specified in [6]. The value
"unknown" should be used if the Reporting MTA cannot determine the
type of the original recipient address from the message envelope.
This field is optional. It should be included only if the sender-
specified recipient address was present in the message envelope, such
as by the SMTP extensions defined in [4]. This address is the same
as that provided by the sender and can be used to automatically
correlate DSN reports and message transactions.
2.3.2 Final-Recipient field
The Final-Recipient field indicates the recipient for which this set
of per-recipient fields applies. This field MUST be present in each
set of per-recipient data.
Moore & Vaudreuil Standards Track [Page 15]
RFC 1894 Delivery Status Notifications January 1996
The syntax of the field is as follows:
final-recipient-field =
"Final-Recipient" ":" address-type ";" generic-address
The generic-address subfield of the Final-Recipient field MUST
contain the mailbox address of the recipient (from the transport
envelope) as it was when the message was accepted for delivery by the
Reporting MTA.
The Final-Recipient address may differ from the address originally
provided by the sender, because it may have been transformed during
forwarding and gatewaying into an totally unrecognizable mess.
However, in the absence of the optional Original-Recipient field, the
Final-Recipient field and any returned content may be the only
information available with which to correlate the DSN with a
particular message submission.
The address-type subfield indicates the type of address expected by
the reporting MTA in that context. Recipient addresses obtained via
SMTP will normally be of address-type "rfc822".
NOTE: The Reporting MTA is not expected to ensure that the address
actually conforms to the syntax conventions of the address-type.
Instead, it MUST report exactly the address received in the envelope,
unless that address contains characters such as CR or LF which may
not appear in a DSN field.
Since mailbox addresses (including those used in the Internet) may be
case sensitive, the case of alphabetic characters in the address MUST
be preserved.
2.3.3 Action field
The Action field indicates the action performed by the Reporting-MTA
as a result of its attempt to deliver the message to this recipient
address. This field MUST be present for each recipient named in the
DSN.
The syntax for the action-field is:
action-field = "Action" ":" action-value
action-value =
"failed" / "delayed" / "delivered" / "relayed" / "expanded"
Moore & Vaudreuil Standards Track [Page 16]
RFC 1894 Delivery Status Notifications January 1996
The action-value may be spelled in any combination of upper and lower
case characters.
"failed" indicates that the message could not be delivered to the
recipient. The Reporting MTA has abandoned any attempts to
deliver the message to this recipient. No further
notifications should be expected.
"delayed" indicates that the Reporting MTA has so far been unable to
deliver or relay the message, but it will continue to
attempt to do so. Additional notification messages may be
issued as the message is further delayed or successfully
delivered, or if delivery attempts are later abandoned.
"delivered" indicates that the message was successfully delivered to
the recipient address specified by the sender, which
includes "delivery" to a mailing list exploder. It does
not indicate that the message has been read. This is a
terminal state and no further DSN for this recipient should
be expected.
"relayed" indicates that the message has been relayed or gatewayed
into an environment that does not accept responsibility for
generating DSNs upon successful delivery. This action-
value SHOULD NOT be used unless the sender has requested
notification of successful delivery for this recipient.
"expanded" indicates that the message has been successfully delivered
to the recipient address as specified by the sender, and
forwarded by the Reporting-MTA beyond that destination to
multiple additional recipient addresses. An action-value
of "expanded" differs from "delivered" in that "expanded"
is not a terminal state. Further "failed" and/or "delayed"
notifications may be provided.
Using the terms "mailing list" and "alias" as defined in
[4], section 7.2.7: An action-value of "expanded" is only
to be used when the message is delivered to a multiple-
recipient "alias". An action-value of "expanded" SHOULD
NOT be used with a DSN issued on delivery of a message to a
"mailing list".
NOTE ON ACTION VS. STATUS CODES: Although the 'action' field might
seem to be redundant with the 'status' field, this is not the case.
In particular, a "temporary failure" ("4") status code could be used
with an action-value of either "delayed" or "failed". For example,
assume that an SMTP client repeatedly tries to relay a message to the
mail exchanger for a recipient, but fails because a query to a domain
Moore & Vaudreuil Standards Track [Page 17]
RFC 1894 Delivery Status Notifications January 1996
name server timed out. After a few hours, it might issue a "delayed"
DSN to inform the sender that the message had not yet been delivered.
After a few days, the MTA might abandon its attempt to deliver the
message and return a "failed" DSN. The status code (which would
begin with a "4" to indicate "temporary failure") would be the same
for both DSNs.
Another example for which the action and status codes may appear
contradictory: If an MTA or mail gateway cannot deliver a message
because doing so would entail conversions resulting in an
unacceptable loss of information, it would issue a DSN with the
'action' field of "failure" and a status code of 'XXX'. If the
message had instead been relayed, but with some loss of information,
it might generate a DSN with the same XXX status-code, but with an
action field of "relayed".
2.3.4 Status field
The per-recipient Status field contains a transport-independent
status code which indicates the delivery status of the message to
that recipient. This field MUST be present for each delivery attempt
which is described by a DSN.
The syntax of the status field is:
status-field = "Status" ":" status-code
status-code = DIGIT "." 1*3DIGIT "." 1*3DIGIT
; White-space characters and comments are NOT allowed within a
; status-code, though a comment enclosed in parentheses MAY follow
; the last numeric subfield of the status-code. Each numeric
; subfield within the status-code MUST be expressed without
; leading zero digits.
Status codes thus consist of three numerical fields separated by ".".
The first sub-field indicates whether the delivery attempt was
successful (2 = success, 4 = persistent temporary failure, 5 =
permanent failure). The second sub-field indicates the probable
source of any delivery anomalies, and the third sub-field denotes a
precise error condition, if known.
The initial set of status-codes is defined in [5].
Moore & Vaudreuil Standards Track [Page 18]
RFC 1894 Delivery Status Notifications January 1996
2.3.5 Remote-MTA field
The value associated with the Remote-MTA DSN field is a printable
ASCII representation of the name of the "remote" MTA that reported
delivery status to the "reporting" MTA.
remote-mta-field = "Remote-MTA" ":" mta-name-type ";" mta-name
NOTE: The Remote-MTA field preserves the "while talking to"
information that was provided in some pre-existing nondelivery
reports.
This field is optional. It MUST NOT be included if no remote MTA was
involved in the attempted delivery of the message to that recipient.
2.3.6 Diagnostic-Code field
For a "failed" or "delayed" recipient, the Diagnostic-Code DSN field
contains the actual diagnostic code issued by the mail transport.
Since such codes vary from one mail transport to another, the
diagnostic-type subfield is needed to specify which type of
diagnostic code is represented.
diagnostic-code-field =
"Diagnostic-Code" ":" diagnostic-type ";" *text
NOTE: The information in the Diagnostic-Code field may be somewhat
redundant with that from the Status field. The Status field is
needed so that any DSN, regardless of origin, may be understood by
any user agent or gateway that parses DSNs. Since the Status code
will sometimes be less precise than the actual transport diagnostic
code, the Diagnostic-Code field is provided to retain the latter
information. Such information may be useful in a trouble ticket sent
to the administrator of the Reporting MTA, or when tunneling foreign
nondelivery reports through DSNs.
If the Diagnostic Code was obtained from a Remote MTA during an
attempt to relay the message to that MTA, the Remote-MTA field should
be present. When interpreting a DSN, the presence of a Remote-MTA
field indicates that the Diagnostic Code was issued by the Remote
MTA. The absence of a Remote-MTA indicates that the Diagnostic Code
was issued by the Reporting MTA.
In addition to the Diagnostic-Code itself, additional textual
description of the diagnostic, MAY appear in a comment enclosed in
parentheses.
Moore & Vaudreuil Standards Track [Page 19]
RFC 1894 Delivery Status Notifications January 1996
This field is optional, because some mail systems supply no
additional information beyond that which is returned in the 'action'
and 'status' fields. However, this field SHOULD be included if
transport-specific diagnostic information is available.
2.3.7 Last-Attempt-Date field
The Last-Attempt-Date field gives the date and time of the last
attempt to relay, gateway, or deliver the message (whether successful
or unsuccessful) by the Reporting MTA. This is not necessarily the
same as the value of the Date field from the header of the message
used to transmit this delivery status notification: In cases where
the DSN was generated by a gateway, the Date field in the message
header contains the time the DSN was sent by the gateway and the DSN
Last-Attempt-Date field contains the time the last delivery attempt
occurred.
last-attempt-date-field = "Last-Attempt-Date" ":" date-time
This field is optional. It MUST NOT be included if the actual date
and time of the last delivery attempt are not available (which might
be the case if the DSN were being issued by a gateway).
The date and time are expressed in RFC 822 'date-time' format, as
modified by [8]. Numeric timezones ([+/-]HHMM format) MUST be used.
3.2.1.5 final-log-id field
The "final-log-id" field gives the final-log-id of the message that
was used by the final-mta. This can be useful as an index to the
final-mta's log entry for that delivery attempt.
final-log-id-field = "Final-Log-ID" ":" *text
This field is optional.
2.3.8 Will-Retry-Until field
For DSNs of type "delayed", the Will-Retry-Until field gives the date
after which the Reporting MTA expects to abandon all attempts to
deliver the message to that recipient. The Will-Retry-Until field is
optional for "delay" DSNs, and MUST NOT appear in other DSNs.
will-retry-until-field = "Will-Retry-Until" ":" date-time
The date and time are expressed in RFC 822 'date-time' format, as
modified by [8]. Numeric timezones ([+/-]HHMM format) MUST be used.
Moore & Vaudreuil Standards Track [Page 20]
RFC 1894 Delivery Status Notifications January 1996
2.4 Extension fields
Additional per-message or per-recipient DSN fields may be defined in
the future by later revisions or extensions to this specification.
Extension-field names beginning with "X-" will never be defined as
standard fields; such names are reserved for experimental use. DSN
field names NOT beginning with "X-" MUST be registered with the
Internet Assigned Numbers Authority (IANA) and published in an RFC.
Extension DSN fields may be defined for the following reasons:
(a) To allow additional information from foreign delivery status
reports to be tunneled through Internet DSNs. The names of such
DSN fields should begin with an indication of the foreign
environment name (e.g. X400-Physical-Forwarding-Address).
(b) To allow the transmission of diagnostic information which is
specific to a particular mail transport protocol. The names of
such DSN fields should begin with an indication of the mail
transport being used (e.g. SMTP-Remote-Recipient-Address). Such
fields should be used for diagnostic purposes only and not by
user agents or mail gateways.
(c) To allow transmission of diagnostic information which is specific
to a particular message transfer agent (MTA). The names of such
DSN fields should begin with an indication of the MTA
implementation which produced the DSN. (e.g. Foomail-Queue-ID).
MTA implementors are encouraged to provide adequate information, via
extension fields if necessary, to allow an MTA maintainer to
understand the nature of correctable delivery failures and how to fix
them. For example, if message delivery attempts are logged, the DSN
might include information which allows the MTA maintainer to easily
find the log entry for a failed delivery attempt.
If an MTA developer does not wish to register the meanings of such
extension fields, "X-" fields may be used for this purpose. To avoid
name collisions, the name of the MTA implementation should follow the
"X-", (e.g. "X-Foomail-Log-ID").
3. Conformance and Usage Requirements
An MTA or gateway conforms to this specification if it generates DSNs
according to the protocol defined in this memo. For MTAs and
gateways that do not support requests for positive delivery
notification (such as in [4]), it is sufficient that delivery failure
reports use this protocol.
Moore & Vaudreuil Standards Track [Page 21]
RFC 1894 Delivery Status Notifications January 1996
A minimal implementation of this specification need generate only the
Reporting-MTA per-message field, and the Final-Recipient, Action, and
Status fields for each attempt to deliver a message to a recipient
described by the DSN. Generation of the other fields, when
appropriate, is strongly recommended.
MTAs and gateways MUST NOT generate the Original-Recipient field of a
DSN unless the mail transfer protocol provides the address originally
specified by the sender at the time of submission. (Ordinary SMTP
does not make that guarantee, but the SMTP extension defined in [4]
permits such information to be carried in the envelope if it is
available.)
Each sender-specified recipient address SHOULD result in at most one
"delivered" or "failed" DSN for that recipient. If a positive DSN is
requested (e.g. one using NOTIFY=SUCCESS in SMTP) for a recipient
that is forwarded to multiple recipients of an "alias" (as defined in
[4], section 7.2.7), the forwarding MTA SHOULD normally issue a
"expanded" DSN for the originally-specified recipient and not
propagate the request for a DSN to the forwarding addresses.
Alternatively, the forwarding MTA MAY relay the request for a DSN to
exactly one of the forwarding addresses and not propagate the request
to the others.
By contrast, successful submission of a message to a mailing list
exploder is considered final delivery of the message. Upon delivery
of a message to a recipient address corresponding to a mailing list
exploder, the Reporting MTA SHOULD issue an appropriate DSN exactly
as if the recipient address were that of an ordinary mailbox.
NOTE: This is actually intended to make DSNs usable by mailing lists
themselves. Any message sent to a mailing list subscriber should
have its envelope return address pointing to the list maintainer [see
RFC 1123, section 5.3.7(E)]. Since DSNs are sent to the envelope
return address, all DSNs resulting from delivery to the recipients of
a mailing list will be sent to the list maintainer. The list
maintainer may elect to mechanically process DSNs upon receipt, and
thus automatically delete invalid addresses from the list. (See
section 7 of this memo.)
This specification places no restrictions on the processing of DSNs
received by user agents or distribution lists.
4. Security Considerations
The following security considerations apply when using DSNs:
Moore & Vaudreuil Standards Track [Page 22]
RFC 1894 Delivery Status Notifications January 1996
4.1 Forgery
DSNs may be forged as easily as ordinary Internet electronic mail.
User agents and automatic mail handling facilities (such as mail
distribution list exploders) that wish to make automatic use of DSNs
should take appropriate precautions to minimize the potential damage
from denial-of-service attacks.
Security threats related to forged DSNs include the sending of:
(a) A falsified delivery notification when the message is not delivered
to the indicated recipient,
(b) A falsified non-delivery notification when the message was in fact
delivered to the indicated recipient,
(c) A falsified Final-Recipient address,
(d) A falsified Remote-MTA identification,
(e) A falsified relay notification when the message is "dead ended".
(f) Unsolicited DSNs
4.2 Confidentiality
Another dimension of security is confidentiality. There may be cases
in which a message recipient is autoforwarding messages but does not
wish to divulge the address to which the messages are autoforwarded.
The desire for such confidentiality will probably be heightened as
"wireless mailboxes", such as pagers, become more widely used as
autoforward addresses.
MTA authors are encouraged to provide a mechanism which enables the
end user to preserve the confidentiality of a forwarding address.
Depending on the degree of confidentiality required, and the nature
of the environment to which a message were being forwarded, this
might be accomplished by one or more of:
(a) issuing a "relayed" DSN (if a positive DSN was requested) when a
message is forwarded to a confidential forwarding address, and
disabling requests for positive DSNs for the forwarded message,
(b) declaring the message to be delivered, issuing a "delivered" DSN,
re-sending the message to the confidential forwarding address, and
arranging for no DSNs to be issued for the re-sent message,
(c) omitting "Remote-*" or extension fields of a DSN whenever they would
otherwise contain confidential information (such as a confidential
forwarding address),
(d) for messages forwarded to a confidential address, setting the
envelope return address (e.g. SMTP MAIL FROM address) to the NULL
Moore & Vaudreuil Standards Track [Page 23]
RFC 1894 Delivery Status Notifications January 1996
reverse-path ("<>") (so that no DSNs would be sent from a downstream
MTA to the original sender),
(e) for messages forwarded to a confidential address, disabling delivery
notifications for the forwarded message (e.g. if the "next-hop" MTA
uses ESMTP and supports the DSN extension, by using the NOTIFY=NEVER
parameter to the RCPT command), or
(f) when forwarding mail to a confidential address, having the
forwarding MTA rewrite the envelope return address for the forwarded
message and attempt delivery of that message as if the forwarding
MTA were the originator. On its receipt of final delivery status,
the forwarding MTA would issue a DSN to the original sender.
In general, any optional DSN field may be omitted if the Reporting
MTA site determines that inclusion of the field would impose too
great a compromise of site confidentiality. The need for such
confidentiality must be balanced against the utility of the omitted
information in trouble reports and DSNs gatewayed to foreign
environments.
Implementors are cautioned that many existing MTAs will send
nondelivery notifications to a return address in the message header
(rather than to the one in the envelope), in violation of SMTP and
other protocols. If a message is forwarded through such an MTA, no
reasonable action on the part of the forwarding MTA will prevent the
downstream MTA from compromising the forwarding address. Likewise,
if the recipient's MTA automatically responds to messages based on a
request in the message header (such as the nonstandard, but widely
used, Return-Receipt-To extension header), it will also compromise
the forwarding address.
4.3 Non-Repudiation
Within the framework of today's internet mail, the DSNs defined in
this memo provide valuable information to the mail user; however,
even a "failed" DSN can not be relied upon as a guarantee that a
message was not received by the recipient. Even if DSNs are not
actively forged, conditions exist under which a message can be
delivered despite the fact that a failure DSN was issued.
Moore & Vaudreuil Standards Track [Page 24]
RFC 1894 Delivery Status Notifications January 1996
For example, a race condition in the SMTP protocol allows for the
duplication of messages if the connection is dropped following a
completed DATA command, but before a response is seen by the SMTP
client. This will cause the SMTP client to retransmit the message,
even though the SMTP server has already accepted it.[9] If one of
those delivery attempts succeeds and the other one fails, a "failed"
DSN could be issued even though the message actually reached the
recipient.
Moore & Vaudreuil Standards Track [Page 25]
RFC 1894 Delivery Status Notifications January 1996
5. Appendix - collected grammar
NOTE: The following lexical tokens are defined in RFC 822: atom,
CHAR, comment, CR, CRLF, DIGIT, LF, linear-white-space, SPACE, text.
The date-time lexical token is defined in [8].
action-field = "Action" ":" action-value
action-value =
"failed" / "delayed" / "delivered" / "relayed" / "expanded"
address-type = atom
arrival-date-field = "Arrival-Date" ":" date-time
delivery-status-content =
per-message-fields 1*( CRLF per-recipient-fields )
diagnostic-code-field =
"Diagnostic-Code" ":" diagnostic-type ";" *text
diagnostic-type = atom
dsn-gateway-field = "DSN-Gateway" ":" mta-name-type ";" mta-name
envelope-id = *text
extension-field = extension-field-name ":" *text
extension-field-name = atom
final-recipient-field =
"Final-Recipient" ":" address-type ";" generic-address
generic-address = *text
last-attempt-date-field = "Last-Attempt-Date" ":" date-time
mta-name = *text
mta-name-type = atom
original-envelope-id-field =
"Original-Envelope-Id" ":" envelope-id
original-recipient-field =
"Original-Recipient" ":" address-type ";" generic-address
Moore & Vaudreuil Standards Track [Page 26]
RFC 1894 Delivery Status Notifications January 1996
per-message-fields =
[ original-envelope-id-field CRLF ]
reporting-mta-field CRLF
[ dsn-gateway-field CRLF ]
[ received-from-mta-field CRLF ]
[ arrival-date-field CRLF ]
*( extension-field CRLF )
per-recipient-fields =
[ original-recipient-field CRLF ]
final-recipient-field CRLF
action-field CRLF
status-field CRLF
[ remote-mta-field CRLF ]
[ diagnostic-code-field CRLF ]
[ last-attempt-date-field CRLF ]
[ will-retry-until-field CRLF ]
*( extension-field CRLF )
received-from-mta-field =
"Received-From-MTA" ":" mta-name-type ";" mta-name
remote-mta-field = "Remote-MTA" ":" mta-name-type ";" mta-name
reporting-mta-field =
"Reporting-MTA" ":" mta-name-type ";" mta-name
status-code = DIGIT "." 1*3DIGIT "." 1*3DIGIT
; White-space characters and comments are NOT allowed within a
; status-code, though a comment enclosed in parentheses MAY follow
; the last numeric subfield of the status-code. Each numeric
; subfield within the status-code MUST be expressed without
; leading zero digits.
status-field = "Status" ":" status-code
will-retry-until-field = "Will-Retry-Until" ":" date-time
Moore & Vaudreuil Standards Track [Page 27]
RFC 1894 Delivery Status Notifications January 1996
6. Appendix - Guidelines for gatewaying DSNs
NOTE: This section provides non-binding recommendations for the
construction of mail gateways that wish to provide semi-transparent
delivery reports between the Internet and another electronic mail
system. Specific DSN gateway requirements for a particular pair of
mail systems may be defined by other documents.
6.1 Gatewaying from other mail systems to DSNs
A mail gateway may issue a DSN to convey the contents of a "foreign"
delivery or non-delivery notification over Internet mail. When there
are appropriate mappings from the foreign notification elements to
DSN fields, the information may be transmitted in those DSN fields.
Additional information (such as might be useful in a trouble ticket
or needed to tunnel the foreign notification through the Internet)
may be defined in extension DSN fields. (Such fields should be given
names that identify the foreign mail protocol, e.g. X400-* for X.400
NDN or DN protocol elements)
The gateway must attempt to supply reasonable values for the
Reporting-MTA, Final-Recipient, Action, and Status fields. These
will normally be obtained by translating the values from the remote
delivery or non-delivery notification into their Internet-style
equivalents. However, some loss of information is to be expected.
For example, the set of status-codes defined for DSNs may not be
adequate to fully convey the delivery diagnostic code from the
foreign system. The gateway should assign the most precise code
which describes the failure condition, falling back on "generic"
codes such as 2.0.0 (success), 4.0.0 (temporary failure), and 5.0.0
(permanent failure) when necessary. The actual foreign diagnostic
code should be retained in the Diagnostic-Code field (with an
appropriate diagnostic-type value) for use in trouble tickets or
tunneling.
The sender-specified recipient address, and the original envelope-id,
if present in the foreign transport envelope, should be preserved in
the Original-Recipient and Original-Envelope-ID fields.
The gateway should also attempt to preserve the "final" recipient
addresses and MTA names from the foreign system. Whenever possible,
foreign protocol elements should be encoded as meaningful printable
ASCII strings.
For DSNs produced from foreign delivery or nondelivery notifications,
the name of the gateway MUST appear in the DSN-Gateway field of the
DSN.
Moore & Vaudreuil Standards Track [Page 28]
RFC 1894 Delivery Status Notifications January 1996
6.2 Gatewaying from DSNs to other mail systems
It may be possible to gateway DSNs from the Internet into a foreign
mail system. The primary purpose of such gatewaying is to convey
delivery status information in a form that is usable by the
destination system. A secondary purpose is to allow "tunneling" of
DSNs through foreign mail systems, in case the DSN may be gatewayed
back into the Internet.
In general, the recipient of the DSN (i.e., the sender of the
original message) will want to know, for each recipient: the closest
available approximation to the original recipient address, the
delivery status (success, failure, or temporary failure), and for
failed deliveries, a diagnostic code that describes the reason for
the failure.
If possible, the gateway should attempt to preserve the Original-
Recipient address and Original-Envelope-ID (if present), in the
resulting foreign delivery status report.
When reporting delivery failures, if the diagnostic-type subfield of
the Diagnostic-Code field indicates that the original diagnostic code
is understood by the destination environment, the information from
the Diagnostic-Code field should be used. Failing that, the
information in the Status field should be mapped into the closest
available diagnostic code used in the destination environment.
If it is possible to tunnel a DSN through the destination
environment, the gateway specification may define a means of
preserving the DSN information in the delivery status reports used by
that environment.
Moore & Vaudreuil Standards Track [Page 29]
RFC 1894 Delivery Status Notifications January 1996
7. Appendix - Guidelines for use of DSNs by mailing list exploders
NOTE: This section pertains only to the use of DSNs by "mailing
lists" as defined in [4], section 7.2.7.
DSNs are designed to be used by mailing list exploders to allow them
to detect and automatically delete recipients for whom mail delivery
fails repeatedly.
When forwarding a message to list subscribers, the mailing list
exploder should always set the envelope return address (e.g. SMTP
MAIL FROM address) to point to a special address which is set up to
received nondelivery reports. A "smart" mailing list exploder can
therefore intercept such nondelivery reports, and if they are in the
DSN format, automatically examine them to determine for which
recipients a message delivery failed or was delayed.
The Original-Recipient field should be used if available, since it
should exactly match the subscriber address known to the list. If
the Original-Recipient field is not available, the recipient field
may resemble the list subscriber address. Often, however, the list
subscriber will have forwarded his mail to a different address, or
the address may be subject to some re-writing, so heuristics may be
required to successfully match an address from the recipient field.
Care is needed in this case to minimize the possibility of false
matches.
The reason for delivery failure can be obtained from the Status and
Action fields, and from the Diagnostic-Code field (if the status-type
is recognized). Reports for recipients with action values other than
"failed" can generally be ignored; in particular, subscribers should
not be removed from a list due to "delayed" reports.
In general, almost any failure status code (even a "permanent" one)
can result from a temporary condition. It is therefore recommended
that a list exploder not delete a subscriber based on any single
failure DSN (regardless of the status code), but only on the
persistence of delivery failure over a period of time.
However, some kinds of failures are less likely than others to have
been caused by temporary conditions, and some kinds of failures are
more likely to be noticed and corrected quickly than others. Once
more precise status codes are defined, it may be useful to
differentiate between the status codes when deciding whether to
delete a subscriber. For example, on a list with a high message
volume, it might be desirable to temporarily suspend delivery to a
recipient address which causes repeated "temporary" failures, rather
than simply deleting the recipient. The duration of the suspension
Moore & Vaudreuil Standards Track [Page 30]
RFC 1894 Delivery Status Notifications January 1996
might depend on the type of error. On the other hand, a "user
unknown" error which persisted for several days could be considered a
reliable indication that address were no longer valid.
8. Appendix - IANA registration forms for DSN types
The forms below are for use when registering a new address-type,
diagnostic-type, or MTA-name-type with the Internet Assigned Numbers
Authority (IANA). Each piece of information requested by a
registration form may be satisfied either by providing the
information on the form itself, or by including a reference to a
published, publicly available specification which includes the
necessary information. IANA MAY reject DSN type registrations
because of incomplete registration forms, imprecise specifications,
or inappropriate type names.
To register a DSN type, complete the applicable form below and send
it via Internet electronic mail to <IANA@IANA.ORG>.
8.1 IANA registration form for address-type
A registration for a DSN address-type MUST include the following
information:
(a) The proposed address-type name.
(b) The syntax for mailbox addresses of this type, specified using BNF,
regular expressions, ASN.1, or other non-ambiguous language.
(c) If addresses of this type are not composed entirely of graphic
characters from the US-ASCII repertoire, a specification for how
they are to be encoded as graphic US-ASCII characters in a DSN
Original-Recipient or Final-Recipient DSN field.
(d) [optional] A specification for how addresses of this type are to be
translated to and from Internet electronic mail addresses.
8.2 IANA registration form for diagnostic-type
A registration for a DSN address-type MUST include the following
information:
(a) The proposed diagnostic-type name.
(b) A description of the syntax to be used for expressing diagnostic
codes of this type as graphic characters from the US-ASCII
repertoire.
Moore & Vaudreuil Standards Track [Page 31]
RFC 1894 Delivery Status Notifications January 1996
(c) A list of valid diagnostic codes of this type and the meaning of
each code.
(d) [optional] A specification for mapping from diagnostic codes of this
type to DSN status codes (as defined in [5]).
8.3 IANA registration form for MTA-name-type
A registration for a DSN MTA-name-type must include the following
information:
(a) The proposed MTA-name-type name.
(b) A description of the syntax of MTA names of this type, using BNF,
regular expressions, ASN.1, or other non-ambiguous language.
(c) If MTA names of this type do not consist entirely of graphic
characters from the US-ASCII repertoire, a specification for how an
MTA name of this type should be expressed as a sequence of graphic
US-ASCII characters.
Moore & Vaudreuil Standards Track [Page 32]
RFC 1894 Delivery Status Notifications January 1996
9. Appendix - Examples
NOTE: These examples are provided as illustration only, and are not
considered part of the DSN protocol specification. If an example
conflicts with the protocol definition above, the example is wrong.
Likewise, the use of *-type subfield names or extension fields in
these examples is not to be construed as a definition for those type
names or extension fields.
These examples were manually translated from bounced messages using
whatever information was available.
Moore & Vaudreuil Standards Track [Page 33]
RFC 1894 Delivery Status Notifications January 1996
9.1 This is a simple DSN issued after repeated attempts
to deliver a message failed. In this case, the DSN is
issued by the same MTA from which the message was originated.
Date: Thu, 7 Jul 1994 17:16:05 -0400
From: Mail Delivery Subsystem <MAILER-DAEMON@CS.UTK.EDU>
Message-Id: <199407072116.RAA14128@CS.UTK.EDU>
Subject: Returned mail: Cannot send message for 5 days
To: <owner-info-mime@cs.utk.edu>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="RAA14128.773615765/CS.UTK.EDU"
--RAA14128.773615765/CS.UTK.EDU
The original message was received at Sat, 2 Jul 1994 17:10:28 -0400
from root@localhost
----- The following addresses had delivery problems -----
<louisl@larry.slip.umd.edu> (unrecoverable error)
----- Transcript of session follows -----
<louisl@larry.slip.umd.edu>... Deferred: Connection timed out
with larry.slip.umd.edu.
Message could not be delivered for 5 days
Message will be deleted from queue
--RAA14128.773615765/CS.UTK.EDU
content-type: message/delivery-status
Reporting-MTA: dns; cs.utk.edu
Original-Recipient: rfc822;louisl@larry.slip.umd.edu
Final-Recipient: rfc822;louisl@larry.slip.umd.edu
Action: failed
Status: 4.0.0
Diagnostic-Code: smtp; 426 connection timed out
Last-Attempt-Date: Thu, 7 Jul 1994 17:15:49 -0400
--RAA14128.773615765/CS.UTK.EDU
content-type: message/rfc822
[original message goes here]
--RAA14128.773615765/CS.UTK.EDU--
Moore & Vaudreuil Standards Track [Page 34]
RFC 1894 Delivery Status Notifications January 1996
9.2 This is another DSN issued by the sender's MTA, which
contains details of multiple delivery attempts. Some of
these were detected locally, and others by a remote MTA.
Date: Fri, 8 Jul 1994 09:21:47 -0400
From: Mail Delivery Subsystem <MAILER-DAEMON@CS.UTK.EDU>
Subject: Returned mail: User unknown
To: <owner-ups-mib@CS.UTK.EDU>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="JAA13167.773673707/CS.UTK.EDU"
--JAA13167.773673707/CS.UTK.EDU
content-type: text/plain; charset=us-ascii
----- The following addresses had delivery problems -----
<arathib@vnet.ibm.com> (unrecoverable error)
<wsnell@sdcc13.ucsd.edu> (unrecoverable error)
--JAA13167.773673707/CS.UTK.EDU
content-type: message/delivery-status
Reporting-MTA: dns; cs.utk.edu
Original-Recipient: rfc822;arathib@vnet.ibm.com
Final-Recipient: rfc822;arathib@vnet.ibm.com
Action: failed
Status: 5.0.0 (permanent failure)
Diagnostic-Code: smtp;
550 'arathib@vnet.IBM.COM' is not a registered gateway user
Remote-MTA: dns; vnet.ibm.com
Original-Recipient: rfc822;johnh@hpnjld.njd.hp.com
Final-Recipient: rfc822;johnh@hpnjld.njd.hp.com
Action: delayed
Status: 4.0.0 (hpnjld.njd.jp.com: host name lookup failure)
Original-Recipient: rfc822;wsnell@sdcc13.ucsd.edu
Final-Recipient: rfc822;wsnell@sdcc13.ucsd.edu
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp; 550 user unknown
Remote-MTA: dns; sdcc13.ucsd.edu
--JAA13167.773673707/CS.UTK.EDU
content-type: message/rfc822
Moore & Vaudreuil Standards Track [Page 35]
RFC 1894 Delivery Status Notifications January 1996
[original message goes here]
--JAA13167.773673707/CS.UTK.EDU--
9.3 A delivery report generated by Message Router (MAILBUS) and
gatewayed by PMDF_MR to a DSN. In this case the gateway did not
have sufficient information to supply an original-recipient address.
Disclose-recipients: prohibited
Date: Fri, 08 Jul 1994 09:21:25 -0400 (EDT)
From: Message Router Submission Agent <AMMGR@corp.timeplex.com>
Subject: Status of : Re: Battery current sense
To: owner-ups-mib@CS.UTK.EDU
Message-id: <01HEGJ0WNBY28Y95LN@mr.timeplex.com>
MIME-version: 1.0
content-type: multipart/report; report-type=delivery-status;
boundary="84229080704991.122306.SYS30"
--84229080704991.122306.SYS30
content-type: text/plain
Invalid address - nair_s
%DIR-E-NODIRMTCH, No matching Directory Entry found
--84229080704991.122306.SYS30
content-type: message/delivery-status
Reporting-MTA: mailbus; SYS30
Final-Recipient: unknown; nair_s
Status: 5.0.0 (unknown permanent failure)
Action: failed
--84229080704991.122306.SYS30--
Moore & Vaudreuil Standards Track [Page 36]
RFC 1894 Delivery Status Notifications January 1996
9.4 A delay report from a multiprotocol MTA. Note that there is no
returned content, so no third body part appears in the DSN.
From: <postmaster@nsfnet-relay.ac.uk>
Message-Id: <199407092338.TAA23293@CS.UTK.EDU>
Received: from nsfnet-relay.ac.uk by sun2.nsfnet-relay.ac.uk
id <g.12954-0@sun2.nsfnet-relay.ac.uk>;
Sun, 10 Jul 1994 00:36:51 +0100
To: owner-info-mime@cs.utk.edu
Date: Sun, 10 Jul 1994 00:36:51 +0100
Subject: WARNING: message delayed at "nsfnet-relay.ac.uk"
content-type: multipart/report; report-type=delivery-status;
boundary=foobar
--foobar
content-type: text/plain
The following message:
UA-ID: Reliable PC (...
Q-ID: sun2.nsf:77/msg.11820-0
has not been delivered to the intended recipient:
thomas@de-montfort.ac.uk
despite repeated delivery attempts over the past 24 hours.
The usual cause of this problem is that the remote system is
temporarily unavailable.
Delivery will continue to be attempted up to a total elapsed
time of 168 hours, ie 7 days.
You will be informed if delivery proves to be impossible
within this time.
Please quote the Q-ID in any queries regarding this mail.
--foobar
content-type: message/delivery-status
Reporting-MTA: dns; sun2.nsfnet-relay.ac.uk
Final-Recipient: rfc822;thomas@de-montfort.ac.uk
Status: 4.0.0 (unknown temporary failure)
Action: delayed
Moore & Vaudreuil Standards Track [Page 37]
RFC 1894 Delivery Status Notifications January 1996
--foobar--
10. Acknowledgments
The authors wish to thank the following people for their reviews of
earlier drafts of this document and their suggestions for
improvement: Eric Allman, Harald Alvestrand, Allan Cargille, Jim
Conklin, Peter Cowen, Dave Crocker, Roger Fajman, Ned Freed, Marko
Kaittola, Steve Kille, John Klensin, John Gardiner Myers, Mark
Nahabedian, Julian Onions, Jacob Palme, Jean Charles Roy, and Gregory
Sheehan.
11. References
[1] Borenstein, N., Freed, N. "Multipurpose Internet Mail Extensions",
RFC 1521, Bellcore, Innosoft, September 1993.
[2] Vaudreuil, G., "The Multipart/Report Content Type for the Reporting
of Mail System Administrative Messages", RFC 1892, Octal Network
Services, January 1996.
[3] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821,
USC/Information Sciences Institute, August 1982.
[4] Moore, K., "SMTP Service Extension for Delivery Status
Notifications", RFC 1891, University of Tennessee, January 1996.
[5] Vaudreuil, G., "Enhanced Mail System Status Codes", RFC 1893, Octal
Network Services, January 1996.
[6] Crocker, D., "Standard for the Format of ARPA Internet Text
Messages", STD 11, RFC 822, UDEL, August 1982.
[7] Moore, K. "MIME (Multipurpose Internet Mail Extensions) Part Two:
Message Header Extensions for Non-Ascii Text", RFC 1522, University
of Tennessee, September 1993.
[8] Braden, R. (ed.) "Requirements for Internet Hosts - Application and
Support", STD 3, RFC 1123, USC/Information Sciences Institute,
October 1989.
[9] Partridge, C., "Duplicate Messages and SMTP", RFC 1047, BBN,
February 1988.
Moore & Vaudreuil Standards Track [Page 38]
RFC 1894 Delivery Status Notifications January 1996
11. Authors' Addresses
Keith Moore
University of Tennessee
107 Ayres Hall
Knoxville, TN 37996-1301
USA
EMail: moore@cs.utk.edu
Phone: +1 615 974 3126
Fax: +1 615 974 8296
Gregory M. Vaudreuil
Octel Network Services
17080 Dallas Parkway
Dallas, TX 75248-1905
USA
EMail: Greg.Vaudreuil@Octel.Com
Moore & Vaudreuil Standards Track [Page 39]