<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type='text/xsl' href='2629xslt/rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>
<?rfc linkmailto="no"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
  <!ENTITY rfc1341 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1341'>
  <!ENTITY rfc2045 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2045'>
  <!ENTITY rfc2047 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2047'>
  <!ENTITY rfc2049 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2049'>
  <!ENTITY rfc2088 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2088'>
  <!ENTITY rfc2119 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119'>
  <!ENTITY rfc2183 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2183'>
  <!ENTITY rfc2231 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2231'>
  <!ENTITY rfc2277 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2277'>
  <!ENTITY rfc3490 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3490'>
  <!ENTITY rfc3501 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3501'>
  <!ENTITY rfc3629 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3629'>
  <!ENTITY rfc4013 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4013'>
  <!ENTITY rfc4466 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4466'>
  <!ENTITY rfc4469 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4469'>
  <!ENTITY rfc5161 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5161'>
  <!ENTITY rfc5198 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5198'>
  <!ENTITY rfc5234 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234'>
  <!ENTITY rfc5258 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5258'>
  <!ENTITY rfc5259 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5259'>
  <!ENTITY rfc5322 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5322'>
  <!ENTITY rfc5335 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5335'>
  <!ENTITY rfc5504 PUBLIC '' 
    'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5504'>
]>
<rfc number="5738" ipr="pre5378Trust200902" updates="3501" category="exp">
<front>
<title>IMAP Support for UTF-8</title>
<author initials="P." surname="Resnick" fullname="Pete Resnick">
 <organization>Qualcomm Incorporated</organization>
 <address>
  <postal>
   <street>5775 Morehouse Drive</street>
   <city>San Diego</city>
   <region>CA</region>
   <code>92121-1714</code>
   <country>US</country>
  </postal>
  <phone>+1 858 651 4478</phone>
  <email>presnick@qualcomm.com</email>
  <uri>http://www.qualcomm.com/~presnick/</uri>
 </address>
</author>
<author initials="C." surname="Newman" fullname="Chris Newman">
 <organization>Sun Microsystems</organization>
 <address>
  <postal>
   <street>800 Royal Oaks</street>
   <city>Monrovia</city>
   <region>CA</region>
   <code>91016</code>
   <country>US</country>
  </postal>
  <email>chris.newman@sun.com</email>
 </address>
</author>
<date month="March" year="2010"/>
<area>Applications</area>
<workgroup>Email Address Internationalization</workgroup>

<!--[rfced] Please insert any keywords (beyond those that appear in the title) for use on http://www.rfc-editor.org/rfcsearch.html. -->

<!-- [rfced] Please note that after you have approved the document,
post-xml2rfc changes will be made to update the header and
boilerplate as described in RFC 5741.
-->

<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.
</t></abstract>
</front>
<middle>

<section title="Introduction">
<t>This specification extends <xref target="RFC3501">IMAP4rev1</xref> to
permit <xref target="RFC3629">UTF-8</xref> in headers as described in <xref
target="RFC5335">&quot;Internationalized Email Headers&quot;</xref>. It also
adds a mechanism to support mailbox names, login names, and passwords using the
UTF-8 charset.  This specification creates five new IMAP capabilities to allow
servers to advertise these new extensions, along with two new IMAP LIST
selection options and a new IMAP LIST return option. 
</t>
</section>

<section title="Conventions Used in This Document">
<t>The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
in this document are to be interpreted as defined in
<xref target="RFC2119">"Key words for use in RFCs to Indicate
Requirement Levels"</xref>.</t>

<t>The formal syntax uses the <xref target="RFC5234">Augmented
Backus-Naur Form (ABNF)</xref> notation including the core rules
defined in Appendix B of <xref target="RFC5234" />. In addition, rules from <xref target="RFC3501">IMAP4rev1</xref>, <xref target="RFC3629">UTF-8</xref>, <xref target="RFC4466">&quot;Collected Extensions to IMAP4 ABNF&quot;</xref>, and <xref target="RFC5258">IMAP4 LIST Command Extensions</xref> are also referenced.</t>

<t>In examples, "C:" and "S:" indicate lines sent by the client and
server, respectively. If a single "C:" or "S:" label applies to multiple
lines, then the line breaks between those lines are for editorial
clarity only and are not part of the actual protocol exchange.</t>
</section>

<section anchor="utf8acceptcapa" title="UTF8=ACCEPT IMAP Capability">
<t>The "UTF8=ACCEPT" capability indicates that the server supports UTF-8 quoted strings, the "UTF8" parameter to SELECT and EXAMINE, and UTF-8 responses from the LIST and LSUB commands.</t>
<t>A client MUST use the "ENABLE UTF8=ACCEPT" command (defined in <xref
target="RFC5161" />) to indicate to the server that the client accepts UTF-8
quoted-strings. The "ENABLE UTF8=ACCEPT" command MUST only be used in the
authenticated state.  (Note that the "UTF8=ONLY" capability described in
<xref target="utf8only" /> and the "UTF8=ALL" capability described in <xref
target="utf8all" /> imply the  "UTF8=ACCEPT" capability.  See
additional information in these sections.) 
</t>
<section title="IMAP UTF-8 Quoted Strings">
<t>The <xref target="RFC3501">IMAP4rev1</xref> base specification forbids the use of 8-bit characters in atoms or quoted strings. Thus, a UTF-8 string can only be sent as a literal. This can be inconvenient from a coding standpoint, and unless the server offers <xref target="RFC2088">IMAP4 non-synchronizing literals</xref>, this requires an extra round trip for each UTF-8 string sent by the client. When the IMAP server advertises the "UTF8=ACCEPT" capability, it informs the client that it supports native UTF-8 quoted-strings with the following syntax:</t>
<?rfc needLines="7"?>
<figure><artwork type="abnf">
  string        =/ utf8-quoted

  utf8-quoted   = "*" DQUOTE *UQUOTED-CHAR DQUOTE

  UQUOTED-CHAR  = QUOTED-CHAR / UTF8-2 / UTF8-3 / UTF8-4
             ; UTF8-2, UTF8-3, and UTF8-4 are as defined in RFC 3629
</artwork></figure>
<t>When this quoting mechanism is used by the client (specifically an
octet sequence beginning with *" and ending with "), then the server
MUST reject octet sequences with the high bit set that fail to comply
with the formal syntax in <xref target="RFC3629"  /> with a
BAD response.</t>
<t>The IMAP server MUST NOT send utf8-quoted syntax to the client unless
the client has indicated support for that syntax by using the "ENABLE UTF8=ACCEPT" command.</t>
<t>If the server advertises the "UTF8=ACCEPT" capability, the client MAY use utf8-quoted syntax with any IMAP argument that permits a string (including astring and nstring). However, if characters outside the US-ASCII repertoire are used in an inappropriate place, the results would be the same as if other syntactically valid but semantically invalid characters were used. For example, if  the client includes UTF-8 characters in the user or password arguments (and the server has not advertised "UTF8=USER"), the LOGIN command will fail as it would with any other invalid user name or password. Specific cases where UTF-8 characters are permitted or not permitted are described in the following paragraphs.</t>
<t>All IMAP servers that advertise the "UTF8=ACCEPT" capability SHOULD accept UTF-8 in mailbox names, and those that also support the "Mailbox International Naming Convention" described in RFC 3501, Section 5.1.3 MUST accept utf8-quoted mailbox names and convert them to the appropriate internal format. Mailbox names MUST comply with the Net-Unicode Definition (Section 2 of <xref target="RFC5198"/>) with the specific exception that they MUST NOT contain control characters (0000-001F, 0080-009F), delete (007F), line separator (2028), or paragraph separator (2029).</t>
<t>An IMAP client MUST NOT issue a SEARCH command that uses a mixture of 
utf8-quoted syntax and a SEARCH CHARSET other than UTF-8. If an IMAP server receives such a SEARCH command, it SHOULD reject the command with a BAD response (due to the conflicting charset labels).</t>
</section>

<section anchor="utf8-parameter" title="UTF8 Parameter to SELECT and EXAMINE">
<t>The "UTF8=ACCEPT" capability also indicates that the server supports the "UTF8" parameter to SELECT and EXAMINE. When a mailbox is selected with the "UTF8" parameter, it alters the behavior of all IMAP commands related to message sizes, message headers, and MIME body headers so they refer to the message with UTF-8 headers. If the mailstore is not UTF-8 header native and the SELECT or EXAMINE command with UTF-8 header modifier succeeds, then the server MUST return results as if the mailstore were UTF-8 header native with upconversion requirements as described in <xref target="upconvert" />. The server MAY reject the SELECT or EXAMINE command with the [NOT-UTF-8] response code, unless the "UTF8=ALL" or "UTF8=ONLY" capability is advertised.</t>
<t>Servers MAY include mailboxes that can only be selected or examined if the
"UTF8" parameter is provided. However, such mailboxes MUST NOT be included in
the output of an unextended LIST, LSUB, or equivalent command. If a client
attempts to SELECT or EXAMINE such mailboxes without the "UTF8" parameter, the
server MUST reject the command with a [UTF-8-ONLY] response code. As a result,
such mailboxes will not be accessible by IMAP clients written prior to this specification and are discouraged unless the server advertises "UTF8=ONLY" or the server implements <xref target="RFC5258">IMAP4 LIST Command Extensions</xref>.</t>
<figure><artwork type="abnf">
  utf8-select-param = "UTF8"
            ;; Conforms to &lt;select-param&gt; from RFC 4466
</artwork></figure>
<figure><artwork type="example">
  C: a SELECT newmailbox (UTF8)
  S: ...
  S: a OK SELECT completed
  C: b FETCH 1 (SIZE ENVELOPE BODY)
  S: ... &lt; UTF-8 header native results &gt;
  S: b OK FETCH completed
  
  C: c EXAMINE legacymailbox (UTF8)
  S: c NO [NOT-UTF-8] Mailbox does not support UTF-8 access
  
  C: d SELECT funky-new-mailbox
  S: d NO [UTF-8-ONLY] Mailbox requires UTF-8 client
</artwork></figure>
</section>

<section anchor="list-response" title="UTF-8 LIST and LSUB Responses">
<t>After an IMAP client successfully issues an "ENABLE UTF8=ACCEPT" command, the server MUST NOT return in LIST results any mailbox names to the client following the IMAP4 Mailbox International Naming Convention. Instead, the server MUST return any mailbox names with characters outside the US-ASCII repertoire using utf8-quoted syntax. (The IMAP4 Mailbox International Naming Convention has proved problematic in the past, so the desire is to make this syntax obsolete as quickly as possible.)</t>
</section>

<section title="UTF-8 Interaction with IMAP4 LIST Command Extensions">
<t>When an IMAP server advertises both the "UTF8=ACCEPT" capability and the <xref target="RFC5258">"LIST-EXTENDED"</xref> capability, the server MUST support the LIST extensions described in this section.</t>
<section anchor="list-select" title="UTF8 and UTF8ONLY LIST Selection Options">
<t>The "UTF8" LIST selection option tells the server to include mailboxes that only support UTF-8 headers in the output of the list command. The "UTF8ONLY" LIST selection option tells the server to include all mailboxes that support UTF-8 headers and to exclude mailboxes that don't support UTF-8 headers. Note that "UTF8ONLY" implies "UTF8", so it is not necessary for the client to request both.
Use of either selection option will also result in UTF-8 mailbox names in the result as described in <xref target="list-response" /> and implies the "UTF8" List return option described in <xref target="list-return"/>.</t>
</section>
<section anchor="list-return" title="UTF8 LIST Return Option">
<t>If the client supplies the "UTF8" LIST return option, then the server MUST
include either the "\NoUTF8" or the "\UTF8Only" mailbox attribute as
appropriate. The "\NoUTF8" mailbox attribute indicates that an attempt to
SELECT or EXAMINE that mailbox with the "UTF8" parameter will fail with a
[NOT-UTF-8] response code. The "\UTF8Only" mailbox attribute indicates that an attempt to SELECT or EXAMINE that mailbox without the "UTF8" parameter will fail with a [UTF-8-ONLY] response code. Note that computing this information may be expensive on some server implementations, so this return option should not be used unless necessary.</t>
</section>
<?rfc needLines="7"?>
<t>The <xref target="RFC5234">ABNF</xref> for these LIST extensions follows:</t>
<figure><artwork type="abnf">
  list-select-independent-opt =/ "UTF8"
  
  list-select-base-opt        =/ "UTF8ONLY"

  mbx-list-oflag              =/ "\NoUTF8" / "\UTF8Only"
  
  return-option               =/ "UTF8"

  resp-text-code              =/ "NOT-UTF-8" / "UTF-8-ONLY"
</artwork></figure>
</section>
</section>

<section title="UTF8=APPEND Capability">
<t>If the "UTF8=APPEND" capability is advertised, then the server accepts UTF-8 headers in the APPEND command message argument. A client that sends a message with UTF-8 headers to the server MUST send them using the "UTF8" APPEND data extension. If the server also advertises the CATENATE capability (as specified in <xref target="RFC4469"/>), the client can use the same data extension to include such a message in a CATENATE message part. The ABNF for the APPEND data extension and CATENATE extension follows:</t>
<figure><artwork type="abnf">
  utf8-literal   = "UTF8" SP "(" literal8 ")"

  append-data    =/ utf8-literal
  
  cat-part       =/ utf8-literal
</artwork></figure>
<t>A server that advertises "UTF8=APPEND" has to comply with the requirements of the IMAP base specification and <xref
target="RFC5322"/> for message fetching. Mechanisms for 7-bit downgrading to help comply with the standards are discussed in <xref target="RFC5504">Downgrading mechanism for Internationalized eMail Address (IMA)</xref>.</t>
<t>IMAP servers that do not advertise the "UTF8=APPEND" or "UTF8=ONLY" capability SHOULD reject an APPEND command that includes any 8-bit in the message headers with a "NO" response.</t>
<t>Note that the "UTF8=ONLY" capability described in <xref target="utf8only" /> implies the "UTF8=APPEND" capability. See additional information in that section.</t>
</section>

<section title="UTF8=USER Capability">
<t>If the "UTF8=USER" capability is advertised, that indicates the server
accepts UTF-8 user names and passwords and applies <xref
target="RFC4013">SASLprep</xref> to both arguments of the LOGIN
command. The server MUST reject UTF-8 that fails to comply with the formal syntax in <xref target="RFC3629">RFC 3629</xref> or if it encounters Unicode characters listed in Section 2.3 of SASLprep <xref target="RFC4013">RFC 4013</xref>.</t>
</section>

<section anchor="utf8all" title="UTF8=ALL Capability">
<t>The "UTF8=ALL" capability indicates all server mailboxes support UTF-8 headers. Specifically, SELECT and EXAMINE with the "UTF8" parameter will never fail with a [NOT-UTF-8] response code.</t>
<t>Note that the "UTF8=ONLY" capability described in <xref target="utf8only" />
implies the "UTF8=ALL" capability. See additional information in that
section.</t>
<t>
Note that the "UTF8=ALL" capability implies the "UTF8=ACCEPT" capability.
</t>
</section>

<section anchor="utf8only" title="UTF8=ONLY Capability">
<t>The "UTF8=ONLY" capability permits an IMAP server to advertise that it does not support the international mailbox name convention (modified UTF-7), and does not permit selection or examination of any mailbox unless the "UTF8" parameter is provided. As this is an incompatible change to IMAP, a clear warning is necessary. IMAP clients that find implementation of the "UTF8=ONLY" capability problematic are encouraged to at least detect the "UTF8=ONLY" capability and provide an informative error message to the end-user.</t>
<t>When an IMAP mailbox internally uses UTF-8 header native storage, the
down-conversion step is necessary to permit selection or examination of the
mailbox in a backwards compatible fashion will become more difficult to
support. Although it is hoped that deployed IMAP servers will not advertise
"UTF8=ONLY" for some years, this capability is intended to minimize the
disruption when legacy support finally goes away.</t> 
<t>The "UTF8=ONLY" capability implies the "UTF8=ACCEPT" capability, the "UTF8=ALL" capability, and the "UTF8=APPEND" capability. A server that advertises "UTF8=ONLY" need not advertise the three implicit capabilities.</t>
</section>

<section anchor="upconvert" title="Up-Conversion Server Requirements">
<t>When an IMAP4 server uses a traditional mailbox format that includes
7-bit headers and it chooses to permit access to that mailbox with
the "UTF8" parameter, it MUST support minimal up-conversion as described in
this section.</t>
<t>The server MUST support up-conversion of the following address header-fields in the message header: From, Sender, To, CC, Bcc, Resent-From, Resent-Sender, Resent-To, Resent-CC, Resent-Bcc, and Reply-To. This up-conversion MUST include address local-parts in fields downgraded according to <xref target="RFC5504"/>, address domains encoded according to <xref target="RFC3490">Internationalizing Domain Names in Applications (IDNA)</xref>, and <xref target="RFC2047">MIME header encoding</xref> of display-names and any <xref
target="RFC5322"/> comments.</t>
<t>The following charsets MUST be supported for up-conversion of <xref target="RFC2047">MIME header encoding</xref>: UTF-8, US-ASCII, ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10, ISO-8859-14, and ISO-8859-15.
 If the server supports other charsets in IMAP SEARCH or IMAP
 CONVERT <xref target="RFC5259"/>, it SHOULD also support
 those charsets in this conversion.</t>
<t>Up-conversion of MIME header encoding of the following headers MUST also be implemented: Subject, Date (<xref
target="RFC5322"/> comments only), Comments, Keywords, and Content-Description.</t>
<t>Server implementations also SHOULD up-convert all <xref target="RFC2045">MIME body headers</xref>, SHOULD up-convert or remove the deprecated (and misused) <xref target="RFC1341">"name" parameter</xref> on Content-Type, and MUST up-convert the <xref target="RFC2183">Content-Disposition</xref> "filename" parameter, except when any of these are contained within a multipart/signed MIME body part (see below). These parameters can be encoded using the standard <xref target="RFC2231">MIME parameter encoding</xref> mechanism, or via non-standard use of <xref target="RFC2047">MIME header encoding</xref> in quoted strings.</t>
<t>The IMAP server MUST NOT perform up-conversion of headers and content of multipart/signed, as well as Original-Recipient and Return-Path.</t>
</section>

<section title="Issues with UTF-8 Header Mailstore">
<t>When an IMAP server uses a mailbox format that supports UTF-8 headers
and it permits selection or examination of that mailbox without the "UTF8"
parameter, it is the responsibility of the server to comply with the
<xref target="RFC3501">IMAP4rev1 base specification</xref> and <xref
target="RFC5322"/> with respect to all header information
transmitted over the wire. Mechanisms for 7-bit downgrading to help
comply with the standards are discussed in <xref
target="RFC5504">"Downgrading Mechanism for Email Address Internationalization"</xref>.</t>
<t>An IMAP server with a mailbox that supports UTF-8 headers MUST
comply with the protocol requirements implicit from <xref
target="upconvert" />. However, the code necessary for such compliance
need not be part of the IMAP server itself in this case. For example,
the minimal required up-conversion could be performed when a message is
inserted into the IMAP-accessible mailbox.</t>
</section>

<?rfc needLines="4"?>
<section title="IANA Considerations">
<t>This adds five new capabilities ("UTF8=ACCEPT", "UTF8=USER", "UTF8=APPEND",
"UTF8=ALL", and "UTF8=ONLY") to the <xref target="RFC3501">IMAP4rev1 Capabilities
registry</xref>.</t> 
<t>This adds two new IMAP4 list selection options and one new IMAP4 list return
option. 
<list style="numbers">
<t>LIST-EXTENDED option name: UTF8<vspace blankLines="1"/>
LIST-EXTENDED option type: SELECTION<vspace blankLines="1"/>
Implied return options(s): UTF8<vspace blankLines="1"/>
LIST-EXTENDED option description: Causes the LIST response to include mailboxes that mandate the UTF8 SELECT/EXAMINE parameter.<vspace blankLines="1"/>
Published specification: RFC &rfc.number;, <xref target="list-select" /><vspace blankLines="1"/>
Security considerations: RFC &rfc.number;, <xref target="security" /><vspace blankLines="1"/>
Intended usage: COMMON<vspace blankLines="1"/>
Person and email address to contact for further information:
see the Authors' Addresses at the end of this specification<vspace blankLines="1"/>
Owner/Change controller: iesg@ietf.org</t>

<t>LIST-EXTENDED option name: UTF8ONLY<vspace blankLines="1"/>
LIST-EXTENDED option type: SELECTION<vspace blankLines="1"/>
Implied return options(s): UTF8<vspace blankLines="1"/>
LIST-EXTENDED option description: Causes the LIST response to include mailboxes
that mandate the UTF8 SELECT/EXAMINE parameter and exclude mailboxes that do
not support the UTF8 SELECT/EXAMINE parameter.
<vspace blankLines="1"/> 
Published specification: RFC &rfc.number;, <xref target="list-select" /><vspace blankLines="1"/>
Security considerations: RFC &rfc.number;, <xref target="security" /><vspace blankLines="1"/>
Intended usage: COMMON<vspace blankLines="1"/>
Person and email address to contact for further information:
see the Authors' Addresses at the end of this specification<vspace blankLines="1"/>
Owner/Change controller: iesg@ietf.org</t>
<t>LIST-EXTENDED option name: UTF8<vspace blankLines="1"/>
LIST-EXTENDED option type: RETURN<vspace blankLines="1"/>
Implied return options(s): none<vspace blankLines="1"/>
LIST-EXTENDED option description: Causes the LIST response to include \NoUTF8 and \UTF8Only mailbox attributes.<vspace blankLines="1"/>
Published specification: RFC &rfc.number;, <xref target="list-select" /><vspace blankLines="1"/>
Security considerations: RFC &rfc.number;, <xref target="security" /><vspace blankLines="1"/>
Intended usage: COMMON<vspace blankLines="1"/>
Person and email address to contact for further information:
see the Authors' Addresses at the end of this specification<vspace blankLines="1"/>
Owner/Change controller: iesg@ietf.org</t>
</list></t>
</section>

<section anchor="security" title="Security Considerations">
<t>The security considerations of <xref target="RFC3629">UTF-8</xref>
and <xref target="RFC4013">SASLprep</xref> apply to this specification,
particularly with respect to use of UTF-8 in user names and passwords. 
Otherwise, this is not believed to alter the security considerations of
IMAP4rev1.</t>
</section>

</middle>
<back>
<references title="Normative References">
&rfc1341;
&rfc2045;
&rfc2047;
&rfc2119;
&rfc2183;
&rfc2231;
&rfc3490;
&rfc3501;
&rfc3629;
&rfc4013;
&rfc4466;
&rfc4469;
&rfc5161;
&rfc5198;
&rfc5234;
&rfc5258;
&rfc5259;
&rfc5322;
&rfc5335;
&rfc5504;
</references>
<references title="Informative References">
&rfc2049;
&rfc2088;
&rfc2277;

<reference anchor='RFC5721'>
<front>
<title>POP3 Support for UTF-8</title>

<author initials='R' surname='Gellens' fullname='Randall Gellens'>
    <organization />
</author>

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

<date month='February' year='2010' />

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

</front>

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

</reference>

</references>
<section title="Design Rationale">
<t>This non-normative section discusses the reasons behind some of the design choices in the above specification.</t>
<t>The basic approach of advertising the ability to access a mailbox in UTF-8 mode is intended to permit graceful upgrade, including servers that support multiple mailbox formats. In particular, it would be undesirable to force conversion of an entire server mailstore to UTF-8 headers, so being able to phase-in support for new mailboxes and gradually migrate old mailboxes is permitted by this design.</t>
<t>"UTF8=USER" is optional because many identity systems are US-ASCII only, so it's helpful to inform the client up front that UTF-8 won't work.</t>
<t>"UTF8=APPEND" is optional because it effectively requires IMAP server support for down-conversion, which is a much more complex operation than up-conversion.</t>
<t>The "UTF8=ONLY" mechanism simplifies diagnosis of interoperability problems when legacy support goes away. In the situation where backwards compatibility is broken anyway, just-send-UTF-8 IMAP has the advantage that it might work with some legacy clients. However, the difficulty of diagnosing interoperability problems caused by a just-send-UTF-8 IMAP mechanism is the reason the "UTF8=ONLY" capability mechanism was chosen.</t>
<t>The up-conversion requirements are designed to balance the desire to deprecate and eventually eliminate complicated encodings (like MIME header encodings) without creating a significant deployment burden for servers. As
IMAP4 servers already require a MIME parser, this includes additional server up-conversion requirements not present in <xref target='RFC5721'> POP3 Support for UTF-8</xref>.</t>
<t>The set of mandatory charsets comes from two sources: <xref target="RFC2049">MIME requirements</xref> and <xref target="RFC2277">IETF Policy on Character Sets</xref>. Including a requirement to up-convert widely deployed encoded ideographic charsets to UTF-8 would be reasonable for most scenarios, but may require unacceptable table sizes for some embedded devices. The open-ended recommendation to support widely deployed charsets avoids the political ramifications of attempting to list such charsets. The authors believe market forces, existing open-source software, and public conversion tables are sufficient to deploy the appropriate charsets.</t>
</section>
<section title="Examples Demonstrating Relationships between UTF8= Capabilities">
<t>
<figure><artwork>
  UTF8=ACCEPT UTF8=USER UTF8=APPEND
  UTF8=ACCEPT UTF8=ALL
  UTF8=ALL       ; Note, same as above
  UTF8=ACCEPT UTF8=USER UTF8=APPEND UTF8=ALL UTF8=ONLY
  UTF8=USER UTF8=ONLY ; Note, same as above
</artwork>
</figure>
</t>
</section>
<section title="Acknowledgments">
<t>The authors wish to thank the participants of the EAI working group for their contributions to this document with particular thanks to
Harald Alvestrand, David Black, Randall Gellens, Arnt Gulbrandsen, Kari Hurtta, John Klensin, Xiaodong Lee, Charles Lindsey, Alexey Melnikov, Subramanian Moonesamy, Shawn Steele, Daniel Taharlev, and Joseph Yee for their specific contributions to the discussion.</t>
</section>
</back>
</rfc>
