Internet Engineering Task Force (IETF)                          B. Leiba
Request for Comments: 6154                           Huawei Technologies
Category: Standards Track                                    J. Nicolson
ISSN: 2070-1721                                                   Google
                                                              March 2011
        
Internet Engineering Task Force (IETF)                          B. Leiba
Request for Comments: 6154                           Huawei Technologies
Category: Standards Track                                    J. Nicolson
ISSN: 2070-1721                                                   Google
                                                              March 2011
        

IMAP LIST Extension for Special-Use Mailboxes

特殊用途邮箱的IMAP列表扩展

Abstract

摘要

Some IMAP message stores include special-use mailboxes, such as those used to hold draft messages or sent messages. Many mail clients allow users to specify where draft or sent messages should be put, but configuring them requires that the user know which mailboxes the server has set aside for these purposes. This extension adds new optional mailbox attributes that a server may include in IMAP LIST command responses to identify special-use mailboxes to the client, easing configuration.

某些IMAP邮件存储包括特殊用途的邮箱,例如用于保存草稿邮件或已发送邮件的邮箱。许多邮件客户端允许用户指定草稿或已发送邮件的放置位置,但配置它们需要用户知道服务器为这些目的预留了哪些邮箱。此扩展添加了新的可选邮箱属性,服务器可以在IMAP LIST命令响应中包含这些属性,以向客户端标识特殊用途的邮箱,从而简化配置。

Status of This Memo

关于下段备忘

This is an Internet Standards Track document.

这是一份互联网标准跟踪文件。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(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/rfc6154.

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

Copyright Notice

版权公告

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

版权所有(c)2011 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许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.1.  Conventions Used in This Document  . . . . . . . . . . . .  3
   2.  New Mailbox Attributes Identifying Special-Use Mailboxes . . .  3
   3.  Extension to IMAP CREATE Command to Set Special-Use
       Attributes . . . . . . . . . . . . . . . . . . . . . . . . . .  5
   4.  IMAP METADATA Entry for Special-Use Attributes . . . . . . . .  6
   5.  Examples . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
     5.1.  Example of an IMAP LIST Command  . . . . . . . . . . . . .  7
     5.2.  Example of an Extended IMAP LIST Command . . . . . . . . .  7
     5.3.  Example of an IMAP CREATE Command  . . . . . . . . . . . .  8
     5.4.  Example of Using IMAP METADATA to Manipulate
           Special-Use Attributes . . . . . . . . . . . . . . . . . .  8
   6.  Formal Syntax  . . . . . . . . . . . . . . . . . . . . . . . .  9
   7.  Security Considerations  . . . . . . . . . . . . . . . . . . .  9
   8.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 10
     8.1.  Registration of USEATTR IMAP Response Code . . . . . . . . 10
     8.2.  Registration of CREATE-SPECIAL-USE IMAP Capability . . . . 10
     8.3.  Registration of SPECIAL-USE IMAP Capability  . . . . . . . 10
     8.4.  Registration of SPECIAL-USE Selection Option . . . . . . . 10
     8.5.  Registration of SPECIAL-USE Return Option  . . . . . . . . 11
     8.6.  Registration of SPECIAL-USE Metadata . . . . . . . . . . . 11
   9.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 12
     9.1.  Normative References . . . . . . . . . . . . . . . . . . . 12
     9.2.  Informative References . . . . . . . . . . . . . . . . . . 12
        
   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.1.  Conventions Used in This Document  . . . . . . . . . . . .  3
   2.  New Mailbox Attributes Identifying Special-Use Mailboxes . . .  3
   3.  Extension to IMAP CREATE Command to Set Special-Use
       Attributes . . . . . . . . . . . . . . . . . . . . . . . . . .  5
   4.  IMAP METADATA Entry for Special-Use Attributes . . . . . . . .  6
   5.  Examples . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
     5.1.  Example of an IMAP LIST Command  . . . . . . . . . . . . .  7
     5.2.  Example of an Extended IMAP LIST Command . . . . . . . . .  7
     5.3.  Example of an IMAP CREATE Command  . . . . . . . . . . . .  8
     5.4.  Example of Using IMAP METADATA to Manipulate
           Special-Use Attributes . . . . . . . . . . . . . . . . . .  8
   6.  Formal Syntax  . . . . . . . . . . . . . . . . . . . . . . . .  9
   7.  Security Considerations  . . . . . . . . . . . . . . . . . . .  9
   8.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 10
     8.1.  Registration of USEATTR IMAP Response Code . . . . . . . . 10
     8.2.  Registration of CREATE-SPECIAL-USE IMAP Capability . . . . 10
     8.3.  Registration of SPECIAL-USE IMAP Capability  . . . . . . . 10
     8.4.  Registration of SPECIAL-USE Selection Option . . . . . . . 10
     8.5.  Registration of SPECIAL-USE Return Option  . . . . . . . . 11
     8.6.  Registration of SPECIAL-USE Metadata . . . . . . . . . . . 11
   9.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 12
     9.1.  Normative References . . . . . . . . . . . . . . . . . . . 12
     9.2.  Informative References . . . . . . . . . . . . . . . . . . 12
        
1. Introduction
1. 介绍

Some IMAP message stores include special-use mailboxes, such as those used to hold draft messages or sent messages. Many mail clients allow users to specify where draft or sent messages should be put, but configuring them requires that the user know which mailboxes the server has set aside for these purposes. This extension adds new optional mailbox attributes that a server may include in IMAP LIST command responses to identify special-use mailboxes to the client, easing configuration.

某些IMAP邮件存储包括特殊用途的邮箱,例如用于保存草稿邮件或已发送邮件的邮箱。许多邮件客户端允许用户指定草稿或已发送邮件的放置位置,但配置它们需要用户知道服务器为这些目的预留了哪些邮箱。此扩展添加了新的可选邮箱属性,服务器可以在IMAP LIST命令响应中包含这些属性,以向客户端标识特殊用途的邮箱,从而简化配置。

In addition, this extension adds an optional parameter on the IMAP CREATE command, allowing a client to assign a special use to a mailbox when it is created. Servers may choose to support this part of the extension, but are not required to.

此外,此扩展在IMAP CREATE命令上添加了一个可选参数,允许客户端在创建邮箱时为邮箱分配特殊用途。服务器可以选择支持扩展的这一部分,但不需要这样做。

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

In examples, "C:" indicates lines sent by a client that is connected to a server. "S:" indicates lines sent by the server to the client.

在示例中,“C:”表示连接到服务器的客户端发送的线路。“S:”表示服务器发送到客户端的行。

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 [RFC2119].

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC 2119[RFC2119]中所述进行解释。

2. New Mailbox Attributes Identifying Special-Use Mailboxes
2. 标识特殊用途邮箱的新邮箱属性

An IMAP server that supports this extension MAY include any or all of the following attributes in responses to the non-extended IMAP LIST command. The new attributes are included along with existing attributes, such as "\Marked" and "\Noselect". A given mailbox may have none, one, or more than one of these attributes. In some cases, a special use is advice to a client about what to put in that mailbox. In other cases, it's advice to a client about what to expect to find there. There is no capability string related to the support of special-use attributes on the non-extended LIST command.

支持此扩展的IMAP服务器在响应非扩展IMAP LIST命令时可能包括以下任何或所有属性。新属性与现有属性一起包含,例如“\Marked”和“\Noselect”。给定邮箱可能没有、有一个或多个这些属性。在某些情况下,一个特殊用途是向客户提供关于在该邮箱中放置什么的建议。在其他情况下,这是给客户的建议,告诉他们在那里可以找到什么。在非扩展列表命令上,没有与支持特殊用途属性相关的功能字符串。

For the extended list command [RFC5258], this extension adds a new capability string, a new selection option, and a new return option, all called "SPECIAL-USE". Supporting implementations MUST include the "SPECIAL-USE" capability string in response to an IMAP CAPABILITY command. If the client specifies the "SPECIAL-USE" selection option, the LIST command MUST return only those mailboxes that have a special-use attribute set. If the client specifies the "SPECIAL-USE" return option, the LIST command MUST return the new special-use attributes on those mailboxes that have them set. The "SPECIAL-USE"

对于扩展列表命令[RFC5258],此扩展添加了一个新的功能字符串、一个新的选择选项和一个新的返回选项,所有这些都称为“特殊用途”。支持实现必须包括“特殊用途”功能字符串,以响应IMAP功能命令。如果客户端指定了“特殊用途”选择选项,则LIST命令必须仅返回设置了特殊用途属性的邮箱。如果客户端指定了“特殊用途”返回选项,则LIST命令必须在设置了这些属性的邮箱上返回新的特殊用途属性。“特殊用途”

return option is implied by the "SPECIAL-USE" selection option. The extended LIST command MAY return SPECIAL-USE attributes even if the client does not specify the return option.

返回选项由“特殊用途”选择选项暗示。即使客户端未指定返回选项,extended LIST命令也可能返回特殊用途属性。

The new attributes defined here are as follows:

此处定义的新属性如下所示:

\All This mailbox presents all messages in the user's message store. Implementations MAY omit some messages, such as, perhaps, those in \Trash and \Junk. When this special use is supported, it is almost certain to represent a virtual mailbox.

\此邮箱显示用户邮件存储中的所有邮件。实现可能会忽略一些消息,例如\Trash和\Junk中的消息。当支持此特殊用途时,几乎可以肯定表示虚拟邮箱。

\Archive This mailbox is used to archive messages. The meaning of an "archival" mailbox is server-dependent; typically, it will be used to get messages out of the inbox, or otherwise keep them out of the user's way, while still making them accessible.

\存档此邮箱用于存档邮件。“存档”邮箱的含义取决于服务器;通常,它将用于将邮件从收件箱中取出,或以其他方式使其远离用户的方式,同时仍使其可访问。

\Drafts This mailbox is used to hold draft messages -- typically, messages that are being composed but have not yet been sent. In some server implementations, this might be a virtual mailbox, containing messages from other mailboxes that are marked with the "\Draft" message flag. Alternatively, this might just be advice that a client put drafts here.

\草稿此邮箱用于保存草稿邮件——通常是正在撰写但尚未发送的邮件。在某些服务器实现中,这可能是一个虚拟邮箱,其中包含来自标记为“\Draft”消息标志的其他邮箱的消息。或者,这可能只是客户将草稿放在此处的建议。

\Flagged This mailbox presents all messages marked in some way as "important". When this special use is supported, it is likely to represent a virtual mailbox collecting messages (from other mailboxes) that are marked with the "\Flagged" message flag.

\标记此邮箱将显示以某种方式标记为“重要”的所有邮件。支持此特殊用途时,它可能表示一个虚拟邮箱,用于收集(来自其他邮箱)标记为“\Flagged”消息标志的邮件。

\Junk This mailbox is where messages deemed to be junk mail are held. Some server implementations might put messages here automatically. Alternatively, this might just be advice to a client-side spam filter.

\垃圾邮件此邮箱用于存放被视为垃圾邮件的邮件。某些服务器实现可能会自动将消息放在此处。或者,这可能只是给客户端垃圾邮件过滤器的建议。

\Sent This mailbox is used to hold copies of messages that have been sent. Some server implementations might put messages here automatically. Alternatively, this might just be advice that a client save sent messages here.

\已发送此邮箱用于保存已发送邮件的副本。某些服务器实现可能会自动将消息放在此处。或者,这可能只是建议客户端将发送的消息保存在此处。

\Trash This mailbox is used to hold messages that have been deleted or marked for deletion. In some server implementations, this might be a virtual mailbox, containing messages from other mailboxes

\垃圾箱此邮箱用于保存已删除或标记为删除的邮件。在某些服务器实现中,这可能是一个虚拟邮箱,包含来自其他邮箱的邮件

that are marked with the "\Deleted" message flag. Alternatively, this might just be advice that a client that chooses not to use the IMAP "\Deleted" model should use this as its trash location. In server implementations that strictly expect the IMAP "\Deleted" model, this special use is likely not to be supported.

用“\Deleted”消息标志标记的。或者,这可能只是建议选择不使用IMAP“\Deleted”模型的客户端将其用作垃圾箱位置。在严格要求使用IMAP“\Deleted”模型的服务器实现中,可能不支持这种特殊用途。

All of the above attributes are OPTIONAL, and any given server or message store may support any combination of the attributes, or none at all. In most cases, there will likely be at most one mailbox with a given attribute for a given user, but in some server or message store implementations it might be possible for multiple mailboxes to have the same special-use attribute.

以上所有属性都是可选的,任何给定的服务器或消息存储都可能支持这些属性的任意组合,或者根本不支持。在大多数情况下,对于给定用户,最多可能有一个邮箱具有给定属性,但在某些服务器或邮件存储实现中,多个邮箱可能具有相同的特殊用途属性。

Special-use attributes are likely to be user-specific. User Adam might share his \Sent mailbox with user Barb, but that mailbox is unlikely to also serve as Barb's \Sent mailbox. It's certainly possible for Adam and Barb to each set the \Sent use on the same mailbox, but that would be done by specific action (see the sections below).

特殊用途属性可能是特定于用户的。用户Adam可能与用户Barb共享其\Sent邮箱,但该邮箱不太可能同时用作Barb的\Sent邮箱。Adam和Barb当然可以在同一个邮箱上设置\Sent的使用,但这将通过特定的操作来完成(请参见下面的部分)。

3. Extension to IMAP CREATE Command to Set Special-Use Attributes
3. IMAP CREATE命令的扩展,用于设置特殊用途属性

As an OPTIONAL feature, a server MAY allow clients to designate a mailbox, at creation, as having one or more special uses. This extension defines the "USE" parameter to the IMAP CREATE command for that purpose (using the syntax defined in RFC 4466 section 2.2 [RFC4466]). The new OPTIONAL "USE" parameter is followed by a parenthesized list of zero or more special-use attributes, as defined above.

作为可选功能,服务器可以允许客户端在创建邮箱时将其指定为具有一个或多个特殊用途。此扩展为IMAP CREATE命令定义了“USE”参数(使用RFC 4466第2.2节[RFC4466]中定义的语法)。新的可选“USE”参数后面是一个括号列表,其中包含零个或多个特殊用途属性,如上所述。

In some server implementations, some special uses may imply automatic action by the server. For example, creation of a "\Junk" mailbox might cause the server to start placing messages that have been evaluated as spam into the mailbox.

在某些服务器实现中,某些特殊用途可能意味着服务器自动执行操作。例如,创建“\Junk”邮箱可能会导致服务器开始将评估为垃圾邮件的邮件放入邮箱。

In some server implementations, some special uses may result in a mailbox with unusual characteristics or side effects. For example, creation of an "\All" mailbox might cause the server to create a virtual mailbox, rather than a standard one, and that mailbox might behave in unexpected ways (COPY into it might fail, for example).

在某些服务器实现中,某些特殊用途可能导致邮箱具有不寻常的特性或副作用。例如,创建“\All”邮箱可能会导致服务器创建虚拟邮箱,而不是标准邮箱,并且该邮箱可能会以意外方式运行(例如,复制到该邮箱可能会失败)。

Servers MAY allow the creation of a special-use mailbox even if one so designated already exists. This might have the effect of moving the special use from the old mailbox to the new one, or might create multiple mailboxes with the same special use. Alternatively, servers MAY refuse the creation, considering the designation to be a conflict.

服务器可能允许创建特殊用途邮箱,即使这样指定的邮箱已经存在。这可能会产生将特殊用途从旧邮箱移动到新邮箱的效果,或者可能会创建具有相同特殊用途的多个邮箱。或者,考虑到指定冲突,服务器可能会拒绝创建。

If the server cannot create a mailbox with the designated special use defined, for whatever reason, it MUST NOT create the mailbox, and MUST respond to the CREATE command with a tagged NO response. If the reason for the failure is related to the special-use attribute (the specified special use is not supported or cannot be assigned to the specified mailbox), the server SHOULD include the new "USEATTR" response code in the tagged response (see Section 5.3 for an example).

如果服务器无法创建定义了指定特殊用途的邮箱,无论出于何种原因,它都不能创建邮箱,并且必须以标记的“无响应”响应create命令。如果故障原因与特殊用途属性有关(指定的特殊用途不受支持或无法分配给指定邮箱),则服务器应在标记的响应中包含新的“USEATTR”响应代码(示例请参见第5.3节)。

An IMAP server that supports this OPTIONAL feature will advertise the "CREATE-SPECIAL-USE" capability string. Clients MUST NOT use the "USE" parameter unless the server advertises the capability. Note that this capability string is different from the "SPECIAL-USE" string defined above, and a server that supports both functions MUST advertise both capability strings.

支持此可选功能的IMAP服务器将公布“CREATE-SPECIAL-USE”功能字符串。除非服务器宣传该功能,否则客户端不得使用“use”参数。请注意,此功能字符串不同于上面定义的“特殊用途”字符串,并且支持这两个功能的服务器必须公布这两个功能字符串。

4. IMAP METADATA Entry for Special-Use Attributes
4. 特殊用途属性的IMAP元数据条目

If a server supports this extension and the METADATA extension [RFC5464], it SHOULD tie the special-use attributes for a mailbox to its metadata entry "/private/specialuse". The value of /private/ specialuse is either NIL (if there are no special-use attributes for that mailbox) or a space-separated list of special-use attributes, presented the same way they would be presented in the LIST command response.

如果服务器支持此扩展和元数据扩展[RFC5464],则应将邮箱的特殊用途属性与其元数据条目“/private/specialuse”绑定。/private/specialuse的值要么为NIL(如果该邮箱没有特殊用途属性),要么为特殊用途属性的空格分隔列表,显示方式与列表命令响应中的显示方式相同。

Such a server MAY allow the setting of special-use attributes through the METADATA mechanisms, thereby allowing clients to change the special uses of existing mailboxes. These changes might have side effects, as the server automatically adjusts the special uses accordingly, just as it might do with CREATE USE, above. See Section 5.4 for an example.

这样的服务器可以允许通过元数据机制设置特殊用途属性,从而允许客户端更改现有邮箱的特殊用途。这些更改可能会产生副作用,因为服务器会相应地自动调整特殊用途,就像上面的创建用途一样。有关示例,请参见第5.4节。

A server that supports this MUST check the validity of changes to the special-use attributes that are done through the metadata in the same way that it checks validity for the CREATE command and for any internal mechanisms for setting special uses on mailboxes. It MUST NOT just blindly accept setting of these metadata by clients, which might result in the setting of special uses that the implementation does not support, multiple mailboxes with the same special use, or other situations that the implementation considers invalid.

支持此功能的服务器必须检查通过元数据对特殊用途属性所做更改的有效性,其方法与检查CREATE命令和用于设置邮箱特殊用途的任何内部机制的有效性相同。它不能盲目接受客户端对这些元数据的设置,这可能会导致设置实现不支持的特殊用途、具有相同特殊用途的多个邮箱,或者实现认为无效的其他情况。

5. Examples
5. 例子
5.1. Example of an IMAP LIST Command
5.1. IMAP LIST命令的示例

This example shows an IMAP LIST response from a server that supports this extension. Note that not all of the attributes are used. This server also supports the Child Mailbox extension [RFC3348].

此示例显示了来自支持此扩展的服务器的IMAP列表响应。请注意,并非所有属性都被使用。此服务器还支持子邮箱扩展[RFC3348]。

     C: t1 LIST "" "%"
     S: * LIST (\Marked \HasNoChildren) "/" Inbox
     S: * LIST (\HasNoChildren) "/" ToDo
     S: * LIST (\HasChildren) "/" Projects
     S: * LIST (\Sent \HasNoChildren) "/" SentMail
     S: * LIST (\Marked \Drafts \HasNoChildren) "/" MyDrafts
     S: * LIST (\Trash \HasNoChildren) "/" Trash
     S: t1 OK done
        
     C: t1 LIST "" "%"
     S: * LIST (\Marked \HasNoChildren) "/" Inbox
     S: * LIST (\HasNoChildren) "/" ToDo
     S: * LIST (\HasChildren) "/" Projects
     S: * LIST (\Sent \HasNoChildren) "/" SentMail
     S: * LIST (\Marked \Drafts \HasNoChildren) "/" MyDrafts
     S: * LIST (\Trash \HasNoChildren) "/" Trash
     S: t1 OK done
        
5.2. Example of an Extended IMAP LIST Command
5.2. 扩展IMAP LIST命令的示例

This example shows an IMAP LIST response from a server that supports this extension. The client uses the extended IMAP LIST command.

此示例显示了来自支持此扩展的服务器的IMAP列表响应。客户端使用扩展IMAP LIST命令。

     C: t1 CAPABILITY
     S: * CAPABILITY IMAP4rev1 SPECIAL-USE
     S: t1 OK done
        
     C: t1 CAPABILITY
     S: * CAPABILITY IMAP4rev1 SPECIAL-USE
     S: t1 OK done
        
     C: t2 LIST "" "%" RETURN (SPECIAL-USE)
     S: * LIST (\Marked) "/" Inbox
     S: * LIST () "/" ToDo
     S: * LIST () "/" Projects
     S: * LIST (\Sent) "/" SentMail
     S: * LIST (\Marked \Drafts) "/" MyDrafts
     S: * LIST (\Trash) "/" Trash
     S: t2 OK done
        
     C: t2 LIST "" "%" RETURN (SPECIAL-USE)
     S: * LIST (\Marked) "/" Inbox
     S: * LIST () "/" ToDo
     S: * LIST () "/" Projects
     S: * LIST (\Sent) "/" SentMail
     S: * LIST (\Marked \Drafts) "/" MyDrafts
     S: * LIST (\Trash) "/" Trash
     S: t2 OK done
        

Here, the client also includes the "SPECIAL-USE" selection option for the same list. The "SPECIAL-USE" return option could also have been specified, but it is unnecessary, as it is implied by the selection option. Note that in this case, mailboxes that do not have a special-use attribute are not listed. Also note that we've used the wildcard "*", rather than "%", to make sure we see all special-use mailboxes, even ones that might not be at the namespace's root.

这里,客户机还包括同一列表的“特殊用途”选择选项。还可以指定“特殊用途”返回选项,但这是不必要的,因为选择选项暗示了这一点。请注意,在这种情况下,不列出没有特殊用途属性的邮箱。还请注意,我们使用了通配符“*”,而不是“%”,以确保看到所有特殊用途邮箱,即使这些邮箱可能不在名称空间的根目录下。

     C: t3 LIST (SPECIAL-USE) "" "*"
     S: * LIST (\Sent) "/" SentMail
     S: * LIST (\Marked \Drafts) "/" MyDrafts
     S: * LIST (\Trash) "/" Trash
     S: t3 OK done
        
     C: t3 LIST (SPECIAL-USE) "" "*"
     S: * LIST (\Sent) "/" SentMail
     S: * LIST (\Marked \Drafts) "/" MyDrafts
     S: * LIST (\Trash) "/" Trash
     S: t3 OK done
        
5.3. Example of an IMAP CREATE Command
5.3. IMAP CREATE命令的示例

This example shows an IMAP CREATE command that might be used to create a mailbox designated to hold draft and sent messages. It also attempts to create a mailbox that will contain all the user's messages, but the server does not support that special use for this user's message store.

此示例显示一个IMAP CREATE命令,该命令可用于创建指定用于保存草稿和已发送邮件的邮箱。它还尝试创建一个包含所有用户邮件的邮箱,但服务器不支持此用户邮件存储的特殊用途。

     C: t1 CAPABILITY
     S: * CAPABILITY IMAP4rev1 CREATE-SPECIAL-USE
     S: t1 OK done
        
     C: t1 CAPABILITY
     S: * CAPABILITY IMAP4rev1 CREATE-SPECIAL-USE
     S: t1 OK done
        
     C: t2 CREATE MySpecial (USE (\Drafts \Sent))
     S: t2 OK MySpecial created
        
     C: t2 CREATE MySpecial (USE (\Drafts \Sent))
     S: t2 OK MySpecial created
        
     C: t3 CREATE Everything (USE (\All))
     S: t3 NO [USEATTR] \All not supported
        
     C: t3 CREATE Everything (USE (\All))
     S: t3 NO [USEATTR] \All not supported
        

5.4. Example of Using IMAP METADATA to Manipulate Special-Use Attributes

5.4. 使用IMAP元数据操作特殊用途属性的示例

This example shows how IMAP METADATA can be used to manipulate special-use attributes, if the operation is supported on the server.

此示例显示了如果服务器上支持此操作,如何使用IMAP元数据操纵特殊用途属性。

     ==> Starting point:
     C: t1 LIST "" "%" RETURN (SPECIAL-USE)
     S: * LIST (\Sent) "/" SentMail
     S: * LIST (\Drafts) "/" MyDrafts
     S: * LIST () "/" SavedDrafts
     S: * LIST (\Trash) "/" Trash
     S: t1 OK done
        
     ==> Starting point:
     C: t1 LIST "" "%" RETURN (SPECIAL-USE)
     S: * LIST (\Sent) "/" SentMail
     S: * LIST (\Drafts) "/" MyDrafts
     S: * LIST () "/" SavedDrafts
     S: * LIST (\Trash) "/" Trash
     S: t1 OK done
        
     ==> Demonstrate the connection:
     C: t2 GETMETADATA "MyDrafts" /private/specialuse
     S: * METADATA "MyDrafts" (/private/specialuse "\\Drafts")
     S: t2 OK done
        
     ==> Demonstrate the connection:
     C: t2 GETMETADATA "MyDrafts" /private/specialuse
     S: * METADATA "MyDrafts" (/private/specialuse "\\Drafts")
     S: t2 OK done
        
     ==> Set new use for SavedDrafts; MyDrafts changes automatically:
     C: t3 SETMETADATA "SavedDrafts" (/private/specialuse "\\Drafts")
     S: * METADATA "MyDrafts" (/private/specialuse NIL)
     S: t3 OK SETMETADATA complete
        
     ==> Set new use for SavedDrafts; MyDrafts changes automatically:
     C: t3 SETMETADATA "SavedDrafts" (/private/specialuse "\\Drafts")
     S: * METADATA "MyDrafts" (/private/specialuse NIL)
     S: t3 OK SETMETADATA complete
        
     ==> Remove special use for SentMail:
     C: t4 SETMETADATA "SentMail" (/private/specialuse NIL)
     S: t4 OK SETMETADATA complete
        
     ==> Remove special use for SentMail:
     C: t4 SETMETADATA "SentMail" (/private/specialuse NIL)
     S: t4 OK SETMETADATA complete
        
     ==> Check the results:
     C: t5 LIST "" "%" RETURN (SPECIAL-USE)
     S: * LIST () "/" SentMail
     S: * LIST () "/" MyDrafts
     S: * LIST (\Drafts) "/" SavedDrafts
     S: * LIST (\Trash) "/" Trash
     S: t5 OK done
        
     ==> Check the results:
     C: t5 LIST "" "%" RETURN (SPECIAL-USE)
     S: * LIST () "/" SentMail
     S: * LIST () "/" MyDrafts
     S: * LIST (\Drafts) "/" SavedDrafts
     S: * LIST (\Trash) "/" Trash
     S: t5 OK done
        
6. Formal Syntax
6. 形式语法

The following syntax specification uses the augmented Backus-Naur Form (BNF) as described in [RFC5234].

以下语法规范使用[RFC5234]中所述的增广巴科斯诺尔形式(BNF)。

   create-param   =/  "USE" SP "(" [use-attr *(SP use-attr)] ")"
                    ; Extends "create-param" from RFC 4466 [RFC4466]
        
   create-param   =/  "USE" SP "(" [use-attr *(SP use-attr)] ")"
                    ; Extends "create-param" from RFC 4466 [RFC4466]
        

mbx-list-oflag =/ use-attr ; Extends "mbx-list-oflag" from IMAP base [RFC3501]

mbx LAG列表=/使用属性;从IMAP基扩展“mbx标签列表”[RFC3501]

list-select-independent-opt =/ "SPECIAL-USE" ; Extends "list-select-independent-opt" from ; LIST-extended [RFC5258]

列表选择独立选项=/“特殊用途”;从扩展“列表选择独立选项”;扩展列表[RFC5258]

return-option =/ "SPECIAL-USE" ; Extends "return-option" from ; LIST-extended [RFC5258]

返回选项=/“特殊用途”;将“返回选项”从;扩展列表[RFC5258]

resp-text-code =/ "USEATTR" ; Extends "resp-text-code" from ; IMAP [RFC3501]

resp文本代码=/“USEATTR”;将“resp文本代码”从扩展;IMAP[RFC3501]

   use-attr        =  "\All" / "\Archive" / "\Drafts" / "\Flagged" /
                    "\Junk" / "\Sent" / "\Trash" / use-attr-ext
        
   use-attr        =  "\All" / "\Archive" / "\Drafts" / "\Flagged" /
                    "\Junk" / "\Sent" / "\Trash" / use-attr-ext
        
   use-attr-ext    =  "\" atom
                    ; Reserved for future extensions.  Clients
                    ; MUST ignore list attributes they do not understand
                    ; Server implementations MUST NOT generate
                    ; extension attributes except as defined by
                    ; future Standards-Track revisions of or
                    ; extensions to this specification.
        
   use-attr-ext    =  "\" atom
                    ; Reserved for future extensions.  Clients
                    ; MUST ignore list attributes they do not understand
                    ; Server implementations MUST NOT generate
                    ; extension attributes except as defined by
                    ; future Standards-Track revisions of or
                    ; extensions to this specification.
        
7. Security Considerations
7. 安全考虑

LIST response: Conveying special-use information to a client exposes a small bit of extra information that could be of value to an attacker. Knowing, for example, that a particular mailbox (\All) contains pointers to

列表响应:将特殊用途信息传送到客户端会暴露一些额外信息,这些信息可能对攻击者有价值。例如,知道特定邮箱(\All)包含指向

every message the user has might be of particular value. If the IMAP channel is not protected from passive eavesdropping, this could be an issue.

用户收到的每一条消息都可能具有特殊的价值。如果IMAP通道没有受到被动窃听的保护,这可能是一个问题。

CREATE command "USE" parameter and metadata extension: In some server implementations, some special uses may imply automatic action by the server. For example, creation of a "\Junk" mailbox might cause the server to start placing messages that have been evaluated as spam into the mailbox. Implementors SHOULD consider the consequences of allowing a user (or client program) to designate the target of such automatic action.

创建命令“USE”参数和元数据扩展:在某些服务器实现中,某些特殊用途可能意味着服务器自动执行操作。例如,创建“\Junk”邮箱可能会导致服务器开始将评估为垃圾邮件的邮件放入邮箱。实现者应该考虑允许用户(或客户端程序)指定这种自动动作的目标的后果。

Example: If a user is allowed to give the "\Junk" attribute to a shared mailbox, legitimate mail that's misclassified as junk (false positives) will be put into that shared mailbox, exposing the user's private mail to others. The server might warn a user of that possibility, or might refuse to allow the specification to be made on a shared mailbox. (Note that this problem exists independent of this specification, if the server allows a user to share a mailbox that's already in use for such a function.)

示例:如果允许用户为共享邮箱指定“\Junk”属性,则误分类为垃圾邮件(误报)的合法邮件将被放入该共享邮箱,从而将用户的私人邮件公开给其他人。服务器可能会警告用户这种可能性,或者可能会拒绝允许对共享邮箱进行规范。(请注意,如果服务器允许用户共享已用于此功能的邮箱,则此问题的存在与此规范无关。)

8. IANA Considerations
8. IANA考虑
8.1. Registration of USEATTR IMAP Response Code
8.1. 注册USEATTR IMAP响应代码

This document defines a new IMAP response code, "USEATTR", which IANA added to the IMAP Response Codes registry.

本文档定义了一个新的IMAP响应代码“USEATTR”,IANA将其添加到IMAP响应代码注册表中。

8.2. Registration of CREATE-SPECIAL-USE IMAP Capability
8.2. 注册创建专用IMAP功能

This document defines a new IMAP capability, "CREATE-SPECIAL-USE", which IANA added to the IMAP 4 Capabilities registry.

本文档定义了一个新的IMAP功能“CREATE-SPECIAL-USE”,IANA将其添加到IMAP 4功能注册表中。

8.3. Registration of SPECIAL-USE IMAP Capability
8.3. 专用IMAP功能的注册

This document defines a new IMAP capability, "SPECIAL-USE", which IANA added to the IMAP 4 Capabilities registry.

本文档定义了一个新的IMAP功能“特殊用途”,IANA将其添加到IMAP 4功能注册表中。

8.4. Registration of SPECIAL-USE Selection Option
8.4. 特殊用途选择权的登记

This document defines a new IMAP4 List Extended selection option, "SPECIAL-USE", which IANA added to the IMAP4 List Extended registry, as follows:

本文档定义了一个新的IMAP4列表扩展选择选项“特殊用途”,IANA将其添加到IMAP4列表扩展注册表中,如下所示:

To: iana@iana.org Subject: Registration of LIST-EXTENDED selection option SPECIAL-USE LIST-EXTENDED option name: SPECIAL-USE LIST-EXTENDED option type: SELECTION

致:iana@iana.org主题:列表扩展选项注册专用列表扩展选项名称:专用列表扩展选项类型:选择

Implied return option(s): SPECIAL-USE LIST-EXTENDED option description: Limit the list to special-use mailboxes only Published specification: RFC 6154 Security considerations: none Intended usage: COMMON Person and email address to contact for further information: Authors' Addresses at the end of RFC 6154 Owner/Change controller: iesg@ietf.org

隐含返回选项:特殊用途列表-扩展选项描述:仅将列表限制为特殊用途邮箱发布规范:RFC 6154安全注意事项:无预期用途:普通人和联系电子邮件地址以获取更多信息:RFC 6154所有者/变更控制者末尾的作者地址:iesg@ietf.org

8.5. Registration of SPECIAL-USE Return Option
8.5. 特殊用途归还选择权的登记

This document defines a new IMAP4 List Extended return option, "SPECIAL-USE", which IANA added to the IMAP4 List Extended registry, as follows:

本文档定义了一个新的IMAP4列表扩展返回选项“SPECIAL-USE”,IANA将其添加到IMAP4列表扩展注册表中,如下所示:

To: iana@iana.org Subject: Registration of LIST-EXTENDED return option SPECIAL-USE LIST-EXTENDED option name: SPECIAL-USE LIST-EXTENDED option type: RETURN LIST-EXTENDED option description: Request special-use mailbox information Published specification: RFC 6154 Security considerations: none Intended usage: COMMON Person and email address to contact for further information: Authors' Addresses at the end of RFC 6154 Owner/Change controller: iesg@ietf.org

致:iana@iana.org主题:注册列表-扩展返回选项特殊用途列表-扩展选项名称:特殊用途列表-扩展选项类型:返回列表-扩展选项说明:请求特殊用途邮箱信息发布规范:RFC 6154安全注意事项:无预期用途:普通人和电子邮件地址更多信息请联系:RFC 6154结尾处的作者地址所有者/变更控制者:iesg@ietf.org

8.6. Registration of SPECIAL-USE Metadata
8.6. 特殊用途元数据的登记

This document defines a new IMAP METADATA entry. IANA added the following to the IMAP METADATA Mailbox Entry registry:

此文档定义了一个新的IMAP元数据条目。IANA将以下内容添加到IMAP元数据邮箱条目注册表:

   To: iana@iana.org
   Subject: IMAP METADATA Entry Registration
   Type: Mailbox
   Name: /private/specialuse
   Description: Defines any special-use features of a mailbox.  See the
   reference specification for details of its use.
   Content-type: text/plain; charset=us-ascii
   RFC Number: RFC 6154
   Contact: MORG mailing list mailto:morg@ietf.org
        
   To: iana@iana.org
   Subject: IMAP METADATA Entry Registration
   Type: Mailbox
   Name: /private/specialuse
   Description: Defines any special-use features of a mailbox.  See the
   reference specification for details of its use.
   Content-type: text/plain; charset=us-ascii
   RFC Number: RFC 6154
   Contact: MORG mailing list mailto:morg@ietf.org
        
9. References
9. 工具书类
9.1. Normative References
9.1. 规范性引用文件

[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月。

[RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, March 2003.

[RFC3501]Crispin,M.,“互联网消息访问协议-版本4rev1”,RFC 35012003年3月。

[RFC4466] Melnikov, A. and C. Daboo, "Collected Extensions to IMAP4 ABNF", RFC 4466, April 2006.

[RFC4466]Melnikov,A.和C.Daboo,“IMAP4 ABNF的收集扩展”,RFC4466,2006年4月。

[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008.

[RFC5234]Crocker,D.和P.Overell,“语法规范的扩充BNF:ABNF”,STD 68,RFC 5234,2008年1月。

[RFC5258] Leiba, B. and A. Melnikov, "Internet Message Access Protocol version 4 - LIST Command Extensions", RFC 5258, June 2008.

[RFC5258]Leiba,B.和A.Melnikov,“互联网消息访问协议第4版-列表命令扩展”,RFC 5258,2008年6月。

[RFC5464] Daboo, C., "The IMAP METADATA Extension", RFC 5464, February 2009.

[RFC5464]Daboo,C.,“IMAP元数据扩展”,RFC 5464,2009年2月。

9.2. Informative References
9.2. 资料性引用

[RFC3348] Gahrns, M. and R. Cheng, "The Internet Message Action Protocol (IMAP4) Child Mailbox Extension", RFC 3348, July 2002.

[RFC3348] Gahrns, M. and R. Cheng, "The Internet Message Action Protocol (IMAP4) Child Mailbox Extension", RFC 3348, July 2002.translate error, please retry

Authors' Addresses

作者地址

Barry Leiba Huawei Technologies

巴里·雷巴华为技术有限公司

   Phone: +1 646 827 0648
   EMail: barryleiba@computer.org
   URI:   http://internetmessagingtechnology.org/
        
   Phone: +1 646 827 0648
   EMail: barryleiba@computer.org
   URI:   http://internetmessagingtechnology.org/
        

Jamie Nicolson Google

杰米·尼科尔森谷歌

   EMail: nicolson@google.com
        
   EMail: nicolson@google.com