Internet Engineering Task Force (IETF)                          S. Bosch
Request for Comments: 8514                               Open Xchange Oy
Category: Standards Track                                   January 2019
ISSN: 2070-1721
        
Internet Engineering Task Force (IETF)                          S. Bosch
Request for Comments: 8514                               Open Xchange Oy
Category: Standards Track                                   January 2019
ISSN: 2070-1721
        

Internet Message Access Protocol (IMAP) - SAVEDATE Extension

Internet消息访问协议(IMAP)-保存日期扩展

Abstract

摘要

This document adds a new capability called "SAVEDATE" to the Internet Message Access Protocol (IMAP). It defines a new IMAP message attribute called "save date" that, unlike the existing "internal date" attribute, always indicates the moment at which the message was saved in its current mailbox. The SAVEDATE capability extends the FETCH command with the means to retrieve the save date attribute and extends the SEARCH command to allow using the save date attribute in searching criteria.

本文档在Internet消息访问协议(IMAP)中添加了一个名为“SAVEDATE”的新功能。它定义了一个名为“保存日期”的新IMAP邮件属性,与现有的“内部日期”属性不同,该属性始终指示邮件在当前邮箱中保存的时刻。SAVEDATE功能通过检索save date属性来扩展FETCH命令,并扩展SEARCH命令以允许在搜索条件中使用save date属性。

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 7841.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 7841第2节。

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

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

Copyright Notice

版权公告

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

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

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://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文件的法律规定的约束(https://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Conventions Used in This Document . . . . . . . . . . . . . .   3
   3.  Save Date Message Attribute . . . . . . . . . . . . . . . . .   3
   4.  IMAP Protocol Changes . . . . . . . . . . . . . . . . . . . .   4
     4.1.  CAPABILITY Identification . . . . . . . . . . . . . . . .   4
     4.2.  FETCH Command and Response Extensions . . . . . . . . . .   4
     4.3.  SEARCH Command Extension  . . . . . . . . . . . . . . . .   4
   5.  Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . .   5
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   6
   8.  Normative References  . . . . . . . . . . . . . . . . . . . .   6
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   7
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   7
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Conventions Used in This Document . . . . . . . . . . . . . .   3
   3.  Save Date Message Attribute . . . . . . . . . . . . . . . . .   3
   4.  IMAP Protocol Changes . . . . . . . . . . . . . . . . . . . .   4
     4.1.  CAPABILITY Identification . . . . . . . . . . . . . . . .   4
     4.2.  FETCH Command and Response Extensions . . . . . . . . . .   4
     4.3.  SEARCH Command Extension  . . . . . . . . . . . . . . . .   4
   5.  Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . .   5
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   6
   8.  Normative References  . . . . . . . . . . . . . . . . . . . .   6
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   7
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   7
        
1. Introduction
1. 介绍

This document extends the Internet Message Access Protocol (IMAP) [IMAP4rev1] with a new capability called "SAVEDATE". This capability adds a new IMAP message attribute called "save date". The save date is the date and time at which a message was saved in the mailbox in which it currently resides. The save date is similar to the existing "internal date" attribute in that it is set at the time of delivery. However, the internal date attribute can be set to an arbitrary value for messages delivered to the mailbox using the APPEND command and is usually copied from the source message for messages delivered using the COPY command. In contrast, the save date attribute is always set to the current date and time at the moment the message is saved in the mailbox, irrespective of how the message is delivered and from where it originates.

本文档使用名为“SAVEDATE”的新功能扩展了Internet消息访问协议(IMAP)[IMAP4rev1]。此功能添加了一个名为“保存日期”的新IMAP消息属性。保存日期是将邮件保存到其当前所在邮箱的日期和时间。保存日期与现有的“内部日期”属性类似,因为它是在交付时设置的。但是,对于使用APPEND命令传递到邮箱的邮件,“内部日期”属性可以设置为任意值,对于使用COPY命令传递的邮件,该属性通常从源邮件复制。相反,“保存日期”属性始终设置为邮件保存在邮箱中时的当前日期和时间,而不管邮件是如何传递的,也不管邮件来自何处。

The save date attribute is useful for implementing automated removal of messages from a mailbox after a configured amount of time. For that application, it is necessary to know when the message was saved in the mailbox, which cannot be reliably determined using the internal date attribute.

“保存日期”属性可用于在配置的时间后自动从邮箱中删除邮件。对于该应用程序,需要知道邮件何时保存在邮箱中,这无法使用内部日期属性可靠地确定。

For example, a common client usage pattern is to move deleted messages to a Trash mailbox. These messages are considered "deleted" at the time they are moved to the Trash mailbox. In an effort to limit the size of the Trash mailbox, a client may subsequently desire to permanently remove (expunge) all messages in that Trash mailbox deleted before a certain time (e.g., a configurable expiration interval). In that case, the internal date attribute cannot be used since it likely refers to the time at which the message was originally received. The proper time comparison attribute should

例如,一种常见的客户端使用模式是将已删除的邮件移动到垃圾邮箱。这些邮件在移动到垃圾箱邮箱时被视为“已删除”。为了限制垃圾邮箱的大小,客户端随后可能希望永久删除(删除)在特定时间(例如,可配置的过期时间间隔)之前删除的垃圾邮箱中的所有邮件。在这种情况下,不能使用internal date属性,因为它可能是指最初收到消息的时间。正确的时间比较属性应该是

instead be the time at which the message was saved to the Trash mailbox. Similar usage patterns can be observed for archiving solutions.

而是邮件保存到垃圾箱邮箱的时间。存档解决方案也有类似的使用模式。

The SAVEDATE capability extends the FETCH command and response to allow retrieving the date and time at which a message was saved. Also, the SAVEDATE capability extends the SEARCH command to allow searching messages with criteria based on when they were saved in the mailbox.

SAVEDATE功能扩展了FETCH命令和响应,允许检索保存消息的日期和时间。此外,SAVEDATE功能还扩展了SEARCH命令,允许根据邮件在邮箱中的保存时间使用条件搜索邮件。

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

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", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [KEYWORDS] [KEYWORDS-UPD] when, and only when, they appear in all capitals, as shown here.

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”在所有大写字母出现时(且仅在所有大写字母出现时)应按照BCP 14[关键词][关键词-UPD]中的说明进行解释,如下所示。

3. Save Date Message Attribute
3. 保存日期消息属性

The save date message attribute is the date and time at which the message was saved in the mailbox it is now located in. Unlike the internal date message attribute defined by [IMAP4rev1], this date and time value cannot be set arbitrarily when a message is delivered by the IMAP APPEND command. Also, when a message is delivered to the mailbox by the IMAP COPY command [IMAP4rev1] or the IMAP MOVE command [IMAP-MOVE], the save date attribute is not copied from the source message. Instead, the current date and time at which the message is delivered to a mailbox MUST be used to set the save date attribute. Once calculated, the save date attribute MUST NOT change as long as the message is contained within the same mailbox.

save date message属性是将邮件保存到其当前所在邮箱的日期和时间。与[IMAP4rev1]定义的内部日期消息属性不同,当IMAP APPEND命令传递消息时,不能任意设置此日期和时间值。此外,当通过IMAP COPY命令[IMAP4rev1]或IMAP MOVE命令[IMAP-MOVE]将邮件传递到邮箱时,不会从源邮件复制“保存日期”属性。相反,必须使用邮件传递到邮箱的当前日期和时间来设置“保存日期”属性。计算完成后,只要邮件包含在同一邮箱中,“保存日期”属性就不能更改。

This means that when the message is copied to another mailbox, the save date of the message in the source mailbox remains unaffected; only the new copy of the message gets a new save date. Consequently, when the message is moved to another mailbox, either using the MOVE command or a command sequence involving the COPY command [IMAP-MOVE], the message always gets a new save date in the destination mailbox.

这意味着将邮件复制到另一个邮箱时,邮件在源邮箱中的保存日期不受影响;只有消息的新副本才能获得新的保存日期。因此,当使用MOVE命令或涉及COPY命令[IMAP-MOVE]的命令序列将邮件移动到另一个邮箱时,邮件始终在目标邮箱中获取新的保存日期。

For some specific mailboxes, the underlying storage may not support the save date attribute. The handling of this situation is described in detail in the next section for each involved IMAP command.

对于某些特定邮箱,基础存储可能不支持“保存日期”属性。下一节将针对每个涉及的IMAP命令详细描述这种情况的处理。

4. IMAP Protocol Changes
4. IMAP协议更改
4.1. CAPABILITY Identification
4.1. 能力识别

IMAP servers that support this extension MUST include "SAVEDATE" in the response list to the CAPABILITY command.

支持此扩展的IMAP服务器必须在CAPABILITY命令的响应列表中包含“SAVEDATE”。

4.2. FETCH Command and Response Extensions
4.2. 获取命令和响应扩展

This extension defines one new data item for the FETCH command:

此扩展为FETCH命令定义了一个新的数据项:

SAVEDATE The save date of the message.

SAVEDATE消息的保存日期。

This extension defines one new data item for the FETCH response:

此扩展为获取响应定义了一个新的数据项:

SAVEDATE A string representing the save date of the message. However, if the underlying mailbox storage does not support the save date message attribute, the value returned for the SAVEDATE item is always NIL, rather than a string.

SAVEDATE表示消息保存日期的字符串。但是,如果基础邮箱存储不支持save date message属性,则SAVEDATE项返回的值始终为NIL,而不是字符串。

Example:

例子:

         C: A101 FETCH 998 (SAVEDATE)
         S: * 998 FETCH (SAVEDATE "01-Jan-2015 18:50:53 +0100")
         S: A101 OK Fetch completed.
        
         C: A101 FETCH 998 (SAVEDATE)
         S: * 998 FETCH (SAVEDATE "01-Jan-2015 18:50:53 +0100")
         S: A101 OK Fetch completed.
        
4.3. SEARCH Command Extension
4.3. 搜索命令扩展名

This extension defines four new search keys for the SEARCH command:

此扩展为搜索命令定义了四个新的搜索键:

SAVEDBEFORE <date> Messages whose save date (disregarding time and timezone) is earlier than the specified date.

SAVEDBEFORE<date>其保存日期(不考虑时间和时区)早于指定日期的邮件。

SAVEDON <date> Messages whose save date (disregarding time and timezone) is within the specified date.

SAVEDON<date>其保存日期(不考虑时间和时区)在指定日期内的邮件。

SAVEDSINCE <date> Messages whose save date (disregarding time and timezone) is within or later than the specified date.

SAVEDSINCE<date>其保存日期(不考虑时间和时区)在指定日期之内或之后的消息。

SAVEDATESUPPORTED Matches all messages in the mailbox when the underlying storage of that mailbox supports the save date attribute. Conversely, it matches no messages in the mailbox when the save date attribute is not supported.

当邮箱的基础存储支持“保存日期”属性时,SAVEDATESUPPORTED将匹配邮箱中的所有邮件。相反,当不支持“保存日期”属性时,它不匹配邮箱中的任何邮件。

When the underlying storage of a mailbox does not support the save date attribute, the SAVEDBEFORE, SAVEDON, and SAVEDSINCE search keys MUST use the internal date attribute instead. In the context of the IMAP Multimailbox SEARCH Extension [MULTISEARCH], this fallback behavior MUST apply to each mailbox individually, meaning that only the mailboxes that lack support for the save date attribute use the internal date attribute instead.

当邮箱的基础存储不支持save date属性时,SAVEDBEFORE、SAVEDON和SAVEDSINCE搜索键必须改用内部日期属性。在IMAP多邮箱搜索扩展[MULTISEARCH]的上下文中,此回退行为必须分别应用于每个邮箱,这意味着只有不支持保存日期属性的邮箱才使用内部日期属性。

Example:

例子:

         C: A102 SEARCH SAVEDON 28-Dec-2014
         S: * SEARCH 993 994
         S: A102 OK Search completed.
         C: A103 SEARCH SAVEDSINCE 28-Dec-2014
         S: * SEARCH 993 994 995 996 997 998 999 1000 1001
         S: A103 OK Search completed.
        
         C: A102 SEARCH SAVEDON 28-Dec-2014
         S: * SEARCH 993 994
         S: A102 OK Search completed.
         C: A103 SEARCH SAVEDSINCE 28-Dec-2014
         S: * SEARCH 993 994 995 996 997 998 999 1000 1001
         S: A103 OK Search completed.
        
5. Formal Syntax
5. 形式语法

The following syntax specification augments the grammar specified in [IMAP4rev1]. It uses the Augmented Backus-Naur Form (ABNF) notation as specified in [ABNF]. Elements not defined here are taken from [IMAP4rev1].

以下语法规范扩充了[IMAP4rev1]中指定的语法。它使用[ABNF]中指定的增广巴科斯诺尔形式(ABNF)表示法。此处未定义的元素取自[IMAP4rev1]。

capability =/ "SAVEDATE"

功能=/“保存日期”

fetch-att =/ "SAVEDATE"

fetch att=/“保存日期”

   msg-att-static =/ "SAVEDATE" SP (date-time / nil)
        
   msg-att-static =/ "SAVEDATE" SP (date-time / nil)
        

search-key =/ "SAVEDBEFORE" SP date / "SAVEDON" SP date / "SAVEDSINCE" SP date / "SAVEDATESUPPORTED"

搜索键=/“SAVEDBEFORE”SP date/“SAVEDON”SP date/“SAVEDSINCE”SP date/“SAVEDATESUPPORTED”

6. Security Considerations
6. 安全考虑

There are no known additional security issues with this extension beyond those described in the base protocol described in [IMAP4rev1].

除了[IMAP4rev1]中描述的基本协议中描述的安全问题外,此扩展没有已知的其他安全问题。

7. IANA Considerations
7. IANA考虑

IANA has added "SAVEDATE" to the "IMAP Capabilities" registry located at <https://www.iana.org/assignments/imap-capabilities>.

IANA已将“保存日期”添加到位于的“IMAP功能”注册表中<https://www.iana.org/assignments/imap-capabilities>.

8. Normative References
8. 规范性引用文件

[ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, <https://www.rfc-editor.org/rfc/rfc5234>.

[ABNF]Crocker,D.和P.Overell,“语法规范的扩充BNF:ABNF”,STD 68,RFC 5234,DOI 10.17487/RFC5234,2008年1月<https://www.rfc-editor.org/rfc/rfc5234>.

[IMAP-MOVE] Gulbrandsen, A. and N. Freed, "Internet Message Access Protocol (IMAP) - MOVE Extension", RFC 6851, DOI 10.17487/RFC6851, January 2013, <https://www.rfc-editor.org/rfc/rfc6851>.

[IMAP-MOVE]Gulbrandsen,A.和N.Freed,“互联网消息访问协议(IMAP)-移动扩展”,RFC 6851,DOI 10.17487/RFC6851,2013年1月<https://www.rfc-editor.org/rfc/rfc6851>.

[IMAP4rev1] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, <https://www.rfc-editor.org/rfc/rfc3501>.

[IMAP4rev1]Crispin,M.,“互联网消息访问协议-版本4rev1”,RFC 3501,DOI 10.17487/RFC3501,2003年3月<https://www.rfc-editor.org/rfc/rfc3501>.

[KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/rfc/rfc2119>.

[关键词]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<https://www.rfc-editor.org/rfc/rfc2119>.

[KEYWORDS-UPD] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.

[KEYWORDS-UPD]Leiba,B.,“RFC 2119关键词中大写与小写的歧义”,BCP 14,RFC 8174,DOI 10.17487/RFC8174,2017年5月<https://www.rfc-editor.org/info/rfc8174>.

[MULTISEARCH] Leiba, B. and A. Melnikov, "IMAP4 Multimailbox SEARCH Extension", RFC 7377, DOI 10.17487/RFC7377, October 2014, <https://www.rfc-editor.org/info/rfc7377>.

[MULTISEARCH]Leiba,B.和A.Melnikov,“IMAP4多邮箱搜索扩展”,RFC 7377,DOI 10.17487/RFC7377,2014年10月<https://www.rfc-editor.org/info/rfc7377>.

Acknowledgements

致谢

Thanks to Bron Gondwana, Alexey Melnikov, Timo Sirainen, and Michael Slusarz for reviews and suggestions.

感谢Bron Gondwana、Alexey Melnikov、Timo Sirainen和Michael Slusarz的评论和建议。

Author's Address

作者地址

Stephan Bosch Open Xchange Oy Lars Sonckin kaari 12 Espoo 02600 Finland

Stephan Bosch开放式交易所Oy Lars Sonckin kaari 12 Espoo 02600芬兰

   Email: stephan.bosch@open-xchange.com
        
   Email: stephan.bosch@open-xchange.com