1
2
3
4
5
6
7Internet Engineering Task Force (IETF) S. Bosch
8Request for Comments: 8514 Open Xchange Oy
9Category: Standards Track January 2019
10ISSN: 2070-1721
11
12
13 Internet Message Access Protocol (IMAP) - SAVEDATE Extension
14
15Abstract
16
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
24 searching criteria.
25
26Status of This Memo
27
28 This is an Internet Standards Track document.
29
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.
35
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.
39
40Copyright Notice
41
42 Copyright (c) 2019 IETF Trust and the persons identified as the
43 document authors. All rights reserved.
44
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.
54
55
56
57
58Bosch Standards Track [Page 1]
59
60RFC 8514 IMAP - SAVEDATE Extension January 2019
61
62
63Table of Contents
64
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
78
791. Introduction
80
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
93 where it originates.
94
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.
100
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
110
111
112
113
114Bosch Standards Track [Page 2]
115
116RFC 8514 IMAP - SAVEDATE Extension January 2019
117
118
119 instead be the time at which the message was saved to the Trash
120 mailbox. Similar usage patterns can be observed for archiving
121 solutions.
122
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
127 mailbox.
128
1292. Conventions Used in This Document
130
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.
133
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.
139
1403. Save Date Message Attribute
141
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.
153
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.
160
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.
164
165
166
167
168
169
170Bosch Standards Track [Page 3]
171
172RFC 8514 IMAP - SAVEDATE Extension January 2019
173
174
1754. IMAP Protocol Changes
176
1774.1. CAPABILITY Identification
178
179 IMAP servers that support this extension MUST include "SAVEDATE" in
180 the response list to the CAPABILITY command.
181
1824.2. FETCH Command and Response Extensions
183
184 This extension defines one new data item for the FETCH command:
185
186 SAVEDATE
187 The save date of the message.
188
189 This extension defines one new data item for the FETCH response:
190
191 SAVEDATE
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.
196
197 Example:
198
199 C: A101 FETCH 998 (SAVEDATE)
200 S: * 998 FETCH (SAVEDATE "01-Jan-2015 18:50:53 +0100")
201 S: A101 OK Fetch completed.
202
2034.3. SEARCH Command Extension
204
205 This extension defines four new search keys for the SEARCH command:
206
207 SAVEDBEFORE <date>
208 Messages whose save date (disregarding time and timezone) is
209 earlier than the specified date.
210
211 SAVEDON <date>
212 Messages whose save date (disregarding time and timezone) is
213 within the specified date.
214
215 SAVEDSINCE <date>
216 Messages whose save date (disregarding time and timezone) is
217 within or later than the specified date.
218
219
220
221
222
223
224
225
226Bosch Standards Track [Page 4]
227
228RFC 8514 IMAP - SAVEDATE Extension January 2019
229
230
231 SAVEDATESUPPORTED
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
235 not supported.
236
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.
244
245 Example:
246
247 C: A102 SEARCH SAVEDON 28-Dec-2014
248 S: * SEARCH 993 994
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.
253
2545. Formal Syntax
255
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
259 [IMAP4rev1].
260
261 capability =/ "SAVEDATE"
262
263 fetch-att =/ "SAVEDATE"
264
265 msg-att-static =/ "SAVEDATE" SP (date-time / nil)
266
267 search-key =/ "SAVEDBEFORE" SP date /
268 "SAVEDON" SP date /
269 "SAVEDSINCE" SP date /
270 "SAVEDATESUPPORTED"
271
2726. Security Considerations
273
274 There are no known additional security issues with this extension
275 beyond those described in the base protocol described in [IMAP4rev1].
276
277
278
279
280
281
282Bosch Standards Track [Page 5]
283
284RFC 8514 IMAP - SAVEDATE Extension January 2019
285
286
2877. IANA Considerations
288
289 IANA has added "SAVEDATE" to the "IMAP Capabilities" registry located
290 at <https://www.iana.org/assignments/imap-capabilities>.
291
2928. Normative References
293
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>.
298
299 [IMAP-MOVE]
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>.
304
305 [IMAP4rev1]
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>.
309
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>.
314
315 [KEYWORDS-UPD]
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>.
319
320 [MULTISEARCH]
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>.
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338Bosch Standards Track [Page 6]
339
340RFC 8514 IMAP - SAVEDATE Extension January 2019
341
342
343Acknowledgements
344
345 Thanks to Bron Gondwana, Alexey Melnikov, Timo Sirainen, and Michael
346 Slusarz for reviews and suggestions.
347
348Author's Address
349
350 Stephan Bosch
351 Open Xchange Oy
352 Lars Sonckin kaari 12
353 Espoo 02600
354 Finland
355
356 Email: stephan.bosch@open-xchange.com
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394Bosch Standards Track [Page 7]
395
396