<?xml version="1.0" encoding="US-ASCII" ?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?rfc sortrefs="yes" ?>
<?rfc rfcedstyle="yes" ?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc toc='yes'?>

<rfc submissionType="IETF" category="std" consensus="yes" ipr="trust200902" number="6857">

<front>
  <title abbrev="POP/IMAP Downgrade">
    Post-Delivery Message Downgrading for Internationalized Email Messages
  </title>
  <author initials="K.F." surname="Fujiwara" fullname="Kazunori Fujiwara">
    <organization abbrev="JPRS">Japan Registry Services Co., Ltd.</organization>
    <address>
	<postal>
	<street>Chiyoda First Bldg. East 13F, 3-8-1 Nishi-Kanda</street>
	<city>Chiyoda-ku</city>
	<region>Tokyo</region>
	<code>101-0065</code>
	<country>Japan</country>
	</postal>
	<phone>+81 3 5215 8451</phone>
	<email>fujiwara@jprs.co.jp</email>
    </address>
  </author>

  <date  month="January" year="2013" />
  <area>Applications</area>
  <workgroup>Email Address Internationalization (EAI)</workgroup>

  <keyword>EAI</keyword>
  <keyword>Email Address Internationalization</keyword>
  <keyword>Downgrade</keyword>
  <keyword>MAIL</keyword>



  <abstract>
    <t>
	The Email Address Internationalization (SMTPUTF8) extension to SMTP allows
	UTF-8 characters in mail header fields.
	Upgraded POP and IMAP servers support internationalized messages.

	If a POP/IMAP client does not support Email Address Internationalization,
	POP/IMAP servers cannot deliver internationalized messages to the client
	and cannot remove the message.

	To avoid that situation,
	this document describes a mechanism
	for converting internationalized messages into the traditional message format.

	In the process, message elements
	requiring internationalized treatment are recoded or removed
        and receivers are able to know that they received messages containing such
	elements, even if they cannot process the internationalized elements.
    </t>
  </abstract>
</front>

<middle>
  <section title="Introduction" anchor="intro">
    <section title="Problem Statement">
    <t>
	Traditional (legacy) mail systems, which are defined by <xref target="RFC5322" /> and other specifications,
	allow only ASCII characters in mail header field values.
	The SMTPUTF8 extension
		(<xref target="RFC6530" />,
		<xref target="RFC6531" />, and
		<xref target="RFC6532" />)
	allow raw UTF-8 <xref target="RFC3629"/> in these mail header fields.
<cref>RFC Editor please note: while I have moved the 3629
reference to there (the first appearance of "UTF-8" in the body
text, I have not changed "raw", which remains undefined in this
context.</cref>
	</t>
    <t>
If a header field contains non-ASCII strings,
POP/IMAP servers cannot deliver internationalized messages to
legacy clients that do not send UTF8 commands or have UTF8 capability.
Also, because they have no obvious or standardized way to explain what
is going on to clients, they cannot even safely discard the message.
    </t>
    </section>
    <section title="Possible Solutions">
      <t>
	There
        are four plausible approaches to the problem, with the preferred
        one depending on the particular circumstances and relationship
        among the delivery SMTP server, the mail store, the POP or IMAP
        server, and the users and their Mail User Agent (MUA) clients:
        <list style="numbers">
           <t>If the delivery Mail Transport Agent (MTA) has sufficient knowledge about the POP
                  and/or IMAP servers and clients being used, the message
                  may be rejected as undeliverable.</t>
           <t>The message may be downgraded by the POP or IMAP server in a
              way that preserves maximum information at the expense of
              some complexity and that does not create security or operational
              problems in the mail system.
           </t>
           <t>Some intermediate downgrading may be applied that balances
                  more information loss against lower complexity and greater
                  ease of implementation.</t>
           <t>The POP or IMAP server may fabricate a message whose
                  intent is to notify the client that an internationalized
                  message is waiting but cannot be delivered until an
                  upgraded client is available.</t>
        </list>
      </t>
    </section>
    <section title="Approach Taken in This Specification">
      <t> This specification describes the second of these options.  It
        is worth noting that, at least in the general case, none of
        these options preserves sufficient information to guarantee that
        it is possible to reply to an incoming message without loss of
        information, so the choice may be considered to be among the "least
        bad" options.
	While this document specifies a well-designed mechanism,
        it is only an interim solution while clients are being upgraded
        <xref target="RFC6856" />
        <xref target="RFC6855" />.
     </t>
<t>This message downgrading mechanism converts mail header fields to an
all-ASCII representation.  The POP/IMAP servers can use the
downgrading mechanism and deliver the internationalized message in
a traditional form.
Receivers can know they received some internationalized messages or some unknown or broken messages.
       </t>
    <t>
<xref target="RFC6532" />
allows UTF-8 characters to be used in
mail header fields and MIME header fields.
<xref target="RFC6531" />
allows UTF-8 characters to be used in
some trace header fields.
The message downgrading mechanism specified here describes 
	the conversion method
	from the internationalized messages that are defined in 
		<xref target="RFC6530" /> and
		<xref target="RFC6532" />
	to the traditional email messages
	defined in
		<xref target="RFC5322" />.
</t>
	<t>
	This document provides a precise definition of the
	minimum-information-loss message downgrading process.
 	</t>
	<t>
	Downgrading consists of the following three parts:
	<vspace blankLines="1" />
	<list style="symbols">
	<t>New header field definitions</t>
	<t>Email header field downgrading</t>
	<t>MIME header field downgrading</t>
	</list>
    </t>
    <t>
	Email header field downgrading is described in <xref target="HeaderDowngrading" />.
	It generates ASCII-only header fields.
    </t>
    <t>
	In <xref target="DowngradeEncap" /> of this document,
	header fields starting with Downgraded- are introduced.
	They preserve the information that appeared in the original
	header fields.
	</t>
    <t>
	The definition of MIME header fields in internationalized messages
	is described in <xref target="RFC6532" />.
	MIME header field downgrading is described in <xref target="MIMEheaderdowngrading" />.
	It generates ASCII-only MIME header fields.
    </t>
    <t>
	Displaying downgraded messages that originally contained
	internationalized header fields is out of scope of this
	document. A POP/IMAP client that does not support UTF8
	extensions as defined for POP3 [UTF8 command]
	and IMAP [ENABLE UTF8=ACCEPT command]
	does not know the internationalized message format
	described in <xref target="RFC6532" />.
<cref>RFC Editor please note: Change to last sentence above pending.</cref>
    </t>
    </section>
  </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 RFC
      2119 <xref target="RFC2119" />.
    </t>
    <t>
   Many of the specialized terms used in this specification are
   defined in other documents.  They include 
   "Overview and Framework for Internationalized Email"
   <xref target="RFC6530" />, the mail message specifications
   <xref target="RFC5322" />, and in the some of the basic MIME documents
   <xref target="RFC2045" />  <xref target="RFC2183" />.
	This specification makes extensive use of MIME Message
	Header Extensions for Non-ASCII Text <xref target="RFC2047"/> and
	extended MIME parameter encodings <xref target="RFC2231"/>.  For
	convenience, both are described as "encoded-words" or
	"encoded-word encoding".  All of the encoded-words generated
	according to this specification use UTF-8 
	as their charset.
<cref>RFC Editor please note: Paragraph break here?</cref> 
	The terms "U-label", "A-label", and "IDNA" are used as defined in <xref target="RFC5890" />.
   The terms "ASCII address", "non-ASCII address", "SMTPUTF8", "message", "internationalized message"
   are used as defined in <xref target="RFC6530" />.
   The term "non-ASCII string"
   is used as defined in <xref target="RFC6532" />.
    </t>
  </section>

  <section title="Email Header Fields Downgrading" anchor="HeaderDowngrading">
    <t>
	This section defines the method to convert to ASCII for each header field
	that may contain non-ASCII strings.
	<xref target="DowngradeElements" /> describes the methods for rewriting each ABNF element.
	<xref target="DowngradeEachHeader" /> describes the methods for rewriting each header field.
    </t>
    <section title="Downgrading Method for Each ABNF Element" anchor="DowngradeElements">
    <t>
	Header field downgrading is defined below for each ABNF element.
	Conversion of the header field terminates when no non-ASCII strings
	remain in the header field.
    </t>
    <t>
	<xref target="RFC5322" /> describes the ABNF elements
	&lt;group&gt;, &lt;mailbox&gt;, &lt;unstructured&gt;, &lt;word&gt;, &lt;comment&gt;, and &lt;display-name&gt;.
	<xref target="RFC2045" /> describes the ABNF element &lt;value&gt;.
	&lt;domain&gt; is updated to allow non-ASCII characters in Section 3.3 of <xref target="RFC6531" /> and Section 3.2 of <xref target="RFC6532" />.
    </t>

    <section title="UNSTRUCTURED Downgrading" anchor="element:unstructured">
	<t>If the header field has an &lt;unstructured&gt; field that
	contains non-ASCII strings,
	apply encoded-word encoding.
    </t></section>

    <section title="WORD Downgrading" anchor="element:word">
	<t>If the header field has any &lt;word&gt;
	fields that contain non-ASCII strings,
	apply encoded-word encoding.
    </t></section>

    <section title="COMMENT Downgrading" anchor="element:comment">
	<t>If the header field has any &lt;comment&gt;
	fields that contain non-ASCII strings,
	apply encoded-word encoding.
    </t></section>


    <section title="MIME-VALUE Downgrading" anchor="element:mimevalue">
	<t>If the header field has any &lt;value&gt; elements defined by <xref target="RFC2045" />
	and those elements contain non-ASCII strings,
	encode the &lt;value&gt; elements
	as encoded-words and
	leave the language information empty.
	If the &lt;value&gt; element is &lt;quoted-string&gt;
		and it contains &lt;CFWS&gt; outside the DQUOTE,
	remove the &lt;CFWS&gt; before this conversion.
    </t></section>

    <section title="DISPLAY-NAME Downgrading" anchor="element:display-name">
	<t>
		If the header field has any &lt;address&gt;
	(&lt;mailbox&gt; or &lt;group&gt;) elements, and
	they have &lt;display-name&gt; elements that contain non-ASCII strings,
	encode the &lt;display-name&gt; elements
	as encoded-words.
	DISPLAY-NAME downgrading uses the same algorithm as WORD downgrading.
    </t></section>

    <section title="DOMAIN Downgrading" anchor="element:domain">
	<t>
	If the header field has any &lt;domain&gt; elements
	that contain U-labels,
	rewrite the non-ASCII domain name into an ASCII domain name using A-labels
	as specified in IDNA <xref target="RFC5891" />.
	</t>
	<t>
	</t>
    </section>

    <section title="GROUP Downgrading" anchor="element:group">
	<t>
	&lt;group&gt; is defined in Section 3.4 of <xref target="RFC5322" />.
	The &lt;group&gt; element may contain &lt;mailbox&gt; elements that contain non-ASCII addresses.
	</t>
	<t>
	If a &lt;group&gt; element contains &lt;mailbox&gt; elements and one of those &lt;mailbox&gt; elements contains a non-ASCII &lt;local-part&gt;,
	rewrite the &lt;group&gt; element as
<figure>
<artwork>
<![CDATA[
display-name " " ENCODED_WORD " :;"
]]>
</artwork>
</figure>
where the &lt;ENCODED_WORD&gt; is the original &lt;group-list&gt; encoded
as encoded-words. />.
	</t>
	<t>
	Otherwise, the &lt;group&gt; element does not contain a non-ASCII &lt;local-part&gt;.
	If the &lt;group&gt; element contains non-ASCII &lt;mailbox&gt; elements,
	they contain non-ASCII domain names.
	Rewrite the non-ASCII domain names into ASCII domain names using A-labels
	as specified in IDNA <xref target="RFC5891" />.
	Generated &lt;mailbox&gt; elements contain ASCII addresses only.
	</t>
    </section>

    <section title="MAILBOX Downgrading" anchor="element:mailbox">
	<t>
	If the &lt;local-part&gt; of the &lt;mailbox&gt; element does not contain non-ASCII characters,
	the &lt;domain&gt; element may contain non-ASCII characters.
	Rewrite the non-ASCII domain name into ASCII domain name using A-labels
	as specified in IDNA <xref target="RFC5891" />.
	</t>
	<t>
	Otherwise, the &lt;local-part&gt; may contain non-ASCII characters.
	The non-ASCII &lt;local-part&gt; has no equivalent format for ASCII addresses.
	The &lt;addr-spec&gt; element that contains non-ASCII strings may appear in two forms as:
	</t>
<figure>
<artwork>
<![CDATA[
"<" addr-spec ">"

or 

addr-spec
]]>
</artwork>
</figure>
	<t>
	Rewrite both as:
	</t>
<figure>
<artwork>
<![CDATA[
ENCODED-WORD " :;"
]]>
</artwork>
</figure>
	<t>where the &lt;ENCODED-WORD&gt; is the original &lt;addr-spec&gt; encoded
		 as encoded-words.
        </t>
    </section>

    <section title="TYPE-ADDR Downgrading"><t>
	If the header field contains &lt;utf-8-type-addr&gt;
	 and the &lt;utf-8-type-addr&gt; contains raw non-ASCII strings,
	it is in utf-8-address form. Convert it to utf-8-addr-xtext form.
	Both utf-8-address and utf-8-addr-xtext are described in <xref target="RFC6533" />.
	COMMENT downgrading is also performed in this case.
	If the address type is unrecognized and the header field contains non-ASCII strings,
	then fall back to using ENCAPSULATION on the entire header field as
	specified in <xref target="DowngradeEncap" />.
    </t>
    </section>
    <section title="ENCAPSULATION: A Last Resort" anchor="DowngradeEncap">
	<t>
   As a last resort, when header fields cannot be converted as
   discussed in the previous subsection, the fields are deleted
   and replaced by specialized new header fields.  Those fields
   are defined to preserve, in encoded form, as much
   information as possible from the header field values of the
   incoming message.  The syntax of these new header fields is:
	</t>
    <figure>
      <artwork>
<![CDATA[
fields                   =/ downgraded

downgraded =  "Downgraded-Message-Id:"         unstructured CRLF /
              "Downgraded-Resent-Message-Id:"  unstructured CRLF /
              "Downgraded-In-Reply-To:"        unstructured CRLF /
              "Downgraded-References:"         unstructured CRLF /
              "Downgraded-Original-Recipient:" unstructured CRLF /
              "Downgraded-Final-Recipient:"    unstructured CRLF 
]]>
      </artwork>
    </figure>
	<t>Applying this procedure to the "Received:" header field is
	prohibited.  ENCAPSULATION Downgrading is allowed for
	"Message-ID:", "In-Reply-To:", "References:",
	"Original-Recipient:", and "Final-Recipient:" header fields.
        </t>
	<t>To preserve a header field in a Downgraded- header field:
	<list style="numbers">
	<t>Generate a new header field.
	  <list style="symbols">
	   <t>The field name is a concatenation of Downgraded- and the original field name.</t>
	   <t>The initial new field value is the original header field value.</t>
	 </list>
        </t>
	<t>
	  Treat the initial new header field value as if it were unstructured,
      and then apply encoded-word encoding
	  as necessary so that the resulting new header field value
	is completely in ASCII.
       </t>
       <t>
	Remove the original header field.
       </t>
	</list>
       </t>
    </section>
    </section>

    <vspace blankLines="100" />
    <section title="Downgrading Method for Each Header Field" anchor="DowngradeEachHeader">
    <t>
	<xref target="RFC4021" /> establishes a registry of header fields.
	This section describes the downgrading method for each header field.
    </t>
    <t>
	If the entire mail header field contains no non-ASCII strings,
	email header field downgrading is not required.
	Each header field's downgrading method is described below.
    </t>
    <section title="Address Header Fields That Contain <address> Elements"
	anchor="header:address">
	<t>
<?rfc subcompact="yes" ?>
<vspace blankLines="1" />
	<list style="hanging">
	<t hangText="From:" />
	<t hangText="Sender:" />
	<t hangText="To:" />
	<t hangText="Cc:" />
	<t hangText="Bcc:" />
	<t hangText="Reply-To:" />
	<t hangText="Resent-From:" />
	<t hangText="Resent-Sender:" />
	<t hangText="Resent-To:" />
	<t hangText="Resent-Cc:" />
	<t hangText="Resent-Bcc:" />
	<t hangText="Resent-Reply-To:" />
	<t hangText="Return-Path:" />
	<t hangText="Disposition-Notification-To:" />
	</list>
<?rfc subcompact="no" ?>
	</t>
	<t>
	If the header field contains non-ASCII characters, first perform
	COMMENT downgrading and DISPLAY-NAME downgrading as
	described in the corresponding subsections of
	<xref target="DowngradeElements" />.

	If the header field still contains non-ASCII characters after that,
	complete the following two steps:
	<list style="numbers">
	<t>If the header field contains &lt;group&gt; elements
	   that contain non-ASCII addresses,
	   perform GROUP downgrading on those elements.
        </t>
	<t>
	   If the header field contains &lt;mailbox&gt; elements
	   that contain non-ASCII addresses,
	   perform MAILBOX downgrading on those elements.
	</t>
	</list>
        </t>
	<t>
	This procedure may generate empty &lt;group&gt; elements in the "From:", and "Sender:" header fields.
	<xref target="RFC6854" /> updates <xref target="RFC5322" />
	to allow (empty) &lt;group&gt; elements in "From:" and "Sender:".
	</t>
    </section>
    <vspace blankLines="100" />
    <section title="Non-ASCII Strings in <comment> Elements"
	     anchor="header:comments">
	<t>
	<?rfc subcompact="yes" ?>
	<vspace blankLines="1" />
	<list style="hanging">
	<t hangText="Date:" />
	<t hangText="Resent-Date:" />
	<t hangText="MIME-Version:" />
	<t hangText="Content-ID:" />
	<t hangText="Content-Transfer-Encoding:" />
	<t hangText="Content-Language:" />
	<t hangText="Accept-Language:" />
	<t hangText="Auto-Submitted:" />
	</list>
	<?rfc subcompact="no" ?>
	</t>
	<t>These header fields do not contain non-ASCII strings except in comments.
	If the header field contains UTF-8 characters in comments, perform COMMENT downgrading.
    </t></section>
    <section title="Message-ID Header Fields" anchor="header:msgid">
	<t>
        <?rfc subcompact="yes" ?>
        <vspace blankLines="1" />
	<list style="hanging">
	<t hangText="Message-ID:" />
	<t hangText="Resent-Message-ID:" />
	<t hangText="In-Reply-To:" />
	<t hangText="References:" />
	</list>
	<?rfc subcompact="no" ?>
	</t>
	<t>Perform ENCAPSULATION as specified in <xref target="DowngradeEncap" />.</t>
    </section>

    <section title="Received Header Field" anchor="header:received">
	<t>
	<?rfc subcompact="yes" ?>
	<vspace blankLines="1" />
	<list style="hanging">
	<t hangText="Received:" />
	</list>
	<?rfc subcompact="no" ?>
	<vspace blankLines="1" />
	If &lt;domain&gt; elements or &lt;mailbox&gt; elements contain U-labels, perform DOMAIN downgrading as specified in <xref target="element:domain" />.
	Comments may contain non-ASCII strings; if so, perform COMMENT downgrading.
	</t>
	<t>
	After the DOMAIN downgrading and the COMMENT downgrading,
	if the FOR clause contains a non-ASCII &lt;local-part&gt;, remove the "FOR" clause.
	If the ID clause contains a non-ASCII values, remove the "ID" clause.
	</t>
    </section>
    <vspace blankLines="100" />
    <section title="MIME Content Header Fields" anchor="header:mime">
	<t>
	<?rfc subcompact="yes" ?>
	<vspace blankLines="1" />
	<list style="hanging">
	<t hangText="Content-Type:" />
	<t hangText="Content-Disposition:" />
	</list>
	<?rfc subcompact="no" ?>
	<vspace blankLines="1" />
	Perform MIME-VALUE downgrading and COMMENT downgrading.
        </t>
    </section>
    <section title="Non-ASCII Characters in <unstructured> Elements" anchor="header:unstructured">
	<t>
	<?rfc subcompact="yes" ?>
	<vspace blankLines="1" />
	<list style="hanging">
	<t hangText="Subject:" />
	<t hangText="Comments:" />
	<t hangText="Content-Description:" />
	</list>
	<?rfc subcompact="no" ?>
	<vspace blankLines="1" />
	Perform UNSTRUCTURED downgrading.
        </t>
    </section>
    <section title="Non-ASCII Characters in <phrase> Elements" anchor="header:phrase"><t>
	<list style="hanging">
	<t hangText="Keywords:" />
	</list>
	Perform WORD downgrading.
    </t></section>

    <section title="Other Header Fields" anchor="header:undefined">
	<t>Other header fields that are not covered in this document (such as
  implementation-specific or user-defined fields) also might contain
  non-ASCII strings.  Any header field that does not have a conversion
  method defined above will be in this category and is treated as follows.</t>
	<t>Perform UNSTRUCTURED downgrading.</t>

	<t>If the software understands the header field's structure and a downgrading
algorithm other than UNSTRUCTURED is applicable, that software SHOULD use
that algorithm; UNSTRUCTURED downgrading is used as a last resort.</t>

	<t>Mailing list header fields (those that start in "List-")
	are part of this category.</t>
    </section>
    </section>
  </section>

  <section title="MIME Downgrading" anchor="MIMEdowngrading">
    <t>
      Both MIME body part header fields and contents of a delivery status notification
      may contain non-ASCII characters.
    </t>
    <section title="MIME Body Part Header Field Downgrading" anchor="MIMEheaderdowngrading">
    <t>
	MIME body part header fields may contain non-ASCII strings
	<xref target="RFC6532" />.
	This section defines the conversion method to ASCII-only header fields
	 for each MIME header field that contains non-ASCII strings.
	Parse the message body's MIME structure at all levels and
	check each MIME header field to see whether it contains non-ASCII strings.
	If the header field contains non-ASCII strings in the header field value,
	the header field is a target of the MIME body part header field's downgrading.
	Each MIME header field's downgrading method is described below.
	COMMENT downgrading, MIME-VALUE downgrading, and UNSTRUCTURED downgrading
	are described in <xref target="HeaderDowngrading" />.

	<list style="hanging">
	<?rfc subcompact="yes" ?>
	<vspace blankLines="1" />
	<t hangText="Content-ID:">
	  <vspace />
	  The "Content-ID:" header field does not contain non-ASCII strings
	  except in comments. If the header field contains
	  UTF-8 characters in comments, perform COMMENT downgrading.
	</t>
	<vspace blankLines="1" />
	<t hangText="Content-Type:" />
	<t hangText="Content-Disposition:">
	        <vspace />
		Perform MIME-VALUE downgrading and
		COMMENT downgrading.
	</t>
	<vspace blankLines="1" />
	<t hangText="Content-Description:">
	        <vspace />
		Perform UNSTRUCTURED downgrading.
	</t>
	<?rfc subcompact="no" ?>
	</list>
    </t>
    </section>
    <section title="Delivery Status Notification Downgrading" anchor="DSNdowngrading">
	<t>
	If the message contains a delivery status notification
	defined in Section 6 of <xref target="RFC3461" />,
	perform the following tests and conversions.
	</t>
	<t>If there are "Original-Recipient:" and "Final-Recipient:" header fields,
           and the header fields contain non-ASCII strings, perform TYPE-ADDR downgrading.
    </t></section>
  </section>

	<section title="Security Considerations" anchor="security">
	<t>
	The purpose of post-delivery message downgrading is to allow
	POP/IMAP servers to deliver internationalized messages
	to traditional POP/IMAP clients
	and permit the clients to display those messages.
	Users who receive such messages can know that they were
	internationalized.
	It does not permit receivers to read the messages in their
	original form and, in general, will not permit generating
	replies, at least without significant user intervention.
	</t>
	<t>
	A downgraded message's header fields contain ASCII characters only.
	However, they still contain MIME-encapsulated header fields that contain
	non-ASCII strings. Furthermore, the body part may contain UTF-8 characters.
	Implementations parsing Internet messages need
	 to accept UTF-8 body parts and UTF-8 header fields that are MIME-encoded.
	Thus, this document inherits the security considerations of
	MIME-encoded header fields as specified in RFC 2047 and for UTF-8
	itself as specified in RFC 3629.
	<cref>RFC Editor please note: Citations for 2047 and 3629 here?
	   They are pretty far from the ones in the Sections 1 and 2.  See
	   email.</cref>
	</t>
	<t>
	Rewriting header fields increases the opportunities for
	undetected spoofing by malicious senders.
	However, the rewritten header field values are
	preserved in equivalent MIME form
	or in newly defined header fields for which traditional MUAs have no special processing procedures.
	</t>
	<t>
	The techniques described here invalidate methods that depend
	on digital signatures over any part of the message,
	which includes the top-level header fields and body part header fields.
	Depending on the specific message being downgraded, at least the
	following techniques are likely to break: DomainKeys Identified
	Mail (DKIM) and possibly S/MIME and Pretty Good Privacy (PGP).
	The downgrade
	mechanism SHOULD NOT remove signatures even if the signatures
	will fail validation after downgrading.  As much of the information as
	possible from the original message SHOULD be preserved.
	</t>
	<t>
   While information in any email header field should usually be treated with
   some suspicion, current email systems commonly employ various
   mechanisms and protocols to make the information more trustworthy.
   Information in the new Downgraded-* header fields is
   not inspected by traditional MUAs and may be even less trustworthy
   than the traditional header fields.
   Note that the Downgraded-* header fields could have been inserted with malicious intent
   (and with content unrelated to the traditional header fields);
   however, traditional MUAs do not parse Downgraded-* header fields.
	</t>
	<t>
  In addition, if an Authentication-Results header field <xref target="RFC5451" /> is
  present, traditional MUAs may consider the digital signatures to be
  valid.

	</t>
    <t>
See the Security Considerations sections in <xref target="RFC6854"/> and <xref target="RFC6530"/> for more discussion.
    </t>
  </section>

  <section title="Implementation Note: Encoded-Word Encoding">
    <t>
<cref>RFC Editor please note: I don't know whether you prefer
   "Encoded-Word" or "Encoded-word" in a title.  I have no preference'
   adjust as you like.  Note also that, per some earlier comments,
   I've eliminated the useless orphan subsection 6.1.  And I've
   included the citation below (as part of rewriting the sentence)
   because it seemed important and distant from Section 2.</cref>
  While the specification of encoded-words includes specific rules for
  dealing with whitespace in
  adjacent encoded words <xref target="RFC2047" />,
  there are a number of deployed implementations
  that fail to implement the algorithm correctly.  As a result, whitespace
  behavior is somewhat unpredictable, in practice, when multiple encoded words
  are used.
<cref>RFC Editor please note: I believe a paragraph break is needed
   here since the comment is actually a different note.  If one wanted
   one-paragraph sections for some reason, the one above could be "6.1
   Whitespace implementations" and the one below could be "6.2 Line
   lengths".  I would _not_ recommend that, however.  Also, I dropped
   the citation to 5322 below without inserting tedious language about
   message formats below.  RFC 5322 is mentioned in the list in
   Section 2 and anyone reading this spec for whom it is not a
   well-known term is in big trouble. </cref>
  While RFC 5322 states that implementations SHOULD limit lines
  to not more than 78 characters, implementations MAY choose to allow
  overly long encoded words in order to work around faulty
  implementations of encoded-words.
  Implementations that choose to do so SHOULD have an
  optional mechanism to limit line length to 78 characters.
     </t>
  </section>

  <section title="IANA Considerations" anchor="iana">

   <t>
   <xref target="RFC5504" /> specified that no new header fields be registered that begin
   with Downgraded-.  That restriction has now been lifted, and this document
   makes a new set of registrations, replacing the experimental fields with
   standard ones.
   </t>
   <section title="Obsolescence of Existing Downgraded-* Header Fields">
   <t>
   The Downgraded-* header fields that were registered as experimental
   fields in <xref target="RFC5504" /> are no longer in use.  IANA has changed the status
   from "experimental" to "obsoleted" for every name in the "Permanent Message
   Header Field Names" registry that began with Downgraded-.
   </t>
   </section>
   <section title="Registration of New Downgraded-* Header Fields">

   <t>
	 The following header fields have been registered in the
	 "Permanent Message Header Field Names" registry, in accordance with the
         procedures set out in <xref target="RFC3864" />.
   </t>
   <t>
<?rfc subcompact="yes" ?>
<vspace blankLines="1" />
    <list style="hanging">
	<t hangText="Header field name:">Downgraded-Message-Id</t>
	<t hangText="Applicable protocol:">mail</t>
	<t hangText="Status:">standard</t>
	<t hangText="Author/change controller:">IETF</t>
	<t hangText="Specification document(s):">This document (<xref target="DowngradeEncap" />)</t>
    </list>
<vspace blankLines="1" />
    <list style="hanging">
	<t hangText="Header field name:">Downgraded-In-Reply-To</t>
	<t hangText="Applicable protocol:">mail</t>
	<t hangText="Status:">standard</t>
	<t hangText="Author/change controller:">IETF</t>
	<t hangText="Specification document(s):">This document (<xref target="DowngradeEncap" />)</t>
    </list>
<vspace blankLines="1" />
    <list style="hanging">
	<t hangText="Header field name:">Downgraded-Reference</t>
	<t hangText="Applicable protocol:">mail</t>
	<t hangText="Status:">standard</t>
	<t hangText="Author/change controller:">IETF</t>
	<t hangText="Specification document(s):">This document (<xref target="DowngradeEncap" />)</t>
    </list>
<vspace blankLines="1" />
    <list style="hanging">
	<t hangText="Header field name:">Downgraded-Original-Recipient</t>
	<t hangText="Applicable protocol:">mail</t>
	<t hangText="Status:">standard</t>
	<t hangText="Author/change controller:">IETF</t>
	<t hangText="Specification document(s):">This document (<xref target="DowngradeEncap" />)</t>
    </list>
<vspace blankLines="1" />
    <list style="hanging">
	<t hangText="Header field name:">Downgraded-Final-Recipient</t>
	<t hangText="Applicable protocol:">mail</t>
	<t hangText="Status:">standard</t>
	<t hangText="Author/change controller:">IETF</t>
	<t hangText="Specification document(s):">This document (<xref target="DowngradeEncap" />)</t>
    </list>
<?rfc subcompact="no" ?>
    </t>
    </section>
  </section>

  <section title="Acknowledgements">
    <t>
	This document draws heavily from the experimental in-transit
	message downgrading procedure described in 
	<xref target="RFC5504"/>.  The contributions of the coauthor
	of that earlier document, Y. Yoneya, are gratefully
	acknowledged.
	Significant comments and suggestions were received from John
	Klensin, Barry Leiba, Randall Gellens, Pete Resnick, Martin J. Durst,
	and other WG participants.
    </t>
  </section>

</middle>

<back>
  <references title="Normative References">
    <?rfc include="reference.RFC.2045" ?>
    <?rfc include="reference.RFC.2047" ?>
    <?rfc include="reference.RFC.2119" ?>
    <?rfc include="reference.RFC.2183" ?>
    <?rfc include="reference.RFC.2231" ?>
    <?rfc include="reference.RFC.3461" ?>
    <?rfc include="reference.RFC.3629" ?>
    <?rfc include="reference.RFC.3864" ?>
    <?rfc include="reference.RFC.4021" ?>
    <?rfc include="reference.RFC.5322" ?>
    <?rfc include="reference.RFC.5890" ?>
    <?rfc include="reference.RFC.5891" ?>
    <?rfc include="reference.RFC.6530" ?>
    <?rfc include="reference.RFC.6531" ?>
    <?rfc include="reference.RFC.6532" ?>
    <?rfc include="reference.RFC.6533" ?>


<!--    I-D.draft-leiba-5322upd-from-group"  -->



<reference anchor='RFC6854'>
<front>
<title>Update to Internet Message Format to Allow Group Syntax in the "From:" and "Sender:" Header Fields</title>

<author initials='B' surname='Leiba' fullname='Barry Leiba'>
    <organization />
</author>

<date month='January' year='2013' />

<abstract><t>The Internet Message Format (RFC 5322) allows "group" syntax in some email header fields, such as "To:" and "CC:", but not in "From:" nor "Sender:".  This document updates RFC 5322 to relax that restriction, allowing group syntax in those latter fields, as well as in "Resent- From:" and "Resent-Sender:", in certain situations.</t></abstract>

</front>

<seriesInfo name='RFC' value='6854' />

</reference>

<!--    I-D.draft-ietf-eai-rfc5721bis"  -->




<reference anchor='RFC6856'>
<front>
<title>Post Office Protocol Version 3 (POP3) Support for UTF-8</title>

<author initials='R' surname='Randy' fullname='Randy'>
    <organization />
</author>

<author initials='C' surname='Newman' fullname='Chris Newman'>
    <organization />
</author>

<author initials='J' surname='Yao' fullname='Jiankang Yao'>
    <organization />
</author>

<author initials='K' surname='Fujiwara' fullname='Kazunori Fujiwara'>
    <organization />
</author>

<date month='January' year='2013' />

<abstract><t>This specification extends the Post Office Protocol version 3 (POP3) to support UTF-8 encoded international string in user names, passwords, mail addresses, message headers, and protocol-level textual strings.</t></abstract>

</front>

<seriesInfo name='RFC' value='6856' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-eai-rfc5721bis-08.txt' />
</reference>


<!--    I-D.draft-ietf-eai-5738bis"  -->

<reference anchor='RFC6855'>
<front>
<title>IMAP Support for UTF-8</title>

<author initials='P' surname='Resnick' fullname='Pete Resnick'>
    <organization />
</author>

<author initials='C' surname='Newman' fullname='Chris Newman'>
    <organization />
</author>

<author initials='S' surname='Shen' fullname='Sean Shen'>
    <organization />
</author>

<date month='January'  year='2013' />

<abstract><t>This specification extends the Internet Message Access Protocol version 4rev1 (IMAP4rev1) to support UTF-8 encoded international characters in user names, mail addresses and message headers.  This specification replaces RFC 5738.</t></abstract>

</front>

<seriesInfo name='RFC' value='6855' />

</reference>





  </references>
  <references title="Informative References">
    <?rfc include="reference.RFC.5451" ?>
    <?rfc include="reference.RFC.5504" ?>

  </references>

  <section title="Examples">
    <section title="Downgrading Example">
	<t>
	This appendix shows a message downgrading example.
	Consider a received mail message where:
	<list style="symbols">
	  <t>
	    The sender address is a non-ASCII address, "NON-ASCII-LOCAL@example.com". Its display-name is "DISPLAY-LOCAL".
	  </t>
	  <t>
	    The "To:" header field contains two non-ASCII addresses, "NON-ASCII-REMOTE1@example.net" and "NON-ASCII-REMOTE2@example.com" Its display-names are "DISPLAY-REMOTE1" and "DISPLAY-REMOTE2".
	  </t>
	  <t>
	    The "Cc:" header field contains a non-ASCII address, "NON-ASCII-REMOTE3@example.org".
		Its display-name is "DISPLAY-REMOTE3".
	  </t>
	  <t>Four display-names contain non-ASCII characters.</t>
	  <t>
	    The "Subject:" header field is "NON-ASCII-SUBJECT", which contains non-ASCII strings.
	  </t>
	  <t>
	    The "Message-Id:" header field contains "NON-ASCII-MESSAGE_ID",
	    which contains non-ASCII strings.
	  </t>
	  <t>
	    There is an unknown header field "X-Unknown-Header:", which  contains non-ASCII strings.
	  </t>
	</list>
	</t>

	<t>
	<figure title="Received Message in a Maildrop" anchor="example-originaleaismtpsession">


	  <artwork>
<![CDATA[
Return-Path: <NON-ASCII-LOCAL@example.com>
Received: from ... by ... for <NON-ASCII-REMOTE1@example.net>
Received: from ... by ... for <NON-ASCII-REMOTE1@example.net>
From: DISPLAY-LOCAL <NON-ASCII-LOCAL@example.com>
To: DISPLAY-REMOTE1 <NON-ASCII-REMOTE1@example.net>,
    DISPLAY-REMOTE2 <NON-ASCII-REMOTE2@example.com>
Cc: DISPLAY-REMOTE3 <NON-ASCII-REMOTE3@example.org>
Subject: NON-ASCII-SUBJECT
Date: Mon, 30 Jul 2012 01:23:45 -0000
Message-Id: NON-ASCII-MESSAGE_ID
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-Unknown-Header: NON-ASCII-CHARACTERS

MAIL_BODY
]]>
	  </artwork>
	</figure>
	</t>

	<t>
	The downgraded message is shown in
	<xref target="example-downgrading" />.
	"Return-Path:", "From:", "To:", and "Cc:" header fields are rewritten.
	"Subject:" and "X-Unknown-Header:" header fields are encoded 
	as encoded-words.
	The "Message-Id:" header field is encapsulated as a
	"Downgraded-Message-Id:" header field.
<figure title="Downgraded Message" anchor="example-downgrading">
<artwork>
<![CDATA[
Return-Path: =?UTF-8?Q?NON-ASCII-LOCAL@example.com?= :;
Received: from ... by ...
Received: from ... by ...
From: =?UTF-8?Q?DISPLAY-LOCAL?=
      =?UTF-8?Q?NON-ASCII-LOCAL@example.com?= :;
To:   =?UTF-8?Q?DISPLAY-REMOTE1?=
      =?UTF-8?Q?NON-ASCII-REMOTE1@example.net?= :;,
      =?UTF-8?Q?DISPLAY-REMOTE2?=
      =?UTF-8?Q?NON-ASCII-REMOTE2@example.com?= :;,
Cc:   =?UTF-8?Q?DISPLAY-REMOTE3?=
      =?UTF-8?Q?NON-ASCII-REMOTE3@example.org?= :;
Subject: =?UTF-8?Q?NON-ASCII-SUBJECT?=
Date: Mon, 30 Jul 2012 01:23:45 -0000
Downgraded-Message-Id: =?UTF-8?Q?MESSAGE_ID?=
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-Unknown-Header: =?UTF-8?Q?NON-ASCII-CHARACTERS?=

MAIL_BODY
]]>
</artwork>
</figure>
      </t>
    </section>
  </section>


</back>
</rfc>
