view Side-By-Side changes
Network Working Group Keith Moore Internet Draft University of Tennessee Expires:May 20,20 July 1995 Greg Vaudreuil Octel Network ServicesNovember 20, 199420 January 1995 An Extensible Message Format for Delivery Status Notificationsdraft-ietf-notary-mime-delivery-03.txtdraft-ietf-notary-mime-delivery-04.txt Status of this Memo This document is an Internet-Draft. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as ``work in progress.'' To learn the current status of any Internet-Draft, please check the ``1id-abstracts.txt'' listing contained in the Internet- Drafts Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or ftp.isi.edu (US West Coast). 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 ismeant to beintended as a machine-processablealternative toreplacement for thefull rangevarious types ofelectronic maildelivery status notifications currently used inuseInternet 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, theInternet.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. Moore/Vaudreuil Expires 20 July 1995 [Page 1] Delivery Status Notifications 20 January 1995 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].Moore/Vaudreuil Expires 20 May 1995 [Page 1] Delivery Status Notifications 20 November 1994 Because many messages are sent between the MIME-capable world and other messaging systems (such as X.400 or the so-called "LAN-based" systems), the DSN protocol is intended to be useful in a multi-protocol messaging environment. To this end, the DSN protocol provides for the carriage of "foreign" addresses and error codes, in addition to the addresses and error codes normally used in Internet mail. Additional attributes may also be defined to support "tunneling" of foreign notifications through MIME-capable systems using the DSN protocol. 2. Requirements1.1. Purposes The DSNs defined in this memo are expected to serve several purposes: + Inform human beings of the status of message delivery processing, as well as the reasons for any delivery problems or outrightfailuresfailures, in a manner which is largely language-independent; + Allow mail user agents to keep track of the delivery status of messagessentsent, by associating returned DSNs with earlier message transmissions; + Allow mailing list expanders to automatically maintain their subscriber lists when delivery attemptsfailrepeatedly fail; + Convey delivery and non-delivery notifications resulting from attempts to deliver messages to "foreign" mail systems via agatewaygateway; + 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; + 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 + 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.These purposes place the following constraints on the notification protocol: +Moore/Vaudreuil Expires 20 July 1995 [Page 2] Delivery Status Notifications 20 January 1995 1.2. Requirements These purposes place the following constraints on the notification protocol: + It must be readable by humans as well as being machine-parsable. + 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. + It must be able to preserve theinformation associated withreason for the success or failure of a delivery attempt in a remote messaging system, using the "language"(addresses(mailbox addresses and status codes) of that remote system.Moore/Vaudreuil Expires 20 May 1995 [Page 2] Delivery Status Notifications 20 November 1994+ 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. + 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. + 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 theoriginal system,foreign addresses and error codes, so thatthe "foreign" attributes mentioned abovethese may be correctlyinterpreted.interpreted by gateways. A DSNconsists ofcontains a set of per-message fieldstowhich 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 themessage,message to each of one or more recipients. 1.3. Terminology A messagethat is either gatewayed between dissimilar messaging systems or auto-forwarded to an alternate recipient addressmayhavebe transmitted through several message transfer agents (MTAs) on itssender orway to a recipient. For a variety of reasons, recipient addresseschangedmay be rewritten duringtransit. For any particular recipient, up to threethis process, so each MTA may potentially see a different recipient address. Depending on the purpose for which a DSN is used, different formats ofana particular recipient address will be needed. Several DSN fields are defined in terms ofinterest: "original" The recipient address as originally specified bythesender. "final" The recipient address as it was whenview from a particular MTA in themessage was presented totransmission. The MTAs are assigned the"final"following names: Moore/Vaudreuil Expires 20 July 1995 [Page 3] Delivery Status Notifications 20 January 1995 a. Original MTA The Original MTA is the one tohandlewhich the message is submitted forthat recipient (i.e.,delivery by theone which is issuingsender of theDSN). "remote" If an attempt was made bymessage. Note: Each time a message is re-sent to a completely different set of recipients (say to the"final"subscribers of a mailing list), the Original MTA for the new recipients of that message is the one torelaywhich the message is initially submitted for delivery toyet another MTA, andthe new list of recipients. 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 DSNis issuedwas produced by translating the"final"foreign notice into DSN format, the Reporting MTAbased onwill still identify theresponse"foreign" MTA where the delivery attempts occurred. c. Preceding MTA The Preceding MTA is the MTA from which the Reporting MTA received the message, and accepted responsibility for delivery of the"remote" (next-hop)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 theaddress presented"next hop" MTA refuses to accept responsibility for delivery of the"remote" MTA, along withmessage to one or more of its intended recipients, thestatus code returned by that MTA,relaying MTA mayalso beneed to issue a DSN on behalf ofinterest.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 1may be useful in explainingillustrates thedifferencerelationship between the"original", "final", and "remote"various MTAs: +-----+ +--------++-----------+ +-----++---------+ +---------+ +------+ | | => |Original| => ... =>|penultimate||Preceding| =>|Final||Reporting| ===> |Remote| | user| | MTA | | MTA | | MTA | <No! | MTA | |agent| +--------++-----------+ +--v--++---------+ +----v----+ +------+ | | | | | <-------------------------------------------+ +-----+ (DSN returned to sender byFinalReporting MTA) Figure 1.Illustration ofOriginal,Final,Preceding, Reporting and Remote MTAsIn the diagram, the "original" MTA is the oneEach of these MTAs may provide information whichacceptsis useful in a DSN: Moore/Vaudreuil Expires 20 July 1995 [Page 4] Delivery Status Notifications 20 January 1995 + Ideally, themessage fromDSN will contain thesender's user agent. The message successfully passes through perhaps several other MTAs until it arrives at the "final" MTA, which for some reason needs to issue a DSN. The DSN is returnedaddress of each recipient as originally specified to thesender. (By definition, the MTA that issues a DSN is always the "final" MTA.) Moore/Vaudreuil Expires 20 May 1995 [Page 3] Delivery Status Notifications 20 November 1994 If the "final" MTA is issuing the DSN based on information obtained from some otherOriginal MTAdownstream (for example, becauseby thedownstream MTA refused to accept responsibility for deliverysender ofa message), then the MTA which reported that information is the "remote" MTA. (If the "final" MTA issues the DSN based on information obtained locally, as inthecase of delivery to a local user, there is no "remote" MTA.) Eachmessage. This version ofthese addresses is useful under some circumstances: + The DSN must containtheoriginal recipientaddress is needed (rather than a forwarding address or some modified version of the originaladdress),address) so that the sender may compare the recipient address in the DSNcan be comparedwith therecipientaddressas specified by the sender when the original message was sent. + The "final" form ofin the sender's records (e.g. an addressis needed when reporting a problem tobook for an individual, thepostmasterlist of subscribers for a mailing list) and take appropriate action. Similarly, thesite where message delivery failed, soDSN may contain an "envelope identifier" thatshe can attemptwas known toreproduce the conditions that caused the failure. + When interpreting a DSN,both the sender's user agentwill wantand thelatest possible (i.e. "remote") status codeOriginal MTA at the time of message submission, and which ifit is available. However, this code may either notincluded in the DSN, can beavailable,used by the sender to keep track of which messages were orit might be fromwere not delivered. + If aforeignmessage was (a) forwarded to a different address than that specified by the sender, (b) gatewayed to a different mail systemwhose codes are not understoodthan 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 useragent. In these casesagent (or the sender) prefers the original recipient address, so the "final"code might be more useful. + When gatewayingaddress 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 "failure" DSNintoshould contain the most accurate explanation for the delivery failure that is available. For ease of interpretation, this information should be aforeign MTS,format which is independent of thegateway may use eithermail transport system that issued the"remote" or "final"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 statuscodescode andrecipient addresses, dependinga mechanism for reporting transport-specific codes. Depending oncircumstances. Similarly, it maythe circumstances that produced delivery failure, the transport-specific code might beappropriate to useobtained from either theoriginalReporting MTA or thecurrent recipient address for any particular recipient. This situation is described in more detail in Appendix 13.Remote MTA. Since different values for"sender address","recipientaddress",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 hereallows each of several differentmay contain both the original and final forms ofthe sender address,a recipient address, andstatus code to be conveyed. 3. Format ofboth aDelivery Status Notification A complete DSN istransport- independent and aMIME message with a top-level content-type of multipart/report (defined in [2]). For a DSN, the report-type parametertransport-specific indication ofthe multipart/report content is "delivery-status". A particular DSN describes thedeliverystatus for exactly one message. However, an MTA MAY report onstatus. Extension fields may also be added by thedelivery statusReporting MTA as needed to provide additional information forseveral recipients of the same messageuse in asingle DSN. Duetrouble ticket or tothe nature of the mail transport system (where responsibilitypreserve information fordeliverytunneling ofa message to its recipientsforeign delivery reports through Internet DSNs. The Original, Reporting, and Remote MTAs maybe split among several MTAs,exist in very different environments and use dissimilar transport protocols, MTA names, address formats, and deliverytostatus codes. DSNs therefore do not assume any Moore/Vaudreuil Expires 20MayJuly 1995 [Page4]5] Delivery Status Notifications 20November 1994January 1995 particularrecipient may be delayed), multiple DSNsformat 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 may bestill be issued. The DSNany octet string, and whose format isaddressed (in bothindicated by theheader and envelope)"type" subfield. This allows a DSN tothe return address from the envelopeconvey these quantities regardless oftheformat. 2. Format of a Delivery Status Notification A DSN is a MIME messagefor whichwith a top-level content-type of multipart/report (defined in [2]). When a multipart/report content is used to transmit a DSN: + The report-type parameter of theDSNmultipart/report content isbeing generated."delivery-status". + TheFrom header fieldfirst component of theDSNmultipart/report contains a human-readable explanation of theaddressDSN, as described in [5]. + The second component ofa human who is responsible for maintainingthemail system at the final MTA site (e.g. Postmaster), whilemultipart/report is of content-type message/delivery-status, described in section 2.1 of this document. + If theenvelope sender addressoriginal message or a portion of theDSNmessage isset uptoensure that no delivery status reports willbeissued in responsereturned to theDSN itself. (For example, in SMTP,sender, it appears as theMAIL FROM address should be an empty string.)third compoment 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" RFC 822 headers which containthe sameequivalent information. In particular, it is very desirable to preserve the subject, date, and message-id (or equivalent) fields from the original message. Themessage/delivery-status content-type is defined as follows: MIME type name:DSN MUST be addressed (in both the messageMIME subtype name: delivery-status Optional parameters: none Encoding considerations: "7bit" encoding is sufficientheader andshould be usedthe transport envelope) tomaintain readability when viewed by non-MIME mail readers. Security considerations: discussed in section 6 of this memo. The message/delivery-status report typethe return address from the transport envelope which accompanied the original message forusewhich the DSN was generated. (For a message that arrived via SMTP, the envelope return address appears in themultipart/report is "delivery-status".MAIL FROM command.) Thebody of a message/delivery-status consistsFrom field ofone or more "fields" formatted according totheABNF of RFC 822message header"fields" (see [5]). The per-message fields appear first. Following the per-message fields are one or more groupsofper-recipient fields. Each groupthe DSN SHOULD contain the address ofper- recipient fieldsa human who ispreceded byresponsible for maintaining the mail system at the Reporting MTA site (e.g. Postmaster), so that ablank line. Usingreply to theABNF of RFC 822,DSN will reach that person. Exception: if a DSN is translated from a foreign delivery report, and thesyntaxgateway performing the translation cannot determine the appropriate address, the From field of themessage/delivery-status content is as follows: delivery-status-content = per-message-fields 1*( CRLF per-recipient-fields ) These fields are described in detail below. Note: Since these fields are defined according toDSN MAY be therulesaddress ofRFC 822, the same conventions for continuation lines and comments apply. Notification fields may be continued onto multiple lines by beginning each additional line withaSPACE or TAB. Text which appears in parenthesishuman who isconsidered a comment and not part ofresponsible for maintaining thecontentsgateway. The envelope sender address ofthat notification field. Field names are case-insensitive, sothenames of notification fields may be spelled in any combination of upper and lower case letters. Comments inDSN SHOULD be chosen to ensure that Moore/Vaudreuil Expires 20MayJuly 1995 [Page5]6] Delivery Status Notifications 20November 1994 fields may use the "encoded-word" construct definedJanuary 1995 no delivery status reports will be issued in[6]. Several fields existresponse toidentify the "MTS type" of the original, final, or remote MTA. Forthepurpose of this specification, a "message transfer system" (MTS) is a service which transfers electronicDSN itself, and MUST be chosen so that DSNs will not generate mailmessages from one user (the sender)loops. (If an SMTP transaction is used toone or more users (recipients).send a DSN, the MAIL FROM address MUST be an empty string.) A particularMTS will have its own protocolsDSN describes the delivery status for(a) electronic mail addressesexactly one message. However, an MTA MAY report on the delivery status forsenders and recipients, (b) namesseveral recipients ofMTAs, (c)theformatsame message in a single DSN. Due to the nature ofelectronicthe mailmessages, (d) transferring messages andtransport system (where responsibility formessage delivery from one MTA to another, and (e) communicatingdeliverystatus conditions. An MTS-type isof aidentifier for a particularmessagetransfer system. A registry of MTS-types is maintained by the Internet Assigned Numbers Authority (IANA). IANA will not register MTS-type names beginning with "X-"; these are reserved for experimental use. The syntax for an MTS-type is: mts-type = atom Because DSNsto its recipients may beissued for messages that originated in foreign mail systems, or gatewayed from delivery status reports that were issued in foreign mail systems, many of the addresssplit among several MTAs, andstatus codes fieldsdelivery to any particular recipient may be delayed), multiple DSNs may be still be issued insome format other than that normally used in the Internet.response to a single message submission. 2.1 Thevarious MTS-type fields aremessage/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 should be used toidentify themaintain readability when viewed by non-MIME mailsystemreaders. Security considerations: discussed in section 4 of this memo. The message/delivery-status report type for use inwhich a particular address or status code appeared. For example, ifthefinal- mts-typemultipart/report isX400, the final-recipient address must be an X.400 recipient address, and the final-status code must be an X.400-style error code. Like notification field names, MTS-type names are also case-insensitve. A number"delivery-status". The body ofDSN fields are defined to haveafield body consistingmessage/delivery-status consists of"xtext". Within such fields,one or more "fields" formatted according to thenormalABNF of RFC 822special charactersheader "fields" (see [6]). The per-message fields appear first, followed by a blank line. Following the per-message fields arenot used. Portionsone or more groups of"xtext" enclosed in paraenthesis are treated as comments, but such comments are not considered separators for the purposeper-recipient fields. Each group oflexical analysis. Exceptper-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 TAB. Text which appears in Moore/Vaudreuil Expires 20 July 1995 [Page 7] Delivery Status Notifications 20 January 1995 parenthesis is considered a comment andescaped-crlf's, allnot 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 do not consist entirely of ASCII characters, and also to allow comments to be inserted in the data. Any octet may be represented by "+" followed by two upper case hexadecimal digits. With certain exceptions, octets that correspond to ASCII characters may be represented as themselves. SPACE and HTAB characters aresignificant. RFC 1522ignored. 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 /escaped-crlflinear-white-space / comment ) xchar = any ASCII CHAR betweenSPACE (32)"!" (33) andTILDE"~" (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 caseMoore/Vaudreuil Expires 20 May 1995 [Page 6] Delivery Status Notifications 20 November 1994hexadecimal digitsAn escaped-crlf may appear at the end of a line to allow the field to be continued to the next line without inserting any white space. escaped-crlf = "\" immediately followed by the characters: CR LF SPACEWhen encodinga field whose body is definedan octet sequence as"xtext", a SPACE which immediately precedes a CR LF pair shouldxtext: + Any ASCII CHAR between "!" and "~" MAY be encodedeitherasa "hexchar", oritself. (Some CHARs in this range may also be encoded asan "escaped-crlf" followed by a SPACE. When decoding a field whose body is defined"hexchar"s, at the implementor's discretion.) + ASCII CHARs that fall outside the range above must be encoded as"xtext", any number of SPACEs which immediately precede a CR"hexchar". + Line breaks (CR LFpair (i.e. end of line) shouldSPACE) MAY beignored. 3.1 Per-Messageinserted 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 DSNFields Somefieldsofrequire aDSN apply to all of the delivery attempts described by"-type" subfield thatDSN. These fields may appear at most once in any DSN.specifies the format of a mailbox address, status code, or MTA name. Thesefieldstypes areused to correlatedefined as follows: Moore/Vaudreuil Expires 20 July 1995 [Page 8] Delivery Status Notifications 20 January 1995 + An "address-type" specifies theDSN withformat of a mailbox address. For example, Internet mail addresses use theoriginal message transaction and to provide additional information which may be useful to gateways. With"rfc822" address-type. address-type = atom + A "diagnostic-type" specifies theexceptionformat ofthe original-mts-typea status code. For example, when a DSN fielditself,contains a reply code reported via the Simple Mail Transfer Protocol [3], the "smtp" diagnostic-type is used. diagnostic-type = atom + An "MTA-name-type" specifies the format ofeach ofan MTA name. For example, for an SMTP server on an Internet host, theper-message fieldsMTA name isspecific totheoriginal-mts-type. per-message-fieldsdomain name of that host, and the "dns" MTA-name-type is used. MTA-name-type =[ original-mts-type-field CRLF ] [ original-envelope-id-field CRLF ] final-mts-type-field CRLF final-mta-field CRLF [ received-from-field CRLF ] [ arrival-date-field CRLF ] *( extension-field CRLF ) 3.1.1atom TheOriginal-MTS-Type field original-mts-type-field = "Original-MTS-Type" ":" MTS-typeInternet 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].) Theoriginal-mts-type field containsregistration for an address-type should include theMTS-typename of theMTS in whichaddress-type and a specification (or a reference to a specification) that describes the syntax for that type of electronic mail address. The registration for a diagnostic-type should include themessage was submitted. ThisnameMUST beof the diagnostic-type and a specification that describes the syntax of diagnostic codes and the meanings of legal values for such codes. The registration of anIANA-registered MTS-type name, unless itMTA-name-type should include the name of the MTA- name-type and a description of the syntax of such names. IANA will not accept registrations for any address-type, diagnostic- type, or MTA-name-type name that begins with "X-".This field is required ifThese 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 theoriginal-envelope-id field or any original-recipient field is present. If neither of theseABNF grammar for DSNs: atom, CHAR, comment, CR, CRLF, date-time, DIGIT, LF, linear-white-space, SPACE. 2.2 Per-Message DSN Fields Some fieldsis present,of a DSN apply to all of theoriginal-mts-type fielddelivery attempts described by that DSN. These fields maybe omitted. 3.1.2 The Original-Envelope-Id fieldappear at most once in any DSN. These Moore/Vaudreuil Expires 20MayJuly 1995 [Page7]9] Delivery Status Notifications 20November 1994 The optional original-envelope-id field contains an "envelope identifier" which uniquely identifiesJanuary 1995 fields are used to correlate thetransaction during whichDSN with the original messagewas submitted,transaction andwas either (a)to provide additional information which may be useful to gateways. per-message-fields = [ original-envelope-id-field CRLF ] reporting-mta-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. Theoriginal-envelope-id lineOriginal-Envelope-Id field is defined as follows: original-envelope-id-field = "Original-Envelope-Id" ":" envelope-id envelope-id = xtext There may be at most oneoriginal-envelope-idOriginal-Envelope-Id field per DSN. If an original "envelope identifier" is not available when a DSN is issued, theoriginal-envelope-idOriginal-Envelope-Id DSN fieldMUSTSHOULD NOT be included in the DSN.NOTE IN DRAFT: This last sentence may be a bit too strong. The intent is to prevent anNOTE: An MTAfrom simply concoctingshould not supply an envelope-id for amessage.message if one was not present in the transmission envelope. For the envelope-id field to be useful, it must be unique for each message transmission, known by the sender of the original message when the message was sent, and be transmitted along with the message envelope. However, the MTA issuing the DSN has no way of knowing whether the envelope-id it received in a message envelope is the same as the "original" one known by the message sender. Some mail protocols require an envelope-id or similar token, and a gateway into such anenvironemntenvironment will have to concoct one without the sender's knowledge. If a DSN is issued for such a message, itwillmay contain an envelope-id which is not specified by the sender. In general this seems unavoidable. The envelope-id is NOT case-insensitive. The DSN must preserve the original case and spelling of the envelope-id. Moore/Vaudreuil Expires 20 July 1995 [Page 10] Delivery Status Notifications 20 January 1995 NOTE: Theoriginal-envelope-idOriginal-Envelope-Id is NOTto be confused withthemessage-idsame as the Message-Id from the message header. Themessage-idMessage-Id identifies the content of the message, while theoriginal-envelope-idOriginal-Envelope-Id identifies the transaction in which the message is sent.3.1.32.2.2 TheFinal-MTS-TypeReporting-MTA DSN fieldfinal-mts-type-fieldreporting-mta-field ="Final-MTS-Type""Reporting-MTA" ":"MTS-typemta-name-type ";" mta-name mta-name = xtext Thefinal-mts-typeReporting-MTA fieldcontains the name of the MTS via which the message arrived at the final MTA. The MTS-type MUST be registered with IANA, unless it begins with "X-". NOTE WELL: If the final MTA is actually a multi-protocol MTA or mail gateway, the final-mts-typeis defined as follows: A DSN describes thenameresults ofthe MTS by which theattempts to deliver, relay, or gateway a messageMoore/Vaudreuil Expires 20 May 1995 [Page 8] Delivery Status Notifications 20 November 1994 ARRIVED at that MTA.to one or more recipients. Thefinal-mts-type fieldReporting-MTA isREQUIRED. 3.1.4 The Final-MTA DSN field final-mta-field = "Final-MTA" ":" xtext The final-mta field contains the name ofthe MTA whichissuedattempted to perform the delivery, relay, or gateway operation described in the DSN. This field isREQUIRED. Thisrequired. Note that the Reporting-MTA is not necessarily the MTA whichreportedactually issued thesuccess or failure of a delivery attempt.DSN. Forexample, ifexample: + 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 thefinal-mtaReporting-MTA field.The contents of the final-mta field are formatted according+ If an attempt tothe conventionsdeliver a message outside of the"final" MTS, as indicated byInternet resulted in a nondelivery notification which was gatewayed back into Internet mail, thefinal-mts-type field.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. The mta-name portion of the Reporting-MTA field is formatted according to the conventions indicated by the mta-name-type subfield. Because the exact spelling of an MTA name may be significant in a particular environment, MTA names must be considered case-sensitive.3.1.52.2.3 TheReceived-FromReceived-From-MTA DSN field The optionalReceived-FromReceived-From-MTA field indicates the name of the MTA from which the message was received. (In Figure 1, this MTA islabelledlabeled the"penultimate""preceding" MTA.)received-from-fieldreceived-from-mta-field ="Received-From""Received-From-MTA" ":"xtextmta-name-type ";" mta-name If the message was received from an Internet host, the contents of theReceived-From fieldMoore/Vaudreuil Expires 20 July 1995 [Page 11] Delivery Status Notifications 20 January 1995 mta-name subfield should be the Internet domain name corresponding to the network address of that host.Otherwise, the contents of(In thisfieldcase, the mta-name-type will usually be "smtp", but may beany printable string identifying the MTA from which the messagedifferent if another protocol wasreceived.used.) Thecontentsmta-name portion of thereceived-fromReceived-From-MTA fieldareis formatted according to the conventionsof the "final" MTS, asindicated by thefinal-mts-type field.mta-name-type subfield. Since case is significant in some mail systems, the exact spelling, including case, of the MTA name should be preserved.3.1.62.2.4 The Arrival-Date DSN field The optional Arrival-Date field indicates the date and time at which the message arrived at thefinalReporting MTA. If the Date field is also provided in a per-recipient field, this can be used to determine the intervalMoore/Vaudreuil Expires 20 May 1995 [Page 9] Delivery Status Notifications 20 November 1994between when the message arrived at thefinalReporting 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. Numeric timezones ([+/-]HHMM format) MUST be used.3.1.7 Extension fields Additional per-message DSN fields may be defined in the future, if necessary to tunnel MTS-specific delivery for a particular MTS-type or by any extension to this memo which is published as an RFC. extension-field = extension-field-name ":" xtext extension-field-name = atom 3.22.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. The syntax for the group of per-recipient fields is as follows: per-recipient-fields =basic-fields mts-specific-fields basic-fields = recipient-field CRLF action-field CRLF status-field CRLF [ date-field CRLF ] [ final-log-id-field CRLF ] [ expiry-date-field CRLF ] mts-specific-fields =[ original-recipient-field CRLF ][final-recipient-field CRLF] [ final-status-fieldaction-field CRLF status-field CRLF][remote-mts-type-fieldremote-mta-field CRLF ] [remote-mta-fielddiagnostic-code-field CRLF ] [remote-recipient-fieldlast-attempt-date-field CRLF ] [remote-status-fieldexpiry-date-field CRLF ] *( extension-field CRLF ) 2.3.1 Original-Recipient field The"basic" fields are generic in nature and are always defined according to Internet mail conventions. Except forOriginal-Recipient field indicates the"date" field, these fields are required for eachoriginal recipientlisted in a DSN. When mts- specific fields are either not available or not usable (say,address as specified bya gateway to a different environment),the"basic" fields provide fallbacksender of the message for which the DSN is being issued. Moore/Vaudreuil Expires 20MayJuly 1995 [Page10]12] Delivery Status Notifications 20November 1994 values with a known syntax. The syntax of each mts-specific field is specific to the mts-type for which thatJanuary 1995 original-recipient-field = "Original-Recipient" ":" address-type ";" generic-address generic-address = xtext The address-type fieldapplies. For example,indicates theformattype of thefinal- recipient, final-mta,original recipient address. If the message originated within the Internet, the address- type field field will normally be "rfc822", andfinal-status fields are given bythefinal- mts-type field. This combined approach allows "foreign" information toaddress will bepreserved in DSNs for messages that are gatewayedaccording to the syntax specified inor out of[6]. The value "unknown" should be used if theInternet, while retaining a setReporting MTA cannot determine the type of"canonical" information which will alwaysthe original recipient address from the message envelope. This field is optional. It should bepresent,included only if the sender- specified recipient address was present in the message envelope, such as by the ESMTP extensions defined in [4]. This address is the same as that provided by the sender andwhichcanprovide minimum functionality. 3.2.1 Basic per-recipient fields 3.2.1.1 Recipientbe used to automatically correlate DSN reports and message transactions. 2.3.2 Final-Recipient field TheRecipientFinal-Recipient field indicates the recipient for which this set ofper- recipientper-recipient fields applies. This fieldMUST be presentis required in each set of per-recipient data. The syntax of the field is as follows:recipient-fieldfinal-recipient-field ="Recipient""Final-Recipient" ":"[route] addr-specaddress-type ";" generic-address Thevalue followingaddress subfield of theRecipientrecipient fieldcontainsshould contain theRFC 822mailbox address of the recipientaddress.(from the transport envelope) as it was when the message was accepted for delivery by the Reporting MTA. The Final-Recipient addressMUST be in RFC 822 "addr-spec" format (with an optional "route" prefix), and MUST contain the fully- qualified domain name ofmay differ from therecipient's domain. (EXCEPTION: Ifaddress originally provided by theDSN is being issued for this recipient,sender, becauseofit may have been transformed during forwarding and gatewaying into animproperly formatted address or incomplete domain name,totally unrecognizable mess. However, in therecipient DSNabsence of the optional Original-Recipient field, the Final-Recipient field and any returned content maycontainbe all theillegal address or the address withinformation available to correlate theincomplete domain name.) NOTE IN DRAFT: There is a conflict here between having a "failed"DSNreport exactly the conditions that cause an error, or havingwith arigorously formattedparticular message submission. The address-type fieldthat contains the failed address (even if the problem is masked whenindicates the type of addressis reformatted). To this author (KM), the former goal seems more important. Delivery failure is often causedexpected bybad address rewriting, andtheportion of anreporting MTA in thatgenerates a DSN can hardly be expected tocontext; for example, recipient addresses obtained via SMTP will normally bebetter at such rewriting (while attempting to translate a foreign address into 822 syntax) than the portionofthe MTA that rewrites such addresses for the message envelope.address-type "rfc822". NOTE: Thebest wayReporting MTA is not expected tosolveensure that the addressrewriting problem would seem to beactually conforms tomakethesourcesyntax conventions of theproblem obvious via accurate error reporting using DSNs. NOTE: Although RFC 1123 [7] discourages explicit source routingaddress-type. Instead, it should report exactly the address received inSMTP, and allows SMTPs to route directlythe envelope, without any changes other than those needed to encode thefinal domain, sourceaddress in "xtext". Moore/Vaudreuil Expires 20MayJuly 1995 [Page11]13] Delivery Status Notifications 20November 1994 routes are still allowed. IfJanuary 1995 Since mailbox addresses (including those used in therecipient address as originally specified is availableInternet) may be case sensitive, the case of alphabetic characters inRFC 822 addr-spec format,theRecipientaddress must be preserved. 2.3.3 Action fieldshould contain that address. Otherwise, the RecipientThe Action fieldshould containindicates theclosest available recipient address to that specifiedaction performed by thesender, as expressed in RFC 822 addr-spec format. This address may not correspond to the addressReporting-MTA asoriginally sent because it may have been transformed during forwarding and gatewaying into an totally unrecognizable mess. In the absencea result of its attempt to deliver theoptional original-recipient field, the Recipient field and any returned content may be all the information available to correlate the DSN with a particularmessagetransaction. Although domain names are case-insensitive, the case of alphabetic characters in the local-part of the addr-spec must be preserved. 3.2.1.2 action field The action field indicates the reason the DSN was issued.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""failure" / "delayed" / "delivered" / "relayed" The action-value may be spelled in any combination of upper and lower case characters."failed""failure" indicates that the message could not be delivered to the recipient. ThefinalReporting MTA has abandoned any attempts to deliver the message to this recipient. No further notifications should be expected. "delayed" indicates that thefinalReporting 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 expander. 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.Moore/Vaudreuil Expires 20 May 1995 [Page 12] Delivery Status Notifications 20 November 1994"relayed" indicates that the message has been relayed or gatewayed intoana "foreign" environment that does not accept responsibility for generating DSNs according to this specification. Additional notification messages may be provided by the"remote""foreign" environment that may or may not conform to this specification. (However, for subsequent notifications, the'original-recipient' fieldOriginal-Recipient and Original- Envelope-ID fields will almost certainly not be included becauseitthey will no longer be available.) Moore/Vaudreuil Expires 20 July 1995 [Page 14] Delivery Status Notifications 20 January 1995 NOTE ON ACTION VS. STATUS CODES: Although the 'action' fieldappearsmight seem to be redundant with the 'status' field, this is not the case. In particular, a4XX"temporary failure" ("4") statusvaluecode could be used with an action-value of either "delayed" or"failed". 3.2.1.3 status"failure". 2.3.4 Status field The per-recipientstatusStatus 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 =3*DIGIT "status" usesDIGIT "." 1*DIGIT "." 1*DIGIT Status codes thus consist of three numerical fields separated by ".". The first sub-field indicates whether thesetdelivery attempt was successful (2 = success, 4 = persistent temporary failure, 5 = permanent failure). The second sub-field indicates the probable source ofreply codes from SMTP [3]any delivery anomalies, andits extensions ([8], [9]), with additions to support indication of error conditions that can never result from an SMTP dialogue. If an SMTP reply code is not available,theclosest match shouldthird sub-field denotes a precise error condition. DSN status codes must bechosen from eitherdefined by standards track RFCs. IANA will maintain a registry of such codes. Initially, the following three status codes are defined: 2.0.0 successful relay, gateway, or delivery operation 4.0.0 unspecified persistent temporary failure 5.0.0 unspecified permanent failure NOTE: An extensive set ofSMTP replystatus codesoris currently under development (see [5]) which, if approved for standardization, will supplement theadditional codes listed in an appendix.list above. Eventually the list may be incorporated into a future version of this memo. Although status-codes are purely numeric, explanatory text may be included as a comment in parentheses following the status-code.NOTE: These "new" codes should only appear in delivery status notifications.2.3.5 Remote-MTA field Thecreation of "new" status-codes for delivery status notifications DOES NOT extendvalue associated with thelegal set of reply codes to be used with the SMTP protocol. The structure ofRemote-MTA DSNstatus-codes is described in an appendix to this memo. 3.2.1.4 date field The "date"fieldgives the date and time of the last delivery attempt (whether successful or unsuccessful) by the final MTA. Note that this may notshould be a printable ASCII representation of thesame as the date header fieldname of themessage used to transmit this"remote" MTA that reported delivery statusnotification. In cases whereto theDSN was"reporting" MTA. Moore/Vaudreuil Expires 20MayJuly 1995 [Page13]15] Delivery Status Notifications 20November 1994 generated by a gateway, the RFC 822 header will contain the time the message was sent and the DSN date field should be the time the notification event occurred. date-fieldJanuary 1995 remote-mta-field ="Date""Remote-MTA" ":"date-timemta-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 SHOULD NOT be included ifthe 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 expressedno remote MTA was involved inRFC 822 'date-time' format. Numeric timezones ([+/-]HHMM format) MUST be used. 3.2.1.5 final-log-id field The "final-log-id" field givesthefinal-log-idattempted delivery of the messagethat was used by the final-mta. This can be useful as an indextothe final- mta's log entry forthatdelivery attempt. final-log-id-field = "Final-Log-ID" ":" xtext This field is optional. 3.2.1.6 expiry-daterecipient. 2.3.6 Diagnostic-Code field ForDSNs of type "delay",a "failure" or "delayed" recipient, the"expiry-date"Diagnostic-Code DSN fieldgivescontains thedate after whichactual diagnostic code issued by thefinal MTA expects to abandon all attemptsmail transport. Since such codes vary from one mail transport todeliveranother, themessagediagnostic-type subfield is needed tothat recipient. expiry-date-fieldspecify which type of diagnostic code is represented. diagnostic-code-field ="Expiry-Date""Diagnostic-Code" ":"date-timediagnostic-type ";" xtext NOTE: Thedate and time are expressedinformation inRFC 822 'date-time' format. Numeric timezones ([+/-]HHMM format) MUST be used. 3.2.2 MTS-specific Per-recipient fields NOTE: Unless otherwise stated,thesyntax for a MTS-specific Per- recipientDiagnostic-Code fieldis: mts-specific-field = field-name ":" xtext This reflects the ability to carry any kind of addresses, MTA names, or status codes. A particular MTS-typemayplace restrictions on the allowable values for MTS-specific fields whenbe somewhat redundant with thatMTS-type is used. Withfrom theexception of MTS-type fields, all MTS-specific fields are case sensitive.Status field. Thefinal-MTA must not change the caseStatus field is needed so that any DSN, regardless of origin, may be understood by anyvalues reported in these fields. Moore/Vaudreuil Expires 20 May 1995 [Page 14] Deliveryuser agent or gateway that parses DSNs. Since the StatusNotifications 20 November 1994 3.2.2.5 original-recipient field The "original-recipient"code will sometimes be less precise than the actual transport diagnostic code, the Diagnostic-Code fieldindicatesis provided to retain theoriginal recipient address as specified bylatter information. Such information may be useful in a trouble ticket sent to thesenderadministrator of themessage for which the DSN is being issued.Reporting MTA, or when tunneling foreign nondelivery reports through DSNs. If themessage originated outside ofDiagnostic Code was obtained from a Remote MTA during an attempt to relay theInternet,message to that MTA, theoriginal- recipientRemote-MTA fieldwill not necessarily contain an RFC 822-style recipient address. However, ifshould be present. When interpreting a DSN, theoriginal-mts-typepresence of a Remote-MTA fieldis present,indicates that theoriginal-recipient address MUST conform toDiagnostic Code was issued by theconventionsRemote MTA. The absence of a Remote-MTA indicates that the Diagnostic Code was issued by theoriginal-mts-type.Reporting MTA. This field isoptional. Itoptional, because some mail systems supply no additional information beyond that which is returned in the 'action' and 'status' fields. However, this field should be includedonlyif transport-specific diagnostic information is available. 2.3.7 Last-Attempt-Date field The Last-Attempt-Date field gives thesender- specified recipient address was present in the message envelope, such as by the ESMTP extensions defined in [4]. This address is the same as that provided by the sender and can be used to automatically correlate DSN reportsdate andmessage transactions. 3.2.2.6 final-recipient field The final-recipient field contains the electronic mail addresstime of therecipient at the timelast attempt to relay, gateway, or deliver the messagewas accepted for delivery(whether successful or unsuccessful) by thefinalReporting MTA. Thisfieldisoptional. Ifnot necessarily thefinal-mts-type field is present,same as thesyntaxvalue of thefinal- recipient field MUST conform to the syntax for that MTS-type. 3.2.2.7 final-statusDate fieldThe value associated withfrom thefinal-status DSN field should be a printable ASCII representationheader ofa MTS-specific status code that indicatesthefinal MTA's precise reason for the success or failure tomessage used to transmit thisrecipient. The possible values for this field are specific todelivery status notification: In cases where thefinal-mts-type. This field is optional. 3.2.2.8 remote-mts-type field The value associated with remote-mts-typeDSNfield is the MTS type ofwas generated by a gateway, the"remote" MTA, as defined in section 2 of this document. ThisDate fieldis optional. It SHOULD NOT be included if no remote MTA was involvedin theattempted delivery of themessageto that recipient. 3.2.2.9 remote-mta fieldheader should Moore/Vaudreuil Expires 20MayJuly 1995 [Page15]16] Delivery Status Notifications 20November 1994 The value associated withJanuary 1995 contain the time the DSN was sent by the gateway and theremote-mtaDSN Last- Attempt-Date field should bea printable ASCII representation ofthename oftime the"remote" MTA that reportedlast deliverystatus to the "final" MTA. NOTE: The remote-mta field preserves the "while talking to" information that was provided in some pre-existing non-delivery reports.attempt occurred. last-attempt-date-field = "Last-Attempt-Date" ":" date-time This field is optional. It SHOULD NOT be included ifno remote MTA was involved in the attempted delivery ofthemessage to that recipient. The conventions for the nameactual date and time of theremote-mta fieldlast delivery attempt arespecific to the remote MTS-type. 3.2.2.10 remote-recipient field The value associated with the remote-recipient DSN field shouldnot available (which might bea printable ASCII representation oftherecipient address as presented tocase if the"remote" MTA in an attemptDSN were being issued bythe "final" MTA to relay the message.a gateway). Theconventions of the remote-recipient addressdate and time arespecific to the remote MTS-type. This field is optional. It SHOULD NOTexpressed in RFC 822 'date-time' format. Numeric timezones ([+/-]HHMM format) MUST beincluded if its value is the same as that of the final-recipient DSN field. 3.2.2.11 remote-status field The value associated with the remote-status DSNused. 2.3.8 Expiry-Date fieldshould be a printable ASCII representationFor DSNs of type "delay", thestatus value returned by"Expiry-Date" field gives theremote MTA todate after which thefinalReporting MTAin responseexpects tothe final MTA's attemptabandon all attempts torelaydeliver the message tothe remote MTA.that recipient. Theconventions for interpreting the remote-status DSN field are specific to the remote MTS-type. ThisExpiry-Date field isoptional, because some mail systems supply no additional information beyond that which is returnedoptional for "delay" DSNs, and SHOULD NOT appear inthe 'action'other DSNs. expiry-date-field = "Expiry-Date" ":" date-time The date and'status' fields. 3.2.2.12time are expressed in RFC 822 'date-time' format. Numeric timezones ([+/-]HHMM format) MUST be used. 2.4 Extension fieldsPer-recipient extensionAdditional per-message or per-recipient DSN fields mayalsobedefined, usingdefined in thesame syntaxfuture 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 forper-message extension field. 4. Extension Mechanism for DSNs Theexperimental use. DSNbody part includes several extensible fields. The extensible fields are: Moore/Vaudreuil Expires 20 May 1995 [Page 16] Delivery Status Notifications 20 November 1994 (a) New Status Codes New status codes may be defined to reflect error conditions which are not covered either by existing SMTP reply codes or by the additional codes defined in section 10.1 of this memo. New codes must be consistentfield names NOT beginning withthe theory of status codes defined in section 10, and"X-" MUST bedefined in apublished in an RFC.NOTE IN DRAFT: I (KM) am leaving this section as-is until the WG gets consensus on whether to define a new status code scheme or extend the existing SMTP scheme. (b) New MTS types New MTS-type names mayExtension DSN fields MAY also be definedto allowfor thecarriage offollowing reasons: + To allow additional information from foreignaddress anddelivery statuscode information in mts-specific DSN fields. New MTS-types mustreports to bedefined in a published RFC, which ideally should include a complete specification for exchanging mail between thetunneled through Internetand the foreign MTS-type. At a minimum, the definitionDSNs. The names ofan additional MTS-typesuch DSN fields shouldinclude: (1)begin with an indication of theproposed MTS-typeforeign environment name(2)(e.g. X400-Physical-Forwarding-Address). + To allow thesyntaxtransmission ofaddresses for that MTS-type, as they arediagnostic information which is specific tobe represented in DSN fields (3) the syntax of MTA names for that MTS-type (4) the syntax of status codes for that MTS-type, along withalist of the codes that are valid NOTE: A definition for the INTERNET MTS-type appears in section 11particular mail transport protocol. The names ofthis memo. (c) New DSN Fields Additional per-message or per-recipientsuch DSN fieldsmay be defined by any extension to this memo that is published asshould begin with anRFC. Theseindication of the mail transport being used (e.g. SMTP-Remote-Recipient-Address). Such fields should be used for diagnostic purposes onlyto contain additional information needed to tunneland not by user agents orreportmail gateways. + To allow transmission of diagnostic informationfrom foreign systems. In the event the DSN fields defined in this memo are insufficient for reporting delivery attempts in Internet mail, this specification as a whole should be revised. Extension field names that arewhich is specific to a particularMTS-typemessage transfer agent (MTA). The names of such DSN fields should begin with an indication of theMTS-type name and a hyphen. For example: a field called "X400-Remote-MTA-Brain-Death" would be specific toMTA which produced the"X400" MTS-type. Extension field names beginning with "X-" are reserved for experimental use. 5. Conformance and Usage RequirementsDSN. Moore/Vaudreuil Expires 20MayJuly 1995 [Page 17] Delivery Status Notifications 20November 1994January 1995 (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 MTA name should follow the "X-", (e.g. "X-Foomail- Log-ID"). All extension fields are assumed to have the following syntax: extension-field = extension-field-name ":" xtext extension-field-name = atom 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. A minimal implementation of this specificationwillneed generate only theRecipient,Reporting-MTA per-message field, and the Final-Recipient, Action, and Statusfields. However, generationfields for each attempt to deliver a message to a recipient described by the DSN. Generation of the otherfieldsfields, when appropriate, is strongly recommended. MTAs and gateways MUST NOT generate the"original-recipient"Original-Recipient field of a DSN unless the mail transfer protocolensures thatprovides the addressprovided is the oneoriginally 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""failure" DSN for that recipient. If a DSN is requested for a message that is forwarded to multiple recipients, the forwarding MTA should normally issue a "relayed" DSN for the originally-specified recipient and not propagate the request for a DSN to the forwarding addresses. Alternatively, the forwarding MTA can relay the request for a DSN to exactly one of the forwarding addresses and not propagate the request to the others. Submission of a message to a mailing list exploder is considered final Moore/Vaudreuil Expires 20 July 1995 [Page 18] Delivery Status Notifications 20 January 1995 delivery of the message. Upon delivery of a message to a recipient address corresponding to a mailing list expander, thefinalReporting 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. (SeeAppendix 14.)section 10.) This specification places no restrictions on the processing of DSNs received by user agents or distribution lists.6.4. Security considerations The following security considerations apply when using DSNs:6.14.1 ForgeryMoore/Vaudreuil Expires 20 May 1995 [Page 18] Delivery Status Notifications 20 November 1994DSNs may be forged as easily as ordinary Internet electronic mail. User agents and automatic mail handling facilities (such as mail distribution list expanders) 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 thereceiptsending of: + A falsified delivery notification when the messageasis notdelivered,delivered to the indicated recipient, + A falsified non-delivery notification when the message wasdelivered,in fact delivered to the indicated recipient, + A falsifiedfinal recipientFinal-Recipient address, + A falsifiedremote-mtaRemote-MTA identification, + A falsified relay notification when the message is "dead ended". + Unsolicited DSNs6.24.2 Confidentality 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 themessaesmessages are autoforwarded. The desire for such confidentiality will probably be heightened as "wireless mailboxes", such as pagers, become more widely used as autoforward addresses. Moore/Vaudreuil Expires 20 July 1995 [Page 19] Delivery Status Notifications 20 January 1995 MTA authors are encouraged to provide a mechanism which enables the end user to preserve the confidentality 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)a. issuing a "relayed" DSN (if a positive DSN were requested) when a message were forwarded to a confidential forwarding address, and disabling requests for positive DSNs for the forwarded message,b)b. omittingthe "remote-*""Remote-*" or extension fields of a DSN whenever they would otherwise contain confidential information (such as a confidential forwardingaddress, c)address), c. for messages forwarded to a confidential address, setting the envelope return address (e.g. SMTP MAIL FROM address) to the empty string (so that no DSNscouldwould beissued),sent from a downstream MTA to the original sender), d. for messages forwarded to a confidential address, disabling delivery notifications for the forwarded message (e.g. if the "next-hop" MTA using ESMTP and supports the DSN extension, by using the NOTIFY=NEVER parameter to the RCPT command), ord)e. 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 it were the originator. After obtaining final delivery status, it would issue a "proxy" DSN to the original sender.6.3In 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 "failure" DSN can not be relied upon as a guarantee that a message was Moore/Vaudreuil Expires 20MayJuly 1995 [Page19]20] Delivery Status Notifications 20November 1994January 1995 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. 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. If one of those delivery attempts succeeds and the other one fails, a "failure" DSN could be issued even though the message actually reached the recipient.7.5. 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, Ned Freed, Steve Kille, John Klensin, John Gardiner Myers, Mark Nahabedian, Julian Onions, Jacob Palme, Jean Charles Roy, and Gregory Sheehan.8.6. References [1] Borenstein, N., Freed, N. "Multipurpose Internet Mail Extensions", RFC 1521, Bellcore, Innosoft, September 1993. [2]Moore, K.,Vaudreuil, G. "Multipart/Report", Internet-Draft. [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", Internet-Draft. [5] Vaudreuil, G. "Enhanced Mail System Status Codes", Internet-Draft. [6] Crocker, D., "Standard for the Format of ARPA Internet Text Messages", STD 11, RFC 822, UDEL, August 1982.[6][7] Moore, K. "MIME (Multipurpose Internet Mail Extensions) Part Two: Message Header Extensions for Non-Ascii Text", RFC 1522, University of Tennessee, September 1993.[7] Braden, R. "Requirements for Internet Hosts - Application and Support" RFC 1123, October 1989. [8] Klensin, J., Freed, N., Rose, M., Stefferud, E., Crocker, D. "SMTP Service Extensions" RFC 1651, MCI, Innosoft International, Inc., Dover Beach Consulting, Inc., Network Management Associates, Inc., Silicon Graphics, Inc,7. Author's Addresses Keith Moore University of Tennessee 107 Ayres Hall Moore/Vaudreuil Expires 20 July1994. [9] Klensin, J., Freed, N., Moore, K. "SMTP Service Extension for Message Size Declaration" RFC 1653, MCI, Innosoft International, Moore/Vaudreuil Expires 20 May1995 [Page20]21] Delivery Status Notifications 20November 1994 Inc., University of Tennessee, July 1994. 9. Author's Addresses Keith Moore University of Tennessee 107 Ayres HallJanuary 1995 Knoxville, TN 37996-1301 USA email: moore@cs.utk.edu Gregory M. Vaudreuil Octel Network Services 17080 Dallas Parkway Dallas, TX 75248-1905 USA email: Greg.Vaudreuil@Octel.Com Moore/Vaudreuil Expires 20MayJuly 1995 [Page21]22] Delivery Status Notifications 20November 1994 10.January 1995 8. Appendix -Theory of status-codescollected grammar NOTE: Thefirst digit of the status-code isfollowing lexical tokens are definedas follows: 2yz Positive Completion status Final delivery of the message has been successfully completed. 4yz Transient Negative Completion status Attempts to deliver the message have been abandoned because of the persistence of "transient" failures. However, the error condition appears to be temporary and the sender may wish to resend the message. In SMTP, 4yz reply codes indicate conditions where the SMTP client is allowed to "try again later" to deliver a message. However, if delivery attempts continuein RFC 822: atom, CHAR, comment, CR, CRLF, date-time, DIGIT, LF, linear-white-space, SPACE. action-field = "Action" ":" action-value action-value = "failure" / "delayed" / "delivered" / "relayed" 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 ";" xtext envelope-id = xtext expiry-date-field = "Expiry-Date" ":" date-time extension-field = extension-field-name ":" xtext extension-field-name = atom final-recipient-field = "Final-Recipient" ":" address-type ";" generic-address generic-address = xtext ; "hexchar"s are used tofail, eventually the client will "give up". At this the client should issue a DSN. The last 4yz reply code obtained from the SMTP server shouldencode octets that cannot bereportedrepresented ; asthe status-code. 5yz Permanent Negative Completion status The message could not be deliveredplain text, either becauseof some permanent error associated with the recipient address. The sender should not attempt to resend the message to that recipient. 6yz Indeterminate Completion status This group of status codes is used when a message is relayedthey are reserved, orgatewayed into a mail system from which any requested DSNs may not be returned. No further notifications should be expected for this message and recipient. However,because ; theymay be issued, perhaps with incomplete information. The second digit of theare non-printable. hexchar = ASCII "+" immediately followed by two upper case hexadecimal digits last-attempt-date-field = "Last-Attempt-Date" ":" date-time mta-name = xtext mta-name-type = atom original-envelope-id-field = "Original-Envelope-Id" ":" envelope-id original-recipient-field = "Original-Recipient" ":" address-type ";" generic-address per-message-fields = Moore/Vaudreuil Expires 20 July 1995 [Page 23] Delivery Status Notifications 20 January 1995 [ original-envelope-id-field CRLF ] reporting-mta-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 ] [ expiry-date-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-codeis defined as follows: x0z Syntax These replies refer to syntax errors, syntactically-correct commands that don't fit= DIGIT "." 1*DIGIT "." 1*DIGIT status-field = "Status" ":" status-code diagnostic-type = atom xchar = anyfunctional category,ASCII CHAR between "!" (33) andunimplemented or superfluous commands. x2z Connections These replies refer to the transmission channel. x5z Mail system These replies indicate the status of the receiver mail system vis-"~" (126) inclusive, except for "+", "\" and "(". xtext = *( xchar / hexchar / linear-white-space / comment ) Moore/Vaudreuil Expires 20MayJuly 1995 [Page22]24] Delivery Status Notifications 20November 1994 a-vis the requested transfer or other mail system action. x6z External servers These replies indicateJanuary 1995 9. Appendix - Guidelines for gatewaying DSNs NOTE: This section provides non-binding recommendations for thestatusconstruction ofany external serversmail gateways thatare not an integral part ofwish to provide semi-transparent delivery reports between the Internet and another electronic mailsystem but whose operation is necessarysystem. Specific DSN gateway requirements forthe correct delivery of mail. The third digit of the status-code givesafiner gradationparticular pair ofmeaning. 10.1 New status-codes for DSNs In addition to the reply codesmail systems may be definedfor SMTP,by other documents. 9.1 Gatewaying from other mail systems to DSNs A mail gateway may issue a DSN to convey thefollowing codescontents of a "foreign" delivery or non-delivery notification over Internet mail. When there areusableappropriate mappings from the foreign notification elements to DSN fields, the information may be transmitted in those DSN fields. Additional information (such asstatus-codesmight be useful inDSNs: 400 Unspecified temporary failure This code isa"fallback"trouble ticket or needed to tunnel the foreign notification through the Internet) may beused when translating temporary failure codes fromdefined in extension DSN fields. (Such fields should be given names that identify the foreign mailsystems, when no more precise status-code is available. 426 Temporary communications failure This code indicates a "temporary" failure to establish communications with a host or networkprotocol, e.g. X400-* forwhich communications is necessaryX.400 NDN or DN protocol elements) The gateway must attempt todeliversupply reasonable values for themessage. Such failures would include "host unreachable", "network unreachable",Reporting-MTA, Final-Recipient, Action, and"connection refused" codes. 466 Temporary routing lookup failure This code indicates a "temporary" failure to locate information necessary to route a message. Such failures would include unanswered Domain Name Server queries,Status fields. These will normally be obtained by translating the values from the remote delivery orother queriesnon-delivery notification into their Internet-style equivalents. However, some loss ofdatabase servers that are necessary to route a message. 500 Unspecified permanent failure This codeinformation isa "fallback"to beused when translating permanent failure codesexpected. For example, the set of status-codes defined for DSNs may not be adequate to fully convey the delivery diagnostic code from the foreignmail systems when no better status-code is available. 601 Message relayed; expect no further notifications Thissystem. The gateway should assign the most precise codeis issued for messages forwhicha positive DSN was requested but which were successfully relayed or gatewayed into an environment which does not support such notifications. Moore/Vaudreuil Expires 20 May 1995 [Page 23] Delivery Status Notifications 20 November 1994 11. Appendix - definition ofdescribes theINTERNET MTS-type The INTERNET MTS-type is hereby defined to refer to what is commonly knownfailure condition, falling back on "generic" codes such asInternet mail. This includes all electronic mail systems which (a) use2.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 theRFC 822 and/or MIME protocolsDiagnostic-Code field (with an appropriate diagnostic-type value) forthe message content, (b)useRFC 822-style sender andin trouble tickets or tunneling. The sender-specified recipientaddressesaddress, and the original envelope- id, if present intheir envelopes, with domains registeredthe foreign transport envelope, should be preserved in theInternet domain name system (DNS) (including domains registered under "wildcard" mail exchanger (MX) records),Original-Recipient and(c) exchange such messages withOriginal-Envelope-ID fields. NOTE: While theIP-connected Internet. The INTERNET MTSgateway is notlimitedrequired tothose systems using SMTP. MTS-type-name: INTERNET Address-syntax: Addresses for the INTERNET MTS mustensure that these fields bein the "addr- spec" format defined in RFC 822 (with an optional "route" prefix), using fully-qualified domain names which are registered with the DNS. MTA-name-syntax: An INTERNET MTA-name shallauthentic, they should be supplied only if there is a reasonable chance that thefully-qualified domain namefield values correspond to those at the time of submission of the original message. The gateway should also attempt to preserve the "final" recipient addresses and MTAissuingnames from theDSN. The address Postmaster@{mta- name} must be a valid address by whichforeign system. In themaintainerinterest ofthat MTAhuman readability, it may bereached. Status-codes: Status codes for the INTERNET MTS consist of three decimal digits. The initial set of status codes consists of thedesirable to encode foreign protocol elements as meaningful printable ASCII strings, rather than encoding theset of SMTP reply codes (including those defined by SMTP extensions), along with the additional codes defined in appendix 10 of this memo. Moore/Vaudreuil Expires 20 May 1995 [Page 24] Delivery Status Notifications 20 November 1994 12. Appendix - collected grammar delivery-status-content = per-message-fields *( CRLF per-recipient-fields ) per-message-fields = [ original-mts-type-field CRLF ] [ original-envelope-id-field CRLF ] [ final-mts-type-field CRLF ] final-mta-field CRLF [ received-from-field CRLF ] [ arrival-date-field CRLF ] *( extension-field CRLF ) original-mts-type-field = "Original-MTS-Type" ":" mts-type original-envelope-id-field = "Original-Envelope-Id" ":" envelope-id envelope-id = xtext final-mts-type-field = "Final-MTS-Type" ":" mts-type final-mta-field = "Final-MTA" ":" xtext arrival-date-field = "Arrival-Date" ":" date-time extension-field = extension-field-name ":" xtext extension-field-name = atom per-recipient-fields = basic-fields mts-specific-fields basic-fields = recipient-field CRLF action-field CRLF status-field CRLF [ date-field CRLF ] [ final-log-id-field CRLF ] [ expiry-date-field CRLF ] mts-specific-fields = [ original-recipient-field CRLF ] [ final-recipient-field CRLF ] [ final-status-field CRLF ] [ remote-mts-type-field CRLF ] [ remote-mta-field CRLF ] [ remote-recipient-field CRLF ] [ remote-status-field CRLF ] *( extension-field CRLF ) recipient-field = "Recipient" ":" [route] addr-spec action-field = "Action" ":" action-value Moore/Vaudreuil Expires 20 May 1995 [Page 25] Delivery Status Notifications 20 November 1994 status-field = "Status" ":" status-code date-field = "Date" ":" date-time final-log-id-field = "Final-Log-ID" ":" xtext expiry-date-field = "Expiry-Date" ":" date-time original-recipient-field = "Original-Recipient" ":" xtext final-recipient-field = "Final-Recipient" ":" xtext final-status-field = "Final-Status" ":" xtext remote-mts-type-field = "Remote-MTS-Type" ":" mts-type remote-mta-field = "Remote-MTA" ":" xtext remote-recipient-field = "Remote-Recipient" ":" xtext remote-status-field = "Remote-Status" ":" xtext action-value = "failed" / "delayed" / "delivered" / "relayed" status-code = 3*DIGIT mts-type = atom ; NOTE: For fields whose field-body is defined as 'xtext', ; the normal RFC 822 special characters are not used. ; text enclosed in paraenthesis is treated as a comment, ; but such comments are not considered separators for ; the purpose of lexical analysis. Except for comments ; and escaped-crlf's, all characters are significant. ; RFC 1522 encoded-words may NOT be used in xtext. xtext = *( xchar / hexchar / escaped-crlf ) xchar = any ASCII CHAR between SPACE (32) and TILDE (126) inclusive, except for "#", "\" and "(". ; "hexchar"s are used to encode octets that cannot be represented ; as plain text, either because they are reserved, or because ; they are non-printable. hexchar = ASCII "#" immediately followed by two upper case hexadecimal digits ; An escaped-crlf may appear at the end of a line to allow the ; field to be continued to the next line without inserting any ; white space. Moore/Vaudreuil Expires 20 May 1995 [Page 26] Delivery Status Notifications 20 November 1994 escaped-crlf = "\" immediately followed by the characters: CR LF SPACE Moore/Vaudreuil Expires 20 May 1995 [Page 27] Delivery Status Notifications 20 November 1994 13. 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. 13.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. The information may be transmitted in the mts-specific fields of a DSN that are defined in this memo, or if necessary, in extension fields. The gateway MUST attempt to supply reasonable values for the per- recipient 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 status from the foreign system. In this case, the gateway should make a best effort, falling back on "generic" codes such as 200 (success), 400 (temporary failure), and 500 (permanent failure) when necessary. The sender-specified recipient address, if available, should be preserved in the original-recipient field. The gateway should also attempt to preserve the "final" recipient addresses, mta names, and status codes from the foreign system. Because DSN fields are limited to the ASCII character set, it may be necessary to encodeforeign protocol elementsas printable ASCII values. The encoding method is specific to the MTS-type from which the delivery report is being received. "remote" values, when available, should be similarly preserved. If it is desirable to provide transparent tunneling of the foreign delivery status notifications through Internet mail, the gateway specification may define per-recipient extension fields to carry additional mts-specific information as necessary. 13.2using xtext. Moore/Vaudreuil Expires 20 July 1995 [Page 25] Delivery Status Notifications 20 January 1995 9.2 Gatewaying from DSNs to other mail systems A DSN may be gatewayed from the Internet to 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.Moore/Vaudreuil Expires 20 May 1995 [Page 28] Delivery Status Notifications 20 November 1994In 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,andthelatest availabledelivery statuscode. Each of these must be in the original sender's format. If the original-recipient address is available,(success, failure, or temporary failure), and for failed deliveries, a diagnostic code that describes theoriginal-mts- type matches the destination MTS, the original-recipient address should be provided in the resulting foreign delivery status report. Otherwise, the gateway may translate the "canonical" recipient address into the convention required byreason for thedestination system. The final- or remote- recipient addresses may also be used. However, due to address translation and mail forwarding,failure. Ideally, each of thesemay have little or no resemblance towill be in the originalrecipient address. Ifsender's format. The gateway should make an attempt to preserve theremote-status code is availableOriginal- Recipient address and Original-Envelope-ID (if present), in theremote-mts-type matchesresulting foreign delivery status report. When reporting delivery failures, if theMTS to whichdiagnostic-type subfield of theDSN is being gatewayed,Diagnostic-Code field indicates that theremote-statusoriginal diagnostic codecan be used directly. Otherwise, if the final-mts-type matchesis understood by the destinationMTS,environment, thefinal-status code mayinformation from the Diagnostic-Code field should be used. Failing that, the"canonical" status-code mayinformation in the Status field should be mapped into theset of status codesclosest available diagnostic code usedbyin the destinationMTS.environment. If it is possible to tunnel a DSN through the destinationMTS,environment, the gateway specification may define a means of preserving the DSN information in the delivery status reports used bythe destination MTS. Such encapsulation will necessarily be specific tothatparticular MTS.environment. Moore/Vaudreuil Expires 20MayJuly 1995 [Page29]26] Delivery Status Notifications 20November 1994 14.January 1995 10. Appendix - Guidelines for use of DSNs by mailing list expanders DSNs are designed to be used by mailing list expanders 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 expander 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 expander 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. Theoriginal-recipientOriginal-Recipient field should be used if available, since it should exactly match the subscriber address known to the list. If theoriginal-recipientOriginal-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 fromone ofthe'status' codesStatus andthe 'action' field. RecipientsAction fields. Reports for recipients with action values other than"failed""failure" can generally be ignored; in particular, subscribers should not be removed from a list due to "delayed"DSNs. The latest possible status code understood by the list expander should be used; the 'remote- status' code is best, followed by the 'final-status' code (if the codes for the final or remote MTS-type are understood by the list expander), and finally the 'status' code.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 expander not delete a subscriber based on any singlefailedfailure 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.When choosing whether to delete a subscriber,Once more precise status codes are defined, it may be useful to differentiate between the statuscodes.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 might depend on the type of error. On the other hand, a "user unknown" error whichpersistspersisted for several dayscan usuallycould be considered a reliablethatindication that addressiswere no longer valid. Moore/Vaudreuil Expires 20MayJuly 1995 [Page30]27] Delivery Status Notifications 20November 1994 Moore/Vaudreuil Expires 20 MayJanuary 1995[Page 31] Delivery Status Notifications 20 November 1994 15.11. 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 ofMTS-type*-type subfield names or extension fields in these examples is not to be construed as a definition for thoseMTS-typestype names or extension fields. These examples were manually translated from bounced messages using whatever information was available. Moore/Vaudreuil Expires 20MayJuly 1995 [Page32]28] Delivery Status Notifications 20November 1994 15.1January 1995 11.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-statusOriginal-MTS-Type: INTERNET Final-MTS-Type: INTERNETFinal-MTA: dns; cs.utk.eduRecipient:Original-Recipient: rfc822; louisl@larry.slip.umd.edu Final-Recipient: rfc822; louisl@larry.slip.umd.edu Action:failedfailure Status: 4.0.0 Diagnostic-Code: smtp; 426 (connection timed out)Date:Last-Attempt-Date: Thu, 7 Jul 1994 17:15:49 -0400Original-Recipient: louisl@larry.slip.umd.edu--RAA14128.773615765/CS.UTK.EDU content-type: message/rfc822 [original message goes here] --RAA14128.773615765/CS.UTK.EDU-- Moore/Vaudreuil Expires 20MayJuly 1995 [Page33]29] Delivery Status Notifications 20November 1994 15.2January 1995 11.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-statusOriginal-MTS-Type: INTERNETFinal-MTA: dns; cs.utk.eduFinal-MTS-Type: INTERNET Recipient:Original-Recipient: rfc822 ; arathib@vnet.ibm.com Final-Recipient: rfc822 ; arathib@vnet.ibm.com Action:failedfailure Status: 5.0.0 (permanent failure) Diagnostic-Code: smtp; 550 ('arathib@vnet.IBM.COM' is not a registered gateway user)Remote-MTS-Type: INTERNETRemote-MTA: dns; vnet.ibm.com Original-Recipient:arathib@vnet.ibm.com Recipient:rfc822; johnh@hpnjld.njd.hp.com Final-Recipient: rfc822; johnh@hpnjld.njd.hp.com Action: delayed Status:4664.0.0 (hpnjld.njd.jp.com: host name lookup failure) Original-Recipient:johnh@hpnjld.njd.hp.com Recipient:rfc822; wsnell@sdcc13.ucsd.edu Final-Recipient: rfc822; wsnell@sdcc13.ucsd.edu Action:failedfailure Status: 5.0.0 Diagnostic-Code: smtp; 550 (user unknown)Remote-MTS-Type: INTERNETRemote-MTA: dns; sdcc13.ucsd.eduOriginal-Recipient: wsnell@sdcc13.ucsd.edu--JAA13167.773673707/CS.UTK.EDU content-type: message/rfc822 [original message goes here] --JAA13167.773673707/CS.UTK.EDU-- Moore/Vaudreuil Expires 20MayJuly 1995 [Page34]30] Delivery Status Notifications 20November 1994 Moore/Vaudreuil Expires 20 MayJanuary 1995[Page 35] Delivery Status Notifications 20 November 1994 15.311.3 A delivery report generated by Message Router (MAILBUS) and gatewayed by PMDF_MR to a DSN.I assume that PMDF_MR could have preserved the MAILBUS status code inIn this case theDSN (NOTE IN DRAFT: right Ned?), I just don't know what it would be.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 Final-MTA: mailbus; SYS30Final-MTS-Type: mailbus Recipient: nair_s@SYS30.timeplex.comFinal-Recipient: unknown; nair_s Status:5005.0.0 (unknown permanent failure) Action:failed Final-Recipient: nair_s Final-Status: ??? (no matching directory entry found)failure --[;84229080704991/122306@SYS30]-- Moore/Vaudreuil Expires 20MayJuly 1995 [Page36]31] Delivery Status Notifications 20November 1994 15.4January 1995 11.4 A delay report from a multiprotocol MTA. Note that there is no returnedcontent;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 Final-MTS-Type: INTERNET Final-MTA: sun2.nsfnet-relay.ac.uk Recipient: thomas@de-montfort.ac.uk Status: 400 (unknown temporary failure) Action: delayed --foobar-- Moore/Vaudreuil Expires 20 May 1995 [Page 37] Delivery Status Notifications 20 November 1994 15.5 A DSN gatewayed from a X.400 nondelivery notification From: "UK.AC.NSF MTA" <postmaster@nsfnet-relay.ac.uk> To: na-digest-bounces@netlib2.cs.utk.edu Subject: Delivery Report (failure) for sdz009@prime.napier.ac.uk Date: Mon, 11 Jul 1994 02:09:43 +0100 Message-ID: <"sun3.nsfne.309:11.06.94.01.09.27"@nsfnet-relay.ac.uk> content-type: multipart/report; report-type=delivery-status; boundary=foobar --foobar content-type: text/plain This report relates to your message: Subject: NA Digest, V. 94, # 27, Message-ID: <199407031824.OAA23971@localhost>, To: na-digest list:; of Sun, 3 Jul 1994 19:47:56 +0100 Your message was not delivered to sdz009@prime.napier.ac.uk for the following reason: Message timed out --foobar content-type: message/delivery-status Final-MTS-Type: X400 Final-MTA: sun3.nsfnet-relay.ac.uk in /PRMD=uk.ac/ADMD= /C=gb/ Recipient: sdz009@prime.napier.ac.uk Action: failed Status: 400 (unknown temporary failure) Final-Recipient: /S=sdz009/OU=prime/O=napier/PRMD=UK.AC/ADMD= /C=GB/ Final-Status: 1/5 (unable-to-transfer/maximum-time-expired) X400-Subject-Intermediate-Trace-Information: /PRMD=uk.ac/ADMD= /C=gb/ arrival Sun, 3 Jul 1994 19:47:56 +0100 action Relayed X400-Subject-Intermediate-Trace-Information: /PRMD=uk.ac/ADMD= /C=gb/ arrival Sun, 3 Jul 1994 19:24:03 +0100 action Relayedmultipart/report; report-type=delivery-status; boundary=foobar --foobar content-type:message/rfc822 [returned content] --foobar-- Moore/Vaudreuil Expires 20 May 1995 [Page 38] Delivery Status Notifications 20 November 1994 16. Appendix - changes since the July 14 draft 1. Title and order of paragraphs in section 3 changedtext/plain The following message: UA-ID: Reliable PC (... Q-ID: sun2.nsf:77/msg.11820-0 has not been delivered todescribe the overall structure ofthemessage beforeintended recipient: thomas@de-montfort.ac.uk despite repeated delivery attempts over thedescriptionpast 24 hours. The usual cause ofthe message/delivery-status content-type. 2. Some text added to section 3 to explicitly state that comments and continuation lines are allowed in the same manner as in RFC 822. 3. Some fields are now explicitly marked as case-sensitive or case-insensitive. 4. "Rcpt"this problem isnow spelled "Recipient" in notification fields, andthat the"INET" MTS-Typeremote system isnow "INTERNET". 5. "X-" MTS-types are now allowed. 6. Received-From field added. 7. Section 3.2.1.2: added example to show how action and status-codes work, contrasting conversion-with-loss with conversion-prohibited. 8. Changed 'xchar' grammartemporarily unavailable. Delivery will continue todisallow the characters "(", "#", and "\"; added "#"XX notation for hexadecimal encoding; added "\" CR LF SPACE notationbe attempted up toallow transparent continuationa total elapsed time oflines. 9. Section 3.2.1.3: clarified "MUST be present for each recipient" -> "MUST168 hours, ie 7 days. You will bepresent for each delivery attempt...". 10. Section 3.2.2.6: deleted the text which said that the final-recipient field shouldn't appearinformed ifit is redundant with either original-recipient or recipient. 11. Section 3.2.2.11: fixed incomplete sentence. 12. Section 5: added note about the use of DSNs by mailing lists. 13. Appendix 10: removed description of x1z status-codes; these are useful in SMTP (e.g. HELP command) but are not applicable todeliverystatus reports. 15. Added text to clarify the difference between original, final, and remote MTAs. 15. Add textproves tosuggest that subject, date, and message-idberetained inimpossible within this time. Please quote thethird (returned content) body part of a DSN. 16. Added some prose to (sort-of) define "MTS". 17. Added Arrival-date per-message field.Q-ID in any queries regarding this mail. --foobar content-type: message/delivery-status Final-MTA: dns; sun2.nsfnet-relay.ac.uk Final-Recipient: rfc822; thomas@de-montfort.ac.uk Status: 4.0.0 (unknown temporary failure) Action: delayed --foobar-- Moore/Vaudreuil Expires 20MayJuly 1995 [Page39]32] Delivery Status Notifications 20November 1994 18. Added Expiry-date per-recipient field. 19. Added more prose to say that (a) a singleJanuary 1995 11.5 A DSNcan describe delivery status for multiple recipients of the same message, but (b) the delivery status for all recipients of the same message doesn't have to be in a single DSN, and (c)gatewayed from asingle DSN cannot describe delivery eventsX.400 nondelivery notification From: "UK.AC.NSF MTA" <postmaster@nsfnet-relay.ac.uk> To: na-digest-bounces@netlib2.cs.utk.edu Subject: Delivery Report (failure) formultiple messages. 20. Expanded the security considerations section. 21. Explicitly allow the first body part of a DSN to be a multipart/alternative. 22. Add a note to the effect that comments may be used in the status-code field. 23. Added an appendix about use of DSNs by mailing lists. 24. Renumbered references. 25. Added prose in the acknowledgements section. (Please let me know if I've left anybody out! -km) 26. Explicitly allow encoded-words in comments. 27. Allow an optional "route"sdz009@prime.napier.ac.uk Date: Mon, 11 Jul 1994 02:09:43 +0100 Message-ID: <"sun3.nsfne.309:11.06.94.01.09.27"@nsfnet-relay.ac.uk> content-type: multipart/report; report-type=delivery-status; boundary=foobar --foobar content-type: text/plain This report relates toappear in the 'recipient' field, and in {final,remote}-recipient fieldsyour message: Subject: NA Digest, V. 94, # 27, Message-ID: <199407031824.OAA23971@localhost>, To: na-digest list:; ofthe "internet" mts-type. 28. Fix a few troff glitches. STILL TO DO 1. Change "original-xxx"Sun, 3 Jul 1994 19:47:56 +0100 Your message was not delivered to"earliest-xxx" (if I can findsdz009@prime.napier.ac.uk for theright words...) 2. Figurefollowing reason: Message timed outand describe how to treat DSNs which result from multi-recipient mail forwarding. Intentions: (a) make the result unambiguous and meaningful to the sender, (b) uniform handling - don't make handing of "delivered" DSNs too different from "relayed/delayed/failed" DSNs.--foobar content-type: message/delivery-status Final-MTA: dns; sun3.nsfnet-relay.ac.uk (in /PRMD=uk.ac/ADMD= /C=gb/) Original-Recipient: rfc822; sdz009@prime.napier.ac.uk Final-Recipient: x400; /S=sdz009/OU=prime/O=napier/PRMD=UK.AC/ADMD=+20/C=GB/ Action: failure Status: 4.0.0 Diagnostic-Code: x400 ; 1/5 (unable-to-transfer/maximum-time-expired) X400-Subject-Intermediate-Trace-Information: /PRMD=uk.ac/ADMD= /C=gb/ arrival Sun, 3 Jul 1994 19:47:56 +0100 action Relayed X400-Subject-Intermediate-Trace-Information: /PRMD=uk.ac/ADMD= /C=gb/ arrival Sun, 3 Jul 1994 19:24:03 +0100 action Relayed --foobar content-type: message/rfc822 [returned content] --foobar-- Moore/Vaudreuil Expires 20MayJuly 1995 [Page40]33] ----