Internet Engineering Task Force (IETF) J. SrimushnamBoovaraghamoorthy Request for Comments: 7889 N. Bisht Category: Standards Track Samsung Electronics America ISSN: 2070-1721 May 2016
Internet Engineering Task Force (IETF) J. SrimushnamBoovaraghamoorthy Request for Comments: 7889 N. Bisht Category: Standards Track Samsung Electronics America ISSN: 2070-1721 May 2016
The IMAP APPENDLIMIT Extension
IMAP追加限制扩展
Abstract
摘要
This document defines an extension to the IMAP service whereby a server can inform the client about maximum message upload sizes, allowing the client to avoid sending APPEND commands that will fail because the messages are too large.
本文档定义了IMAP服务的一个扩展,通过该扩展,服务器可以通知客户端最大的消息上载大小,从而允许客户端避免发送由于消息太大而失败的APPEND命令。
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/rfc7889.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7889.
Copyright Notice
版权公告
Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved.
版权所有(c)2016 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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Conventions . . . . . . . . . . . . . . . . . . . . . . . 2 2. APPENDLIMIT Extension . . . . . . . . . . . . . . . . . . . . 3 3. Mailbox-Specific APPENDLIMIT . . . . . . . . . . . . . . . . 3 3.1. STATUS Response to the STATUS Command . . . . . . . . . . 4 3.2. STATUS Response to the LIST Command . . . . . . . . . . . 4 3.3. APPENDLIMIT Behavior . . . . . . . . . . . . . . . . . . 4 4. APPEND Response . . . . . . . . . . . . . . . . . . . . . . . 4 5. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 5 6. Security Considerations . . . . . . . . . . . . . . . . . . . 5 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 8.1. Normative References . . . . . . . . . . . . . . . . . . 6 8.2. Informative References . . . . . . . . . . . . . . . . . 6 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 7 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Conventions . . . . . . . . . . . . . . . . . . . . . . . 2 2. APPENDLIMIT Extension . . . . . . . . . . . . . . . . . . . . 3 3. Mailbox-Specific APPENDLIMIT . . . . . . . . . . . . . . . . 3 3.1. STATUS Response to the STATUS Command . . . . . . . . . . 4 3.2. STATUS Response to the LIST Command . . . . . . . . . . . 4 3.3. APPENDLIMIT Behavior . . . . . . . . . . . . . . . . . . 4 4. APPEND Response . . . . . . . . . . . . . . . . . . . . . . . 4 5. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 5 6. Security Considerations . . . . . . . . . . . . . . . . . . . 5 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 8.1. Normative References . . . . . . . . . . . . . . . . . . 6 8.2. Informative References . . . . . . . . . . . . . . . . . 6 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 7 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7
Some IMAP servers have limits for message upload size, and those limits are not published to the email client. When the email client APPENDs a message with huge attachments, using non-synchronizing literals, the APPEND fails because of the upload limit, but the client has already sent the message data anyway. This results in unnecessary resource usage. Especially in the mobile device environment, appending a message with huge attachments consumes device resources like device battery power and mobile data.
某些IMAP服务器对邮件上载大小有限制,这些限制不会发布到电子邮件客户端。当电子邮件客户端使用非同步文本追加带有大量附件的邮件时,由于上载限制,追加会失败,但客户端已经发送了邮件数据。这会导致不必要的资源使用。特别是在移动设备环境中,添加带有巨大附件的消息会消耗设备资源,如设备电池电量和移动数据。
The IMAP APPENDLIMIT extension provides the ability to advertise a maximum upload size allowed by the IMAP server, so that the email client knows the size limitation beforehand. By implementing this extension, IMAP server-side processing of huge attachments above the maximum upload size can be avoided.
IMAP APPENDLIMIT扩展可以公布IMAP服务器允许的最大上载大小,以便电子邮件客户端事先知道大小限制。通过实现此扩展,可以避免IMAP服务器端处理超过最大上载大小的大型附件。
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 [RFC2119].
本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[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:”标签适用于多行,则这些行之间的换行符仅用于编辑清晰性,不属于实际协议交换的一部分。
An IMAP server that supports the APPENDLIMIT extension advertises this by including the name APPENDLIMIT in its capability list in the authenticated state. The server may also advertise this extension before the user has logged in. If this capability is omitted, no information is conveyed about the server's fixed maximum size for mail uploads. An IMAP server can publish the APPENDLIMIT capability in two formats.
支持APPENDLIMIT扩展的IMAP服务器通过将名称APPENDLIMIT包含在其处于已验证状态的功能列表中来播发此扩展。服务器也可以在用户登录之前播发此扩展。如果省略此功能,则不会传递有关服务器邮件上载的固定最大大小的信息。IMAP服务器可以以两种格式发布APPENDLIMIT功能。
(a) APPENDLIMIT=<number>
(a) APPENDLIMIT=<number>
This indicates that the IMAP server has the same upload limit for all mailboxes. The following example demonstrates the APPENDLIMIT capability with the same upload limit for all mailboxes.
这表示IMAP服务器对所有邮箱具有相同的上载限制。以下示例演示了APPENDLIMIT功能,所有邮箱的上载限制相同。
C: t1 CAPABILITY S: * CAPABILITY IMAP4rev1 ID APPENDLIMIT=257890 S: t1 OK foo
C: t1 CAPABILITY S: * CAPABILITY IMAP4rev1 ID APPENDLIMIT=257890 S: t1 OK foo
(b) APPENDLIMIT
(b) 附加限制
The APPENDLIMIT capability without any value indicates that the IMAP server supports this extension, and that the client will need to discover upload limits for each mailbox, as they might differ from mailbox to mailbox. The following example demonstrates the APPENDLIMIT capability without any value.
没有任何值的APPENDLIMIT功能表示IMAP服务器支持此扩展,并且客户端需要发现每个邮箱的上载限制,因为每个邮箱的上载限制可能不同。下面的示例演示不带任何值的APPENDLIMIT功能。
C: t1 CAPABILITY S: * CAPABILITY IMAP4rev1 ID APPENDLIMIT S: t1 OK foo
C: t1 CAPABILITY S: * CAPABILITY IMAP4rev1 ID APPENDLIMIT S: t1 OK foo
In this case, the client can get an APPENDLIMIT value by either issuing a STATUS or a LIST command.
在这种情况下,客户端可以通过发出STATUS或LIST命令来获取APPENDLIMIT值。
An IMAP client implementing this extension should be able to parse both mailbox-specific and global APPENDLIMIT responses. By looking at the upload size advertised by the IMAP server, a client can avoid trying to APPEND mail more than the advertised limit.
实现此扩展的IMAP客户端应该能够解析邮箱特定和全局APPENDLIMIT响应。通过查看IMAP服务器公布的上载大小,客户机可以避免尝试追加超过公布限制的邮件。
An IMAP server can have mailbox-specific APPENDLIMIT values that will not be advertised as part of the CAPABILITY response. The IMAP server can publish specific values for each mailbox, and it can publish "NIL" for a mailbox to convey that there is no APPENDLIMIT for that mailbox. The following subsections describe the changes to the STATUS and LIST commands in support of this situation.
IMAP服务器可以具有特定于邮箱的APPENDLIMIT值,这些值不会作为功能响应的一部分发布。IMAP服务器可以为每个邮箱发布特定的值,并且可以为邮箱发布“NIL”,以表示该邮箱没有附加限制。以下小节描述了支持这种情况的状态和列表命令的更改。
A new attribute APPENDLIMIT is added to get the limit set by the server for a mailbox as part of a STATUS command. An IMAP client should issue a STATUS command with an APPENDLIMIT item to get the mailbox-specific upload value. The following example demonstrates its usage.
添加了一个新属性APPENDLIMIT,以获取服务器为邮箱设置的限制,作为STATUS命令的一部分。IMAP客户端应发出带有APPENDLIMIT项的STATUS命令,以获取邮箱特定的上载值。下面的示例演示了它的用法。
C: t1 STATUS INBOX (APPENDLIMIT) S: * STATUS INBOX (APPENDLIMIT 257890) S: t1 OK STATUS completed
C: t1 STATUS INBOX (APPENDLIMIT) S: * STATUS INBOX (APPENDLIMIT 257890) S: t1 OK STATUS completed
In the above example, APPENDLIMIT represents the maximum upload size for INBOX.
在上面的示例中,APPENDLIMIT表示收件箱的最大上载大小。
If the server advertises the LIST-STATUS capability [RFC5819], the client can issue a LIST command in combination with the STATUS return option to get the mailbox-specific upload value. The following example demonstrates its usage.
如果服务器播发LIST-STATUS功能[RFC5819],则客户端可以发出LIST命令并结合STATUS return选项来获取邮箱特定的上载值。下面的示例演示了它的用法。
C: t1 LIST "" % RETURN (STATUS (APPENDLIMIT)) S: * LIST () "." "INBOX" S: * STATUS "INBOX" (APPENDLIMIT 257890) S: t1 OK List completed.
C: t1 LIST "" % RETURN (STATUS (APPENDLIMIT)) S: * LIST () "." "INBOX" S: * STATUS "INBOX" (APPENDLIMIT 257890) S: t1 OK List completed.
The IMAP server MUST recognize the APPENDLIMIT attribute and include an appropriate STATUS response for each matching mailbox. Refer to Section 5 for the syntax.
IMAP服务器必须识别APPENDLIMIT属性,并为每个匹配的邮箱包含适当的状态响应。有关语法,请参阅第5节。
If the server does not support the STATUS return option on the LIST command, then the client should use the STATUS command instead.
如果服务器不支持LIST命令上的STATUS return选项,则客户端应改用STATUS命令。
Computing the APPENDLIMIT should be fast and should not take Access Control Lists (ACLs), quotas, or other such information into account. The APPENDLIMIT specifies one part of the policy, but an APPEND command can still fail due to issues related to ACLs and quotas, even if the message being appended is smaller than the APPENDLIMIT.
计算APPENDLIMIT应该很快,并且不应该考虑访问控制列表(ACL)、配额或其他此类信息。APPENDLIMIT指定了策略的一部分,但由于ACL和配额相关的问题,APPEND命令仍然可能失败,即使要追加的消息小于APPENDLIMIT。
If a client uploads a message that exceeds the maximum upload size set for that mailbox, then the server SHALL reject the APPEND command with a tagged TOOBIG response code. Refer to Section 4 of [RFC4469] for various APPEND response codes and their handling.
如果客户端上载的邮件超过了为该邮箱设置的最大上载大小,则服务器应拒绝带有标记的TOOBIG响应代码的APPEND命令。有关各种追加响应代码及其处理,请参阅[RFC4469]第4节。
A client SHOULD avoid use of non-synchronizing literals [RFC7888] when the maximum upload size supported by the IMAP server is unknown. Refer to Section 4.2.2.3 of [RFC4549] for usage of non-synchronizing literals and its risk for disconnected IMAP clients.
当IMAP服务器支持的最大上载大小未知时,客户端应避免使用非同步文本[RFC7888]。请参阅[RFC4549]的第4.2.2.3节,了解非同步文字的使用及其对断开连接的IMAP客户端的风险。
The following syntax specification uses the Augmented Backus-Naur Form (ABNF) notation as specified in [RFC5234] including the core rules in Appendix B.1 of that document. [RFC3501] defines the non-terminals "capability" and "status-att", and [RFC4466] defines "status-att-val".
以下语法规范使用[RFC5234]中规定的增广巴科斯诺尔形式(ABNF)符号,包括该文件附录B.1中的核心规则。[RFC3501]定义了非终端的“能力”和“状态att”,而[RFC4466]定义了“状态att val”。
All alphabetic characters are case insensitive. The use of uppercase or lowercase characters to define token strings is for editorial clarity only. Implementations MUST accept these strings in a case-insensitive fashion.
所有字母字符都不区分大小写。使用大写或小写字符定义标记字符串仅用于编辑清晰性。实现必须以不区分大小写的方式接受这些字符串。
capability =/ "APPENDLIMIT" ["=" number] ;; capability is defined in RFC 3501
capability =/ "APPENDLIMIT" ["=" number] ;; capability is defined in RFC 3501
status-att =/ "APPENDLIMIT" ;; status-att is defined in RFC 3501
status-att =/ "APPENDLIMIT" ;; status-att is defined in RFC 3501
status-att-val =/ "APPENDLIMIT" SP (number / nil) ;; status-att-val is defined in RFC 4466
status-att-val =/ "APPENDLIMIT" SP (number / nil) ;; status-att-val is defined in RFC 4466
The number indicates the fixed maximum message size in octets that the server will accept. An APPENDLIMIT number of 0 indicates the server will not accept any APPEND commands at all for the affected mailboxes.
该数字表示服务器将接受的固定最大消息大小(以八位字节为单位)。APPENDLIMIT数为0表示服务器根本不接受受影响邮箱的任何APPEND命令。
This extension provides additional information that cooperative clients can use as an optimization and does not introduce new security concerns. This extension does not address abusive clients that intend to consume server resources, and servers will still have to take action to disconnect and/or restrict access to clients that exhibit abusive behavior.
此扩展提供了其他信息,协作客户端可以将这些信息用作优化,并且不会引入新的安全问题。此扩展不处理打算使用服务器资源的滥用客户端,服务器仍必须采取措施断开和/或限制对表现出滥用行为的客户端的访问。
IANA has added "APPENDLIMIT" to the "IMAP Capabilities" registry, using this document as its reference.
IANA已将此文档作为参考,将“APPENDLIMIT”添加到“IMAP功能”注册表中。
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.
[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<http://www.rfc-editor.org/info/rfc2119>.
[RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, <http://www.rfc-editor.org/info/rfc3501>.
[RFC3501]Crispin,M.,“互联网消息访问协议-版本4rev1”,RFC 3501,DOI 10.17487/RFC3501,2003年3月<http://www.rfc-editor.org/info/rfc3501>.
[RFC4466] Melnikov, A. and C. Daboo, "Collected Extensions to IMAP4 ABNF", RFC 4466, DOI 10.17487/RFC4466, April 2006, <http://www.rfc-editor.org/info/rfc4466>.
[RFC4466]Melnikov,A.和C.Daboo,“IMAP4 ABNF的收集扩展”,RFC 4466,DOI 10.17487/RFC4466,2006年4月<http://www.rfc-editor.org/info/rfc4466>.
[RFC4469] Resnick, P., "Internet Message Access Protocol (IMAP) CATENATE Extension", RFC 4469, DOI 10.17487/RFC4469, April 2006, <http://www.rfc-editor.org/info/rfc4469>.
[RFC4469]Resnick,P.,“互联网消息访问协议(IMAP)连锁扩展”,RFC 4469,DOI 10.17487/RFC4469,2006年4月<http://www.rfc-editor.org/info/rfc4469>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, <http://www.rfc-editor.org/info/rfc5234>.
[RFC5234]Crocker,D.,Ed.和P.Overell,“语法规范的扩充BNF:ABNF”,STD 68,RFC 5234,DOI 10.17487/RFC5234,2008年1月<http://www.rfc-editor.org/info/rfc5234>.
[RFC5819] Melnikov, A. and T. Sirainen, "IMAP4 Extension for Returning STATUS Information in Extended LIST", RFC 5819, DOI 10.17487/RFC5819, March 2010, <http://www.rfc-editor.org/info/rfc5819>.
[RFC5819]Melnikov,A.和T.Sirainen,“扩展列表中返回状态信息的IMAP4扩展”,RFC 5819,DOI 10.17487/RFC5819,2010年3月<http://www.rfc-editor.org/info/rfc5819>.
[RFC7888] Melnikov, A., Ed., "IMAP4 Non-synchronizing Literals", RFC 7888, DOI 10.17487/RFC7888, May 2016, <http://www.rfc-editor.org/info/rfc7888>.
[RFC7888]Melnikov,A.,Ed.,“IMAP4非同步文字”,RFC 7888,DOI 10.17487/RFC7888,2016年5月<http://www.rfc-editor.org/info/rfc7888>.
[RFC4549] Melnikov, A., Ed., "Synchronization Operations for Disconnected IMAP4 Clients", RFC 4549, DOI 10.17487/RFC4549, June 2006, <http://www.rfc-editor.org/info/rfc4549>.
[RFC4549]Melnikov,A.,Ed.,“断开连接的IMAP4客户端的同步操作”,RFC 4549,DOI 10.17487/RFC4549,2006年6月<http://www.rfc-editor.org/info/rfc4549>.
Acknowledgements
致谢
Thanks to Alexey Melnikov, Dave Cridland, Adrien de Croy, Michael M. Slusarz, Timo Sirainen, Chris Newman, Pete Maclean, Jamie Nicolson, Stu Brandt, Bron Gondwana, Arnt Gulbrandsen, Cyrus Daboo, Jan Kundrat, Brandon Long, and Barry Leiba for providing valuable comments.
感谢Alexey Melnikov、Dave Cridland、Adrien de Croy、Michael M.Slusarz、Timo Sirainen、Chris Newman、Pete Maclean、Jamie Nicolson、Stu Brandt、Bron Gondwana、Arnt Gulbrandsen、Cyrus Daboo、Jan Kundrat、Brandon Long和Barry Leiba提供了宝贵的意见。
Authors' Addresses
作者地址
Jayantheesh SrimushnamBoovaraghamoorthy Samsung Electronics America 685 US Highway 202/206 Bridgewater, NJ 08807 United States
Jayantheeesh SrimushnamBoovaraghamoorthy三星电子美国685美国公路202/206号美国新泽西州布里奇沃特08807
Email: jayantheesh.sb@gmail.com
Email: jayantheesh.sb@gmail.com
Narendra Singh Bisht Samsung Electronics America 685 US Highway 202/206 Bridgewater, NJ 08807 United States
Narendra Singh Bisht三星电子美国685美国公路202/206美国新泽西州布里奇沃特08807
Email: narendrasingh.bisht@gmail.com
Email: narendrasingh.bisht@gmail.com