RFC 8098

Message Disposition Notification

๐Ÿ“… published February 2017, from ietf

RFC 8098: Message Disposition Notification ๐Ÿ’Œ

Okay bestie, let's start with the vibe check โœจ This doc is RFC 8098, called Message Disposition Notification, and it's a Standards Track document with STD 85 status, so it's a full Internet Standard ๐Ÿ‘‘ It was published in February 2017. The authors are T. Hansen (Ed.) from AT&T Laboratories and A. Melnikov (Ed.) from Isode Ltd. ๐ŸŽ€ It obsoletes RFC 3798 (so that one is retired now ๐Ÿซ ) and updates RFC 2046 and RFC 3461. The ISSN is 2070-1721.

Abstract

okay so this memo defines a MIME content type that a Mail User Agent (MUA) or an electronic mail gateway can use to report what happened to a message after it was successfully delivered to a recipient ๐Ÿ“ฌ The content type is meant to be machine processable, which is so important for the robots ๐Ÿค– It also defines extra message header fields so a sender can request these notifications (MDNs) in the first place ๐Ÿ’Œ

The goal is to bring Internet Mail up to speed with features that other messaging systems already have, like X.400 and the proprietary "LAN-based" systems. You've probably heard these called "read receipts," "acknowledgements," or "receipt notifications" ๐Ÿ‘€ The big thing is that it does all this while respecting privacy, which people have been really vocal about whenever this kind of feature came up in the past ๐Ÿ™ˆ

Since lots of messages hop between the Internet and other messaging systems (like X.400 or the proprietary "LAN-based" systems), the MDN protocol is built to work in a multiprotocol messaging environment ๐ŸŒˆ That means it can carry "foreign" addresses too, not just the ones Internet Mail normally uses. It can also define extra attributes so "foreign" notifications can be tunneled through Internet Mail ๐Ÿš‡

This document is an Internet Standard. It obsoletes RFC 3798 and updates RFC 2046 (message/partial media type handling) and RFC 3461 (Original-Recipient header field generation requirement) ๐Ÿ’…


Status of This Memo

This is an Internet Standards Track document ๐ŸŒธ

This document is a product of the Internet Engineering Task Force (IETF) โœจ It represents the consensus of the IETF community, and it got public review before the Internet Engineering Steering Group (IESG) approved it for publication ๐Ÿซถ If you want more info about Internet Standards, check out Section 2 of RFC 7841.

Info about the current status of this document, any errata, and how to give feedback on it lives at http://www.rfc-editor.org/info/rfc8098 ๐Ÿ”—


Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved ๐Ÿฉท

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they were in effect on the publication date. Please read these carefully, because they explain your rights and restrictions for this document ๐Ÿ“œ Any Code Components pulled out of this document must include the Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions. They're also provided without warranty, as described in the Simplified BSD License โš–๏ธ


Table of Contents

1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   4
  1.1.  Purposes  . . . . . . . . . . . . . . . . . . . . . . . .   4
  1.2.  Requirements  . . . . . . . . . . . . . . . . . . . . . .   4
  1.3.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   5
2.  Requesting Message Disposition Notifications  . . . . . . . .   5
  2.1.  The Disposition-Notification-To Header  . . . . . . . . .   5
  2.2.  The Disposition-Notification-Options Header . . . . . . .   8
  2.3.  The Original-Recipient Header Field . . . . . . . . . . .   9
  2.4.  Use with the Message/Partial Media Type . . . . . . . . .  10
3.  Format of a Message Disposition Notification  . . . . . . . .  10
  3.1.  The Message/Disposition-Notification Media Type . . . . .  12
  3.2.  Message/Disposition-Notification Content Fields . . . . .  15
  3.3.  Extension-Fields  . . . . . . . . . . . . . . . . . . . .  21
4.  Timeline of Events  . . . . . . . . . . . . . . . . . . . . .  22
5.  Conformance and Usage Requirements  . . . . . . . . . . . . .  23
6.  Security Considerations . . . . . . . . . . . . . . . . . . .  24
  6.1.  Forgery . . . . . . . . . . . . . . . . . . . . . . . . .  24
  6.2.  Privacy . . . . . . . . . . . . . . . . . . . . . . . . .  24
    6.2.1.  Disclosure of Product Information . . . . . . . . . .  25
    6.2.2.  MUA Fingerprinting  . . . . . . . . . . . . . . . . .  25
  6.3.  Non-repudiation . . . . . . . . . . . . . . . . . . . . .  25
  6.4.  Mail Bombing  . . . . . . . . . . . . . . . . . . . . . .  26
7.  Collected ABNF Grammar  . . . . . . . . . . . . . . . . . . .  26
8.  Guidelines for Gatewaying MDNs  . . . . . . . . . . . . . . .  29
  8.1.  Gatewaying from Other Mail Systems to MDNs  . . . . . . .  29
  8.2.  Gatewaying from MDNs to Other Mail Systems  . . . . . . .  29
  8.3.  Gatewaying of MDN-Requests to Other Mail Systems  . . . .  30
9.  Example . . . . . . . . . . . . . . . . . . . . . . . . . . .  30
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  31
  10.1.  Disposition-Notification-Options Header Field
         disposition-notification-parameter Names . . . . . . . .  32
  10.2.  Disposition Modifier Names . . . . . . . . . . . . . . .  33
  10.3.  MDN Extension Field Names  . . . . . . . . . . . . . . .  33
11. References  . . . . . . . . . . . . . . . . . . . . . . . . .  33
  11.1.  Normative References . . . . . . . . . . . . . . . . . .  33
  11.2.  Informative References . . . . . . . . . . . . . . . . .  34
Appendix A.  Changes from RFC 3798  . . . . . . . . . . . . . . .  36
Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  37
Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  37

1. Introduction ๐Ÿฆ‹

This memo defines a media type [RFC2046] for Message Disposition Notifications (MDNs) ๐Ÿ’ซ An MDN is how you tell the sender what happened to their message after it got delivered. That could be the message being displayed, printed, or deleted without being displayed, or the recipient refusing to send MDNs at all ๐Ÿ™…โ€โ™€๏ธ The "message/disposition-notification" content type is meant to be used inside the "multipart/report" content type defined in RFC-REPORT [RFC6522] ๐ŸŽ

This memo also defines the format of the notifications, plus the RFC-MSGFMT [RFC5322] header fields you use to request them ๐Ÿ“

1.1. Purposes

The MDNs defined in this memo are expected to do a few jobs ๐Ÿ’…

  • a. Tell humans what happened to their messages after delivery, in a way that doesn't depend on any human language ๐ŸŒ
  • b. Let mail user agents keep track of what happened to the messages they sent, by matching returned MDNs to the earlier transmissions ๐Ÿ•ต๏ธโ€โ™€๏ธ
  • c. Pass disposition notification requests and disposition notifications between Internet Mail and "foreign" mail systems through a gateway ๐Ÿšช
  • d. Let "foreign" notifications get tunneled through a MIME-capable messaging system and back into the original messaging system that sent the original notification, or even over to a third messaging system ๐Ÿš‡
  • e. Give language-independent, yet still reasonably precise, signals about what happened to a delivered message ๐ŸŽฏ

1.2. Requirements

These purposes put the following constraints on the notification protocol ๐Ÿง

  • a. It must be readable by humans and must be machine parsable ๐Ÿค“
  • b. It must provide enough information to let message senders (or their user agents) unambiguously match an MDN to the message that was sent and to the original recipient address the MDN was issued for (if that info is available), even if the message got forwarded to another recipient address ๐Ÿ”
  • c. It must also be able to describe the disposition of a message without depending on any particular human language or on the terminology of any particular mail system ๐ŸŒ
  • d. The specification must be extensible so it can handle future requirements ๐Ÿ”ฎ

1.3. Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC-KEYWORDS [RFC2119] ๐Ÿ”‘

All syntax descriptions use the ABNF specified by RFC-MSGFMT [RFC5322], which defines the lexical tokens used below: "CRLF", "FWS", "CFWS", "field-name", "mailbox-list", "msg-id", and "text" ๐Ÿงฉ The following lexical token is defined in RFC-SMTP [RFC5321]: "Atom" ๐Ÿ’–

2. Requesting Message Disposition Notifications โœจ

Message disposition notifications get requested by including a Disposition-Notification-To header field in the message, with one or more addresses saying where the dispositions should be sent ๐Ÿ“ฌ If you want the recipient's Mail User Agent (MUA) [RFC5598] to have more info when it generates the MDN, you can also include Original-Recipient and/or Disposition-Notification-Options header fields in the message ๐Ÿซถ

2.1. The Disposition-Notification-To Header ๐Ÿ’Œ

okay bestie, so if you want the receiving user agent to send back message disposition notifications, you slap a Disposition-Notification-To header field onto the message ๐ŸŽ€ The syntax is:

mdn-request-header = "Disposition-Notification-To" ":"
           mailbox-list CRLF

A Disposition-Notification-To header field can show up in a message at most once. โœจ

Having one is just a request for an MDN, not a demand. The recipient's user agent is always free to silently ignore it ๐Ÿ‘ป no drama, no cap.

An MDN MUST NOT itself have a Disposition-Notification-To header field. An MDN MUST NOT be generated in response to an MDN. ๐Ÿ™…โ€โ™€๏ธ

A user agent MUST NOT issue more than one MDN on behalf of each particular recipient. So once an MDN has gone out for a recipient, no more MDNs may be sent for that recipient by the same user agent, even if another disposition happens to the message ๐Ÿ’… The exception is forwarding. If a message gets forwarded, an MDN may already have been issued for the recipient doing the forwarding, and the person who gets the forwarded copy may also cause an MDN to be generated. It's giving chain reaction ๐Ÿฆ‹

It's also possible that the same message is accessed by multiple user agents (for example, using POP3), in which case multiple dispositions might be generated for the same recipient. Bestie, that's messy ๐Ÿ˜ญ User agents SHOULD lean on whatever the underlying message access protocol offers to stop multiple MDNs from being generated. Specifically, when the user agent is accessing the message using RFC-IMAP [RFC3501], it SHOULD implement the procedures specified in RFC-IMAP-MDN [RFC3503]. ๐ŸŒธ

Internet standards usually don't dictate how user interfaces behave, but it is strongly recommended that the user agent gets the user's consent before sending an MDN ๐Ÿซถ That consent can happen per message, through a prompt or dialog box, or globally through a preference setting. The user can also say globally that MDNs are to never be sent. The whole point of asking is to protect the user's privacy, and the default value should be not to send MDNs. Privacy is literally the main character here ๐Ÿ‘‘

MDNs MUST NOT be sent automatically if the address in the Disposition-Notification-To header field differs from the address in the Return-Path header field (see RFC-MSGFMT [RFC5322]).

So in that case, confirmation from the user MUST be obtained, if possible. If getting consent isn't possible (for example, the user isn't online at the time, or the client isn't an interactive email client), then an MDN MUST NOT be sent. ๐Ÿ™ˆ

Confirmation from the user MUST be obtained (or no MDN sent) if there is no Return-Path header field in the message, or if there is more than one distinct address in the Disposition-Notification-To header field. Two different addresses? Nope, we're not doing that ๐Ÿ’€

Now for the address matching. The comparison only looks at the addr-spec (local-part "@" domain) portion, ignoring any angle brackets, phrase, and route. As RFC 5322 prescribes, the comparison is case sensitive for the local-part and case insensitive for the domain part. The local-part comparison SHOULD be done after local-part canonicalization, which means removing the surrounding double-quote characters (if any) and any escaping "" characters. (See RFC-MSGFMT [RFC5322] for more details.) Implementations MAY treat known domain aliases as equivalent for the purpose of comparison. ๐Ÿงš

Heads up about subaddressing (see [RFC5233]). It can make two local-parts fail to match, which means an MDN might get suppressed. This document doesn't recommend special handling for that case, because the receiving MUA can't reliably know whether the sender is using subaddressing. Iykyk ๐Ÿ™ƒ

If the message contains more than one Return-Path header field, the implementation may pick one to use for the comparison, or treat the situation as a failure of the comparison.

Why all the strictness? Not sending an MDN automatically when the comparison fails or more than one address is specified reduces the chance of mail loops and of MDNs being used for mail bombing. Protecting the vibes, literally ๐Ÿ›ก๏ธ

It's especially important that a message containing a Disposition-Notification-To header field also contains a Message-ID header field. That's how user agents can automatically correlate MDNs with their original messages ๐Ÿ”—

Say you only want MDNs from some recipients and not others. Then two copies of the message should be sent: one with a Disposition-Notification-To header field, and one without. Lots of other header fields (like To and Cc) will be the same in both copies. The recipients in each message envelope decide who gets asked for MDNs and who doesn't. If you want, the Message-ID header field can be the same in both copies ๐Ÿ“ Other situations (like Bcc) also need multiple copies with slightly different header fields, so mixing those with a subset-of-recipients MDN request can end up with more than two copies, some with a Disposition-Notification-To header field and some without. Busy, but that's the job ๐Ÿ’…

If it's possible to tell that a recipient is a newsgroup, don't include a Disposition-Notification-To header field for that recipient. Similarly, if an existing message is resent or gatewayed to a newsgroup, the agent doing the resending or gatewaying SHOULD strip the Disposition-Notification-To header field. See Section 5 for more discussion. And clients that see an otherwise valid Disposition-Notification-To header field in a newsgroup message SHOULD NOT generate an MDN. Newsgroups don't get MDNs, periodt ๐Ÿ“ฐ

2.2. The Disposition-Notification-Options Header ๐ŸŽ€

Extensions to this spec might need to give the recipient's MUA extra info, so it can control how and what MDNs get generated. That's what the Disposition-Notification-Options header field is for. It's an extensible mechanism for passing that info along. Here's the syntax:

Disposition-Notification-Options =
           "Disposition-Notification-Options" ":" [FWS]
                          disposition-notification-parameter-list CRLF

disposition-notification-parameter-list =
           disposition-notification-parameter
           *([FWS] ";" [FWS] disposition-notification-parameter)

disposition-notification-parameter = attribute [FWS] "="
           [FWS] importance [FWS] "," [FWS] value
           *([FWS] "," [FWS] value)

importance = "required" / "optional"

attribute = Atom

value = word

A Disposition-Notification-Options header field can appear in a message at most once. โœจ

Now the importance thing, which is kinda the heart of it ๐Ÿ’– An importance of "required" means you NEED to interpret that disposition-notification-parameter to generate an MDN properly for this request. An importance of "optional" means an MUA that doesn't understand that parameter MAY generate an MDN in response anyway, ignoring the parameter's value. Flexible, but make sure your required stuff is actually understood ๐Ÿง 

No disposition-notification-parameter attribute names are defined in this specification. Future revisions or extensions can define them. Attribute names MUST be registered with the Internet Assigned Numbers Authority (IANA) using the "Specification Required" registration policy [RFC5226]. Registration, bestie, always registration ๐Ÿ“‹

Quick history lesson: the "X-" prefix used to mean "unregistered experimental stuff that's assumed to never become common." Deployment experience across this and other protocols has shown that assumption is often false ๐Ÿ™ƒ This document only allows "X-" for registering attributes that are already in common use. The prefix has no meaning for new attributes, and using it on substantially new attributes may cause confusion, so it's discouraged. (See Section 10 for a registration form.) ๐ŸŒˆ

2.3. The Original-Recipient Header Field ๐Ÿงšโ€โ™€๏ธ

So here's the deal: email addresses can get rewritten while a message is in transit, which means it's really useful for the original recipient address to be made available by the delivering Message Transfer Agent (MTA) [RFC5598]. The delivering MTA might be able to grab that info from the ORCPT parameter of the SMTP RCPT TO command, as defined in RFC-SMTP [RFC5321] and RFC-DSN-SMTP [RFC3461]. โœจ

RFC-DSN-SMTP [RFC3461] gets amended like this: if the ORCPT information is available, the delivering MTA SHOULD insert an Original-Recipient header field at the beginning of the message (along with the Return-Path header field). The delivering MTA MAY delete any other Original-Recipient header fields that occur in the message. The syntax looks like this:

original-recipient-header =
           "Original-Recipient" ":" OWS address-type OWS
           ";" OWS generic-address OWS

OWS = [CFWS]
      ; Optional whitespace.
      ; MDN generators SHOULD use "*WSP"
      ; (Typically a single space or nothing.
      ; It SHOULD be nothing at the end of a field.),
      ; unless an RFC 5322 "comment" is required.
      ;
      ; MDN parsers MUST parse it as "[CFWS]".

The address-type and generic-address tokens are as specified in the description of the Original-Recipient field in Section 3.2.3. ๐ŸŒธ

Why bother carrying the original recipient and returning it in the MDN? So MDNs can be automatically correlated with the original message on a per-recipient basis. That's the whole payoff ๐ŸŽฏ

2.4. Use with the Message/Partial Media Type ๐Ÿงฉ

Using Disposition-Notification-To, Disposition-Notification-Options, and Original-Recipient together with the MIME message/partial content type (RFC-MIME-MEDIA [RFC2046]) needs some extra definition, so here it is ๐Ÿซถ

When a message gets split into two or more message/partial fragments, the three header fields mentioned above SHOULD be placed in the "inner" or "enclosed" message (using the terms of RFC-MIME-MEDIA [RFC2046]). If these header fields show up in any of the fragments, they're ignored. Fragments don't get a say, babe ๐Ÿ’…

When the multiple message/partial fragments get reassembled, here's what happens. If these header fields occur along with the other header fields of a message/partial fragment message, they pertain to an MDN that will be generated for the fragment. If they occur in the header fields of the "inner" or "enclosed" message (using the terms of RFC-MIME-MEDIA [RFC2046]), they pertain to an MDN that will be generated for the reassembled message. Section 5.2.2.1 of RFC-MIME-MEDIA [RFC2046]) is amended so that, in addition to the header fields specified there, the three header fields described in this specification get appended, in order, to the header fields of the reassembled message. Lastly, any occurrences of the three header fields defined here in the header fields of the initial enclosing message MUST NOT be copied to the reassembled message. Not copying them over is the rule, no exceptions ๐Ÿ”ฅ

3. Format of a Message Disposition Notification โœจ

okay so an MDN is a MIME message whose top-level content type is multipart/report (defined in RFC-REPORT [RFC6522]) ๐Ÿ’… when you use multipart/report to send one, here's the vibe:

a. the report-type parameter of the multipart/report content is "disposition-notification" ๐ŸŽ€

b. the first component is a human-readable explanation of the MDN, as described in RFC-REPORT [RFC6522] ๐Ÿ“

c. the second component is content type message/disposition-notification, which gets its own section (Section 3.1 of this document) ๐Ÿฆ‹

d. if the original message (or part of it) is going back to the sender, it shows up as the third component of the multipart/report. the MUA making the MDN gets to decide whether to send it back or not ๐Ÿคทโ€โ™€๏ธ BUT if the original was encrypted and asked for an MDN, the returned copy MUST be in its original encrypted form ๐Ÿ”๐Ÿซถ

NOTE: for MDNs gatewayed from foreign systems, the original message's header fields might not be available ๐Ÿ˜ญ in that case the third component can be left out, or it can contain "simulated" RFC-MSGFMT [RFC5322] header fields that carry the same info. it's very desirable to keep the subject and date fields from the original message ๐Ÿ’–

okay now the rules that really matter ๐Ÿ‘‘

The MDN MUST be addressed (in both the message header field and the transport envelope) to the address(es) from the Disposition-Notification-To header field of the original message that the MDN is being generated for โœ‰๏ธ

The From header field of the MDN MUST contain the address of the person the disposition notification is being issued for ๐ŸŒธ

The envelope sender address (aka SMTP MAIL FROM) of the MDN MUST be null (<>). this means no Delivery Status Notification messages, and no other messages saying delivery worked or didn't, get sent back in response to an MDN ๐Ÿ™ˆ

A message disposition notification MUST NOT itself request an MDN. so it MUST NOT contain a Disposition-Notification-To header field ๐Ÿšซ๐Ÿ’…

The Message-ID header field (if there is one) on an MDN MUST be different from the Message-ID of the message the MDN is about ๐Ÿ†”

An MDN describes the disposition of exactly one message for exactly one recipient ๐ŸŽฏ one message submission can make multiple MDNs (one per recipient) โœจ BUT because of the stuff in Section 2.1, some recipients who asked for MDNs just won't send one back ๐Ÿ˜ญ that's life bestie ๐Ÿฅ€

3.1. The Message/Disposition-Notification Media Type ๐ŸŽ€

the message/disposition-notification media type is defined like this ๐Ÿงš

Type name:          message

Subtype name:       disposition-notification

Required parameters:  none

Optional parameters:  none

Encoding considerations:  "7bit" encoding is sufficient and MUST be
                    used to maintain readability when viewed by
                    non-MIME mail readers.

Security considerations:  discussed in Section 6 of RFC 8098.

Interoperability considerations:  none

Published specification:  RFC 8098

Applications that use this media type:  Mail Transfer Agents and
                    email clients that support multipart/report
                    generation and/or parsing.

Fragment identifier considerations:  N/A

Additional information:

                       Deprecated alias names for this type: N/A

                       Magic number(s): none

                       File extension(s): .disposition-notification

                       Macintosh file type code(s): The 'TEXT' type
                       code is suggested as files of this type are
                       typically used for diagnostic purposes and
                       suitable for analysis in a text editor.  A
                       Uniform Type Identifier (UTI) of "public.utf8-
                       email-message-header" is suggested.  This type
                       conforms to "public.plain-text".

Person & email address to contact for further information:
                    ART Area Mailing List <art@ietf.org>

Intended usage:     COMMON

Restrictions on usage:  This media type contains textual data in the
                    US-ASCII charset, which is always 7bit.

Author:             See the Authors' Addresses section of RFC 8098.

Change controller:  IETF

Provisional registration?  no

(ok the 7bit restriction applies to the message/disposition-notification part of the multipart/report, but NOT to the optional third part ๐Ÿ™ˆ it's giving "read the fine print")

the message/disposition-notification report type for use in multipart/report is "disposition-notification" โœจ

the body of a message/disposition-notification is one or more "fields" formatted according to the ABNF of RFC-MSGFMT [RFC5322] header "fields" ๐Ÿ“‹ here's the syntax ๐Ÿ‘‡

disposition-notification-content = [ reporting-ua-field CRLF ]
          [ mdn-gateway-field CRLF ]
          [ original-recipient-field CRLF ]
          final-recipient-field CRLF
          [ original-message-id-field CRLF ]
          disposition-field CRLF
          *( error-field CRLF )
          *( extension-field CRLF )

extension-field = extension-field-name ":" *([FWS] text)

extension-field-name = field-name

the order of the fields above is recommended but not fixed ๐ŸŒˆ and extension fields can show up anywhere ๐Ÿฆ‹

3.1.1. General Conventions for Fields

these fields follow the rules of RFC-MSGFMT [RFC5322], so the same conventions for continuation lines and comments apply ๐Ÿ’… notification fields can be continued onto more lines by starting each extra line with a SPACE or HTAB ๐Ÿซถ text in parentheses counts as a comment and is NOT part of the field's contents ๐Ÿ™ˆ field names are case insensitive, so you can spell notification field names in any mix of uppercase and lowercase ๐ŸŽ€ and RFC-MSGFMT [RFC5322] comments in notification fields may use the "encoded-word" construct from RFC-MIME-HEADER [RFC2047] ๐Ÿงš

3.1.2. "*-type" Subfields

several fields have a "-type" subfield, then a semi-colon, then "*text" โœจ for these fields, the keyword in the address-type or MTA-type subfield tells you what format the address or MTA-name after it should be ๐Ÿ‘€

the "-type" subfields work like this ๐Ÿ’–

a. an "address-type" specifies the format of a mailbox address. for example, Internet Mail addresses use the "rfc822" address-type ๐Ÿ“ฌ other values can show up here as specified in the "Address Types" IANA subregistry set up by RFC-DSN-FORMAT [RFC3464] ๐ŸŒธ

address-type = Atom

Atom = <The version from RFC 5321 (not from RFC 5322)
           is used in this document.>

b. an "MTA-name-type" specifies the format of a mail transfer agent name. for example, for an SMTP server on an Internet host, the MTA name is that host's domain name, and the "dns" MTA-name-type is used ๐ŸŒ other values can show up here as specified in the "MTA Name Types" IANA subregistry set up by RFC-DSN-FORMAT [RFC3464] ๐Ÿ“

mta-name-type = Atom

values for address-type and mta-name-type are case insensitive ๐Ÿ™Œ so "RFC822" and "rfc822" are the same thing ๐Ÿ’œ

the Internet Assigned Numbers Authority (IANA) keeps a registry of address-type and mta-name-type values, with descriptions of what each one means or a reference to specs that describe them ๐Ÿ“š (the "rfc822" address-type is defined in RFC-DSN-SMTP [RFC3461].) registration forms for address-type and mta-name-type are in RFC-DSN-FORMAT [RFC3464] ๐ŸŽ€

3.2. Message/Disposition-Notification Content Fields ๐ŸŒธ

3.2.1. The Reporting-UA Field

reporting-ua-field = "Reporting-UA" ":" OWS ua-name OWS
                     [ ";" OWS ua-product OWS ]

ua-name = *text-no-semi

ua-product = *([FWS] text)

text-no-semi = %d1-9 /         ; "text" characters excluding NUL, CR,
               %d11 / %d12 / %d14-58 / %d60-127  ; LF, or semi-colon

okay so the Reporting-UA field ๐Ÿฅฐ an MDN describes what happened to a message after it got delivered to a recipient ๐Ÿ“ฌ in every case, the Reporting-UA is the MUA that did the disposition described in the MDN โœจ

the "Reporting-UA" field has info about the MUA that made the MDN ๐Ÿ” servers often use it to figure out the scope of reported interoperability problems, to work around or tailor responses for particular MUA limitations, and for analytics on MUA or OS use ๐Ÿ“Š an MUA SHOULD send a "Reporting-UA" field unless it's specifically configured not to ๐Ÿซถ

if the reporting MUA is more than one component (like a base program plus plug-ins), you can show that by listing product names ๐Ÿงฉ

a reporting MUA SHOULD limit product identifiers to what's needed to identify the product ๐ŸŽฏ a sender MUST NOT put advertising or other nonessential info inside the product identifier ๐Ÿšซ๐Ÿ“ข

a reporting MUA SHOULD NOT generate a "Reporting-UA" field with needlessly fine-grained detail, and SHOULD limit how many subproducts third parties add ๐Ÿ™…โ€โ™€๏ธ overly long and detailed "Reporting-UA" values raise the risk of a user getting identified against their wishes ("fingerprinting") ๐Ÿ˜ญ๐Ÿ•ต๏ธโ€โ™€๏ธ

also, implementations are encouraged NOT to borrow other implementations' product tokens to claim compatibility ๐Ÿ™ˆ wait, scratch that caps, the original says "not to" in lowercase, so here it is: implementations are encouraged not to use the product tokens of other implementations to declare compatibility with them, because that gets around the whole purpose of the field ๐Ÿ’€ if an MUA pretends to be a different MUA, recipients can assume the user actually wants responses tailored for that MUA, even if they won't work as well for the MUA really in use ๐ŸŽญ

example ๐ŸŽ€

Reporting-UA:  Foomail 97.1

3.2.2. The MDN-Gateway Field

the MDN-Gateway field says which gateway or MTA translated a foreign (non-Internet) message disposition notification into this MDN ๐ŸŒ‰ this field MUST appear in any MDN that a gateway translated from a foreign system into MDN format, and it MUST NOT appear otherwise ๐Ÿ™…โ€โ™€๏ธโœจ

mdn-gateway-field = "MDN-Gateway" ":" OWS mta-name-type OWS
                    ";" OWS mta-name OWS

mta-name = *text

for gateways into Internet Mail, the MTA-name-type will normally be "dns", and the mta-name will be the Internet domain name of the gateway ๐ŸŒ๐Ÿ’–

3.2.3. Original-Recipient Field ๐ŸŽ€

Okay so the Original-Recipient field is basically the original recipient address, exactly as the sender wrote it, for the message this MDN is about. ๐Ÿ’Œ For Internet Mail, the value gets copied from the Original-Recipient header field of that message. Here's the bestie rule: if there's an Original-Recipient header field in the message, or if info about the original recipient is reliably available some other way, then the Original-Recipient field MUST be included. If not, it MUST NOT be included. โœจ And if the message has more than one Original-Recipient header field, the MUA may pick which one to use, or act like none of them are there. ๐Ÿฆ‹

original-recipient-field =
          "Original-Recipient" ":" OWS address-type OWS
          ";" OWS generic-address OWS

generic-address = *text

The address-type field tells you what kind of original recipient address it is. If the message started out inside the Internet, the address-type is normally rfc822, and the address follows the syntax from RFC-MSGFMT [RFC5322]. ๐Ÿ’… The value unknown should be used if the Reporting MUA can't figure out the address type from the message envelope. This address is the same one the sender gave, so it can be used to automatically match MDN reports to original messages on a per-recipient basis. ๐Ÿซถ

3.2.4. Final-Recipient Field ๐Ÿ’œ

The Final-Recipient field tells you which recipient the MDN is being issued for. This field MUST be present. ๐Ÿ™ˆ

The syntax is:

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

The generic-address subfield of the Final-Recipient field SHOULD contain the mailbox address of the recipient, which will be the same as the From header field of the MDN, as it was when the MUA generated the MDN. ๐Ÿ“ฌ

Lowkey a fun one: this field might not show the final recipient address if an alias forwards mail to a personal address. Like, customer-support@example.com forwards to bob@example.com. Bob might want to send MDNs without giving away his personal email address. ๐ŸŒธ In that case, the Final-Recipient field can contain:
Final-Recipient: rfc822;customer-support@example.com

instead of:

Final-Recipient: rfc822;bob@example.com

The Final-Recipient address may be different from the address the sender originally gave, because it might have been transformed during forwarding and gatewaying into a totally unrecognizable mess. ๐Ÿ’€ But if the optional Original-Recipient field isn't there, the Final-Recipient field and any returned content might be the only info left to match the MDN to a particular message recipient. ๐Ÿงš

The address-type subfield shows the type of address the reporting MTA expects in that context. Recipient addresses obtained via SMTP will normally have address-type "rfc822", but other values can come from the "Address Types" subregistry of the "Delivery Status Notification (DSN) Types" IANA registry. ๐Ÿ“

Mailbox addresses (including the ones used on the Internet) can be case sensitive, so the case of alphabetic characters in the address MUST be preserved. ๐Ÿ”ฅ

3.2.5. Original-Message-ID Field ๐ŸŒˆ

The Original-Message-ID field gives the message-ID of the message this MDN is being issued for. It's taken from the Message-ID header field of that message. This field MUST be present if and only if the original message contained a Message-ID header field. โœจ The syntax:

original-message-id-field =
          "Original-Message-ID" ":" msg-id

The msg-id token is as specified in RFC-MSGFMT [RFC5322]. ๐Ÿ’–

3.2.6. Disposition Field ๐Ÿ‘‘

The Disposition field shows the action the Reporting MUA took on behalf of the user. This field MUST be present. ๐Ÿซถ

The syntax for the Disposition field is:

disposition-field =
          "Disposition" ":" OWS disposition-mode OWS ";"
          OWS disposition-type
          [ OWS "/" OWS disposition-modifier
          *( OWS "," OWS disposition-modifier ) ] OWS

disposition-mode = action-mode OWS "/" OWS sending-mode

action-mode = "manual-action" / "automatic-action"

sending-mode = "MDN-sent-manually" / "MDN-sent-automatically"

disposition-type = "displayed" / "deleted" / "dispatched" /
          "processed"

disposition-modifier = "error" / disposition-modifier-extension

disposition-modifier-extension = Atom

The disposition-mode, disposition-type, and disposition-modifier values may be spelled in any mix of uppercase and lowercase US-ASCII characters. ๐ŸŒธ

3.2.6.1. Disposition Modes ๐Ÿฆ‹

Disposition mode has two parts: action mode and sending mode. ๐Ÿ’…

Here are the action modes:

"manual-action"     The disposition described by the disposition type
                    was a result of an explicit instruction by the
                    user rather than some sort of automatically
                    performed action.  (This might include the case
                    when the user has manually configured her MUA to
                    automatically respond to valid MDN requests.)
                    Unless prescribed otherwise in a particular mail
                    environment, in order to preserve the user's
                    privacy, this MUST be the default for MUAs.

"automatic-action"  The disposition described by the disposition type
                    was a result of an automatic action rather than
                    an explicit instruction by the user for this
                    message.  This is typically generated by a Mail
                    Delivery Agent (e.g., MDN generations by Sieve
                    reject action [RFC5429], Fax-over-Email
                    [RFC3249], voice message system (see Voice
                    Profile for Internet Mail (VPIM) [RFC3801]), or
                    upon delivery to a mailing list).

"manual-action" and "automatic-action" are mutually exclusive. One or the other MUST be specified. ๐Ÿ™…โ€โ™€๏ธ

And here are the sending modes:

"MDN-sent-manually" The user explicitly gave permission for this
                    particular MDN to be sent.  Unless prescribed
                    otherwise in a particular mail environment, in
                    order to preserve the user's privacy, this MUST
                    be the default for MUAs.

"MDN-sent-automatically"
                    The MDN was sent because the MUA had previously
                    been configured to do so automatically.

"MDN-sent-manually" and "MDN-sent-automatically" are mutually exclusive. One or the other MUST be specified. ๐Ÿ”ฅ

3.2.6.2. Disposition Types ๐Ÿงš

Here are the disposition-types that are defined:

"displayed"         The message has been displayed by the MUA to
                    someone reading the recipient's mailbox.  There
                    is no guarantee that the content has been read or
                    understood.

"dispatched"        The message has been sent somewhere in some
                    manner (e.g., printed, faxed, forwarded) without
                    necessarily having been previously displayed to
                    the user.  The user may or may not see the
                    message later.

"processed"         The message has been processed in some manner
                    (i.e., by some sort of rules or server) without
                    being displayed to the user.  The user may or may
                    not see the message later, or there may not even
                    be a human user associated with the mailbox.

"deleted"           The message has been deleted.  The recipient may
                    or may not have seen the message.  The recipient
                    might "undelete" the message at a later time and
                    read the message.

3.2.6.3. Disposition Modifiers โœจ

Only the extension disposition modifiers are defined:

disposition-modifier-extension
                    Disposition modifiers may be defined in the
                    future by later revisions or extensions to this
                    specification.  MDN disposition value names MUST
                    be registered with the Internet Assigned Numbers
                    Authority (IANA) using the "Specification
                    Required" registration policy.  (See Section 10
                    for a registration form.)  MDNs with disposition
                    modifier names not understood by the receiving
                    MUA MAY be silently ignored or placed in the
                    user's mailbox without special interpretation.
                    They MUST NOT cause any error message to be sent
                    to the sender of the MDN.

It is not required that an MUA be able to generate all of the possible values of the Disposition field. ๐Ÿ’œ

A user agent MUST NOT issue more than one MDN on behalf of each particular recipient. So once an MDN has been issued for a recipient, no more MDNs can be issued for that recipient, even if another disposition happens to the message. ๐Ÿ™…โ€โ™€๏ธ However, if a message is forwarded, a "dispatched" MDN MAY be issued for the recipient doing the forwarding, and the recipient of the forwarded message may also cause an MDN to be generated. ๐Ÿฆ‹

3.2.7. Error Field ๐Ÿ’€

The Error field supplies extra information as text when the "error" disposition modifier appears. The syntax is:

error-field = "Error" ":" *([FWS] text)

Quick heads-up: the syntax of these header fields doesn't include comments, so the "encoded-word" construct defined in RFC-MIME-HEADER [RFC2047] can't be used to carry non-ASCII text. ๐ŸŒ Apps that need to send non-ASCII text in these fields should consider using the message/global-disposition-notification media type specified in [RFC6533] instead of this specification. ๐ŸŒˆ

3.3. Extension-Fields ๐ŸŒธ

Additional MDN fields may be defined in the future by later revisions or extensions to this specification. MDN field names MUST be registered with the Internet Assigned Numbers Authority (IANA) using the "Specification Required" registration policy. (See Section 10 for a registration form.) MDN Extension-fields may be defined for the following reasons: ๐Ÿ“

a. To allow additional information from foreign disposition reports to be tunneled through Internet MDNs. The names of such MDN fields should begin with an indication of the foreign environment name (e.g., X400-Physical-Forwarding-Address).

b. To allow transmission of diagnostic information that is specific to a particular Mail User Agent (MUA). The names of such MDN fields should begin with an indication of the MUA implementation that produced the MDN (e.g., Foomail-information). ๐Ÿง

4. Timeline of Events โœจ

Okay, bestie, here's the play-by-play of how a message and its MDNs go down, step by step. ๐ŸŽ€

  • User composes message. ๐Ÿ’Œ
  • User tells MUA to send message.
  • MUA passes message to Mail Submission Agent (MSA) and original recipient information is passed along.
  • MSA sends message to next MTA.
  • Final MTA receives message.
  • Final MTA delivers message to recipient's mailbox (possibly generating a Delivery Status Notification (DSN)).
  • (Recipient's) MUA discovers a new message in recipient's mailbox and decides whether an MDN should be generated. If the MUA has information that an MDN has already been generated for this message, no further MDN processing described below is performed. If MUA decides that no MDN can be generated, no further MDN processing described below is performed. ๐Ÿ™…โ€โ™€๏ธ
  • MUA performs automatic processing and might generate corresponding MDNs ("dispatched", "processed", or "deleted" disposition type with "automatic-action" and "MDN-sent-automatically" disposition modes). The MUA remembers that an MDN was generated. ๐Ÿค–
  • MUA displays list of messages to user. ๐Ÿ“ฌ
  • User selects a message and requests that some action be performed on it. ๐Ÿ‘†
  • MUA performs requested action; if an automatic MDN has not already been generated, with user's permission, sends an appropriate MDN ("displayed", "dispatched", "processed", or "deleted" disposition type, with "manual-action" and "MDN-sent-manually" or "MDN-sent-automatically" disposition mode). The MUA remembers that an MDN was generated. โœจ
  • User possibly performs other actions on message, but no further MDNs are generated. ๐Ÿ’…

5. Conformance and Usage Requirements

An MUA or gateway conforms to this specification if it generates MDNs according to the protocol defined in this memo. It is not necessary to be able to generate all of the possible values of the Disposition field. ๐ŸŒธ

MUAs and gateways MUST NOT generate the Original-Recipient field of an MDN unless the mail protocols provide the address originally specified by the sender at the time of submission. Ordinary SMTP does not make that guarantee, but the SMTP extension defined in RFC--DSN-SMTP [RFC3461] permits such information to be carried in the envelope if it is available. The Original-Recipient header field defined in this document provides a way for the MTA to pass the original recipient address to the MUA. ๐Ÿšซ

Each sender-specified recipient address may result in more than one MDN. If an MDN is requested for a recipient that is forwarded to multiple recipients of an "alias" (as defined in Section 6.2.7.3 of RFC-DSN-SMTP [RFC3461]), each of the recipients may issue an MDN. ๐Ÿฆ‹

Successful distribution of a message to a mailing list exploder or gateway to Usenet newsgroup SHOULD be considered the final disposition of the message. A mailing list exploder MAY issue an MDN with a disposition type of "processed" and disposition modes of "automatic-action" and "MDN-sent-automatically" indicating that the message has been forwarded to the list. In this case, the request for MDNs is not propagated to the members of the list. ๐Ÿ“ฎ

Alternatively (if successful distribution of a message to a mailing list exploder / Usenet newsgroup is not considered the final disposition of the message), the mailing list exploder can issue no MDN and propagate the request for MDNs to all members of the list. The latter behavior is not recommended for any but small, closely knit lists, as it might cause large numbers of MDNs to be generated and may cause confidential subscribers to the list to be revealed. The mailing list exploder can also direct MDNs to itself, correlate them, and produce a report to the original sender of the message. ๐Ÿง

This specification places no restrictions on the processing of MDNs received by user agents or mailing lists. ๐Ÿซถ


6. Security Considerations ๐Ÿ”

The following security considerations apply when using MDNs. Bestie, pay attention to this part, it's serious. ๐Ÿ˜ค

6.1. Forgery

MDNs can be (and are, in practice) forged as easily as ordinary Internet electronic mail. User agents and automatic mail handling facilities (such as mail distribution list exploders) that wish to make automatic use of MDNs should take appropriate precautions to minimize the potential damage from denial-of-service attacks. ๐Ÿ’€

Security threats related to forged MDNs include the sending of:

  1. A falsified disposition notification when the indicated disposition of the message has not actually occurred, and
  2. Unsolicited MDNs.

Similarly, a forged spam or phishing email message can contain Disposition-Notification-To header field that can trick the recipient to send an MDN. MDN processing should only be invoked once authenticity of an email message is verified. ๐Ÿšจ

6.2. Privacy

Another dimension of security is privacy. There may be cases in which a message recipient does not wish the disposition of messages addressed to him to be known, or is concerned that the sending of MDNs may reveal other sensitive information (e.g., when the message was read, using which email client, and which OS was used). In this situation, it is acceptable for the MUA to silently ignore requests for MDNs. ๐Ÿ™ˆ

If the Disposition-Notification-To header field is passed on unmodified when a message is distributed to the subscribers of a mailing list, the subscribers to the list may be revealed to the sender of the original message by the generation of MDNs. ๐Ÿซฃ

Headers of the original message returned in part 3 of the multipart/report, as well as content of the message/disposition-notification part, could reveal confidential information about host names and/or network topology inside a firewall. ๐Ÿงฑ

Disposition mode (Section 3.2.6.1) can leak information about recipient's MUA configuration, in particular, whether MDNs are acknowledged manually or automatically. If this is a concern, MUAs can return "manual-action/MDN-sent-manually" disposition mode in generated MDNs. ๐ŸŽญ

In general, any optional MDN field may be omitted if the Reporting MUA site or user 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 MDNs. ๐Ÿ“

In some cases, someone with access to the message stream may use the MDN request mechanism to monitor the mail reading habits of a target. If the target is known to generate MDN reports, they could add a Disposition-Notification-To header field containing the envelope from address. This risk can be minimized by not sending MDN's automatically. ๐Ÿ‘€

6.2.1. Disclosure of Product Information

The "Reporting-UA" field (Section 3.2.1), User-Agent header field, and other header fields often reveal information about the respective sender's software systems. In theory, this can make it easier for an attacker to exploit known security holes; in practice, attackers tend to try all potential holes regardless of the apparent software versions being used. Also note that the "Reporting-UA" field doesn't provide any new information in comparison to the "User-Agent" and/or (undocumented) "X-Mailer" header fields used by many MUAs. ๐Ÿ•ต๏ธโ€โ™€๏ธ

6.2.2. MUA Fingerprinting

The "Reporting-UA" field (Section 3.2.1) might contain enough information to uniquely identify a specific device, usually when combined with other characteristics, particularly if the user agent sends excessive details about the user's system or extensions. Even when the guidance in Section 3.2.1 is followed to avoid fingerprinting, other sources of unique information may still be present, such as the Accept-Language header fields. ๐Ÿงฉ

6.3. Non-repudiation

MDNs do not provide non-repudiation with proof of delivery. Within the framework of today's Internet Mail, the MDNs defined in this document provide valuable information to the mail user; however, MDNs cannot be relied upon as a guarantee that a message was or was not seen by the recipient. Even if MDNs are not actively forged, they may be lost in transit. The recipient may bypass the MDN issuing mechanism in some manner. ๐Ÿซ 

One possible solution for this purpose can be found in RFC-SEC-SERVICES [RFC2634]. ๐Ÿ”—

6.4. Mail Bombing

The MDN request mechanism introduces an additional way of mail bombing a mailbox. The MDN request notification provides an address to which MDN's should be sent. It is possible for an attacking agent to send a potentially large set of messages to otherwise unsuspecting third party recipients with a false Disposition-Notification-To address. Automatic or simplistic processing of such requests would result in a flood of MDN notifications to the target of the attack. Additionally, as generated MDN notifications can include the full content of messages that caused them and thus they can be bigger than such messages, they can be used for bandwidth amplification attacks. Such an attack could overrun the storage capacity of the targeted mailbox and/or of the mail transport system, and deny service. ๐ŸŒŠ

For that reason, MDN's SHOULD NOT be sent automatically where the Disposition-Notification-To address is different from the SMTP MAIL FROM address (which is carried in the Return-Path header field). See Section 2.1 for further discussion. ๐Ÿ›‘

7. Collected ABNF Grammar โœจ

okay bestie, this is the grammar cheat sheet ๐Ÿ“‹ Some tokens come from other RFCs: CRLF, FWS, CFWS, field-name, mailbox-list, msg-id, text, comment, and word are from RFC-MSGFMT [RFC5322]. Atom is from RFC-SMTP [RFC5321]. RFC-MSGFMT also defines "atom", but the RFC-SMTP one is stricter, and this document uses the stricter one ๐Ÿ’… Also, the "encoded-word" construct from RFC-MIME-HEADER [RFC2047] is allowed anywhere RFC-MSGFMT "comment" is allowed, like inside CFWS ๐Ÿซถ

OWS = [CFWS]
      ; Optional whitespace.
      ; MDN generators SHOULD use "*WSP"
      ; (Typically a single space or nothing.
      ; It SHOULD be nothing at the end of a field.),
      ; unless an RFC 5322 "comment" is required.
      ;
      ; MDN parsers MUST parse it as "[CFWS]".

Message header fields ๐Ÿ“ฎ

mdn-request-header =
       "Disposition-Notification-To" ":" mailbox-list CRLF

Disposition-Notification-Options =
       "Disposition-Notification-Options" ":" [FWS]
                 disposition-notification-parameter-list CRLF

disposition-notification-parameter-list =
                 disposition-notification-parameter
                 *([FWS] ";" [FWS]
                 disposition-notification-parameter)

disposition-notification-parameter = attribute [FWS] "=" [FWS]
                 importance [FWS] "," [FWS] value *([FWS] ","
                 [FWS] value)

importance = "required" / "optional"

attribute = Atom

value = word

original-recipient-header =
       "Original-Recipient" ":" OWS address-type OWS
       ";" OWS generic-address OWS CRLF

Report content ๐Ÿ“

disposition-notification-content =
       [ reporting-ua-field CRLF ]
       [ mdn-gateway-field CRLF ]
       [ original-recipient-field CRLF ]
       final-recipient-field CRLF
       [ original-message-id-field CRLF ]
       disposition-field CRLF
       *( error-field CRLF )
       *( extension-field CRLF )

address-type = Atom

mta-name-type = Atom

reporting-ua-field = "Reporting-UA" ":" OWS ua-name OWS [
                     ";" OWS ua-product OWS ]

ua-name = *text-no-semi

ua-product = *([FWS] text)

text-no-semi = %d1-9 /        ; "text" characters excluding NUL, CR,
        %d11 / %d12 / %d14-58 / %d60-127      ; LF, or semi-colon

mdn-gateway-field = "MDN-Gateway" ":" OWS mta-name-type OWS
                    ";" OWS mta-name

mta-name = *text

original-recipient-field =
       "Original-Recipient" ":" OWS address-type OWS
       ";" OWS generic-address OWS

generic-address = *text

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

original-message-id-field = "Original-Message-ID" ":" msg-id

disposition-field =
       "Disposition" ":" OWS disposition-mode OWS ";"
       OWS disposition-type
       [ OWS "/" OWS disposition-modifier
       *( OWS "," OWS disposition-modifier ) ] OWS

disposition-mode = action-mode OWS "/" OWS sending-mode

action-mode = "manual-action" / "automatic-action"

sending-mode = "MDN-sent-manually" / "MDN-sent-automatically"

disposition-type = "displayed" / "deleted" / "dispatched" /
        "processed"

disposition-modifier = "error" / disposition-modifier-extension

disposition-modifier-extension = Atom

error-field = "Error" ":" *([FWS] text)

extension-field = extension-field-name ":" *([FWS] text)

extension-field-name = field-name

8. Guidelines for Gatewaying MDNs ๐ŸŒ‰

heads up: this section is just non-binding recommendations for mail gateways that want to give semi-transparent disposition notifications between the Internet and some other email system ๐Ÿ’Œ If a particular pair of mail systems needs specific gateway rules, other documents can define those ๐Ÿซถ

8.1. Gatewaying from Other Mail Systems to MDNs ๐Ÿ“ค

a mail gateway can send an MDN to carry the contents of a "foreign" disposition notification over Internet Mail ๐Ÿ’– If the foreign notification elements have proper matches in MDN fields, the info can go in those fields. Extra stuff (like whatever you'd need to tunnel the foreign notification through the Internet) can go in extension MDN fields. Those fields should be named after the foreign mail protocol, like X400-* for X.400 protocol elements [X.400] ๐Ÿงš

the gateway must try to fill in reasonable values for Reporting-UA, Final-Recipient, and Disposition ๐ŸŽ€ Usually you get these by translating the foreign values into Internet-style equivalents. Some info loss is totally expected, though ๐Ÿ˜ญ

the sender-specified recipient address and the original message-id (if the foreign notification has them) should be kept in the Original-Recipient and Original-Message-ID fields ๐Ÿฆ‹

the gateway should also try to keep the "final" recipient address from the foreign system ๐Ÿ’… And whenever possible, foreign protocol elements should be encoded as meaningful printable ASCII strings โœจ

For MDNs made from foreign disposition notifications, the name of the gateway MUST appear in the MDN-Gateway field of the MDN ๐Ÿ‘‘

8.2. Gatewaying from MDNs to Other Mail Systems ๐Ÿ“จ

it might be possible to gateway MDNs from the Internet into a foreign mail system ๐ŸŒˆ The main goal is to pass along disposition info in a form the destination system can actually use. The secondary goal is "tunneling," which lets MDNs travel through foreign mail systems in case they get gatewayed back into the Internet later ๐Ÿ”

generally, the recipient of the MDN (aka the sender of the original message) wants to know two things for each recipient: the closest available approximation to the original recipient address, and the disposition (displayed, printed, etc.) ๐Ÿฅน

if possible, the gateway should try to keep the Original-Recipient address and Original-Message-ID (if present) in the resulting foreign disposition report ๐Ÿ’œ

if an MDN can be tunneled through the destination environment, the gateway spec may define a way to keep the MDN info in the disposition reports that environment uses ๐Ÿซง

8.3. Gatewaying of MDN-Requests to Other Mail Systems ๐Ÿ“ฌ

with the separate Disposition-Notification-To request header field, this spec offers way more functionality than most email systems, if not all of them ๐Ÿคฏ In most other email systems, the notification recipient is just the message sender from the "from" address. There are two interesting cases when gatewaying into those systems:

  1. If the address in the Disposition-Notification-To header field matches the address in the SMTP "MAIL FROM", the expected behavior will happen, even if the Disposition-Notification-To info gets lost. Systems should pass along the MDN request ๐Ÿ™Œ
  2. If the address in the Disposition-Notification-To header field is different from the address in the SMTP "MAIL FROM", gatewaying into a foreign system without a separate notification address will cause unintended behavior ๐Ÿ’€ This matters a LOT when the message comes through mailing list expansion software, since that software might swap the SMTP "MAIL FROM" address for an alternate one. In those cases, the MDN request should not be gatewayed and should be silently dropped ๐Ÿ™ˆ This is consistent with other forms of non-support for MDN ๐Ÿคทโ€โ™€๏ธ

9. Example ๐ŸŽ€

NOTE: this example is just for illustration and is not part of the MDN protocol spec ๐Ÿ’… If the example ever conflicts with the protocol definition above, the example is wrong ๐Ÿ˜ค

Likewise, using *-type subfield names or extension fields in this example doesn't define those type names or extension fields ๐ŸŒธ

this is an MDN sent after a message was displayed to the user of an Internet Mail user agent ๐Ÿ‘€

Date: Wed, 20 Sep 1995 00:19:00 (EDT) -0400
From: Joe Recipient <Joe_Recipient@example.com>
Message-Id: <199509200019.12345@example.com>
Subject: Disposition notification
To: Jane Sender <Jane_Sender@example.org>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=disposition-notification;
   boundary="RAA14128.773615765/example.com"

--RAA14128.773615765/example.com

The message sent on 1995 Sep 19 at 13:30:00 (EDT) -0400 to Joe
Recipient <Joe_Recipient@example.com> with subject "First draft of
report" has been displayed.
This is no guarantee that the message has been read or understood.

--RAA14128.773615765/example.com
Content-Type: message/disposition-notification

Reporting-UA: joes-pc.cs.example.com; Foomail 97.1
Original-Recipient: rfc822;Joe_Recipient@example.com
Final-Recipient: rfc822;Joe_Recipient@example.com
Original-Message-ID: <199509192301.23456@example.org>
Disposition: manual-action/MDN-sent-manually; displayed

--RAA14128.773615765/example.com
Content-Type: message/rfc822

[original message optionally goes here]

--RAA14128.773615765/example.com--

10. IANA Considerations ๐Ÿ—‚๏ธ

okay so IANA already finished these actions ๐Ÿฅณ

  1. IANA updated the registration template for the message/disposition-notification media type so it matches what's in Section 3.1 of this document. They also changed the reference for the media type to point to this document instead of RFC 3798 ๐Ÿ’–
  2. The registries mentioned here already exist, and this section just updates their documentation. IANA changed the reference document for the three Message Disposition Notification Parameters registries to point to this document instead of RFC 3798 โœจ

this document defines three types of parameters that must be registered with the Internet Assigned Numbers Authority (IANA) ๐ŸŒท They all use the "Specification Required" IANA registration policy [RFC5226] ๐Ÿฆ‹

the forms below are for registering a new disposition-notification-parameter name for the Disposition-Notification-Options header field, a new disposition modifier name, or a new MDN extension field ๐ŸŽ€ Each piece of info a registration form asks for can be given either on the form itself or by linking to a published, publicly available spec that has the needed info ๐Ÿซถ IANA MAY reject registrations because of incomplete forms or incomplete specifications ๐Ÿ™ƒ

to register, fill out the right form and email it to <IANA@IANA.ORG> ๐Ÿ’Œ

10.1. Disposition-Notification-Options Header Field disposition-notification-parameter Names

okay bestie, this is the registry checklist for new Disposition-Notification-Options parameter names ๐Ÿงพโœจ if you want to add one, your registration MUST include all of these:

  • a. The proposed disposition-notification-parameter name.
  • b. The syntax for disposition-notification-parameter values, written in BNF, ABNF, regular expressions, or some other non-ambiguous language.
  • c. If the values aren't made up entirely of graphic characters from the US-ASCII repertoire, you MUST include a spec for how they get encoded as graphic US-ASCII characters in a Disposition-Notification-Options header field ๐Ÿซถ
  • d. A reference to a permanent and readily available public specification that explains what the disposition-notification-parameter values actually mean ๐Ÿ“š

10.2. Disposition Modifier Names

this one is for disposition-modifier names, the ones that show up in the Disposition field of a message/disposition-notification ๐Ÿ’… your registration MUST include:

  • a. The proposed disposition-modifier name.
  • b. A reference to a permanent and readily available public specification that describes the semantics of the disposition modifier ๐ŸŒธ

10.3. MDN Extension Field Names

last registry, for MDN extension-field names ๐Ÿงš your registration MUST include:

  • a. The proposed extension field name.
  • b. The syntax for extension values, written in BNF, ABNF, regular expressions, or another non-ambiguous language.
  • c. If extension-field values aren't composed entirely of graphic characters from the US-ASCII repertoire, a specification for how they are to be encoded as graphic US-ASCII characters in a Disposition-Notification-Options header field ๐Ÿ’–
  • d. A reference to a permanent and readily available public specification that describes the semantics of the extension field ๐Ÿฆ‹

11. References

11.1. Normative References

these are the references the spec leans on hardest, so you really want to know them ๐Ÿค“

[RFC5321]  Klensin, J., "Simple Mail Transfer Protocol", RFC 5321,
           DOI 10.17487/RFC5321, October 2008,
           <http://www.rfc-editor.org/info/rfc5321>.

[RFC5322]  Resnick, P., Ed., "Internet Message Format", RFC 5322,
           DOI 10.17487/RFC5322, October 2008,
           <http://www.rfc-editor.org/info/rfc5322>.

[RFC2045]  Freed, N. and N. Borenstein, "Multipurpose Internet Mail
           Extensions (MIME) Part One: Format of Internet Message
           Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996,
           <http://www.rfc-editor.org/info/rfc2045>.

[RFC2046]  Freed, N. and N. Borenstein, "Multipurpose Internet Mail
           Extensions (MIME) Part Two: Media Types", RFC 2046,
           DOI 10.17487/RFC2046, November 1996,
           <http://www.rfc-editor.org/info/rfc2046>.

[RFC2047]  Moore, K., "MIME (Multipurpose Internet Mail Extensions)
           Part Three: Message Header Extensions for Non-ASCII Text",
           RFC 2047, DOI 10.17487/RFC2047, November 1996,
           <http://www.rfc-editor.org/info/rfc2047>.

[RFC6522]  Kucherawy, M., Ed., "The Multipart/Report Media Type for
           the Reporting of Mail System Administrative Messages",
           STD 73, RFC 6522, DOI 10.17487/RFC6522, January 2012,
           <http://www.rfc-editor.org/info/rfc6522>.

[RFC3461]  Moore, K., "Simple Mail Transfer Protocol (SMTP) Service
           Extension for Delivery Status Notifications (DSNs)",
           RFC 3461, DOI 10.17487/RFC3461, January 2003,
           <http://www.rfc-editor.org/info/rfc3461>.

[RFC3464]  Moore, K. and G. Vaudreuil, "An Extensible Message Format
           for Delivery Status Notifications", RFC 3464,
           DOI 10.17487/RFC3464, January 2003,
           <http://www.rfc-editor.org/info/rfc3464>.

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119,
           DOI 10.17487/RFC2119, March 1997,
           <http://www.rfc-editor.org/info/rfc2119>.

[RFC3503]  Melnikov, A., "Message Disposition Notification (MDN)
           profile for Internet Message Access Protocol (IMAP)",
           RFC 3503, DOI 10.17487/RFC3503, March 2003,
           <http://www.rfc-editor.org/info/rfc3503>.

11.2. Informative References

these ones are good background reading, not required to implement ๐ŸŒˆ

[RFC2634]  Hoffman, P., Ed., "Enhanced Security Services for S/MIME",
           RFC 2634, DOI 10.17487/RFC2634, June 1999,
           <http://www.rfc-editor.org/info/rfc2634>.

[RFC3249]  Cancio, V., Moldovan, M., Tamura, H., and D. Wing,
           "Implementers Guide for Facsimile Using Internet Mail",
           RFC 3249, DOI 10.17487/RFC3249, September 2002,
           <http://www.rfc-editor.org/info/rfc3249>.

[RFC3501]  Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
           4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003,
           <http://www.rfc-editor.org/info/rfc3501>.

[RFC3801]  Vaudreuil, G. and G. Parsons, "Voice Profile for Internet
           Mail - version 2 (VPIMv2)", RFC 3801,
           DOI 10.17487/RFC3801, June 2004,
           <http://www.rfc-editor.org/info/rfc3801>.

[RFC5233]  Murchison, K., "Sieve Email Filtering: Subaddress
           Extension", RFC 5233, DOI 10.17487/RFC5233, January 2008,
           <http://www.rfc-editor.org/info/rfc5233>.

[RFC5226]  Narten, T. and H. Alvestrand, "Guidelines for Writing an
           IANA Considerations Section in RFCs", BCP 26, RFC 5226,
           DOI 10.17487/RFC5226, May 2008,
           <http://www.rfc-editor.org/info/rfc5226>.

[RFC5429]  Stone, A., Ed., "Sieve Email Filtering: Reject and
           Extended Reject Extensions", RFC 5429,
           DOI 10.17487/RFC5429, March 2009,
           <http://www.rfc-editor.org/info/rfc5429>.

[RFC5598]  Crocker, D., "Internet Mail Architecture", RFC 5598,
           DOI 10.17487/RFC5598, July 2009,
           <http://www.rfc-editor.org/info/rfc5598>.

[RFC6533]  Hansen, T., Ed., Newman, C., and A. Melnikov,
           "Internationalized Delivery Status and Disposition
           Notifications", RFC 6533, DOI 10.17487/RFC6533, February
           2012, <http://www.rfc-editor.org/info/rfc6533>.

[X.400]    International Telecommunications Union, "Message handling
           system and service overview", ITU-T Recommendation
           F.400/X.400, June 1999.

Appendix A. Changes from RFC 3798

this is the changelog, the glow-up receipts of everything that changed since RFC 3798 ๐ŸŽ€

  • IANA registration for the different subregistries got switched to "Specification Required" so it matches what IANA already uses ๐Ÿซถ
  • The IANA registration template for message/disposition-notification got updated ๐Ÿ“
  • "X-" fields are no longer reserved for experimental use, and they can now be registered following RFC 6648 ๐ŸŒˆ
  • The default MTA-name-type used in "MDN-Gateway" got fixed to be "dns" โœจ
  • The requirements on getting user consent got strengthened to protect user privacy ๐Ÿ”’
  • The discussion of using source routes with MDNs got removed, since source route is a deprecated Email feature ๐Ÿ™…โ€โ™€๏ธ
  • The values "dispatched" and "processed" had gone missing from the ABNF for "disposition-type". (Erratum #691) ๐Ÿ› ๏ธ
  • Because the warning disposition modifier got removed earlier, the warning-field got removed too. (Erratum #692) ๐Ÿ’€
  • Because the failed disposition type got removed earlier, the failure-field got removed as well ๐Ÿฅ€
  • The ABNF for ua-name and ua-product had a semi-colon that couldn't be told apart from *text in the production. So ua-name is now restricted so it can't include a semi-colon, but a semi-colon can still show up in the ua-product ๐Ÿ“
  • The recommendation to include the MUA DNS host name in the "Reporting-UA" MDN field got removed ๐Ÿ‘‘
  • The ABNF didn't show every place whitespace was allowed, especially folding whitespace. Every implementation already allowed whitespace and folding in header fields the same way any other header field does, as described in RFC-MSGFMT [RFC5322]. Some spots also allowed comments and whitespace in one part of a production but not another. The ABNF now specifies FWS and CFWS in several places that the grammar should have specified already ๐Ÿงน
  • Extension-field was defined in the collected grammar but not in the main text, and that's fixed now ๐Ÿงฉ
  • The comparison of mailboxes in Disposition-Notification-To to the Return-Path addr-spec got clarified ๐Ÿ’Œ
  • The grammar production "parameter" was confusing next to the RFC 2045 [RFC2045] production with the same name (plus other uses of the term), so those got clarified ๐Ÿ™ˆ
  • A clarification got added about the extent of the 7bit nature of MDNs ๐Ÿ”ข
  • Uses of the terms "may" and "might" got clarified ๐Ÿค”
  • A clarification got added about the order of the fields in the message/disposition-notification content ๐Ÿ“‹

Acknowledgements

big thank-yous to Bruce Lilly, Alfred Hoenes, Barry Leiba, Ben Campbell, Pete Resnick, Donald Eastlake, and Alissa Cooper for their work on this revision ๐Ÿซถ and to Roger Fajman and Greg Vaudreuil for their help on earlier draft versions ๐Ÿ’œ

Authors' Addresses

the humans behind it, so you know who to slide into the DMs ๐Ÿ’Œ

Tony Hansen (editor)
AT&T Laboratories
200 Laurel Ave. South
Middletown, NJ  07748
United States of America

Email: tony@att.com


Alexey Melnikov (editor)
Isode Ltd
14 Castle Mews
Hampton, Middlesex  TW12 2NP
United Kingdom

Email: Alexey.Melnikov@isode.com
๐Ÿ“ฆ where this page comes from