7Internet Engineering Task Force (IETF) S. Bosch
8Request for Comments: 8514 Open Xchange Oy
9Category: Standards Track January 2019
13 Internet Message Access Protocol (IMAP) - SAVEDATE Extension
17 This document adds a new capability called "SAVEDATE" to the Internet
18 Message Access Protocol (IMAP). It defines a new IMAP message
19 attribute called "save date" that, unlike the existing "internal
20 date" attribute, always indicates the moment at which the message was
21 saved in its current mailbox. The SAVEDATE capability extends the
22 FETCH command with the means to retrieve the save date attribute and
23 extends the SEARCH command to allow using the save date attribute in
28 This is an Internet Standards Track document.
30 This document is a product of the Internet Engineering Task Force
31 (IETF). It represents the consensus of the IETF community. It has
32 received public review and has been approved for publication by the
33 Internet Engineering Steering Group (IESG). Further information on
34 Internet Standards is available in Section 2 of RFC 7841.
36 Information about the current status of this document, any errata,
37 and how to provide feedback on it may be obtained at
38 https://www.rfc-editor.org/info/rfc8514.
42 Copyright (c) 2019 IETF Trust and the persons identified as the
43 document authors. All rights reserved.
45 This document is subject to BCP 78 and the IETF Trust's Legal
46 Provisions Relating to IETF Documents
47 (https://trustee.ietf.org/license-info) in effect on the date of
48 publication of this document. Please review these documents
49 carefully, as they describe your rights and restrictions with respect
50 to this document. Code Components extracted from this document must
51 include Simplified BSD License text as described in Section 4.e of
52 the Trust Legal Provisions and are provided without warranty as
53 described in the Simplified BSD License.
58Bosch Standards Track [Page 1]
60RFC 8514 IMAP - SAVEDATE Extension January 2019
65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
66 2. Conventions Used in This Document . . . . . . . . . . . . . . 3
67 3. Save Date Message Attribute . . . . . . . . . . . . . . . . . 3
68 4. IMAP Protocol Changes . . . . . . . . . . . . . . . . . . . . 4
69 4.1. CAPABILITY Identification . . . . . . . . . . . . . . . . 4
70 4.2. FETCH Command and Response Extensions . . . . . . . . . . 4
71 4.3. SEARCH Command Extension . . . . . . . . . . . . . . . . 4
72 5. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 5
73 6. Security Considerations . . . . . . . . . . . . . . . . . . . 5
74 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6
75 8. Normative References . . . . . . . . . . . . . . . . . . . . 6
76 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 7
77 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7
81 This document extends the Internet Message Access Protocol (IMAP)
82 [IMAP4rev1] with a new capability called "SAVEDATE". This capability
83 adds a new IMAP message attribute called "save date". The save date
84 is the date and time at which a message was saved in the mailbox in
85 which it currently resides. The save date is similar to the existing
86 "internal date" attribute in that it is set at the time of delivery.
87 However, the internal date attribute can be set to an arbitrary value
88 for messages delivered to the mailbox using the APPEND command and is
89 usually copied from the source message for messages delivered using
90 the COPY command. In contrast, the save date attribute is always set
91 to the current date and time at the moment the message is saved in
92 the mailbox, irrespective of how the message is delivered and from
95 The save date attribute is useful for implementing automated removal
96 of messages from a mailbox after a configured amount of time. For
97 that application, it is necessary to know when the message was saved
98 in the mailbox, which cannot be reliably determined using the
99 internal date attribute.
101 For example, a common client usage pattern is to move deleted
102 messages to a Trash mailbox. These messages are considered "deleted"
103 at the time they are moved to the Trash mailbox. In an effort to
104 limit the size of the Trash mailbox, a client may subsequently desire
105 to permanently remove (expunge) all messages in that Trash mailbox
106 deleted before a certain time (e.g., a configurable expiration
107 interval). In that case, the internal date attribute cannot be used
108 since it likely refers to the time at which the message was
109 originally received. The proper time comparison attribute should
114Bosch Standards Track [Page 2]
116RFC 8514 IMAP - SAVEDATE Extension January 2019
119 instead be the time at which the message was saved to the Trash
120 mailbox. Similar usage patterns can be observed for archiving
123 The SAVEDATE capability extends the FETCH command and response to
124 allow retrieving the date and time at which a message was saved.
125 Also, the SAVEDATE capability extends the SEARCH command to allow
126 searching messages with criteria based on when they were saved in the
1292. Conventions Used in This Document
131 In examples, "C:" indicates lines sent by a client that is connected
132 to a server. "S:" indicates lines sent by the server to the client.
134 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
135 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
136 "OPTIONAL" in this document are to be interpreted as described in
137 BCP 14 [KEYWORDS] [KEYWORDS-UPD] when, and only when, they appear in
138 all capitals, as shown here.
1403. Save Date Message Attribute
142 The save date message attribute is the date and time at which the
143 message was saved in the mailbox it is now located in. Unlike the
144 internal date message attribute defined by [IMAP4rev1], this date and
145 time value cannot be set arbitrarily when a message is delivered by
146 the IMAP APPEND command. Also, when a message is delivered to the
147 mailbox by the IMAP COPY command [IMAP4rev1] or the IMAP MOVE command
148 [IMAP-MOVE], the save date attribute is not copied from the source
149 message. Instead, the current date and time at which the message is
150 delivered to a mailbox MUST be used to set the save date attribute.
151 Once calculated, the save date attribute MUST NOT change as long as
152 the message is contained within the same mailbox.
154 This means that when the message is copied to another mailbox, the
155 save date of the message in the source mailbox remains unaffected;
156 only the new copy of the message gets a new save date. Consequently,
157 when the message is moved to another mailbox, either using the MOVE
158 command or a command sequence involving the COPY command [IMAP-MOVE],
159 the message always gets a new save date in the destination mailbox.
161 For some specific mailboxes, the underlying storage may not support
162 the save date attribute. The handling of this situation is described
163 in detail in the next section for each involved IMAP command.
170Bosch Standards Track [Page 3]
172RFC 8514 IMAP - SAVEDATE Extension January 2019
1754. IMAP Protocol Changes
1774.1. CAPABILITY Identification
179 IMAP servers that support this extension MUST include "SAVEDATE" in
180 the response list to the CAPABILITY command.
1824.2. FETCH Command and Response Extensions
184 This extension defines one new data item for the FETCH command:
187 The save date of the message.
189 This extension defines one new data item for the FETCH response:
192 A string representing the save date of the message. However, if
193 the underlying mailbox storage does not support the save date
194 message attribute, the value returned for the SAVEDATE item is
195 always NIL, rather than a string.
199 C: A101 FETCH 998 (SAVEDATE)
200 S: * 998 FETCH (SAVEDATE "01-Jan-2015 18:50:53 +0100")
201 S: A101 OK Fetch completed.
2034.3. SEARCH Command Extension
205 This extension defines four new search keys for the SEARCH command:
208 Messages whose save date (disregarding time and timezone) is
209 earlier than the specified date.
212 Messages whose save date (disregarding time and timezone) is
213 within the specified date.
216 Messages whose save date (disregarding time and timezone) is
217 within or later than the specified date.
226Bosch Standards Track [Page 4]
228RFC 8514 IMAP - SAVEDATE Extension January 2019
232 Matches all messages in the mailbox when the underlying storage of
233 that mailbox supports the save date attribute. Conversely, it
234 matches no messages in the mailbox when the save date attribute is
237 When the underlying storage of a mailbox does not support the save
238 date attribute, the SAVEDBEFORE, SAVEDON, and SAVEDSINCE search keys
239 MUST use the internal date attribute instead. In the context of the
240 IMAP Multimailbox SEARCH Extension [MULTISEARCH], this fallback
241 behavior MUST apply to each mailbox individually, meaning that only
242 the mailboxes that lack support for the save date attribute use the
243 internal date attribute instead.
247 C: A102 SEARCH SAVEDON 28-Dec-2014
249 S: A102 OK Search completed.
250 C: A103 SEARCH SAVEDSINCE 28-Dec-2014
251 S: * SEARCH 993 994 995 996 997 998 999 1000 1001
252 S: A103 OK Search completed.
256 The following syntax specification augments the grammar specified in
257 [IMAP4rev1]. It uses the Augmented Backus-Naur Form (ABNF) notation
258 as specified in [ABNF]. Elements not defined here are taken from
261 capability =/ "SAVEDATE"
263 fetch-att =/ "SAVEDATE"
265 msg-att-static =/ "SAVEDATE" SP (date-time / nil)
267 search-key =/ "SAVEDBEFORE" SP date /
269 "SAVEDSINCE" SP date /
2726. Security Considerations
274 There are no known additional security issues with this extension
275 beyond those described in the base protocol described in [IMAP4rev1].
282Bosch Standards Track [Page 5]
284RFC 8514 IMAP - SAVEDATE Extension January 2019
2877. IANA Considerations
289 IANA has added "SAVEDATE" to the "IMAP Capabilities" registry located
290 at <https://www.iana.org/assignments/imap-capabilities>.
2928. Normative References
294 [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax
295 Specifications: ABNF", STD 68, RFC 5234,
296 DOI 10.17487/RFC5234, January 2008,
297 <https://www.rfc-editor.org/rfc/rfc5234>.
300 Gulbrandsen, A. and N. Freed, "Internet Message Access
301 Protocol (IMAP) - MOVE Extension", RFC 6851,
302 DOI 10.17487/RFC6851, January 2013,
303 <https://www.rfc-editor.org/rfc/rfc6851>.
306 Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
307 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003,
308 <https://www.rfc-editor.org/rfc/rfc3501>.
310 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
311 Requirement Levels", BCP 14, RFC 2119,
312 DOI 10.17487/RFC2119, March 1997,
313 <https://www.rfc-editor.org/rfc/rfc2119>.
316 Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
317 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
318 May 2017, <https://www.rfc-editor.org/info/rfc8174>.
321 Leiba, B. and A. Melnikov, "IMAP4 Multimailbox SEARCH
322 Extension", RFC 7377, DOI 10.17487/RFC7377, October 2014,
323 <https://www.rfc-editor.org/info/rfc7377>.
338Bosch Standards Track [Page 6]
340RFC 8514 IMAP - SAVEDATE Extension January 2019
345 Thanks to Bron Gondwana, Alexey Melnikov, Timo Sirainen, and Michael
346 Slusarz for reviews and suggestions.
352 Lars Sonckin kaari 12
356 Email: stephan.bosch@open-xchange.com
394Bosch Standards Track [Page 7]