Internet Engineering Task Force (IETF)                        R. Gellens
Request for Comments: 5721                         QUALCOMM Incorporated
Category: Experimental                                         C. Newman
ISSN: 2070-1721                                         Sun Microsystems
                                                           February 2010
        
Internet Engineering Task Force (IETF)                        R. Gellens
Request for Comments: 5721                         QUALCOMM Incorporated
Category: Experimental                                         C. Newman
ISSN: 2070-1721                                         Sun Microsystems
                                                           February 2010
        

POP3 Support for UTF-8

对UTF-8的POP3支持

Abstract

摘要

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.

本规范扩展了邮局协议版本3(POP3),以支持用户名、密码、邮件地址、邮件标题和协议级文本错误字符串中的未编码国际字符。

Status of This Memo

关于下段备忘

This document is not an Internet Standards Track specification; it is published for examination, experimental implementation, and evaluation.

本文件不是互联网标准跟踪规范;它是为检查、实验实施和评估而发布的。

This document defines an Experimental Protocol for the Internet community. This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.

本文档为互联网社区定义了一个实验协议。本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。并非IESG批准的所有文件都适用于任何级别的互联网标准;见RFC 5741第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc5721.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc5721.

Copyright Notice

版权公告

Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2010 IETF信托基金和确定为文件作者的人员。版权所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.

本文件可能包含2008年11月10日之前发布或公开的IETF文件或IETF贡献中的材料。控制某些材料版权的人员可能未授予IETF信托允许在IETF标准流程之外修改此类材料的权利。在未从控制此类材料版权的人员处获得充分许可的情况下,不得在IETF标准流程之外修改本文件,也不得在IETF标准流程之外创建其衍生作品,除了将其格式化以RFC形式发布或将其翻译成英语以外的其他语言。

Table of Contents

目录

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.1.  Conventions Used in This Document  . . . . . . . . . . . .  3
   2.  LANG Capability  . . . . . . . . . . . . . . . . . . . . . . .  4
   3.  UTF8 Capability  . . . . . . . . . . . . . . . . . . . . . . .  6
     3.1.  The UTF8 Command . . . . . . . . . . . . . . . . . . . . .  7
     3.2.  USER Argument to UTF8 Capability . . . . . . . . . . . . .  9
   4.  Native UTF-8 Maildrops . . . . . . . . . . . . . . . . . . . .  9
   5.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 10
   6.  Security Considerations  . . . . . . . . . . . . . . . . . . . 10
   7.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 10
     7.1.  Normative References . . . . . . . . . . . . . . . . . . . 10
     7.2.  Informative References . . . . . . . . . . . . . . . . . . 11
   Appendix A.  Design Rationale  . . . . . . . . . . . . . . . . . . 12
   Appendix B.  Acknowledgments . . . . . . . . . . . . . . . . . . . 12
        
   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.1.  Conventions Used in This Document  . . . . . . . . . . . .  3
   2.  LANG Capability  . . . . . . . . . . . . . . . . . . . . . . .  4
   3.  UTF8 Capability  . . . . . . . . . . . . . . . . . . . . . . .  6
     3.1.  The UTF8 Command . . . . . . . . . . . . . . . . . . . . .  7
     3.2.  USER Argument to UTF8 Capability . . . . . . . . . . . . .  9
   4.  Native UTF-8 Maildrops . . . . . . . . . . . . . . . . . . . .  9
   5.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 10
   6.  Security Considerations  . . . . . . . . . . . . . . . . . . . 10
   7.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 10
     7.1.  Normative References . . . . . . . . . . . . . . . . . . . 10
     7.2.  Informative References . . . . . . . . . . . . . . . . . . 11
   Appendix A.  Design Rationale  . . . . . . . . . . . . . . . . . . 12
   Appendix B.  Acknowledgments . . . . . . . . . . . . . . . . . . . 12
        
1. Introduction
1. 介绍

This document forms part of the Email Address Internationalization (EAI) experiment described in the EAI Framework document [RFC4952] (for background, please see the charter of the EAI working group) and should be evaluated within the context of EAI. As part of the overall EAI work, email messages may be transmitted and delivered containing un-encoded UTF-8 characters, and mail drops that are accessed using POP3 [RFC1939] might natively store UTF-8.

本文档构成EAI框架文档[RFC4952]中描述的电子邮件地址国际化(EAI)实验的一部分(背景信息,请参阅EAI工作组章程),应在EAI的背景下进行评估。作为整个EAI工作的一部分,可以传输和传递包含未编码UTF-8字符的电子邮件,并且使用POP3[RFC1939]访问的邮件投递可能本机存储UTF-8。

This specification extends POP3 [RFC1939] using the POP3 extension mechanism [RFC2449] to permit un-encoded UTF-8 [RFC3629] in headers, as described in "Internationalized Email Headers" [RFC5335]. It also adds a mechanism to support login names and passwords outside the ASCII character set, and a mechanism to support UTF-8 protocol-level error strings in a language appropriate for the user.

本规范使用POP3扩展机制[RFC2449]扩展POP3[RFC1939],以允许在标头中使用未编码的UTF-8[RFC3629],如“国际化电子邮件标头”[RFC5335]中所述。它还添加了一种支持ASCII字符集之外的登录名和密码的机制,以及一种支持UTF-8协议级错误字符串的机制,该字符串采用适合用户的语言。

This document updates POP3 [RFC1939], and the fact that an Experimental specification updates a Standards Track specification means that people who participate in the experiment have to consider the Standard updated. In an attempt to reduce confusion, this Experimental document does not contain an "Updates" header. If and when a version of this document moves to the Standards Track, an "Updates: 1939" header should be added.

该文档更新POP3[RCF1939 ],并且实验规范更新标准跟踪规范的事实意味着参与实验的人必须考虑更新的标准。为了减少混淆,本实验性文档不包含“更新”标题。如果本文档的某个版本移动到“标准”轨道,则应添加“更新:1939”标题。

Within this specification, the term "down-conversion" refers to the process of modifying a message containing UTF8 headers [RFC5335] or body parts with 8bit content-transfer-encoding, as defined in MIME Section 2.8 [RFC2045], into conforming 7-bit Internet Message Format [RFC5322] with message header extensions for non-ASCII text [RFC2047] and other 7-bit encodings. Down-conversion is specified by "Downgrading Mechanism for Email Address Internationalization" [RFC5504].

在本规范中,术语“下转换”是指将包含UTF8头[RFC5335]或具有8bit内容传输编码(如MIME第2.8节[RFC2045]中所定义)的消息体部分修改为符合7位互联网消息格式[RFC5322],并具有非ASCII文本[RFC2047]的消息头扩展的过程和其他7位编码。下转换由“电子邮件地址国际化降级机制”[RFC5504]指定。

1.1. Conventions Used in This Document
1.1. 本文件中使用的公约

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 "Key words for use in RFCs to Indicate Requirement Levels" [RFC2119].

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照“RFC中用于指示需求水平的关键词”[RFC2119]中的描述进行解释。

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.

在示例中,“C:”和“S:”分别表示客户端和服务器发送的行。如果单个“C:”或“S:”标签适用于多行,则这些行之间的换行符仅用于编辑清晰性,不属于实际协议交换的一部分。

Note that examples always use 7-bit ASCII characters due to limitations of this document format; in particular, some examples for the "LANG" command may appear silly as a result.

注意,由于本文档格式的限制,示例始终使用7位ASCII字符;特别是,“LANG”命令的一些示例可能因此显得很愚蠢。

2. LANG Capability
2. 语言能力

Per "POP3 Extension Mechanism" [RFC2449], this document adds a new capability response tag to indicate support for a new command: LANG. The capability tag and new command are described below.

根据“POP3扩展机制”[RFC2449],本文档添加了一个新的功能响应标签,以指示对新命令LANG的支持。下面描述了功能标签和新命令。

CAPA tag: LANG

卡帕标签:朗

Arguments with CAPA tag: none

带有CAPA标记的参数:无

Added Commands: LANG

添加命令:LANG

Standard commands affected: All

受影响的标准命令:全部

Announced states / possible differences: both / no

宣布的州/可能的差异:两者/否

Commands valid in states: AUTHENTICATION, TRANSACTION

在以下状态下有效的命令:身份验证、事务

Specification reference: this document

规范参考:本文件

Discussion:

讨论:

POP3 allows most +OK and -ERR server responses to include human-readable text that, in some cases, might be presented to the user. But that text is limited to ASCII by the POP3 specification [RFC1939]. The LANG capability and command permit a POP3 client to negotiate which language the server should use when sending human-readable text.

POP3允许大多数+OK和-ERR服务器响应包含人类可读的文本,在某些情况下,这些文本可能会呈现给用户。但该文本受POP3规范[RFC1939]限制为ASCII。LANG功能和命令允许POP3客户端协商服务器在发送人类可读文本时应使用哪种语言。

A server that advertises the LANG extension MUST use the language "i-default" as described in [RFC2277] as its default language until another supported language is negotiated by the client. A server MUST include "i-default" as one of its supported languages.

播发LANG扩展的服务器必须使用[RFC2277]中所述的语言“i-default”作为其默认语言,直到客户端协商另一种受支持的语言。服务器必须包含“i-default”作为其支持的语言之一。

The LANG command requests that human-readable text included in all subsequent +OK and -ERR responses be localized to a language matching the language range argument (the "Basic Language Range" as described

LANG命令要求将所有后续+OK和-ERR响应中包含的人类可读文本本地化为与language range参数匹配的语言(如所述的“基本语言范围”)

by [RFC4647]). If the command succeeds, the server returns a +OK response followed by a single space, the exact language tag selected, another space, and the rest of the line is human-readable text in the appropriate language. This and subsequent protocol-level human-readable text is encoded in the UTF-8 charset.

通过[RFC4647])。如果命令成功,服务器将返回+OK响应,后跟一个空格、选定的确切语言标记、另一个空格,行的其余部分是适当语言的人类可读文本。此协议级和后续协议级人类可读文本编码在UTF-8字符集中。

If the command fails, the server returns an -ERR response and subsequent human-readable response text continues to use the language that was previously active (typically i-default).

如果命令失败,服务器将返回一个-ERR响应,随后的人类可读响应文本将继续使用以前处于活动状态的语言(通常为i-default)。

The special "*" language range argument indicates a request to use a language designated as preferred by the server administrator. The preferred language MAY vary based on the currently active user.

特殊的“*”语言范围参数表示使用服务器管理员指定为首选语言的请求。首选语言可能因当前活动用户而异。

If no argument is given and the POP3 server issues a positive response, then the response given is multi-line. After the initial +OK, for each language tag the server supports, the POP3 server responds with a line for that language. This line is called a "language listing".

如果没有给出参数,并且POP3服务器发出肯定响应,那么给出的响应是多行的。在初始+OK之后,对于服务器支持的每个语言标记,POP3服务器都会用该语言的一行进行响应。这一行称为“语言列表”。

In order to simplify parsing, all POP3 servers are required to use a certain format for language listings. A language listing consists of the language tag [RFC5646] of the message, optionally followed by a single space and a human-readable description of the language in the language itself, using the UTF-8 charset.

为了简化解析,所有POP3服务器都需要使用特定的语言列表格式。语言列表由消息的语言标记[RFC5646]组成,可选地后跟一个空格,以及使用UTF-8字符集的语言本身的可读描述。

Examples:

示例:

< Note that some examples do not include the correct character accents due to limitations of this document format. >

<注意,由于本文档格式的限制,某些示例中不包含正确的字符重音。>

< The server defaults to using English i-default responses until the client explicitly changes the language. >

<在客户端明确更改语言之前,服务器默认使用英语i-default响应。>

      C: USER karen
      S: +OK Hello, karen
      C: PASS password
      S: +OK karen's maildrop contains 2 messages (320 octets)
        
      C: USER karen
      S: +OK Hello, karen
      C: PASS password
      S: +OK karen's maildrop contains 2 messages (320 octets)
        

< Client requests deprecated MUL language. Server replies with -ERR response. >

<客户端请求不推荐的MUL语言。服务器回复为-ERR响应。>

      C: LANG MUL
      S: -ERR invalid language MUL
        
      C: LANG MUL
      S: -ERR invalid language MUL
        

< A LANG command with no parameters is a request for a language listing. >

<不带参数的LANG命令是对语言列表的请求。>

      C: LANG
      S: +OK Language listing follows:
      S: en English
      S: en-boont English Boontling dialect
      S: de Deutsch
      S: it Italiano
      S: es Espanol
      S: sv Svenska
      S: i-default Default language
      S: .
        
      C: LANG
      S: +OK Language listing follows:
      S: en English
      S: en-boont English Boontling dialect
      S: de Deutsch
      S: it Italiano
      S: es Espanol
      S: sv Svenska
      S: i-default Default language
      S: .
        

< A request for a language listing might fail. >

<请求语言列表可能会失败。>

      C: LANG
      S: -ERR Server is unable to list languages
        
      C: LANG
      S: -ERR Server is unable to list languages
        

< Once the client changes the language, all responses will be in that language, starting with the response to the LANG command. >

<一旦客户端更改语言,所有响应都将使用该语言,从对LANG命令的响应开始。>

      C: LANG es
      S: +OK es Idioma cambiado
        
      C: LANG es
      S: +OK es Idioma cambiado
        

< If a server does not support the requested primary language, responses will continue to be returned in the current language the server is using. >

<如果服务器不支持请求的主语言,响应将继续以服务器当前使用的语言返回。>

      C: LANG uga
      S: -ERR es Idioma <<UGA>> no es conocido
        
      C: LANG uga
      S: -ERR es Idioma <<UGA>> no es conocido
        
      C: LANG sv
      S: +OK sv Kommandot "LANG" lyckades
        
      C: LANG sv
      S: +OK sv Kommandot "LANG" lyckades
        
      C: LANG *
      S: +OK es Idioma cambiado
        
      C: LANG *
      S: +OK es Idioma cambiado
        
3. UTF8 Capability
3. UTF8能力

Per "POP3 Extension Mechanism" [RFC2449], this document adds a new capability response tag to indicate support for new server functionality, including a new command: UTF8. The capability tag and new command and functionality are described below.

根据“POP3扩展机制”[RFC2449],本文档添加了一个新的功能响应标签,以指示对新服务器功能的支持,包括一个新命令:UTF8。下面描述了功能标签以及新的命令和功能。

CAPA tag: UTF8

CAPA标签:UTF8

Arguments with CAPA tag: USER

带有CAPA标记的参数:USER

Added Commands: UTF8

添加命令:UTF8

Standard commands affected: USER, PASS, APOP, LIST, TOP, RETR

受影响的标准命令:USER、PASS、APOP、LIST、TOP、RETR

Announced states / possible differences: both / no

宣布的州/可能的差异:两者/否

Commands valid in states: AUTHORIZATION

在以下状态下有效的命令:授权

Specification reference: this document

规范参考:本文件

Discussion:

讨论:

This capability adds the "UTF8" command to POP3. The UTF8 command switches the session from ASCII to UTF-8 mode.

此功能将“UTF8”命令添加到POP3中。UTF8命令将会话从ASCII模式切换到UTF-8模式。

3.1. The UTF8 Command
3.1. UTF8命令

The UTF8 command enables UTF-8 mode. The UTF8 command has no parameters.

UTF8命令启用UTF-8模式。UTF8命令没有参数。

Maildrops can natively store UTF-8 or be limited to ASCII. UTF-8 mode has no effect on messages in an ASCII-only maildrop. Messages in native UTF-8 maildrops can be ASCII or UTF-8 using internationalized headers [RFC5335] and/or 8bit content-transfer-encoding, as defined in MIME Section 2.8 [RFC2045]. In UTF-8 mode, both UTF-8 and ASCII messages are sent to the client as-is (without conversion). When not in UTF-8 mode, UTF-8 messages in a native UTF-8 maildrop MUST be down-converted (downgraded) to comply with unextended POP and Internet Mail Format. POP servers (unlike SMTP and Submit servers) are not required to use "Downgrading Mechanism for Email Address Internationalization" [RFC5504].

邮件投递可以本机存储UTF-8,也可以限制为ASCII。UTF-8模式对仅ASCII邮件投递中的邮件没有影响。本机UTF-8邮件投递中的消息可以是ASCII或UTF-8,使用MIME第2.8节[RFC2045]中定义的国际化头[RFC5335]和/或8位内容传输编码。在UTF-8模式下,UTF-8和ASCII消息都按原样发送到客户端(无需转换)。当未处于UTF-8模式时,本机UTF-8邮件投递中的UTF-8邮件必须向下转换(降级),以符合未扩展的POP和Internet邮件格式。POP服务器(与SMTP和提交服务器不同)不需要使用“电子邮件地址国际化降级机制”[RFC5504]。

Discussion: The main argument against a single required mechanism for downgrading by a POP server is that the only clients that have any use for a standardized downgraded message (because they wish to interpret downgrade headers, for example) are ones that can support UTF-8 and, hence, will issue the UTF8 command in the first place. The counter argument to this is that clients that do not support UTF-8 might be upgraded in the future; it's desirable for an upgraded client to be capable of interpreting prior downgraded messages in the local mail store, which is most likely if the messages were downgraded using one standardized procedure.

讨论:反对POP服务器降级所需的单一机制的主要论点是,唯一可以使用标准化降级消息的客户端(例如,因为它们希望解释降级头)是可以支持UTF-8的客户端,因此将首先发出UTF8命令。与此相反的论点是,不支持UTF-8的客户端将来可能会升级;升级后的客户机最好能够在本地邮件存储中解释先前降级的邮件,如果使用一个标准化过程对邮件进行降级,则最有可能发生这种情况。

Therefore, while POP servers are not required to use "Downgrading Mechanism for Email Address Internationalization" [RFC5504], there are advantages to them doing so.

因此,虽然POP服务器不需要使用“电子邮件地址国际化降级机制”[RFC5504],但这样做有好处。

Note that even in UTF-8 mode, MIME binary content-transfer-encoding is still not permitted.

注意,即使在UTF-8模式下,MIME二进制内容传输编码仍然是不允许的。

The octet count (size) of a message reported in a response to the LIST command SHOULD match the actual number of octets sent in a RETR response (not counting byte-stuffing). Sizes reported elsewhere, such as in STAT responses and non-standardized, free-form text in positive status indicators (following "+OK") need not be accurate, but it is preferable if they are.

在对LIST命令的响应中报告的消息的八位字节数(大小)应与RETR响应中发送的实际八位字节数相匹配(不计算字节填充)。其他地方报告的大小,如统计响应中的大小和积极状态指标中的非标准化、自由格式文本(在“+OK”之后)不需要准确,但最好是准确。

Discussion: Mail stores are either ASCII or native UTF-8, and clients either issue the UTF8 command or not. The message needs converting only when it is native UTF-8 and the client has not issued the UTF-8 command, in which case the server must down-convert it. The down-converted message may be larger. The server may choose various strategies regarding down-conversion, which include when to down-convert, whether to cache or store the down-converted form of a message (and if so, for how long), and whether to calculate or retain the size of a down-converted message independently of the down-converted content. If the server does not have immediate access to the accurate down-converted size, it may be faster to estimate rather than calculate it. Servers are expected to normally follow the RFC 1939 [RFC1939] text on using the "exact size" in a scan listing, but there may be situations with maildrops containing very large numbers of messages in which this might be a problem. If the server does estimate, reporting a scan listing size smaller than what it turns out to be could be a problem for some clients. In summary, it is better for servers to report accurate sizes, but if this is not possible, high guesses are better than small ones. Some POP servers include the message size in the non-standardized text response following "+OK" (the 'text' production of RFC 2449 [RFC2449]), in a RETR or TOP response (possibly because some examples in POP3 [RFC1939] do so). There has been at least one known case of a client relying on this to know when it had received all of the message rather than following the POP3 [RFC1939] rule of looking for a line consisting of a termination octet (".") and a CRLF pair. While any such client is non-compliant, if a server does include the size in such text, it is better if it is accurate.

讨论:邮件存储可以是ASCII或本机UTF-8,客户机可以发出UTF8命令,也可以不发出UTF8命令。只有当消息是本机UTF-8且客户端未发出UTF-8命令时,才需要转换消息,在这种情况下,服务器必须向下转换消息。向下转换的消息可能更大。服务器可以选择关于下转换的各种策略,包括何时下转换、是否缓存或存储消息的下转换形式(如果是,则存储多长时间),以及是否独立于下转换内容计算或保留下转换消息的大小。如果服务器无法立即访问准确的向下转换大小,则估计它可能比计算它更快。在扫描列表中使用“精确大小”时,服务器通常会遵循RFC 1939[RFC1939]文本,但在邮件投递包含大量邮件的情况下,这可能是一个问题。如果服务器确实进行了估计,则报告扫描列表大小小于实际大小可能会给某些客户端带来问题。总之,服务器最好报告准确的大小,但如果不可能,高猜测比小猜测要好。一些POP服务器在RETR或TOP响应中包含“+OK”(RFC 2449[RFC2449]的“文本”生成)之后的非标准文本响应中的消息大小(可能是因为POP3[RFC1939]中的一些示例这样做)。至少存在一种已知情况,即客户机依赖于此来了解其何时收到所有消息,而不是遵循POP3[RFC1939]规则来查找由终止八位组(“.”)和CRLF对组成的行。虽然任何这样的客户机都是不兼容的,但是如果服务器确实在这样的文本中包含了大小,那么如果它是准确的就更好了。

Clients MUST NOT issue the STLS command [RFC2595] after issuing UTF8; servers MAY (but are not required to) enforce this by rejecting with an "-ERR" response an STLS command issued subsequent to a successful

客户端在发出UTF8后不得发出STLS命令[RFC2595];服务器可以(但不需要)通过在成功执行后发出的STLS命令,以“-ERR”响应拒绝该命令来强制执行此操作

UTF8 command. (Because this is a protocol error as opposed to a failure based on conditions, an extended response code [RFC2449] is not specified.)

UTF8命令。(由于这是协议错误,而不是基于条件的故障,因此未指定扩展响应代码[RFC2449])

3.2. USER Argument to UTF8 Capability
3.2. UTF8功能的用户参数

If the USER argument is included with this capability, it indicates that the server accepts UTF-8 user names and passwords.

如果此功能包含用户参数,则表示服务器接受UTF-8用户名和密码。

Servers that include the USER argument in the UTF8 capability response SHOULD apply SASLprep [RFC4013] to the arguments of the USER and PASS commands.

在UTF8功能响应中包含用户参数的服务器应将SASLprep[RFC4013]应用于用户参数并传递命令。

A client or server that supports APOP and permits UTF-8 in user names or passwords MUST apply SASLprep [RFC4013] to the user name and password used to compute the APOP digest.

支持APOP并在用户名或密码中允许UTF-8的客户端或服务器必须将SASLprep[RFC4013]应用于用于计算APOP摘要的用户名和密码。

When applying SASLprep [RFC4013], servers MUST reject UTF-8 user names or passwords that contain a Unicode character listed in Section 2.3 of SASLprep [RFC4013]. When applying SASLprep to the USER argument, the PASS argument, or the APOP username argument, a compliant server or client MUST treat them as a query string (i.e., unassigned Unicode codepoints are allowed). When applying SASLprep to the APOP password argument, a compliant server or client MUST treat them as a stored string (i.e., unassigned Unicode codepoints are prohibited).

应用SASLprep[RFC4013]时,服务器必须拒绝包含SASLprep[RFC4013]第2.3节中列出的Unicode字符的UTF-8用户名或密码。将SASLprep应用于用户参数、PASS参数或APOP username参数时,符合要求的服务器或客户端必须将其视为查询字符串(即,允许使用未分配的Unicode代码点)。将SASLprep应用于APOP password参数时,符合要求的服务器或客户端必须将其视为存储字符串(即,禁止使用未分配的Unicode代码点)。

The client does not need to issue the UTF8 command prior to using UTF-8 in authentication. However, clients MUST NOT use UTF-8 in USER, PASS, or APOP commands unless the USER argument is included in the UTF8 capability response.

在身份验证中使用UTF-8之前,客户端不需要发出UTF8命令。但是,除非UTF8功能响应中包含用户参数,否则客户端不得在用户、PASS或APOP命令中使用UTF-8。

The server MUST reject UTF-8 user names or passwords that fail to comply with the formal syntax in UTF-8 [RFC3629].

服务器必须拒绝不符合UTF-8[RFC3629]中正式语法的UTF-8用户名或密码。

Use of UTF-8 in the AUTH command is governed by the POP3 SASL [RFC5034] mechanism.

AUTH命令中UTF-8的使用由POP3 SASL[RFC5034]机制控制。

4. Native UTF-8 Maildrops
4. 本机UTF-8邮件投递

When a POP3 server uses a native UTF-8 maildrop, it is the responsibility of the server to comply with the POP3 base specification [RFC1939] and Internet Message Format [RFC5322] when not in UTF-8 mode. Mechanisms for 7-bit downgrading to help comply with the standards are described in "Downgrading Mechanism for Email Address Internationalization" [RFC5504].

当POP3服务器使用本机UTF-8邮件投递时,服务器有责任在不处于UTF-8模式时遵守POP3基本规范[RFC1939]和互联网消息格式[RFC5322]。“电子邮件地址国际化的降级机制”[RFC5504]中描述了帮助遵守标准的7位降级机制。

5. IANA Considerations
5. IANA考虑

This specification adds two new capabilities ("UTF8" and "LANG") to the POP3 capability registry [RFC2449].

本规范向POP3功能注册表[RFC2449]添加了两个新功能(“UTF8”和“LANG”)。

6. Security Considerations
6. 安全考虑

The security considerations of UTF-8 [RFC3629] and SASLprep [RFC4013] apply to this specification, particularly with respect to use of UTF-8 in user names and passwords.

UTF-8[RFC3629]和SASLprep[RFC4013]的安全注意事项适用于本规范,特别是在用户名和密码中使用UTF-8方面。

The "LANG *" command might reveal the existence and preferred language of a user to an active attacker probing the system if the active language changes in response to the USER, PASS, or APOP commands prior to validating the user's credentials. Servers MUST implement a configuration to prevent this exposure.

“LANG*”命令可能会向探测系统的主动攻击者透露用户的存在和首选语言,如果主动语言在验证用户凭据之前响应用户、PASS或APOP命令而发生变化。服务器必须实现一个配置来防止这种暴露。

It is possible for a man-in-the-middle attacker to insert a LANG command in the command stream, thus making protocol-level diagnostic responses unintelligible to the user. A mechanism to integrity-protect the session, such as Transport Layer Security (TLS) [RFC2595] can be used to defeat such attacks.

中间人攻击者有可能在命令流中插入LANG命令,从而使用户无法理解协议级诊断响应。一种保护会话完整性的机制,如传输层安全(TLS)[RFC2595]可用于抵御此类攻击。

Modifying server authentication code (in this case, to support UTF-8) needs to be done with care to avoid introducing vulnerabilities (for example, in string parsing).

修改服务器身份验证代码(在本例中,是为了支持UTF-8)时需要小心,以避免引入漏洞(例如,在字符串解析中)。

The UTF8 command description (Section 3.1) contains a discussion on reporting inaccurate sizes. An additional risk to doing so is that, if a client allocates buffers based on the reported size, it may overrun the buffer, crash, or have other problems if the message data is larger than reported.

UTF8命令说明(第3.1节)包含关于报告不准确尺寸的讨论。这样做的另一个风险是,如果客户端根据报告的大小分配缓冲区,那么如果消息数据大于报告的大小,它可能会溢出缓冲区、崩溃或出现其他问题。

7. References
7. 工具书类
7.1. Normative References
7.1. 规范性引用文件

[RFC1939] Myers, J. and M. Rose, "Post Office Protocol - Version 3", STD 53, RFC 1939, May 1996.

[RFC1939]迈尔斯,J.和M.罗斯,“邮局协议-第3版”,STD 53,RFC 1939,1996年5月。

[RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996.

[RFC2045]Freed,N.和N.Borenstein,“多用途Internet邮件扩展(MIME)第一部分:Internet邮件正文格式”,RFC 20451996年11月。

[RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text", RFC 2047, November 1996.

[RFC2047]Moore,K.,“MIME(多用途互联网邮件扩展)第三部分:非ASCII文本的消息头扩展”,RFC 2047,1996年11月。

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC2277] Alvestrand, H., "IETF Policy on Character Sets and Languages", BCP 18, RFC 2277, January 1998.

[RFC2277]Alvestrand,H.,“IETF字符集和语言政策”,BCP 18,RFC 2277,1998年1月。

[RFC2449] Gellens, R., Newman, C., and L. Lundblade, "POP3 Extension Mechanism", RFC 2449, November 1998.

[RFC2449]Gellens,R.,Newman,C.,和L.Lundblade,“POP3扩展机制”,RFC 2449,1998年11月。

[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.

[RFC3629]Yergeau,F.,“UTF-8,ISO 10646的转换格式”,STD 63,RFC 3629,2003年11月。

[RFC4013] Zeilenga, K., "SASLprep: Stringprep Profile for User Names and Passwords", RFC 4013, February 2005.

[RFC4013]Zeilenga,K.,“SASLprep:用户名和密码的Stringprep配置文件”,RFC40113,2005年2月。

[RFC4647] Phillips, A. and M. Davis, "Matching of Language Tags", BCP 47, RFC 4647, September 2006.

[RFC4647]Phillips,A.和M.Davis,“语言标记的匹配”,BCP 47,RFC 4647,2006年9月。

[RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, October 2008.

[RFC5322]Resnick,P.,Ed.“互联网信息格式”,RFC5222008年10月。

[RFC5335] Abel, Y., "Internationalized Email Headers", RFC 5335, September 2008.

[RFC5335]Abel,Y.,“国际化电子邮件标题”,RFC 53352008年9月。

[RFC5646] Phillips, A. and M. Davis, "Tags for Identifying Languages", BCP 47, RFC 5646, September 2009.

[RFC5646]Phillips,A.和M.Davis,“识别语言的标记”,BCP 47,RFC 5646,2009年9月。

7.2. Informative References
7.2. 资料性引用

[RFC2595] Newman, C., "Using TLS with IMAP, POP3 and ACAP", RFC 2595, June 1999.

[RFC2595]Newman,C.,“将TLS与IMAP、POP3和ACAP一起使用”,RFC2595,1999年6月。

[RFC4952] Klensin, J. and Y. Ko, "Overview and Framework for Internationalized Email", RFC 4952, July 2007.

[RFC4952]Klensin,J.和Y.Ko,“国际化电子邮件的概述和框架”,RFC 49522007年7月。

[RFC5034] Siemborski, R. and A. Menon-Sen, "The Post Office Protocol (POP3) Simple Authentication and Security Layer (SASL) Authentication Mechanism", RFC 5034, July 2007.

[RFC5034]Siemborski,R.和A.Menon Sen,“邮局协议(POP3)简单认证和安全层(SASL)认证机制”,RFC 5034,2007年7月。

[RFC5504] Fujiwara, K. and Y. Yoneya, "Downgrading Mechanism for Email Address Internationalization", RFC 5504, March 2009.

[RFC5504]Fujiwara,K.和Y.Yoneya,“电子邮件地址国际化的降级机制”,RFC 55042009年3月。

Appendix A. Design Rationale
附录A.设计原理

This non-normative section discusses the reasons behind some of the design choices in the above specification.

本非规范性章节讨论了上述规范中某些设计选择背后的原因。

Having servers perform up-conversion so that, at a minimum, RFC2047- encoded words are decoded into UTF-8 is tempting, since this is an area that clients often fail to correctly implement. However, after much discussion, the EAI group felt that the benefits did not justify the burden.

让服务器执行上转换,以便至少将RFC2047编码的字解码为UTF-8是很有诱惑力的,因为这是客户端经常无法正确实现的一个领域。然而,经过大量讨论后,EAI小组认为这些好处并不能证明负担是合理的。

Due to interoperability problems with RFC 2047 and limited deployment of RFC 2231, it is hoped these 7-bit encoding mechanisms can be deprecated in the future when UTF-8 header support becomes prevalent.

由于RFC 2047的互操作性问题和RFC 2231的有限部署,希望将来当UTF-8报头支持变得普遍时,这些7位编码机制可以被弃用。

USER is optional because the implementation burden of SASLprep [RFC4013] is not well understood, and mandating such support in all cases could negatively impact deployment.

用户是可选的,因为对SASLprep[RFC4013]的实现负担没有很好的理解,在所有情况下强制提供此类支持可能会对部署产生负面影响。

While it is possible to provide useful examples for language negotiation without support for non-ASCII characters, it is difficult to provide useful examples for commands specifically designed to use the UTF-8 charset un-encoded when the document format is limited to ASCII. As a result, there are no plans to provide examples for that part of the specification as long as this remains an experimental proposal. However, implementers of this specification are encouraged to provide examples to the document authors for a future revision.

虽然可以在不支持非ASCII字符的情况下为语言协商提供有用的示例,但当文档格式限制为ASCII时,很难为专门设计用于使用未编码UTF-8字符集的命令提供有用的示例。因此,只要这仍然是一个实验性的建议,就没有计划为规范的该部分提供示例。但是,鼓励本规范的实施者向文档作者提供示例,以供将来修订。

While down-conversion of native UTF-8 messages is mandatory in the absence of the UTF8 command, servers are not required to use "Downgrading Mechanism for Email Address Internationalization" [RFC5504] to do so. As clients are upgraded with UTF-8 support and the ability to intelligently handle (e.g., display and reply to) UTF-8 messages that were downgraded in transit, it is better if they are also able to handle messages in the local mail store that were downgraded by the POP server. This is more likely if the POP server downgrades messages using the same mechanism as an SMTP server.

虽然在没有UTF8命令的情况下,本机UTF-8消息的下转换是强制性的,但服务器不需要使用“电子邮件地址国际化降级机制”[RFC5504]来进行下转换。由于客户端升级了UTF-8支持,并且能够智能地处理(例如,显示和回复)传输中降级的UTF-8邮件,因此,如果客户端还能够处理本地邮件存储中被POP服务器降级的邮件,则效果更好。如果POP服务器使用与SMTP服务器相同的机制降级邮件,则更可能出现这种情况。

Appendix B. Acknowledgments
附录B.确认书

Thanks to John Klensin, Tony Hansen, and other EAI working group participants who provided helpful suggestions and interesting debate that improved this specification.

感谢John Klensin、Tony Hansen和其他EAI工作组参与者,他们提供了有益的建议和有趣的辩论,从而改进了该规范。

Authors' Addresses

作者地址

Randall Gellens QUALCOMM Incorporated 5775 Morehouse Drive San Diego, CA 92651 US

美国加利福尼亚州圣地亚哥Morehouse大道5775号美国高通公司Randall Gellens 92651

   EMail: rg+ietf@qualcomm.com
        
   EMail: rg+ietf@qualcomm.com
        

Chris Newman Sun Microsystems 800 Royal Oaks Monrovia, CA 91016-6347 US

克里斯纽曼太阳微系统800皇家橡树园蒙罗维亚,加利福尼亚州91016-6347美国

   EMail: chis.newman@sun.com
        
   EMail: chis.newman@sun.com