RFC3464 - An Extensible Message Format for Delivery Status N

时间:2005-02-17 来源: 作者: 点击:
Network Working Group K. Moore Request for Comments: 3464 University of Tennessee Obsoletes: 1894 G. Vaudreuil Category: Standards Track Lucent Technologies January 2003 An Extensible Message Format for Delivery Status Notifications Status of this Me
  Network Working Group K. Moore
Request for Comments: 3464 University of Tennessee
Obsoletes: 1894 G. Vaudreuil
Category: Standards Track Lucent Technologies
January 2003

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.

Copyright Notice

Copyright (C) The Internet Society (2003). All Rights Reserved.

Abstract

This memo defines a Multipurpose Internet Mail Extensions (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 "Local Area Network
(LAN)-based" systems), the Delivery Status Notification (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.

Table of Contents

1. Introduction ....................................................3
1.1 Purposes .....................................................3
1.2 Requirements .................................................4
1.3 Terminology ..................................................5
2. Format of a Delivery Status Notification ........................7
2.1 The message/delivery-status content-type .....................9
2.1.1 General conventions for DSN fields ........................9
2.1.2 "*-type" sub-fields .......................................9
2.1.3 Lexical tokens imported from RFC822 .....................10
2.2 Per-Message DSN Fields ......................................11
2.2.1 The Original-Envelope-Id field ...........................11
2.2.2 The Reporting-MTA DSN field ..............................12
2.2.3 The DSN-Gateway field ....................................13
2.2.4 The Received-From-MTA DSN field ..........................14
2.2.5 The Arrival-Date DSN field ...............................14
2.3 Per-Recipient DSN fields ....................................14
2.3.1 Original-Recipient field .................................15
2.3.2 Final-Recipient field ....................................15
2.3.3 Action field .............................................16
2.3.4 Status field .............................................18
2.3.5 Remote-MTA field .........................................19
2.3.6 Diagnostic-Code field ....................................19
2.3.7 Last-Attempt-Date field ..................................20
2.3.8 final-log-id field .......................................20
2.3.9 Will-Retry-Until field ...................................20
2.4 Extension fields ............................................21
3. Conformance and Usage Requirements .............................22
4. Security Considerations ........................................23
4.1 Forgery .....................................................23
4.2 Confidentiality .............................................23
4.3 Non-Repudiation .............................................25
5. References .....................................................25
6. Acknowledgments ................................................26
Appendix A - Collected Grammar ....................................27
Appendix B - Guidelines for Gatewaying DSNS .......................29
Gatewaying from other mail systems to DSNs ......................29
Gatewaying from DSNs to other mail systems ......................30
Appendix C - Guidelines for Use of DSNS By Mailing List Exploders .30
Appendix D - IANA Registration Forms for DSN Types ................31
IANA registration form for address-type .........................32
IANA registration form for diagnostic-type ......................32
IANA registration form for MTA-name-type ........................32
Appendix E - Examples .............................................33
Simple DSN ......................................................34
Multi-Recipient DSN .............................................35
DSN from gateway to foreign system ..............................36

Delayed DSN .....................................................37
Appendix F - Changes from RFC1894 ................................38
Authors' Addresses ................................................39
Full Copyright Statement ..........................................40

1. Introduction

This memo defines a Multipurpose Internet Mail Extensions (MIME)
[MIME1] 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 [REPORT].

This memo defines only the format of the notifications. An extension
to the Simple Message Transfer Protocol (SMTP) [SMTP] to fully
support such notifications is the subject of a separate memo [DRPT].

Document Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in BCP 14, RFC2119
[RFC2119].

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 that is largely independent of human
language and media;

(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 and medium-independent, yet reasonably
precise, indications of the reason for the failure of a message
to be delivered; 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 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 that 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.

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.

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 that 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 that is independent of the mail
transport system that issued the DSN. However, if a foreign error
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" sub-field followed by
a sub-field whose contents are ordinary text characters, and the
format of which is indicated by the "type" sub-field. 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 [REPORT]). 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 [REPORT].

(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.

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" RFC822 headers that 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 still be issued in response to a single message
submission.

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 RFC822 header "fields"
(see [RFC822]). 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 RFC822, 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 RFC822, 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 that 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 [MIME3].

2.1.2 "*-type" sub-fields

Several DSN fields consist of a "-type" sub-field, followed by a
semicolon, followed by "*text". For these fields, the keyword used
in the address-type, diagnostic-type, or MTA-name-type sub-field
indicates the expected format of the address, status-code, or
MTA-name which follows.

The "-type" sub-fields 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 [SMTP], 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 one or more specifications that provide such
descriptions. (The "rfc822" address-type, "smtp" diagnostic-type,
and "dns" MTA-name-type are defined in [DRPT].) Registration forms
for address-type, diagnostic-type, and MTA-name-type appear in
Appendix D.

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 RFC822

The following lexical tokens, defined in [RFC822], 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 [HOSTREQ].

2.2 Per-Message DSN Fields

Some fields of a DSN apply to all of the delivery attempts described
by that DSN. At most, these fields may appear 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" that 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 that
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
that 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.

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 that 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 non-delivery 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.

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 non-delivery
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
sub-field. 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 sub-field 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 that
translated a foreign (non-Internet) delivery status notification into
this DSN. This field MUST appear in any DSN that 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

For gateways into Internet mail, the MTA-name-type will normally be
"dns", 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 sub-field 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 "dns".)

The mta-name portion of the Received-From-MTA field is formatted
according to the conventions indicated by the MTA-name-type sub-
field.

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 RFC822 'date-time' format, as
modified by [HOSTREQ]. 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.

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 ]
[ final-log-id-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 will normally be "rfc822", and the address will be
according to the syntax specified in [RFC822]. 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 [DRPT]. 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.

The syntax of the field is as follows:

final-recipient-field =
"Final-Recipient" ":" address-type ";" generic-address

The generic-address sub-field of the Final-Recipient field MUST
contain the mailbox address of the recipient (from the transport
envelope), as it was when the Reporting MTA accepted the message for
delivery.

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 a 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 sub-field 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 are
not allowed 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"

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 [DRPT],
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 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 that 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 sub-field of the status-code.
; Each numeric sub-field 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 [STATUS].

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 sub-field 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
non-delivery 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.

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 RFC822 'date-time' format, as
modified by [HOSTREQ]. Numeric timezones ([+/-]HHMM format) MUST be
used.

2.3.8 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.9 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 RFC822 'date-time' format, as
modified by [HOSTREQ]. Numeric timezones ([+/-]HHMM format) MUST be
used.

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 that produced the DSN. (e.g., Foomail-Queue-ID).

MTA implementers 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 that 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 [DRPT]), it is sufficient that delivery
failure reports use this protocol.

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
[DRPT] 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
[DRPT], 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 RFC1123, 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:

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
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容