1
2
3
4
5
6
7Internet Engineering Task Force (IETF) B. Gondwana, Ed.
8Request for Comments: 8474 FastMail
9Updates: 3501 September 2018
10Category: Standards Track
11ISSN: 2070-1721
12
13
14 IMAP Extension for Object Identifiers
15
16Abstract
17
18 This document updates RFC 3501 (IMAP4rev1) with persistent
19 identifiers on mailboxes and messages to allow clients to more
20 efficiently reuse cached data when resources have changed location on
21 the server.
22
23Status of This Memo
24
25 This is an Internet Standards Track document.
26
27 This document is a product of the Internet Engineering Task Force
28 (IETF). It represents the consensus of the IETF community. It has
29 received public review and has been approved for publication by the
30 Internet Engineering Steering Group (IESG). Further information on
31 Internet Standards is available in Section 2 of RFC 7841.
32
33 Information about the current status of this document, any errata,
34 and how to provide feedback on it may be obtained at
35 https://www.rfc-editor.org/info/rfc8474.
36
37Copyright Notice
38
39 Copyright (c) 2018 IETF Trust and the persons identified as the
40 document authors. All rights reserved.
41
42 This document is subject to BCP 78 and the IETF Trust's Legal
43 Provisions Relating to IETF Documents
44 (https://trustee.ietf.org/license-info) in effect on the date of
45 publication of this document. Please review these documents
46 carefully, as they describe your rights and restrictions with respect
47 to this document. Code Components extracted from this document must
48 include Simplified BSD License text as described in Section 4.e of
49 the Trust Legal Provisions and are provided without warranty as
50 described in the Simplified BSD License.
51
52
53
54
55
56
57
58Gondwana Standards Track [Page 1]
59
60RFC 8474 IMAP ObjectID September 2018
61
62
63Table of Contents
64
65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
66 2. Conventions Used in This Document . . . . . . . . . . . . . . 3
67 3. CAPABILITY Identification . . . . . . . . . . . . . . . . . . 3
68 4. MAILBOXID Object Identifier . . . . . . . . . . . . . . . . . 3
69 4.1. New Response Code for CREATE . . . . . . . . . . . . . . 4
70 4.2. New OK Untagged Response for SELECT and EXAMINE . . . . . 4
71 4.3. New Attribute for STATUS . . . . . . . . . . . . . . . . 5
72 5. EMAILID Object Identifier and THREADID Correlator . . . . . . 6
73 5.1. EMAILID Identifier for Identical Messages . . . . . . . . 6
74 5.2. THREADID Identifier for Related Messages . . . . . . . . 6
75 5.3. New Message Data Items in FETCH and UID FETCH Commands . 7
76 6. New Filters on SEARCH Command . . . . . . . . . . . . . . . . 9
77 7. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 9
78 8. Implementation Considerations . . . . . . . . . . . . . . . . 10
79 8.1. Assigning Object Identifiers . . . . . . . . . . . . . . 10
80 8.2. Interaction with Special Cases . . . . . . . . . . . . . 11
81 8.3. Client Usage . . . . . . . . . . . . . . . . . . . . . . 11
82 8.4. Advice to Client Implementers . . . . . . . . . . . . . . 12
83 9. Future Considerations . . . . . . . . . . . . . . . . . . . . 12
84 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12
85 11. Security Considerations . . . . . . . . . . . . . . . . . . . 13
86 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 13
87 12.1. Normative References . . . . . . . . . . . . . . . . . . 13
88 12.2. Informative References . . . . . . . . . . . . . . . . . 14
89 Appendix A. Ideas for Implementing Object Identifiers . . . . . 15
90 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 15
91 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 16
92
931. Introduction
94
95 IMAP stores are often used by many clients. Each client may cache
96 data from the server so that it doesn't need to redownload
97 information. [RFC3501] states that a mailbox can be uniquely
98 referenced by its name and UIDVALIDITY, and a message within that
99 mailbox can be uniquely referenced by its mailbox (name +
100 UIDVALIDITY) and unique identifier (UID). The triple of mailbox
101 name, UIDVALIDITY, and UID is guaranteed to be immutable.
102
103 [RFC4315] defines a COPYUID response that allows a client that copies
104 messages to know the mapping between the UIDs in the source and
105 destination mailboxes and, hence, update its local cache.
106
107 If a mailbox is successfully renamed by a client, that client will
108 know that the same messages exist in the destination mailbox name as
109 previously existed in the source mailbox name.
110
111
112
113
114Gondwana Standards Track [Page 2]
115
116RFC 8474 IMAP ObjectID September 2018
117
118
119 The result is that the client that copies (or moves [RFC6851])
120 messages or renames a mailbox can update its local cache, but any
121 other client connected to the same store cannot know with certainty
122 that the messages are identical, so it will redownload everything.
123
124 This extension adds new properties to a message (EMAILID) and mailbox
125 (MAILBOXID). These properties allow a client to quickly identify
126 messages or mailboxes that have been renamed by another client.
127
128 This extension also adds an optional thread identifier (THREADID) to
129 messages, which can be used by the server to indicate messages that
130 it has identified to be related. A server that does not implement
131 threading will return NIL to all requests for THREADID.
132
1332. Conventions Used in This Document
134
135 In examples, "C:" indicates lines sent by a client that is connected
136 to a server. "S:" indicates lines sent by the server to the client.
137
138 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
139 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
140 "OPTIONAL" in this document are to be interpreted as described in
141 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
142 capitals, as shown here.
143
1443. CAPABILITY Identification
145
146 IMAP servers that support this extension MUST include "OBJECTID" in
147 the response list to the CAPABILITY command.
148
1494. MAILBOXID Object Identifier
150
151 The MAILBOXID is a server-allocated unique identifier for each
152 mailbox.
153
154 The server MUST return the same MAILBOXID for a mailbox with the same
155 name and UIDVALIDITY.
156
157 The server MUST NOT report the same MAILBOXID for two mailboxes at
158 the same time.
159
160 The server MUST NOT reuse the same MAILBOXID for a mailbox that does
161 not obey all the invariants that [RFC3501] defines for a mailbox that
162 does not change name or UIDVALIDITY.
163
164
165
166
167
168
169
170Gondwana Standards Track [Page 3]
171
172RFC 8474 IMAP ObjectID September 2018
173
174
175 The server MUST keep the same MAILBOXID for the source and
176 destination when renaming a mailbox in a way that keeps the same
177 messages (but see [RFC3501] for the special case regarding the
178 renaming of INBOX, which is treated as creating a new mailbox and
179 moving the messages).
180
1814.1. New Response Code for CREATE
182
183 This document extends the CREATE command to have the response code
184 MAILBOXID on successful mailbox creation.
185
186 A server advertising the OBJECTID capability MUST include the
187 MAILBOXID response code in the tagged OK response to all successful
188 CREATE commands.
189
190 Syntax: "MAILBOXID" SP "(" objectid ")"
191
192 Response code in tagged OK response for successful CREATE command.
193
194 Example:
195
196 C: 3 create foo
197 S: 3 OK [MAILBOXID (F2212ea87-6097-4256-9d51-71338625)] Completed
198 C: 4 create bar
199 S: 4 OK [MAILBOXID (F6352ae03-b7f5-463c-896f-d8b48ee3)] Completed
200 C: 5 create foo
201 S: 5 NO Mailbox already exists
202
2034.2. New OK Untagged Response for SELECT and EXAMINE
204
205 This document adds a new untagged response code to the SELECT and
206 EXAMINE commands.
207
208 A server advertising the OBJECTID capability MUST return an untagged
209 OK response with the MAILBOXID response code on all successful SELECT
210 and EXAMINE commands.
211
212 Syntax: "OK" SP "[" "MAILBOXID" SP "(" objectid ")" "]" SP text
213
214 Untagged OK response to SELECT or EXAMINE.
215
216 Example:
217
218 C: 27 select "foo"
219 [...]
220 S: * OK [MAILBOXID (F2212ea87-6097-4256-9d51-71338625)] Ok
221 [...]
222 S: 27 OK [READ-WRITE] Completed
223
224
225
226Gondwana Standards Track [Page 4]
227
228RFC 8474 IMAP ObjectID September 2018
229
230
2314.3. New Attribute for STATUS
232
233 This document adds the MAILBOXID attribute to the STATUS command
234 using the extended syntax defined in [RFC4466].
235
236 A server that advertises the OBJECTID capability MUST support the
237 MAILBOXID status attribute.
238
239 Syntax: "MAILBOXID"
240
241 The attribute in the STATUS command.
242
243 Syntax: "MAILBOXID" SP "(" objectid ")"
244
245 The response item in the STATUS response contains the ObjectID
246 assigned by the server for this mailbox.
247
248 Example:
249
250 C: 6 status foo (mailboxid)
251 S: * STATUS foo (MAILBOXID (F2212ea87-6097-4256-9d51-71338625))
252 S: 6 OK Completed
253 C: 7 status bar (mailboxid)
254 S: * STATUS bar (MAILBOXID (F6352ae03-b7f5-463c-896f-d8b48ee3))
255 S: 7 OK Completed
256 C: 8 rename foo renamed
257 S: * OK rename foo renamed
258 S: 8 OK Completed
259 C: 9 status renamed (mailboxid)
260 S: * STATUS renamed (MAILBOXID (F2212ea87-6097-4256-9d51-71338625))
261 S: 9 OK Completed
262 C: 10 status bar (mailboxid)
263 S: * STATUS bar (MAILBOXID (F6352ae03-b7f5-463c-896f-d8b48ee3))
264 S: 10 OK Completed
265
266 When the LIST-STATUS IMAP capability defined in [RFC5819] is also
267 available, the STATUS command can be combined with the LIST command.
268
269 Example:
270
271 C: 11 list "" "*" return (status (mailboxid))
272 S: * LIST (\HasNoChildren) "." INBOX
273 S: * STATUS INBOX (MAILBOXID (Ff8e3ead4-9389-4aff-adb1-d8d89efd8cbf))
274 S: * LIST (\HasNoChildren) "." bar
275 S: * STATUS bar (MAILBOXID (F6352ae03-b7f5-463c-896f-d8b48ee3))
276 S: * LIST (\HasNoChildren) "." renamed
277 S: * STATUS renamed (MAILBOXID (F2212ea87-6097-4256-9d51-71338625))
278 S: 11 OK Completed (0.001 secs 3 calls)
279
280
281
282Gondwana Standards Track [Page 5]
283
284RFC 8474 IMAP ObjectID September 2018
285
286
2875. EMAILID Object Identifier and THREADID Correlator
288
2895.1. EMAILID Identifier for Identical Messages
290
291 The EMAILID data item is an ObjectID that uniquely identifies the
292 content of a single message. Anything that must remain immutable on
293 a {name, uidvalidity, uid} triple must also be the same between
294 messages with the same EMAILID.
295
296 The server MUST return the same EMAILID for the same triple; hence,
297 EMAILID is immutable.
298
299 The server MUST return the same EMAILID as the source message for the
300 matching destination message in the COPYUID pairing after a COPY or
301 MOVE command [RFC6851].
302
303 The server MAY assign the same EMAILID as an existing message upon
304 APPEND (e.g., if it detects that the new message has exactly
305 identical content to that of an existing message).
306
307 NOTE: EMAILID only identifies the immutable content of the message.
308 In particular, it is possible for different messages with the same
309 EMAILID to have different keywords. This document does not specify a
310 way to STORE by EMAILID.
311
3125.2. THREADID Identifier for Related Messages
313
314 The THREADID data item is an ObjectID that uniquely identifies a set
315 of messages that the server believes should be grouped together when
316 presented.
317
318 THREADID calculation is generally based on some combination of
319 References, In-Reply-To, and Subject, but the exact logic is left up
320 to the server implementation. [RFC5256] describes some algorithms
321 that could be used; however, this specification does not mandate any
322 particular strategy.
323
324 The server MUST return the same THREADID for all messages with the
325 same EMAILID.
326
327 The server SHOULD return the same THREADID for related messages, even
328 if they are in different mailboxes; for example, messages that would
329 appear in the same thread if they were in the same mailbox SHOULD
330 have the same THREADID, even if they are in different mailboxes.
331
332 The server MUST NOT change the THREADID of a message once reported.
333
334
335
336
337
338Gondwana Standards Track [Page 6]
339
340RFC 8474 IMAP ObjectID September 2018
341
342
343 THREADID is OPTIONAL; if the server doesn't support THREADID or is
344 unable to calculate relationships between messages, it MUST return
345 NIL to all FETCH responses for the THREADID data item, and a SEARCH
346 for THREADID MUST NOT match any messages.
347
348 The server MUST NOT use the same ObjectID value for both EMAILIDs and
349 THREADIDs. If they are stored with the same value internally, the
350 server can generate prefixed values (as shown in the examples below
351 with M and T prefixes) to avoid clashes.
352
3535.3. New Message Data Items in FETCH and UID FETCH Commands
354
355 This document defines two FETCH items:
356
357 Syntax: "EMAILID"
358
359 The EMAILID message data item causes the server to return EMAILID
360 FETCH response data items.
361
362 Syntax: "THREADID"
363
364 The THREADID message data item causes the server to return THREADID
365 FETCH response data items.
366
367 This document defines the following responses:
368
369 Syntax: "EMAILID" SP "(" objectid ")"
370
371 The EMAILID response data item contains the server-assigned ObjectID
372 for each message.
373
374 Syntax: "THREADID" SP "(" objectid ")"
375
376 The THREADID response data item contains the server-assigned ObjectID
377 for the set of related messages to which this message belongs.
378
379 Syntax: "THREADID" SP nil
380
381 The NIL value is returned for the THREADID response data item when
382 the server mailbox does not support THREADID calculation.
383
384
385
386
387
388
389
390
391
392
393
394Gondwana Standards Track [Page 7]
395
396RFC 8474 IMAP ObjectID September 2018
397
398
399 Example:
400
401 C: 5 append inbox "20-Mar-2018 03:07:37 +1100" {733}
402 [...]
403 Subject: Message A
404 Message-ID: <fake.1521475657.54797@example.com>
405 [...]
406 S: 5 OK [APPENDUID 1521475658 1] Completed
407
408 C: 11 append inbox "20-Mar-2018 03:07:37 +1100" {793}
409 [...]
410 Subject: Re: Message A
411 Message-ID: <fake.1521475657.21213@example.org>
412 References: <fake.1521475657.54797@example.com>
413 [...]
414 S: 11 OK [APPENDUID 1521475658 2] Completed
415
416 C: 17 append inbox "20-Mar-2018 03:07:37 +1100" {736}
417 [...]
418 Subject: Message C
419 Message-ID: <fake.1521475657.60280@example.com>
420 [...]
421 S: 17 OK [APPENDUID 1521475658 3] Completed
422
423 C: 22 fetch 1:* (emailid threadid)
424 S: * 1 FETCH (EMAILID (M6d99ac3275bb4e) THREADID (T64b478a75b7ea9))
425 S: * 2 FETCH (EMAILID (M288836c4c7a762) THREADID (T64b478a75b7ea9))
426 S: * 3 FETCH (EMAILID (M5fdc09b49ea703) THREADID (T11863d02dd95b5))
427 S: 22 OK Completed (0.000 sec)
428
429 C: 23 move 2 foo
430 S: * OK [COPYUID 1521475659 2 1] Completed
431 S: * 2 EXPUNGE
432 S: 23 OK Completed
433
434 C: 24 fetch 1:* (emailid threadid)
435 S: * 1 FETCH (EMAILID (M6d99ac3275bb4e) THREADID (T64b478a75b7ea9))
436 S: * 2 FETCH (EMAILID (M5fdc09b49ea703) THREADID (T11863d02dd95b5))
437 S: 24 OK Completed (0.000 sec)
438 C: 25 select "foo"
439
440 C: 25 select "foo"
441 [...]
442 S: 25 OK [READ-WRITE] Completed
443 C: 26 fetch 1:* (emailid threadid)
444 S: * 1 FETCH (EMAILID (M288836c4c7a762) THREADID (T64b478a75b7ea9))
445 S: 26 OK Completed (0.000 sec)
446
447
448
449
450Gondwana Standards Track [Page 8]
451
452RFC 8474 IMAP ObjectID September 2018
453
454
455 Example: (no THREADID support)
456
457 C: 26 fetch 1:* (emailid threadid)
458 S: * 1 FETCH (EMAILID (M00000001) THREADID NIL)
459 S: * 2 FETCH (EMAILID (M00000002) THREADID NIL)
460 S: 26 OK Completed (0.000 sec)
461
462
4636. New Filters on SEARCH Command
464
465 This document defines the filters EMAILID and THREADID on the SEARCH
466 command.
467
468 Syntax: "EMAILID" SP objectid
469
470 Messages whose EMAILID is exactly the specified ObjectID.
471
472 Syntax: "THREADID" SP objectid
473
474 Messages whose THREADID is exactly the specified ObjectID.
475
476 Example: (as if run before the MOVE shown above when the mailbox had
477 three messages)
478
479 C: 27 search emailid M6d99ac3275bb4e
480 S: * SEARCH 1
481 S: 27 OK Completed (1 msgs in 0.000 secs)
482 C: 28 search threadid T64b478a75b7ea9
483 S: * SEARCH 1 2
484 S: 28 OK Completed (2 msgs in 0.000 secs)
485
4867. Formal Syntax
487
488 The following syntax specification uses the Augmented Backus-Naur
489 Form (ABNF) [RFC5234] notation. Elements not defined here can be
490 found in the formal syntax of the ABNF [RFC5234], IMAP [RFC3501], and
491 IMAP ABNF extensions [RFC4466] specifications.
492
493 Except as noted otherwise, all alphabetic characters are case
494 insensitive. The use of uppercase or lowercase characters to define
495 token strings is for editorial clarity only. Implementations MUST
496 accept these strings in a case-insensitive fashion.
497
498 Please note specifically that ObjectID values are case sensitive.
499
500
501
502
503
504
505
506Gondwana Standards Track [Page 9]
507
508RFC 8474 IMAP ObjectID September 2018
509
510
511 capability =/ "OBJECTID"
512
513 fetch-att =/ "EMAILID" / "THREADID"
514
515 fetch-emailid-resp = "EMAILID" SP "(" objectid ")"
516 ; follows tagged-ext production from [RFC4466]
517
518 fetch-threadid-resp = "THREADID" SP ( "(" objectid ")" / nil )
519 ; follows tagged-ext production from [RFC4466]
520
521 msg-att-static =/ fetch-emailid-resp / fetch-threadid-resp
522
523 objectid = 1*255(ALPHA / DIGIT / "_" / "-")
524 ; characters in object identifiers are case
525 ; significant
526
527 resp-text-code =/ "MAILBOXID" SP "(" objectid ")"
528 ; incorporated before the expansion rule of
529 ; atom [SP 1*<any TEXT-CHAR except "]">]
530 ; that appears in [RFC3501]
531
532 search-key =/ "EMAILID" SP objectid / "THREADID" SP objectid
533
534 status-att =/ "MAILBOXID"
535
536 status-att-val =/ "MAILBOXID" SP "(" objectid ")"
537 ; follows tagged-ext production from [RFC4466]
538
5398. Implementation Considerations
540
5418.1. Assigning Object Identifiers
542
543 All ObjectID values are allocated by the server.
544
545 In the interest of reducing the possibilities of encoding mistakes,
546 ObjectIDs are restricted to a safe subset of possible byte values; in
547 order to allow clients to allocate storage, they are restricted in
548 length.
549
550 An ObjectID is a string of 1 to 255 characters from the following set
551 of 64 codepoints: a-z, A-Z, 0-9, _, -. These characters are safe to
552 use in almost any context (e.g., filesystems, URIs, IMAP atoms).
553 These are the same characters defined as base64url in [RFC4648].
554
555
556
557
558
559
560
561
562Gondwana Standards Track [Page 10]
563
564RFC 8474 IMAP ObjectID September 2018
565
566
567 For maximum safety, servers should also follow defensive allocation
568 strategies to avoid creating risks where glob completion or data type
569 detection may be present (e.g., on filesystems or in spreadsheets).
570 In particular, it is wise to avoid:
571
572 o IDs starting with a dash
573
574 o IDs starting with digits
575
576 o IDs that contain only digits
577
578 o IDs that differ only by ASCII case (for example, A vs. a)
579
580 o the specific sequence of three characters NIL in any case (because
581 this sequence can be confused with the IMAP protocol expression of
582 the null value)
583
584 A good solution to these issues is to prefix every ID with a single
585 alphabetical character.
586
5878.2. Interaction with Special Cases
588
589 The case of RENAME INBOX may need special handling because it has
590 special behavior, as defined in [RFC3501], Section 6.3.5.
591
592 It is advisable (though not required) to have MAILBOXID be globally
593 unique, but it is only required to be unique within messages offered
594 to a single client login to a single server hostname. For example, a
595 proxy that aggregates multiple independent servers MUST NOT advertise
596 the OBJECTID capability unless it can guarantee that different
597 objects will never use the same identifiers, even if backend object
598 identifiers collide.
599
6008.3. Client Usage
601
602 Servers that implement both RFC 6154 and this specification should
603 optimize their execution of commands like UID SEARCH OR EMAILID 1234
604 EMAILID 4321.
605
606 Clients can assume that searching the all-mail mailbox using OR/
607 EMAILID or OR/THREADID is a fast way to find messages again if some
608 other client has moved them out of the mailbox where they were
609 previously seen.
610
611 Clients that cache data offline should fetch the EMAILID of all new
612 messages to avoid redownloading already-cached message details.
613
614
615
616
617
618Gondwana Standards Track [Page 11]
619
620RFC 8474 IMAP ObjectID September 2018
621
622
623 Clients should fetch the MAILBOXID for any new mailboxes before
624 discarding cache data for any mailbox that is no longer present on
625 the server so that they can detect renames and avoid redownloading
626 data.
627
6288.4. Advice to Client Implementers
629
630 In cases of server failure and disaster recovery, or misbehaving
631 servers, it is possible that a client will be sent invalid
632 information, e.g., identical ObjectIDs or ObjectIDs that have changed
633 where they MUST NOT change according to this document.
634
635 In a case where a client detects inconsistent ObjectID responses from
636 a server, it SHOULD fall back to relying on the guarantees of RFC
637 3501. For simplicity, a client MAY instead choose to discard its
638 entire cache and resync all state from the server.
639
640 Client authors protecting against server misbehavior MUST ensure that
641 their design cannot get into an infinite loop of discarding cache and
642 fetching the same data repeatedly without user interaction.
643
6449. Future Considerations
645
646 This extension is intentionally defined to be compatible with the
647 data model in [JMAP-MAIL].
648
649 A future extension could be proposed to give a way to SELECT a
650 mailbox by MAILBOXID rather than name.
651
652 A future extension to [RFC5228] could allow fileinto by MAILBOXID
653 rather than name.
654
655 An extension to allow fetching message content directly via EMAILID
656 and message listings by THREADID could be proposed.
657
65810. IANA Considerations
659
660 IANA has added "OBJECTID" to the "IMAP Capabilities" registry located
661 at <https://www.iana.org/assignments/imap-capabilities> with a
662 reference to this document.
663
664 IANA has added "MAILBOXID" to the "IMAP Response Codes" registry
665 located at <https://www.iana.org/assignments/imap-response-codes>
666 with a reference to this document.
667
668
669
670
671
672
673
674Gondwana Standards Track [Page 12]
675
676RFC 8474 IMAP ObjectID September 2018
677
678
67911. Security Considerations
680
681 It is strongly advised that servers generate ObjectIDs that are safe
682 to use as filesystem names and unlikely to be autodetected as
683 numbers. See implementation considerations.
684
685 If a digest is used for ID generation, it must have a collision-
686 resistant property, so server implementations are advised to monitor
687 current security research and choose secure digests. As the IDs are
688 generated by the server, it will be possible to migrate to a new hash
689 by just using the new algorithm when creating new IDs. This is
690 particularly true if a prefix is used on each ID, which can be
691 changed when the algorithm changes.
692
693 The use of a digest for ID generation may be used as proof that a
694 particular sequence of bytes was seen by the server. However, this
695 is only a risk if IDs are leaked to clients who don't have permission
696 to fetch the data directly. Servers that are expected to handle
697 highly sensitive data should consider this when choosing how to
698 create IDs.
699
700 See also the security considerations in [RFC3501], Section 11.
701
70212. References
703
70412.1. Normative References
705
706 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
707 Requirement Levels", BCP 14, RFC 2119,
708 DOI 10.17487/RFC2119, March 1997,
709 <https://www.rfc-editor.org/info/rfc2119>.
710
711 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
712 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003,
713 <https://www.rfc-editor.org/info/rfc3501>.
714
715 [RFC4315] Crispin, M., "Internet Message Access Protocol (IMAP) -
716 UIDPLUS extension", RFC 4315, DOI 10.17487/RFC4315,
717 December 2005, <https://www.rfc-editor.org/info/rfc4315>.
718
719 [RFC4466] Melnikov, A. and C. Daboo, "Collected Extensions to IMAP4
720 ABNF", RFC 4466, DOI 10.17487/RFC4466, April 2006,
721 <https://www.rfc-editor.org/info/rfc4466>.
722
723 [RFC5228] Guenther, P., Ed. and T. Showalter, Ed., "Sieve: An Email
724 Filtering Language", RFC 5228, DOI 10.17487/RFC5228,
725 January 2008, <https://www.rfc-editor.org/info/rfc5228>.
726
727
728
729
730Gondwana Standards Track [Page 13]
731
732RFC 8474 IMAP ObjectID September 2018
733
734
735 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
736 Specifications: ABNF", STD 68, RFC 5234,
737 DOI 10.17487/RFC5234, January 2008,
738 <https://www.rfc-editor.org/info/rfc5234>.
739
740 [RFC5256] Crispin, M. and K. Murchison, "Internet Message Access
741 Protocol - SORT and THREAD Extensions", RFC 5256,
742 DOI 10.17487/RFC5256, June 2008,
743 <https://www.rfc-editor.org/info/rfc5256>.
744
745 [RFC5819] Melnikov, A. and T. Sirainen, "IMAP4 Extension for
746 Returning STATUS Information in Extended LIST", RFC 5819,
747 DOI 10.17487/RFC5819, March 2010,
748 <https://www.rfc-editor.org/info/rfc5819>.
749
750 [RFC6851] Gulbrandsen, A. and N. Freed, Ed., "Internet Message
751 Access Protocol (IMAP) - MOVE Extension", RFC 6851,
752 DOI 10.17487/RFC6851, January 2013,
753 <https://www.rfc-editor.org/info/rfc6851>.
754
755 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
756 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
757 May 2017, <https://www.rfc-editor.org/info/rfc8174>.
758
75912.2. Informative References
760
761 [JMAP-MAIL]
762 Jenkins, N. and C. Newman, "JMAP for Mail", Work in
763 Progress, draft-ietf-jmap-mail-07, August 2018.
764
765 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally
766 Unique IDentifier (UUID) URN Namespace", RFC 4122,
767 DOI 10.17487/RFC4122, July 2005,
768 <https://www.rfc-editor.org/info/rfc4122>.
769
770 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data
771 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006,
772 <https://www.rfc-editor.org/info/rfc4648>.
773
774
775
776
777
778
779
780
781
782
783
784
785
786Gondwana Standards Track [Page 14]
787
788RFC 8474 IMAP ObjectID September 2018
789
790
791Appendix A. Ideas for Implementing Object Identifiers
792
793 Ideas for calculating MAILBOXID:
794
795 o Universally Unique Identifier (UUID) [RFC4122]
796
797 o Server-assigned sequence number (guaranteed not to be reused)
798
799 Ideas for implementing EMAILID:
800
801 o Digest of message content (RFC822 bytes) -- expensive unless
802 cached
803
804 o UUID [RFC4122]
805
806 o Server-assigned sequence number (guaranteed not to be reused)
807
808 Ideas for implementing THREADID:
809
810 o Derive from EMAILID of first seen message in the thread.
811
812 o UUID [RFC4122]
813
814 o Server-assigned sequence number (guaranteed not to be reused)
815
816 There is a need to index and look up reference/in-reply-to data at
817 message creation to efficiently find matching messages for threading.
818 Threading may be either across mailboxes or within each mailbox only.
819 The server has significant leeway here.
820
821Acknowledgments
822
823 The author would like to thank the EXTRA working group at IETF for
824 feedback and advice -- in particular, Arnt Gulbrandsen, Brandon Long,
825 Chris Newman, and Josef Sipek.
826
827 This document drew inspiration from the Gmail X-GM-THRID and X-GM-
828 MSGID implementations as currently defined at
829 <https://developers.google.com/gmail/imap/imap-extensions>, as well
830 as the X-GUID implementation in the Dovecot server.
831
832
833
834
835
836
837
838
839
840
841
842Gondwana Standards Track [Page 15]
843
844RFC 8474 IMAP ObjectID September 2018
845
846
847Author's Address
848
849 Bron Gondwana (editor)
850 FastMail
851 Level 2, 114 William St
852 Melbourne VIC 3000
853 Australia
854
855 Email: brong@fastmailteam.com
856 URI: https://www.fastmail.com
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898Gondwana Standards Track [Page 16]
899
900