<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc='yes' ?>
<?rfc symrefs='yes' ?>
<?rfc sortrefs='no'?>
<?rfc linkmailto='no'?>
<?rfc compact='yes'?>
<?rfc comments='yes'?>
<?rfc inline='yes'?>
<?rfc-ext parse-xml-in-artwork='yes' ?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<rfc ipr='trust200902'
  docName='draft-ietf-appsawg-mdn-3798bis-15.txt'
  obsoletes='3798' updates='2046, 3461' category='std' >
  <front>
    <title abbrev='MDN'>Message Disposition Notification</title>
    <author initials='T.' surname='Hansen' fullname='Tony Hansen' role='editor'>
      <organization>AT&amp;T Laboratories</organization>
      <address>
        <postal>
          <street>200 Laurel Ave. South</street>
          <city>Middletown</city>
          <region>NJ</region>
          <code>07748</code>
          <country>USA</country>
        </postal>
        <email>tony@att.com</email>
      </address>
    </author>
    <author initials="A." surname="Melnikov" fullname="Alexey Melnikov" role="editor">
      <organization>Isode Ltd</organization>
      <address>
        <postal>
          <street>14 Castle Mews</street>
          <city>Hampton</city>
          <region>Middlesex</region>
          <code>TW12 2NP</code>
          <country>UK</country>
        </postal>
        <email>Alexey.Melnikov@isode.com</email>
      </address>
    </author>
    <date />
    <area>ART</area>
    <keyword>delivery notification</keyword>
    <abstract>
      <t>
        This memo defines a MIME content-type that may be used by a mail user
        agent (MUA) or electronic mail gateway to report the disposition of a
        message after it has been successfully delivered to a recipient.
        This content-type is intended to be machine-processable.
        Additional message header fields are also defined to permit Message Disposition
        Notifications (MDNs) to be requested by the sender of a message.
        The purpose is to extend Internet Mail to support functionality often
        found in other messaging systems, such as X.400 and the proprietary
        "LAN-based" systems, and often referred to as "read receipts,"
        "acknowledgements", or "receipt notifications."  The intention is to
        do this while respecting privacy concerns, which have often been
        expressed when such functions have been discussed in the past.
      </t><t>
        Because many messages are sent between the Internet and other
        messaging systems (such as X.400 or the proprietary "LAN-based"
        systems), the MDN protocol is designed to be useful in a
        multi-protocol messaging environment.
        To this end, the protocol described in this memo provides for the carriage of "foreign"
        addresses, in addition to those normally used in Internet Mail.
        Additional attributes may also be defined to support "tunneling" of
        foreign notifications through Internet Mail.
      </t>

      <t>
      This document obsoletes RFC 3798, moving it to Internet Standard. It also updates RFC 2046 (message/partial Media Type handling)
      and RFC 3461 (Original-Recipient header field generation requirement).
      </t>
    </abstract>
  </front>
  <middle>
    <section title='Introduction'>
      <t>
        This memo defines a media type <xref target='RFC2046'/> for message
        disposition notifications (MDNs).
        An MDN can be used to notify the sender of a message of any of several conditions that may occur after
        successful delivery, such as display of the message contents, printing
        of the message, deletion (without display) of the message, or the
        recipient's refusal to provide MDNs.
        The "message/disposition-notification" content-type defined herein is
        intended for use within the framework of the "multipart/report"
        content type defined in <xref target='RFC6522'>RFC-REPORT</xref>.
      </t><t>
        This memo defines the format of the notifications and the <xref target='RFC5322'>RFC-MSGFMT</xref>
        header fields used to request them.
      </t><t>
        <!--RFC Editor: Please remove or update this sentence before publication-->
        This memo is an update to RFC 3798 and is intended to be published at Internet Standard Level.
      </t>
    <section title='Purposes'>
      <t>
        The MDNs defined in this memo are expected to serve several purposes:
        <vspace blankLines='1' /><list style='letters'>
          <t>
            Inform human beings of the disposition of messages after
            successful delivery, in a manner that is largely independent of
            human language;
          <vspace blankLines='1' /></t><t>
            Allow mail user agents to keep track of the disposition of
            messages sent, by associating returned MDNs with earlier message
            transmissions;
          <vspace blankLines='1' /></t><t>
            Convey disposition notification requests and disposition
            notifications between Internet Mail and "foreign" mail systems
            via a gateway;
          <vspace blankLines='1' /></t><t>
            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;
          <vspace blankLines='1' /></t><t>
            Allow language-independent, yet reasonably precise, indications
            of the disposition of a message to be delivered.
          </t>
        </list>
      </t>
    </section>
    <section title='Requirements'>
      <t>
        These purposes place the following constraints on the notification
        protocol:
        <vspace blankLines='1' /><list style='letters'>
          <t>
            It must be readable by humans, and must be machine-parsable.
          <vspace blankLines='1' /></t><t>
            It must provide enough information to allow message senders (or
            their user agents) to unambiguously associate an MDN with the
            message that was sent and the original recipient address for
            which the MDN was issued (if such information is available),
            even if the message was forwarded to another recipient address.
          <vspace blankLines='1' /></t><t>
            It must also be able to describe the disposition of a message
            independent of any particular human language or of the
            terminology of any particular mail system.
          <vspace blankLines='1' /></t><t>
            The specification must be extensible in order to accommodate
            future requirements.
          </t>
        </list>
      </t>
    </section>
    <section title='Terminology'>
      <t>
        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 <xref target='RFC2119'>RFC-KEYWORDS</xref>.
      </t><t>
        All syntax descriptions use the ABNF specified by <xref target='RFC5322'>RFC-MSGFMT</xref>, in
        which the lexical tokens (used below) are defined: "CRLF", "FWS", "CFWS", "field-name",
        "mailbox-list", "msg-id", and "text".
        The following lexical tokens are defined in <xref target='RFC5321'>RFC-SMTP</xref>:
        "atom".
      </t>
    </section>
    </section>
    <section title='Requesting Message Disposition Notifications'>
      <t>
        Message disposition notifications are requested by including a
        Disposition-Notification-To header field in the message containing one
        or more addresses specifying where dispositions should be sent.
        Further information to be used by the recipient's Mail User
        Agent (MUA) <xref target='RFC5598'/> in generating the MDN may be provided by also including Original-Recipient and/or
        Disposition-Notification-Options header fields in the message.
      </t>
      <section title='The Disposition-Notification-To Header' anchor='thedispositionnotificationtoheader'>
        <t>
          A request for the receiving user agent to issue message disposition
          notifications is made by placing a Disposition-Notification-To header field
          into the message.
          The syntax of the header field is
          <figure><artwork type='abnf'>
mdn-request-header = "Disposition-Notification-To" ":" mailbox-list CRLF
          </artwork></figure>
        </t><t>
          A Disposition-Notification-To header field can appear at most once in a message.
          <!--////Alexey: Point to RFC 7103 ("Safe Mail Handling"), Section 7.5.1 if the header field is repeated?-->
        </t><t>
          The presence of a Disposition-Notification-To header field in a message is
          merely a request for an MDN.
          The recipients' user agents are always free to silently ignore such a request.
        </t><t>
          An MDN MUST NOT itself have a Disposition-Notification-To header field.
          An MDN MUST NOT be generated in response to an MDN.
        </t><t>
          A user agent MUST NOT issue more than one MDN on behalf of each
          particular recipient.
          That is, once an MDN has been issued on behalf of a recipient, no further MDNs may be issued on behalf of that
          recipient by the same user agent, even if another disposition is performed on the message.
          However, if a message is forwarded, an MDN may have been issued for
          the recipient doing the forwarding and the recipient of the forwarded
          message may also cause an MDN to be generated.
        </t><t>
          It is also possible that if the same message is being accessed by multiple user agents (for example using POP3),
          then multiple dispositions might be generated for the same recipient.
          User agents SHOULD leverage support in the underlying message access protocol to prevent multiple MDNs from being generated.
          In particular, when the user agent is accessing the message using <xref target='RFC3501'>RFC-IMAP</xref>,
          it SHOULD implement the procedures specified in <xref target='RFC3503'>RFC-IMAP-MDN</xref>.
        <!--This should be covered by the previous paragraph:
          If underlying protocol support is not available, the mail user agent MUST use local knowledge to prevent multiple MDNs.
        -->
      </t><t>
          While Internet standards normally do not specify the behavior of user
          interfaces, it is strongly recommended that the user agent obtain the
          user's consent before sending an MDN.
          This consent could be obtained for each message through some sort of prompt or dialog box, or
          globally through the user's setting of a preference. The user might also indicate globally that MDNs are to never be sent.
          The purpose of obtaining user's consent is to protect user's privacy.
          The default value should be not to send MDNs.
          <!--////What about environments like military where the default might be to automatically send MDNs?-->
      </t><t>
          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 <xref target='RFC5322'>RFC-MSGFMT</xref>).
          In this case, confirmation from the user MUST be obtained, if possible.
          If obtaining consent is not possible (e.g., because the user is not online at the time
          or the client is not an interactive email client), then an MDN MUST NOT be sent.
          <!--////A configuration option can be treated as consent. How can this be clarified?-->
        </t><t>
          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.
        </t><t>
          The comparison of the addresses is done using only the
          addr-spec (local-part "@" domain) portion, excluding any angle brackets, phrase and
          route.
          As prescribed by RFC 5322, the comparison is case-sensitive for the local-part and case-insensitive for the domain part.
          <!--Alexey: SHOULD (and not MUST), because this is unlikely to have significant effect on iteroperability
	    Tony: okay
	    -->
          The local-part comparison SHOULD be done after performing local-part canonicalization (i.e. after removing
          the surrounding double-quote characters, if any, as well as any escaping "\" characters.
          (See <xref target='RFC5322'>RFC-MSGFMT</xref> for more details.)
          Implementations MAY treat known domain aliases as equivalent for the purpose of comparison.
        </t><t>
          Note that use of subaddressing (see <xref target='RFC5233'/>) can result in a failure to match two local-parts
          and thus result in possible suppression of the MDN. This document doesn't recommend special handling for this
          case, as the receiving MUA can't reliably know whether or not the sender is using subaddressing.          
          <!--Don't say anything about equivalent local parts like alexey.melnikov and alexeymelnikov for Gmail.-->
<!--
	  <vspace blankLines='1'/><cref>(From Bruce) 
            the domains might differ, yet refer to the same place (equivalent MX mail
            exchangers, A vs. CNAME DNS records, DNS names vs. domain literals, etc.)
            These are not addressed in 3798.
	  </cref>
    <vspace blankLines='1'/><cref>(From Bruce) 
            internationalization issues might further compound comparison issues between
            local-parts and domains (specifying that the on-the-wire forms must be
            compared might suffice)
	  </cref>
    <vspace blankLines='1'/><cref>(From Bruce) 
            there exist some conventions (not standardized as far as I know) regarding
            subaddressing applied to local parts, e.g. as in
            tony+rfc3798@maillennium.att.com  (that example also illustrates an
            issue regarding subdomains)
	  </cref>
    <vspace blankLines='1'/><cref>(From Bruce) 
            Of those, the angle bracket issue ought to be understood, but clarification
	    could benefit implementors, especially as RFC 5322 defined the Return-Path syntax
	    somewhat peculiarly.  Canonicalization of local-parts and domains should
	    probably be required prior to comparison, and use of  on-the-wire forms should
	    probably also be specified.  DNS equivalence issues might be tricky for some
	    implementations (e.g. offline reading); perhaps the specification could use
	    RFC 2119 "MAY" to give implementations leeway to consider A vs. CNAME and DNS
	    vs domain literal equivalence for situations where DNS is available to the
	    implementation (I'm not sure about MX).  About the only thing that can be said
	    w.r.t. subaddressing and subdomains is a caution to sending MUA and
	    address-rewriting MTA authors that a mismatch might result in no MDN being
	    produced.
	  </cref>
-->
        </t><t>
          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.
        </t><t>
          The reason for not automatically sending an MDN if the comparison
          fails or more than one address is specified is to reduce the
          possibility of mail loops and of MDNs being used for mail bombing.
        </t><t>
          It's especially important that a message that contains a Disposition-Notification-To header field
          also contain a Message-ID header field, to permit user agents to automatically
          correlate MDNs with their original messages.
        </t><t>
          If the request for message disposition notifications for some
          recipients and not others is desired, two copies of the message should be sent,
          one with a Disposition-Notification-To header field and one without.
          Many of the other header fields of the message (e.g., To, Cc) will be the same in
          both copies.
          The recipients in the respective message envelopes determine from whom message disposition notifications are requested and
          from whom they are not.
          If desired, the Message-ID header field may be the same in both copies of the message.
          Note that there are other situations (e.g., Bcc) in which it is necessary to send multiple
          copies of a message with slightly different header fields.
          The combination of such situations and the need to request MDNs for a subset of all
          recipients may result in more than two copies of a message being sent,
          some with a Disposition-Notification-To header field and some without.
        </t><t>
          <!--////Does this cover just posting to a newsgroup?-->
          If it is possible to determine that a recipient is a newsgroup,
          do not include a Disposition-Notification-To header field for
          that recipient.
          <!--////Old text:
          Messages posted to newsgroups SHOULD NOT have a
          Disposition-Notification-To header field.
          -->
          Similarly, if an existing message is resent or gatewayed to a newsgroup,
          the agent doing resending/gatewaying SHOULD strip the Disposition-Notification-To header field.
          See <xref target='conformance'/> for more discussion.
          Clients that see an otherwise valid Disposition-Notification-To header field in a newsgroup message
          SHOULD NOT generate an MDN.
        </t>
      </section>
      <section title='The Disposition-Notification-Options Header'>
        <t>
          Extensions to this specification may require that information
          be supplied to the recipient's MUA for additional control over how and
          what MDNs are generated.
          The Disposition-Notification-Options header field provides an extensible mechanism for such information.
          The syntax of this header field is as follows:
          <figure><artwork type='abnf'>
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
          </artwork></figure>
        </t><t>
          A Disposition-Notification-Options header field can appear at most once in a message.
          <!--////Alexey: Point to RFC 7103 ("Safe Mail Handling"), Section 7.5.1 if the header field is repeated?-->
        </t><t>
          An importance of "required" indicates that interpretation of the
          disposition-notification-parameter is necessary for proper generation of an MDN in response to
          this request.
          An importance of "optional" indicates that an MUA that does not understand the meaning of this
          disposition-notification-parameter MAY generate an MDN in response anyway, ignoring the value
          of the disposition-notification-parameter.
        </t><t>
          No disposition-notification-parameter attribute names are defined in this specification.
          Attribute names may be defined in the future by later revisions or extensions to this
          specification.
<!--Took this out as per RFC 6648 and Barry's review comments:
          Disposition-notification-parameter attribute names beginning with "X-" will never be defined as standard names; such names are reserved for
          experimental use.
-->
          disposition-notification-parameter attribute names MUST be registered
          with the Internet Assigned Numbers Authority (IANA) using "Specification required" registration policy.
          The "X-" prefix has historically been used to denote unregistered "experimental"
          protocol elements, that are assumed not to become common use. Deployment experience of this
          and other protocols have shown that this assumption is often false. This document allows
          the use of the "X-" prefix primarily to allow the registration of attributes
          that are already in common use. The prefix has no meaning for new attributes. Its use in
          substantially new attributes may cause confusion and is therefore discouraged.
          <vspace/>
          (See <xref target='ianaconsiderations' /> for a registration form.)
        </t>
      </section>
      <section title='The Original-Recipient Header Field'>
        <t>
          Since electronic mail addresses may be rewritten while the message is
          in transit, it is useful for the original recipient address to be made
          available by the delivering Message Transfer Agent (MTA) <xref target='RFC5598'/>.
          The delivering MTA may be able to obtain this information from the ORCPT parameter of the SMTP RCPT TO
          command, as defined in <xref target='RFC5321'>RFC-SMTP</xref> and <xref target='RFC3461'>RFC-DSN-SMTP</xref>.
        </t><t>
          <xref target='RFC3461'>RFC-DSN-SMTP</xref> is amended as follows: 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 of this header field is as follows:
          <figure><artwork type='abnf'>
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]".
          </artwork></figure>
        </t><t>
          The address-type and generic-address token are as specified in the
          description of the Original-Recipient field in <xref target='originalrecipientfield' />.
        </t><t>
          The purpose of carrying the original recipient information and
          returning it in the MDN is to permit automatic correlation of MDNs
          with the original message on a per-recipient basis.
        </t>
      </section>
      <section title='Use with the Message/Partial Media Type'>
        <t>
          The use of the header fields Disposition-Notification-To,
          Disposition-Notification-Options, and Original-Recipient with the MIME
          message/partial content type (<xref target='RFC2046'>RFC-MIME-MEDIA</xref>]) requires further
          definition.
        </t><t>
          When a message is segmented into two or more message/partial
          fragments, the three header fields mentioned in the above paragraph SHOULD
          be placed in the "inner" or "enclosed" message (using the terms of
          <xref target='RFC2046'>RFC-MIME-MEDIA</xref>).
          If these header fields are found in the header fields of any of the fragments, they are ignored.
        </t><t>
          When the multiple message/partial fragments are reassembled, the
          following applies.
          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 these header fields occur in the header fields of the "inner" or "enclosed" message (using the terms of
          <xref target='RFC2046'>RFC-MIME-MEDIA</xref>), they pertain to an MDN that will be generated for the
          reassembled message.
          Section 5.2.2.1 of <xref target='RFC2046'>RFC-MIME-MEDIA</xref>) is amended to specify that,
          in addition to the header fields specified there, the three
          header fields described in this specification are to be appended, in order,
          to the header fields of the reassembled message.
          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.
        </t>
      </section>
    </section>
    <section title='Format of a Message Disposition Notification'>
        <t>
          A message disposition notification is a MIME message with a top-level
          content-type of multipart/report (defined in <xref target='RFC6522'>RFC-REPORT</xref>).
          When multipart/report content is used to transmit an MDN:
          <vspace blankLines='1' /><list style='letters'>
            <t>
              The report-type parameter of the multipart/report content is
              "disposition-notification".
            <vspace blankLines='1' /></t><t>
              The first component of the multipart/report contains a
              human-readable explanation of the MDN, as described in <xref target='RFC6522'>RFC-REPORT</xref>.
            <vspace blankLines='1' /></t><t>
              The second component of the multipart/report is of content-type
              message/disposition-notification, described in <xref target='themessagedispositionnotificationcontenttype'/> of
              this document.
            <vspace blankLines='1' /></t><t>
              If the original message or a portion of the message is to be
              returned to the sender, it appears as the third component of the
              multipart/report.
              The decision of whether or not to return the message or part of the message is up to the MUA generating the
              MDN.
              However, in the case of encrypted messages requesting MDNs, encrypted message text MUST be returned, if it is returned at
              all, only in its original encrypted form.
            </t>
          </list>
        </t>
        <t>
          NOTE:  For message disposition notifications gatewayed from foreign
          systems, the header fields of the original message may not be available.
          In this case, the third component of the MDN may be omitted, or it
          may contain "simulated" <xref target='RFC5322'>RFC-MSGFMT</xref> header fields that contain
          equivalent information.
          In particular, it is very desirable to preserve the subject and date fields from the original message.
        </t><t>
          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 from the original message for which
          the MDN is being generated.
        </t><t>
          The From header field of the MDN MUST contain the
          address of the person for whom the message disposition notification is
          being issued.
        </t><t>
          The envelope sender address (i.e., SMTP "MAIL FROM") of the MDN MUST be
          null (&lt;&gt;), specifying that no Delivery Status Notification messages nor
          other messages indicating successful or unsuccessful delivery are to
          be sent in response to an MDN.
        </t><t>
          A message disposition notification MUST NOT itself request an MDN.
          That is, it MUST NOT contain a Disposition-Notification-To header field.
        </t><t>
          The Message-ID header field (if present) for an MDN MUST be different from
          the Message-ID of the message for which the MDN is being issued.
        </t><t>
          A particular MDN describes the disposition of exactly one message for
          exactly one recipient.
          Multiple MDNs may be generated as a result of one message submission, one per recipient.
          However, due to the circumstances described in <xref target='thedispositionnotificationtoheader' />,
          it's possible that some of the recipients for whom MDNs were requested will not generate MDNs.
        </t>
      <section title='The message/disposition-notification Media Type' anchor='themessagedispositionnotificationcontenttype'>
        <t>
          The message/disposition-notification Media Type is defined as follows:
          <vspace blankLines='1' /><list style='hanging' hangIndent='20'>
            <t hangText='Type name:'>message<vspace blankLines='1' /></t>
            <t hangText='Subtype name:'>disposition-notification<vspace blankLines='1' /></t>
            <t hangText='Required parameters:'>none<vspace blankLines='1' /></t>
            <t hangText='Optional parameters:'>none<vspace blankLines='1' /></t>
            <t hangText='Encoding considerations:'>"7bit" encoding is sufficient and
                                  MUST be used to maintain readability
                                  when viewed by non-MIME mail readers.<vspace blankLines='1' /></t>
            <t hangText='Security considerations:'>discussed in <xref target='securityconsiderations' /> of [RFCXXXX].</t>
              <!--////Should we say below that it is not clear whether RFC 2231 encoding is in use in this media type?-->
            <t hangText='Interoperability considerations:'>none<vspace blankLines='1' /></t>
            <t hangText='Published specification:'>[RFCXXXX]<vspace blankLines='1' /></t>
            <t hangText='Applications that use this media type:'>Mail Transfer Agents and email
              clients that support multipart/report generation and/or parsing.<vspace blankLines='1' /></t>
            <t hangText='Fragment identifier considerations:'>N/A<vspace blankLines='1' /></t>

            <t hangText='Additional information:'>
              <list>
                <t>Deprecated alias names for this type: N/A</t>
                <t>Magic number(s): none</t>
                <t>File extension(s): .disposition-notification </t>
                <t>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
     <!--////Is this the right thing?-->
                "public.utf8-email-message-header" is suggested.  This type
                conforms to "public.plain-text".</t>
              </list>
            </t>

            <t hangText='Person &amp; email address to contact for further information:'>See the Authors&apos; Addresses section of [RFCXXXX]<vspace blankLines='1' /></t>
            <t hangText='Intended usage:'>COMMON<vspace blankLines='1' /></t>
            <t hangText='Restrictions on usage:'>This media type contains textual data in the US-ASCII charset, which is always 7-bit.<vspace blankLines='1' /></t>
            <t hangText='Author:'>See the Authors&apos; Addresses section of [RFCXXXX]<vspace blankLines='1' /></t>
            <t hangText='Change controller:'>IETF<vspace blankLines='1' /></t>
            <t hangText='Provisional registration?'>no<vspace blankLines='1' /></t>
          </list>
	  (While the 7bit restriction applies to the message/disposition-notification portion of the multipart/report content,
	  it does not apply to the optional third portion of the multipart/report content.)
        </t><t>
          The message/disposition-notification report type for use in the
          multipart/report is "disposition-notification".
        </t><t>
          The body of a message/disposition-notification consists of one or more
          "fields" formatted according to the ABNF of <xref target='RFC5322'>RFC-MSGFMT</xref> header
          "fields".
          The syntax of the message/disposition-notification content is as follows:
          <figure><artwork type='abnf'>
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
          </artwork></figure>
        </t><t>
    <!--////Alexey: I changed my mind on this, I think various extensions show order which is different.
        I've seen existing MDNs where extension header fields appear between defined header fields.-->
	  Note that the order of the above fields is recommended, but not fixed. Extension fields can appear anywhere.
	</t>
        <section title='General conventions for fields' toc='exclude'>
          <t>
            Since these fields are defined according to the rules of <xref target='RFC5322'>RFC-MSGFMT</xref>,
            the same conventions for continuation lines and comments apply.
            Notification fields may be continued onto multiple lines by beginning
            each additional line with a SPACE or HTAB.
            Text that appears in parentheses is considered a comment and not part of the contents of
            that notification field.
<!--Alexey: Do we really need to support comments? But note, this text comes from RFC 2298!
Tony: sure dates back a long ways, so it seems that comments should be allowed.
-->
            Field names are case-insensitive, so the names of notification fields may be spelled in any combination of
            upper and lower case letters.
            <xref target="RFC5322"/> comments in notification fields may use
            the "encoded-word" construct defined in <xref target='RFC2047'>RFC-MIME-HEADER</xref>.
          </t>
        </section>
        <section title='"*-type" subfields' toc='exclude'>
          <t>
<!--Alexey: Note that -type fields are not "text" themselves, they are *followed* by "text"-->
<!--Strictly speaking, the part that follows can also contain FWS, but this is fine, as the definition below is informal anyway.
Tony: FWS != WSP. text includes WSP, but FWS goes way beyond WSP.
Alexey: I've updated several fields to use "([FWS] text)" instead of "text", this should address the issue.
        However FWS is not allowed in -type subfields themselves, only before and after them.
        I assume that it is better not to fold lines within such fields.
-->
            Several fields consist of a "-type" subfield, followed by a semi-colon, followed by "*text".
	    <vspace/>
<!--The following was implemented by introducing OWS, which is interpreted slightly differently when parsing and when generating
        (Here and elsewhere in the document) It looks like there is emerging consensus that the document should describe 2 grammars:
        one for "must accept" (which either allows CFWS or [FWS]) and another one for "should generate" (CFWS not allowed, but *WSP are allowed).
        A future version of this document will implement this change, unless objections are voiced.
-->
	    <vspace/>
<!--Alexey: Suggestion to use RFC 5321 definition of atom, which doesn't allow CFWS. Also says that explicitly.
Tony: My thoughts are converging on either:
    *) only generate and accept FWS.
    *) generate FWS, but accept CFWS.
Alexey: either of these would be fine with me.
Keith: use the second choice.
Tony/Alexey: Ok.
Alexey: I am starting to think that we might need 2 grammars - "must accept CFWS" and "must generate without CFWS, but may use *WSP".
-->
            For these fields, the keyword used in the address-type or MTA-type subfield indicates the expected
            format of the address or MTA-name that follows.
          </t><t>
            The "-type" subfields are defined as follows:
            <vspace blankLines='1' /><list style='letters'>
              <t>
                An "address-type" specifies the format of a mailbox address.
                For example, Internet Mail addresses use the "rfc822" address-type.
                Other values can appear in this field as specified in the "Address Types" IANA subregistry
                established by <xref target='RFC3464'>RFC-DSN-FORMAT</xref>.
                <figure><artwork type='abnf'>
address-type = atom

atom = &lt;The version from RFC 5321 (not from RFC 5322) is used in this document.&gt;
                </artwork></figure>
              <vspace blankLines='1' /></t><t>
                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 the domain name of that host, and the "dns" MTA-name-type is used.
                Other values can appear in this field as specified in the "MTA Name Types" IANA subregistry
                established by <xref target='RFC3464'>RFC-DSN-FORMAT</xref>.
                <figure><artwork type='abnf'>
mta-name-type = atom
                </artwork></figure>
              </t>
            </list>
          </t><t>
            Values for address-type and mta-name-type are case-insensitive.
            Thus, address-type values of "RFC822" and "rfc822" are equivalent.
          </t><t>
            The Internet Assigned Numbers Authority (IANA) maintains a registry of
            address-type and mta-name-type values, along with descriptions of the
            meanings of each, or a reference to one or more specifications that
            provide such descriptions.
            (The "rfc822" address-type is defined in <xref target='RFC3461'>RFC-DSN-SMTP</xref>.)
            Registration forms for address-type and mta-name-type
            appear in <xref target='RFC3464'>RFC-DSN-FORMAT</xref>.
          </t>
        </section>
      </section>
      <section title='Message/disposition-notification Content Fields'>
        <section title='The Reporting-UA field' anchor='reporting-ua' toc='exclude'>
          <t>
            <figure><artwork type='abnf'>
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
            </artwork></figure>
            The Reporting-UA field is defined as follows:
          </t><t>
            An MDN describes the disposition of a message after it has been
            delivered to a recipient.
            In all cases, the Reporting-UA is the MUA that performed the disposition described in the MDN.
          </t><t>
            The "Reporting-UA" field contains information about the MUA
            that generated the MDN, which is often used by servers to help
            identify the scope of reported interoperability problems, to work
            around or tailor responses to avoid particular MUA
            limitations, and for analytics regarding MUA or operating system
            use.  A MUA SHOULD send a "Reporting-UA" field
            unless specifically configured not to do so.
          </t><t>
            If the reporting MUA consists of more than one component (e.g., a base
            program and plug-ins), this may be indicated by including a list of
            product names.
          </t><t>
            A reporting MUA SHOULD limit generated product identifiers to what is
            necessary to identify the product; a sender MUST NOT generate
            advertising or other nonessential information within the product
            identifier.
            <!--///Not applicable, as there is no product-version:
            A sender SHOULD NOT generate information in
            product-version that is not a version identifier (i.e., successive
            versions of the same product name ought to differ only in the
            product-version portion of the product identifier).
            -->
          </t><t>
            A reporting MUA SHOULD NOT generate a "Reporting-UA" field containing
            needlessly fine-grained detail and SHOULD limit the addition of
            subproducts by third parties.  Overly long and detailed "Reporting-UA"
            field values increase the risk of a user being
            identified against their wishes ("fingerprinting").
          </t><t>
            Likewise, implementations are encouraged not to use the product
            tokens of other implementations in order to declare compatibility
            with them, as this circumvents the purpose of the field.  If a MUA
            masquerades as a different MUA, recipients can assume
            that the user intentionally desires to see responses tailored for
            that identified MUA, even if they might not work as well for
            the actual MUA being used.
          </t><t>
            Example:
            <figure><artwork>
Reporting-UA:  Foomail 97.1
            </artwork></figure>
          </t>
        </section>
        <section title='The MDN-Gateway field' toc='exclude'>
          <t>
            The MDN-Gateway field indicates the name of the gateway or MTA that
            translated a foreign (non-Internet) message disposition notification
            into this MDN.
            This field MUST appear in any MDN that was translated by a gateway from a foreign system into MDN format, and MUST NOT
            appear otherwise.
            <figure><artwork type='abnf'>
mdn-gateway-field = "MDN-Gateway" ":" OWS mta-name-type OWS ";" OWS mta-name OWS

mta-name = *text
            </artwork></figure>
          </t><t>
            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.
          </t>
        </section>
        <section title='Original-Recipient field' toc='exclude' anchor='originalrecipientfield'>
          <t>
            The Original-Recipient field indicates the original recipient address
            as specified by the sender of the message for which the MDN is being
            issued.
            For Internet Mail messages, the value of the Original-Recipient field is obtained from the Original-Recipient
            header field from the message for which the MDN is being generated.

            If there is an Original-Recipient header field in the message, or if information
            about the original recipient is reliably available some other way,
            then the Original-Recipient field MUST be included.  Otherwise, the
            Original-Recipient field MUST NOT be included.

            If there is more than one Original-Recipient header field in the message, the MUA may choose the one
            to use, or act as if no Original-Recipient header field is present.
            <figure><artwork type='abnf'>
original-recipient-field =
          "Original-Recipient" ":" OWS address-type OWS ";" OWS generic-address OWS

generic-address = *text
            </artwork></figure>
          </t><t>
            The address-type field indicates the type of the original recipient
            address.
            If the message originated within the Internet, the address-type field will normally be "rfc822", and the address will be
            according to the syntax specified in <xref target='RFC5322'>RFC-MSGFMT</xref>.
            The value "unknown" should be used if the Reporting MUA cannot determine the
            type of the original recipient address from the message envelope.
            This address is the same as that provided by the sender and can be
            used to automatically correlate MDN reports with original messages on
            a per recipient basis.
          </t>
        </section>
        <section title='Final-Recipient field' toc='exclude'>
          <t>
            The Final-Recipient field indicates the recipient for which the MDN is
            being issued.
            This field MUST be present.
          </t><t>
            The syntax of the field is as follows:
            <figure><artwork type='abnf'>
final-recipient-field =
          "Final-Recipient" ":" OWS address-type OWS ";" OWS generic-address OWS
            </artwork></figure>
          </t><t>
            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 MDN was generated by the MUA.

            <list style="empty">
              <t>
              One example of when this field might not contain the final recipient address of the message
              is when an alias (e.g. "customer-support@example.com") forwards mail to a specific personal address
              (e.g. "bob@example.com"). Bob might want to be able to send MDNs, but not give away his personal email address.
              In this case the Final-Recipient field can be "customer-support@example.com" instead of "bob@example.com".
              </t>
            </list>

          </t><t>
            The Final-Recipient address may differ from the address originally
            provided by the sender, because it may have been transformed during
            forwarding and gatewaying into a totally unrecognizable mess.
            However, in the absence of the optional Original-Recipient field, the
            Final-Recipient field and any returned content may be the only
            information available with which to correlate the MDN with a
            particular message recipient.
          </t><t>
            The address-type subfield indicates the type of address expected by
            the reporting MTA in that context.
            Recipient addresses obtained via SMTP will normally be of address-type "rfc822",
            but can be other values from the "Address Types" subregistry of the
            "Delivery Status Notification (DSN) Types" IANA registry.
          </t><t>
            Since mailbox addresses (including those used in the Internet) may be
            case sensitive, the case of alphabetic characters in the address MUST
            be preserved.
          </t>
        </section>
        <section title='Original-Message-ID field' toc='exclude'>
          <t>
            The Original-Message-ID field indicates the message-ID of the message
            for which the MDN is being issued.
            It is obtained from the Message-ID header field of the message for which the MDN is issued.
            This field MUST be present if and only if the original message contained a Message-ID header field.
            The syntax of the field is as follows:
            <figure><artwork type='abnf'>
original-message-id-field =
          "Original-Message-ID" ":" msg-id
            </artwork></figure>
          </t><t>
          The msg-id token is as specified in <xref target='RFC5322'>RFC-MSGFMT</xref>.
            </t>
        </section>
        <section title='Disposition field' toc='exclude' anchor='dispositionfield'>
          <t>
            The Disposition field indicates the action performed by the
            Reporting-MUA on behalf of the user.
            This field MUST be present.
          </t><t>
            The syntax for the Disposition field is:
            <figure><artwork type='abnf'>
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
            </artwork></figure>
          </t><t>
            The disposition-mode, disposition-type, and disposition-modifier values may be
            spelled in any combination of upper and lower case US-ASCII characters.
          </t>
          <section title='Disposition modes' toc='exclude' anchor='disposition-modes'>

            <t>Disposition mode consists of 2 parts: action mode and sending mode.</t>
            
            <t>
              The following action modes are defined:
              <vspace blankLines='1' /><list style='hanging' hangIndent='20'>
                <t hangText='"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 user's privacy, this MUST be the default for MUAs.
                <vspace blankLines='1' /></t><t hangText='"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 <xref target='RFC5429'/>, Fax-over-Email <xref target='RFC3249'/>,
                               Voice Messaging System (VPIM) <xref target='RFC3801'/> or upon delivery to a mailing list).
                </t>
              </list>
            </t>
            <t>
              "Manual-action" and "automatic-action" are mutually exclusive.
              One or the other MUST be specified.
            </t>
            <t>
              The following sending modes are defined:
              <vspace blankLines='1' /><list style='hanging' hangIndent='20'>
                <t hangText='"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 user's privacy, this MUST be the default for MUAs.
                <vspace blankLines='1' /></t><t hangText='"MDN-sent-automatically"'>The MDN was sent because the MUA had
                               previously been configured to do so
                               automatically.
                               <!--////Alexey: Add some text here that this might leak information about MUA configuration?-->
                </t>
              </list>
            </t><t>
              "MDN-sent-manually" and "MDN-sent-automatically" are mutually
              exclusive.
              One or the other MUST be specified.
            </t>
          </section>
          <section title='Disposition types' toc='exclude'>
            <t>
              The following disposition-types are defined:<!-- add dispatched, processed -->
              <vspace blankLines='1' /><list style='hanging' hangIndent='20'>
                <t hangText='"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.
                <vspace blankLines='1' /></t><t hangText='"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.
 		
                <vspace blankLines='1' /></t><t hangText='"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.

                <vspace blankLines='1' /></t><t hangText='"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.
                </t>
              </list>
            </t>
          </section>
          <section title='Disposition modifiers' toc='exclude'>
            <t>
              Only the extension disposition modifiers is defined:
              <vspace blankLines='1' /><list style='hanging' hangIndent='20'>
                <t hangText='disposition-modifier-extension'><vspace />Disposition modifiers may be defined
                               in the future by later revisions
                               or extensions to this specification.
<!--                               
                               Disposition value names beginning with "X-"
                               will never be defined as standard values;
                               such names are reserved for experimental
                               use.
-->                               
                               MDN disposition value names MUST be registered with
                               the Internet Assigned Numbers Authority
                               (IANA) using "Specification required" registration policy.

                               (See <xref target='ianaconsiderations' /> 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.
                    </t>
                </list>
              </t>
<!--
              <t>
                If an MUA developer does not wish to register the meanings of such
                disposition modifier extensions, "X-" modifiers may be used for this
                purpose.
                To avoid name collisions, the name of the MUA implementation should follow the "X-", (e.g., "X-Foomail-").
              </t>
-->
              <t>
                It is not required that an MUA be able to generate all of the possible
                values of the Disposition field.
              </t><t>
                A user agent MUST NOT issue more than one MDN on behalf of each
                particular recipient.
                That is, once an MDN has been issued on behalf of a recipient, no further MDNs may be issued on behalf of
                that recipient, even if another disposition is performed on 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.
              </t>
            </section>
          </section>
          <section title='Error Field' toc='exclude' anchor='failureerrorwarningfields'>
            <t>
              The Error field is used to supply additional
              information in the form of text messages when the "error" disposition modifier appear.
              The syntax is as follows:
              <figure><artwork type='abnf'>
error-field = "Error" ":" *([FWS] text)
              </artwork></figure>
            </t>

            <t>
            Note that syntax of these header fields doesn't include comments, so "encoded-word" construct
            defined in <xref target='RFC2047'>RFC-MIME-HEADER</xref> can't be used to convey non ASCII text.
            Application that need to convey non ASCII text in these fields should consider implementing 
            message/global-disposition-notification media type specified in <xref target="RFC6533"/>
            instead of this specification.
            </t>
          </section>
        </section>
        <section title='Extension-fields'>
          <t>
            Additional MDN fields may be defined in the future by later revisions
            or extensions to this specification.
<!--////How can we register existing fields already in circulation?
            Extension-field names beginning with "X-" will never be defined as standard fields; such names are
            reserved for experimental use.
-->
            MDN field names <!--NOT beginning with "X-"--> MUST be registered with the Internet Assigned Numbers Authority
            (IANA) using "Specification required" registration policy.
            (See <xref target='ianaconsiderations' /> for a registration form.)
            MDN Extension-fields may be defined for the following reasons:
            <vspace blankLines='1' /><list style='letters'>
              <t>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).
              <vspace blankLines='1' /></t><t>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).
              </t>
            </list>
          </t>
<!--
          <t>
            If an application developer does not wish to register the meanings of
            such extension fields, "X-" fields may be used for this purpose.
            To avoid name collisions, the name of the application implementation
            should follow the "X-", (e.g., "X-Foomail-Log-ID" or
            "X-Foomail-EDI-info").
          </t>
-->
      </section>
    </section>
    <section title='Timeline of events'>
      <t>
        The following timeline shows when various events in the processing of
        a message and generation of MDNs take place:
        <vspace blankLines='1' /><list style='hanging'>
          <t hangText='--'>User composes message
          <vspace blankLines='1' /></t><t hangText='--'>User tells MUA to send message.
          <vspace blankLines='1' /></t><t hangText='--'>MUA passes message to Mail Submission Agent (MSA), original recipient information passed along.
          <vspace blankLines='1' /></t><t hangText='--'>MSA sends message to next MTA.
          <vspace blankLines='1' /></t><t hangText='--'>Final MTA receives message.
          <vspace blankLines='1' /></t><t hangText='--'>Final MTA delivers message to recipient's mailbox (possibly generating a Delivery Status Notification (DSN)).
          <vspace blankLines='1' /></t><t hangText='--'>(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.
          
          <vspace blankLines='1' /></t><t hangText='--'>MUA performs automatic processing and might generate corresponding MDNs
            ("dispatched", "processed" or "deleted" <!-- changed: removed "denied" or "failed" from list -->
            disposition type with "automatic-action" and "MDN-sent-automatically"
            disposition modes). The MUA remembers that an MDN was generated.
          <vspace blankLines='1' /></t><t hangText='--'>MUA displays list of messages to user.
          <vspace blankLines='1' /></t><t hangText='--'>User selects a message and requests that some action be performed
            on it.
          <vspace blankLines='1' /></t><t hangText='--'>MUA performs requested action; if an automatic MDN has not already
            been generated, with user's permission, sends
            an appropriate MDN ("displayed", "dispatched", "processed", <!-- changed: removed "denied" or "failed" from list -->
            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.
          <vspace blankLines='1' /></t><t hangText='--'>User possibly performs other actions on message, but no further
            MDNs are generated.
          </t>
        </list>
      </t>
    </section>
    <section title='Conformance and Usage Requirements' anchor='conformance'>
      <t>
        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.
      </t><t>
        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 <xref target='RFC3461'>RFC-DSN-SMTP</xref>
        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.
      </t><t>
        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 <xref target='RFC3461'>RFC-DSN-SMTP</xref>,
        section 6.2.7.3), each of the recipients may issue an MDN.
      </t><t>
        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.
      </t><t>
        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.
      </t><t>
        This specification places no restrictions on the processing of MDNs
        received by user agents or mailing lists.
      </t>
    </section>
    <section title='Security Considerations' anchor='securityconsiderations'>
      <t>
        The following security considerations apply when using MDNs:
      </t>
      <section title='Forgery'>
        <t>
          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.
        </t><t>
          Security threats related to forged MDNs include the sending of:
          <vspace blankLines='1' /><list style='letters'>
            <t>A falsified disposition notification when the indicated
              disposition of the message has not actually occurred,<vspace blankLines='1' /></t>
            <t>Unsolicited MDNs</t>
          </list>
        </t>
        <t>
          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 email message is verified.
        </t>
      
      </section>
      <section title='Privacy'>
        <t>
          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, which OS was used).
        In this situation, it is acceptable for the MUA to silently ignore requests for MDNs.
      </t><t>
          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.
        </t><t>
          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.
        </t><t>
          Disposition mode (<xref target='disposition-modes'/>) 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.
        </t>
        <!--This doesn't seem to be true if S/MIME or OpenPGP is used:
        <t>
          An unencrypted MDN could reveal confidential information about an
          encrypted message, especially if all or part of the original message
          is returned in part 3 of the multipart/report.
          Encrypted MDNs are not defined in this specification.
        </t>
        -->
        <t>
          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.
        </t><t>
          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 field containing the envelope from address.
          This risk can be minimized by not sending MDN's automatically.
        </t>

        <section title='Disclosure of Product Information'>

          <t>
            The "Reporting-UA" field (<xref target='reporting-ua'/>)
            User-Agent (Section 5.5.3) and 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.
          </t>
          
        </section>

        <section title='MUA Fingerprinting'>

          <t>
            The "Reporting-UA" field (<xref target='reporting-ua'/>) 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.  However, the source
            of unique information that is least expected by users is proactive
            negotiation, including the Accept-Language header fields.
          </t>

        </section>

      </section>
      <section title='Non-Repudiation'>
        <t>
          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.
        </t><t>
          One possible solution for this purpose can be found in <xref target='RFC2634'>RFC-SEC-SERVICES</xref>.
        </t>
      </section>
      <section title='Mail Bombing'>
        <t>
          The MDN request mechanism introduces an additional way of mailbombing
          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.
          Such an attack could overrun the capacity of the targeted mailbox and deny
          service.
        </t><t>
          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 <xref target='thedispositionnotificationtoheader' /> for further discussion.
        </t>
      </section>
    </section>
    <section title='Collected ABNF Grammar'>
      <t>
        NOTE:  The following lexical tokens are defined in <xref target='RFC5322'>RFC-MSGFMT</xref>:
        CRLF, FWS, CFWS, field-name, mailbox-list, msg-id, text, comment, word.
        The following lexical tokens are defined in <xref target='RFC5321'>RFC-SMTP</xref>:
        atom. (Note that <xref target='RFC5322'>RFC-MSGFMT</xref> also defines "atom",
        but the version from <xref target='RFC5321'>RFC-SMTP</xref> is more restrictive and
        this more restrictive version is used in this document.)
        "encoded-word" construct defined in <xref target='RFC2047'>RFC-MIME-HEADER</xref> is allowed everywhere
        where <xref target='RFC5322'>RFC-MSGFMT</xref> "comment" is used, for example in CFWS.
        <figure><artwork type='abnf'>
   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
        </artwork></figure>
      </t>
    </section>
    <section title='Guidelines for Gatewaying MDNs'>
      <t>
        NOTE:  This section provides non-binding recommendations for the
        construction of mail gateways that wish to provide semi-transparent
        disposition notifications between the Internet and another electronic
        mail system.
        Specific MDN gateway requirements for a particular pair of mail systems may be defined by other documents.
      </t>
      <section title='Gatewaying from other mail systems to MDNs'>
        <t>
          A mail gateway may issue an MDN to convey the contents of a "foreign"
          disposition notification over Internet Mail.
          When there are appropriate mappings from the foreign notification elements to MDN
          fields, the information may be transmitted in those MDN fields.
          Additional information (such as might be needed to tunnel the foreign
          notification through the Internet) may be defined in extension MDN
          fields.
          (Such fields should be given names that identify the foreign mail protocol, e.g., X400-* for X.400 protocol elements).
        </t><t>
          The gateway must attempt to supply reasonable values for the
          Reporting-UA, Final-Recipient, and Disposition fields.
          These will normally be obtained by translating the values from the foreign
          notification into their Internet-style equivalents.
          However, some loss of information is to be expected.
        </t><t>
          The sender-specified recipient address and the original message-id,
          if present in the foreign notification, should be preserved in the
          Original-Recipient and Original-Message-ID fields.
        </t><t>
          The gateway should also attempt to preserve the "final" recipient
          address from the foreign system.
          Whenever possible, foreign protocol elements should be encoded as meaningful printable ASCII strings.
        </t><t>
          For MDNs produced from foreign disposition notifications, the name of
          the gateway MUST appear in the MDN-Gateway field of the MDN.
        </t>
      </section>
      <section title='Gatewaying from MDNs to other mail systems'>
        <t>
          It may be possible to gateway MDNs from the Internet into a foreign
          mail system.
          The primary purpose of such gatewaying is to convey disposition information in a form that is usable by the destination
          system.
          A secondary purpose is to allow "tunneling" of MDNs through foreign mail systems in case the MDN may be gatewayed back into the
          Internet.
        </t><t>
          In general, the recipient of the MDN (i.e., the sender of the original
          message) will want to know, for each recipient:  the closest available
          approximation to the original recipient address, and the disposition
          (displayed, printed, etc.).
        </t><t>
          If possible, the gateway should attempt to preserve the
          Original-Recipient address and Original-Message-ID (if present) in
          the resulting foreign disposition report.
        </t><t>
          If it is possible to tunnel an MDN through the destination
          environment, the gateway specification may define a means of
          preserving the MDN information in the disposition reports used by that
          environment.
        </t>
      </section>
      <section title='Gatewaying of MDN-requests to other mail systems'>
        <t>
          By use of the separate disposition-notification-to request header field,
          this specification offers a richer functionality than most, if not all,
          other email systems.
          In most other email systems, the notification recipient is identical to the message sender as indicated in the
          "from" address.
          There are two interesting cases when gatewaying into such systems:
          <vspace blankLines='1' /><list style='numbers'>
          <t>If the address in the disposition-notification-to header field is
            identical to the address in the SMTP "MAIL FROM", the expected
            behavior will result, even if the disposition-notification-to
            information is lost.
            Systems should propagate the MDN request.
          <vspace blankLines='1' /></t><t>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 result in unintended behavior.
            This is especially important when the message arrives via a mailing list expansion
            software that may specifically replace the SMTP "MAIL FROM"
            address with an alternate address.
            In such cases, the MDN request should not be gatewayed and should be silently
            dropped.
            This is consistent with other forms of non-support for MDN.
          </t>
        </list>
      </t>
    </section>
    </section>
    <section title='Example'>
      <t>
        NOTE:  This example is provided as illustration only, and is not
        considered part of the MDN protocol specification.
        If the example conflicts with the protocol definition above, the example is wrong.
      </t><t>
        Likewise, the use of *-type subfield names or extension fields in this
        example is not to be construed as a definition for those type names or
        extension fields.
      </t><t>
        This is an MDN issued after a message has been displayed to the user
        of an Internet Mail user agent.
      </t><t>
        <figure><artwork>
Date: Wed, 20 Sep 1995 00:19:00 (EDT) -0400
From: Joe Recipient &lt;Joe_Recipient@example.com&gt;
Message-Id: &lt;199509200019.12345@example.com&gt;
Subject: Disposition notification
To: Jane Sender &lt;Jane_Sender@example.org&gt;
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 &lt;Joe_Recipient@example.com&gt; 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: &lt;199509192301.23456@example.org&gt;
Disposition: manual-action/MDN-sent-manually; displayed

--RAA14128.773615765/example.com
content-type: message/rfc822

[original message optionally goes here]

--RAA14128.773615765/example.com--
        </artwork></figure>
      </t>
    </section>
    <section title='IANA Considerations' anchor='ianaconsiderations'>
      <t>There are two actions for IANA:
        <list style='numbers'>
          <t>IANA is asked to update the registration template for the
          message/disposition-notification media type to the one in
          <xref target='themessagedispositionnotificationcontenttype' /> of this document,
          and to update the reference for that media type to point to this document
          instead of to RFC 3798.</t>

          <t>The registries specified here already exist, and this section
          is updating their documentation.  IANA is asked to change the
          reference document for the three Message Disposition
          Notification Parameters registries to point to this document
          instead of to RFC 3798.</t>
        </list>
      </t>

      <t>
        This document specifies three types of parameters that must be
        registered with the Internet Assigned Numbers Authority (IANA).
        All of them use <xref target="RFC5226"/> "Specification required" IANA registration policy.
      </t><t>
        The forms below are for use when 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 information required by a registration form may be satisfied either by
        providing the information on the form itself, or by including a
        reference to a published, publicly available specification that
        includes the necessary information.
        IANA MAY reject registrations because of incomplete registration forms or incomplete specifications.
      </t><t>
        To register, complete the following applicable form and send it via
        electronic mail to &lt;IANA@IANA.ORG&gt;.
      </t>
      <section title='Disposition-Notification-Options header field disposition-notification-parameter names'>
        <t>
          A registration for a Disposition-Notification-Options header field disposition-notification-parameter
          name MUST include the following information:
          <vspace blankLines='1' /><list style='letters'>
            <t>The proposed disposition-notification-parameter name.
            <vspace blankLines='1' /></t><t>The syntax for disposition-notification-parameter values, specified using BNF, ABNF,
              regular expressions, or other non-ambiguous language.
            <vspace blankLines='1' /></t><t>If disposition-notification-parameter values are not composed entirely of graphic
              characters from the US-ASCII repertoire, a specification for how
              they are to be encoded as graphic US-ASCII characters in a
              Disposition-Notification-Options header field.
            <vspace blankLines='1' /></t><t>
              A reference to a permanent and readily available public
              specification that describes the semantics of the disposition-notification-parameter values.
            </t>
          </list>
        </t>
      </section>
      <section title='Disposition modifier names'>
        <t>
          A registration for a disposition-modifier name (used in the
          Disposition field of a message/disposition-notification) MUST include
          the following information:
          <vspace blankLines='1' /><list style='letters'>
            <t>The proposed disposition-modifier name.
            <vspace blankLines='1' /></t><t>
              A reference to a permanent and readily available public
              specification that describes the semantics of the disposition
              modifier.
            </t>
          </list>
        </t>
      </section>
      <section title='MDN extension field names'>
        <t>
          A registration for an MDN extension-field name MUST include the
          following information:
          <vspace blankLines='1' /><list style='letters'>
            <t>The proposed extension field name.
            <vspace blankLines='1' /></t><t>The syntax for extension values, specified using BNF, ABNF,
              regular expressions, or other non-ambiguous language.
            <vspace blankLines='1' /></t><t>If extension-field values are not composed entirely of graphic
              characters from the US-ASCII repertoire, a specification for how
              they are to be encoded as graphic US-ASCII characters in a
              Disposition-Notification-Options header field.
            <vspace blankLines='1' /></t><t>
              A reference to a permanent and readily available public
              specification that describes the semantics of the extension field.
            </t>
          </list>
        </t>
      </section>
    </section>
    <section title='Acknowledgements'>
      <t>
        The contributions of Bruce Lilly, Alfred Hoenes, Barry Leiba, Ben Campbell and Pete Resnick are gratefully acknowledged for this revision.
      </t>
      <t>
        The contributions of Roger Fajman and Greg Vaudreuil to earlier versions of this document are also gratefully acknowledged.
      </t>
    </section>
  </middle>
  <back>
    <references title='Normative References'>
      <?rfc include='reference.RFC.5321' ?>
      <?rfc include='reference.RFC.5322' ?>
      <?rfc include='reference.RFC.2045' ?>
      <?rfc include='reference.RFC.2046' ?>
      <?rfc include='reference.RFC.2047' ?>
      <?rfc include='reference.RFC.6522' ?>
      <?rfc include='reference.RFC.3461' ?>
      <?rfc include='reference.RFC.3464' ?>
      <?rfc include='reference.RFC.2119' ?>
      <?rfc include='reference.RFC.3503' ?>
    </references>
    <references title='Informative References'>
      <?rfc include='reference.RFC.2634' ?>
      <?rfc include='reference.RFC.3249' ?> <!--Implementers Guide for Facsimile Using Internet Mail-->
      <?rfc include='reference.RFC.3501' ?>
      <?rfc include='reference.RFC.3801' ?> <!--Voice Profile for Internet Mail - version 2 (VPIMv2)-->
      <?rfc include='reference.RFC.5233' ?>
      <?rfc include='reference.RFC.5226' ?>
      <?rfc include='reference.RFC.5429' ?> <!--Sieve Reject Action-->
      <?rfc include='reference.RFC.5598' ?>
      <?rfc include='reference.RFC.6533' ?>
    </references>
    <section title='Changes from RFC 3798'>
      
   <!--////Add other significant changes/fixes done in 07 and later versions-->
      
      <t>Changed IANA registration for different subregistries to "Specification Required" to match what is already used by IANA.
      </t>

      <t>Updated IANA registration template for message/disposition-notification.</t>

      <t>"X-" fields no longer reserved for experimental use and can now be registered in compliance with RFC 6648.</t>

      <t>Fixed the default MTA-name-type used in "MDN-Gateway" to be "dns".</t>

      <t>Strengthen requirements on obtaining user consent in order to protect user privacy.</t>

      <t>Removed discussion of using source routes with MDNs, as source route is a deprecated Email feature.</t>
      
      <t>
        The values of "dispatched" and "processed" were lost from the ABNF for "disposition-type". (Erratum #691)
        <!-- Alfred Hoenes ah@tr-sys.de
                
                Hello,
                
                triggered by the recent RFC 3886, I have re-visited RFC 3798 and found
                a serious general issue with that document:
                
                The 'Changes from RFC 2298' - as listed in Appendix A on page 29 of
                RFC 3798 - in fact have NOT been applied consistently to this document.
                
                As a result, the textual description of actions throughout RFC 3398
                often remains in contradiction to the new, restricted MDN grammar!
                
                Details:
                
                
                (1) disposition types
                =====================
                
                Appendix A says:
                
                  The dispositions "denied" and "failed" were removed from the
                  document reflecting the lack of implementation or usage ...
                
                
                Now, the syntax production "disposition-type" in section 3.2.6. (on
                page 14) and section 7. (on mid-page 22) has been changed to read:
                
                    disposition-type = "displayed" / "deleted"
                
                This means that the RFC 2298 disposition types "dispatched" and
                "processed" have been removed from the syntax definitions as well!
                
                Thus, either Appendix A lacks mentioning these removals  OR  these
                items should not have been removed from the syntax definitions.

                
                Nevertheless, all these disposition types removed from the syntax are
                mentioned at many places througout RFC 3798:
                
                o  "dispatched" :
                
                   - section 3.2.6. , final paragraph of the section on page 16
                   - section 4. , third-to-last bullet on page 17
                   - section 4. , first bullet on page 18
                
                o  "denied" :
                
                   - section 2.1. , bottom of page 4
                   - section 2.1. , end of 3rd paragraph on page 5
                   - section 4. , third-to-last bullet on page 17
                   - section 4. , first bullet on page 18
                   - section 6.2. , end of first paragraph on page 19
                
                o  "failed" :
                
                   - section 2.2. , middle of second-to-last paragraph on page 6
                   - section 2.2. , middle of second paragraph on page 7 (twice)
                   - section 2.2. , third paragraph on page 7 (twice)
                   - section 3.2.7. , in 2nd text line, on page 16
                                    (mis-spelled "failure" there)
                   - section 4. , third-to-last bullet on page 17
                   - section 4. , first bullet on page 18
                
                All these places in the text deal with the issue/sending/generation
                of MDNs with the named deprecated disposition types (it would be
                acceptable to talk about what to do with *received* such disposition
                types for backwards compatibility with RFC 2298) !
                
                -->

      </t><t>
        Because the warning disposition modifier was previously removed, warning-field has also been removed. (Erratum #692)
                <!-- Alfred Hoenes <ah@tr-sys.de>
                (2) disposition modifiers
                =========================
                
                Appendix A says:
                
                  The disposition modifiers "warning", "superseded", "expired",
                  "mailbox-terminated" have not seen actual implementation. They have
                  been deleted from this document.
                
                
                Accordingly, the syntax production "disposition-type" in section 3.2.6.
                (on page 14) and section 7. (on mid-page 22) has been changed to read:
                
                    disposition-modifier = "error" / disposition-modifier-extension
                
                Nevertheless, one of these 'removed' modifiers disposition is
                mentioned in the text of RFC 3798:
                
                o  "warning" :
                
                   - section 3.2.7. , 3rd line of text on page 16
               -->

      </t><t>
        Because the failed disposition type was previously removed, failure-field has also been removed.
      </t><t>
        The ABNF for ua-name and ua-product included semi-colon, which could not be distinguished from *text in the production.
        The ua-name was restricted to not include semi-colon. Semi-colon can still appear in the ua-product.
        <!-- Bruce Lilly:
                 There is a serious error in the ABNF in RFC 3798 sections 3.2.1 and 7:
                 
                   reporting-ua-field = "Reporting-UA" ":" ua-name [ ";" ua-product ]
                 
                   ua-name = *text
                 
                   ua-product = *text
                 
                 It is impossible to uniquely determine the ua-name component in
                 Reporting-UA: foo ; bar ; baz
                 [hint: semicolon and space are legal characters in "text"]
                 ua-name might be "foo", "foo ; bar", or "foo ; bar ; baz".
                -->
      </t><t>
        Removed recommendation to include the MUA DNS host name in the "Reporting-UA" MDN field.
      </t><t>
        The ABNF did not indicate all places that whitespace was allowable, in particular folding whitespace, although all implementations
	allow whitespace and folding in the header fields just like any other <xref target='RFC5322'>RFC5322</xref>-formatted header field.
	There were also a number of places in the ABNF that inconsistently permitted comments and whitespace in one leg of the production and not another.
	The ABNF now specifies FWS and CFWS in several places that should have already been specified by the grammar.

                <!-- Bruce Lilly:
                 2.1  The ABNF for fields ought to show places where comments, line folding, and
                 whitespace are permitted.  2822 uses CFWS and FWS grammar productions for that
                 purpose.  That of course applies to all of the field definitions.  One can
                 generally figure out the intent from the examples and by referring to 2298 and
                 822 (which had implicit liberal use of CFWS), but technically the ABNF in 3798
                 implies that no comments, whitespace, or line folding are permitted anywhere in
                 any of the fields.
                -->
      </t><t>
        Extension-field was defined in the collected grammar but not in the main text.
      </t><t>
        The comparison of mailboxes in Disposition-Notification-To to the Return-Path addr-spec was clarified.

                <!-- Bruce Lilly:
                2.1 Comparisons between mailboxes in Disposition-Notification-To and the
                addr-spec contained in a Return-Path field can be tricky.  Many of the issues
                are discussed in 3798, but there are a few not mentioned:
                   of course, the angle brackets which might appear in a name-addr mailbox and
                      which appear around the addr-spec in Return-Path need to be excluded from
                      comparisons
                   the domains might differ, yet refer to the same place (equivalent MX mail
                      exchangers, A vs. CNAME DNS records, DNS names vs. domain literals, etc.)
                      These are not addressed in 3798.
                   local-parts and domains might differ as literal text, but be equivalent when
                      put in canonical form.  The issues are discussed in RFC 3696 - but beware
                      - 3696 has a number of errors; refer to RFC 2822 for the actual quoting
                      and escaping rules.
                   internationalization issues might further compound comparison issues between
                      local-parts and domains (specifying that the on-the-wire forms must be
                      compared might suffice)
                   there exist some conventions (not standardized as far as I know) regarding
                      subaddressing applied to local parts, e.g. as in
                      tony+rfc3798@maillennium.att.com  (that example also illustrates an
                      issue regarding subdomains)
                Of those, the angle bracket issue ought to be understood, but clarification
                could benefit implementors, especially as 2822 defined the Return-Path syntax
                somewhat peculiarly.  Canonicalization of local-parts and domains should
                probably be required prior to comparison, and use of  on-the-wire forms should
                probably also be specified.  DNS equivalence issues might be tricky for some
                implementations (e.g. offline reading); perhaps the specification could use
                RFC 2119 "MAY" to give implementations leeway to consider A vs. CNAME and DNS
                vs domain literal equivalence for situations where DNS is available to the
                implementation (I'm not sure about MX).  About the only thing that can be said
                w.r.t. subaddressing and subdomains is a caution to sending MUA and
                address-rewriting MTA authors that a mismatch might result in no MDN being
                produced.
		-->
      </t><t>
        The use of the grammar production "parameter" was confusing with the <xref target='RFC2045'>RFC2045</xref>
	production of the same name, as well as other uses of the same term.
	These have been clarified.
	       <!-- Bruce Lilly
                2.2 syntax uses "attribute" and "value" productions from RFC 2045.  That is noted
                in sections 1.3 and 7, but not in 2.2.  Also, as RFC 2045 is used, the use of
                "parameter" as a grammar production with a different definition from "parameter"
                as used in RFC 2045 and as referred to in multiple places in the document (e.g.
                the multipart/report report-type parameter) is rather confusing. Some instances
                of "parameter" ("parameters", etc.) refer to the RFC 2045 definition, while
                others apparently refer to the different definition in 3798, and still others
                refer to ESMTP command parameters.  It would be clearer if a separate term (e.g.
                disposition-notification-parameter) were used to refer to the production defined
                in 3798. [disposition-notification-parameters (N.B. plural) could be re-named
                disposition-notification-parameter-list to clearly differentiate the
                comma-separated list from a single item]  
		-->
        <vspace/>
<!--        
        <cref>
          Not sure what to do with this one:
	        (From Bruce) 

                In the case of the message header fields, RFC 2822 also
                specifies minimum and maximum counts for each header field, and similar
                guidance would clarify 3798 (e.g. are multiple Disposition-Notification-Options
                fields permitted in a single message header, and if so, what semantics apply?).
              
Alexey: I am undecided. Allowing multiple seems fine, but I don't know how existing implementations handle them.
Tony: don't know
Alexey: I decided to disallow multiple instances, as this is likely to cause interop issues.
        </cref>
-->
        <vspace/>
<!--        
        <cref>
          (From Bruce)
          Note also that RFC 2045 is itself
          based on RFC 822 rather than 2822, so the issue of where CFWS is permitted or
          prohibited should probably be clearly specified where "attribute" and "value"
          are used.  Note further that the RFC 2045 definitions are clarified by errata
          and modified by RFC 2231, and by RFC 2231 errata.  Finally, note that RFC 2231
          has provisions for continuation of long parameter values (where there would
          otherwise be problems with the maximum line length specifications of RFCs 822
          and 2822), specification of language and charset, and provision for compatible
          handling of non-ASCII text, none of which are provided for in the RFC 3798
          disposition-notification parameters. It might be a good idea to think about that
          now, as a future change would almost certainly reset the document status to
          "Proposed".
        </cref>
          
Alexey: I don't think this is a big deal in real world (this header field is not used very often),
    but we can just disallow non-ASCII (and any encodings). If people want this sort of extensibility,
    they can put a "required" token in a parameter and define a separate header field for conveying non ASCII data.
    Thoughts?

Tony: okay
-->
      </t><t>
        A clarification was added on the extent of the 7bit nature of MDNs.
                <!-- Bruce Lilly:
                3.1 Encoding considerations states that "'7bit' encoding is sufficient.  The
                possibility that the original message might have been sent with 8bit or even
                binary encoding might have been overlooked.  Since an MDN may include the
                original message in the third part of the enclosed report multipart, the only
                ways to comply with the "MUST" use 7bit requirement are
                  o apply transfer encoding to the original before placing it in part 3, which
                    of course alters the original, and seems out of line with the spirit of
                    the document, particularly for encrypted originals.  And it is
                    EXPRESSLY FORBIDDEN by RFC 2045 (emphasis in original) to specify a transfer
                    encoding of quoted-printable or base64 for the enclosing message/rfc822 or
                    its multipart wrapper.  RFC 2045 also requires that the domain of any
                    enclosing composite type be no more restrictive than what is contained
                    within, so the "7bit" restriction on message/disposition-notification
                    does not permit the multipart/report or its enclosed 3rd part to have a
                    domain other than 7bit. (RFC 3462 also specifies 7bit for
                    multipart/report - which should probably also be relaxed - but falls short
                    of imposing RFC 2119 requirements.)
                  o omit the optional third part entirely
                  o return only portions of the original
                While the latter two are permitted by RFC 3798, it seems unduly restrictive
                from a practical point of view - it prevents providing the original content
                in its entirety in some cases.  It might be appropriate to relax the encoding
                restriction to permit 8bit or binary content (subject to the MIME and RFC 2822
                restrictions on the content of enclosed message/rfc822 content).
		-->
      </t><t>
        Uses of the terms "may" and "might" were clarified.
                <!-- Bruce Lilly
                The document mixes use of "may" and "might" to indicate possibility of some
                state or event.  The word "may" might lead to some confusion due to its
                multiple meanings, particularly as RFC 2119 "MAY" has a specific meaning w.r.t.
                the granting of permission.  It is unlikely that the other meaning of "might",
                i.e. power, would be confused with indication of possibility.  It might,
                therefore, be worthwhile examining the occurrences of "may" in the document for
                possible replacement with "might" where appropriate.
		-->

      </t><t>
      </t><t>
        A clarification was added on the order of the fields in the message/disposition-notification content.
                <!-- Bruce Lilly
                3.1 ABNF implies a specific order of MDN fields.  If not intentional, a note
                similar to the one regarding field order in RFC 2822 would be appropriate. On
                the other hand, if it is intentional, the intent could be clarified by
                reinforcement in the text.
		-->

      </t><t>
        <vspace/>
<!--
        <cref>
	  Not sure what to do with this one:

	        (From Bruce) 
                3.1.1 explicitly mentions use of RFC 2047 encoded-words in comments (however,
                as noted above there is no explicit provision for comments), but fails to
                mention the other contexts in which encoded-words may be used, viz. in an
                RFC [2]822 "phrase" (e.g. in the display name of a name-addr mailbox in
                Disposition-Notification-To (therefore, the discussion of encoded-words should
                probably be moved earlier in the document, prior to the specification of
                Disposition-Notification-To]), and in unstructured text (i.e. every instance of
                *text in the ABNF).  In particular, use of encoded-words might be highly
                desirable in the following places:
                  *) the ua-product portion of the Reporting-UA field;
  - allowed, because comments are allowed
                  *) the generic-address part of the Original-Recipient and Final-Recipient fields;
  - allowed, around them, because comments are allowed
                  *) the (unstructured) field bodies of Error, Failure, and Warning fields;
                  in structured extension fields where the context (per RFC 2047) is appropriate
                  in unstructured extension fields;
  - disallowed (or rather they have no special meaning)
                  *) in X- extension fields (see RFC 2047 for related X- message header fields).
                In cases where the field syntax is shared with DSN fields, some coordination
                with the RFC 346x authors might be desirable.
Alexey: Suggestion to disallow encoded words in the parsable part of MDNs. EAI MDNs can be used if non-ASCII is desired.
    We can add a pointer to that RFC.

Tony: okay

Alexey: on a second thought: allowing encoded-word in ua-production and possibly unstructured fields might be reasonable.
I don't think it is a good idea to allow it in generic-address (they should be machine parseable and not for human consumption).
But recommending use of EAI MDNs for unstructured fields is still a good idea.

	</cref>
-->
   <vspace/>
<!--Alexey: Add a reference to RFC 3503 (MDN Profile for IMAP) and just described the issue for other protocols.
        <cref>
	  I think a couple of clarifications are in order:
	  1) This restriction is within a given mail user agent. 
	       If the user uses multiple MUAs, it is possible that multiple MDNs MAY be generated.
	  2) A mail user agent SHOULD use underlying protocol support when possible to prevent multiple MDNs from being generated.
	     If underlying protocol support is not available, the mail user agent MUST use local knowledge to prevent multiple MDNs.

	    I don't think we need to worry about the case of an MUA error; accidents and bad implementations DO happen.

	        (From Bruce) 

                3.2.6.3 prohibition against multiple MDNs being issued on behalf of each
                recipient poses some implementation difficulties:
                  *) While IMAP servers maintain state that could possibly be used to prevent
                    issuance of multiple MDNs, the POP protocol has no such provision.  Even
                    in the case of IMAP, there is some ambiguity in the case of shared
                    mailboxes.
                  *) Some MUAs are known to have extreme difficulty keeping track of which
                    messages have been seen, let alone responded to.  Software version updates,
                    minor configuration changes (e.g. domain name or IP address change of POP
                    or IMAP server) are known to "confuse" some MUAs.
                  *) there is no standardized mechanism for communicating status between
                    multiple MUAs accessing the same mailbox (except in the case of IMAP, as
                    noted above).  Therefore, if an MDN is sent when a message is viewed (etc.)
                    using one MUA, a different MUA subsequently being used to view the same
                    message in the same user's mailbox (either via POP, or from a flat file
                    mailbox) might have no way to determine that an MDN had already been sent.
                    This is a fundamental difficulty with the specified protocol (relaxing
                    "MUST NOT" to "SHOULD NOT" is one possible way around that difficulty -
                    otherwise the document contains a "known technical omission" viz. no
                    defined means of establishing whether or not an MDN has already been sent
                    for a particular message. I believe that "known technical omissions" are
                    a barrier to further Standards Track progress).
                  *) Due to aliases, forwarding, etc. an original message sent to multiple
                    addresses might end up as multiple copies in a single recipient's mailbox.
                    It is unclear whether or not multiple MDNs are permitted in that case (the
                    Message-ID, if present in the original, will be the same in the copies,
                    and the "particular recipient" could be interpreted as being the same,
                    even though the addresses specified in the original message transport
                    envelope might have appeared to have been distinct to the originator who
                    requested MDNs.
	</cref>
-->
      </t>
    </section>
  </back>
</rfc>
