--- 1/draft-ietf-extra-imap-objectid-02.txt 2018-05-28 02:13:32.772050878 -0700 +++ 2/draft-ietf-extra-imap-objectid-03.txt 2018-05-28 02:13:32.804051641 -0700 @@ -1,42 +1,42 @@ EXTRA B. Gondwana, Ed. Internet-Draft FastMail -Updates: 3501 (if approved) May 26, 2018 +Updates: 3501 (if approved) May 28, 2018 Intended status: Standards Track -Expires: November 27, 2018 +Expires: November 29, 2018 IMAP Extension for object identifiers - draft-ietf-extra-imap-objectid-02 + draft-ietf-extra-imap-objectid-03 Abstract - This document adds new properties to IMAP mailboxes and messages to - allow clients to more efficiently re-use cached data for resources - which have changed location on the server. + This document updates RFC3501 (IMAP4rev1) with persistent identifiers + on mailboxes and messages to allow clients to more efficiently re-use + cached data when resources have changed location on the server. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on November 27, 2018. + This Internet-Draft will expire on November 29, 2018. Copyright Notice Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved. 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 @@ -62,30 +62,31 @@ 6. New Filters on SEARCH command . . . . . . . . . . . . . . . . 9 7. Formal syntax . . . . . . . . . . . . . . . . . . . . . . . . 9 8. Implementation considerations . . . . . . . . . . . . . . . . 10 8.1. Assigning object identifiers . . . . . . . . . . . . . . 10 8.2. Interaction with special cases . . . . . . . . . . . . . 11 8.3. Client usage . . . . . . . . . . . . . . . . . . . . . . 11 9. Future considerations . . . . . . . . . . . . . . . . . . . . 11 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 11. Security Considerations . . . . . . . . . . . . . . . . . . . 12 12. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 - 12.1. draft-ietf-extra-imap-objectid-02 . . . . . . . . . . . 12 - 12.2. draft-ietf-extra-imap-objectid-01 . . . . . . . . . . . 12 - 12.3. draft-ietf-extra-imap-objectid-00 . . . . . . . . . . . 13 - 12.4. draft-ietf-extra-imap-uniqueid-00 . . . . . . . . . . . 13 - 12.5. draft-gondwana-imap-uniqueid-01 . . . . . . . . . . . . 13 - 12.6. draft-gondwana-imap-uniqueid-00 . . . . . . . . . . . . 13 - 13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 13 + 12.1. draft-ietf-extra-imap-objectid-03 . . . . . . . . . . . 12 + 12.2. draft-ietf-extra-imap-objectid-02 . . . . . . . . . . . 12 + 12.3. draft-ietf-extra-imap-objectid-01 . . . . . . . . . . . 12 + 12.4. draft-ietf-extra-imap-objectid-00 . . . . . . . . . . . 13 + 12.5. draft-ietf-extra-imap-uniqueid-00 . . . . . . . . . . . 13 + 12.6. draft-gondwana-imap-uniqueid-01 . . . . . . . . . . . . 13 + 12.7. draft-gondwana-imap-uniqueid-00 . . . . . . . . . . . . 14 + 13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 14 13.1. Appendix 1: ideas for implementing object identifiers . 14 - 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 - 14.1. Normative References . . . . . . . . . . . . . . . . . . 14 + 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 15 + 14.1. Normative References . . . . . . . . . . . . . . . . . . 15 14.2. Informative References . . . . . . . . . . . . . . . . . 15 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 16 1. Introduction IMAP stores are often used by many clients. Each client may cache data from the server so that they don't need to re-download information. [RFC3501] defines that a mailbox can be uniquely referenced by its name and UIDVALIDITY, and a message within that mailbox can be uniquely referenced by its mailbox (name + @@ -160,45 +161,44 @@ MAILBOXID response code in the tagged OK response to all successful CREATE commands. Syntax: "MAILBOXID" SP "(" ")" Response code in tagged OK for successful CREATE command. Example: C: 3 create foo - S: 3 OK [MAILBOXID (F2212ea87-6097-4256-9d51-716686338625)] Completed + S: 3 OK [MAILBOXID (F2212ea87-6097-4256-9d51-71338625)] Completed C: 4 create bar - S: 4 OK [MAILBOXID (F6352ae03-b7f5-463c-896f-d47cf8b48ee3)] Completed + S: 4 OK [MAILBOXID (F6352ae03-b7f5-463c-896f-d8b48ee3)] Completed C: 5 create foo S: 5 NO Mailbox already exists 4.2. New OK Untagged Response for SELECT and EXAMINE This document adds a new untagged response code to the SELECT and EXAMINE commands. A server advertising the OBJECTID capability MUST return an untagged OK response with the MAILBOXID response code on all successful SELECT and EXAMINE commands. Syntax: "OK" SP "[" "MAILBOXID" SP "(" ")" "]" text Untagged OK response to SELECT or EXAMINE. Example: C: 27 select "foo" [...] - S: * OK [UIDVALIDITY 1524195797] Ok - S: * OK [MAILBOXID (F2212ea87-6097-4256-9d51-716686338625)] Ok + S: * OK [MAILBOXID (F2212ea87-6097-4256-9d51-71338625)] Ok [...] S: 27 OK [READ-WRITE] Completed 4.3. New attribute for STATUS This document adds the MAILBOXID attribute to the STATUS command using the extended syntax defined in [RFC4466]. A server that advertises the OBJECTID capability MUST support the MAILBOXID status attribute. @@ -208,47 +208,47 @@ The attribute in the STATUS command. Syntax: "MAILBOXID" SP "(" ")" The response item in the STATUS response contains the objectid assigned by the server for this mailbox. Example: C: 6 status foo (mailboxid) - S: * STATUS foo (MAILBOXID (F2212ea87-6097-4256-9d51-716686338625)) + S: * STATUS foo (MAILBOXID (F2212ea87-6097-4256-9d51-71338625)) S: 6 OK Completed C: 7 status bar (mailboxid) - S: * STATUS bar (MAILBOXID (F6352ae03-b7f5-463c-896f-d47cf8b48ee3)) + S: * STATUS bar (MAILBOXID (F6352ae03-b7f5-463c-896f-d8b48ee3)) S: 7 OK Completed C: 8 rename foo renamed S: * OK rename foo renamed S: 8 OK Completed C: 9 status renamed (mailboxid) - S: * STATUS renamed (MAILBOXID (F2212ea87-6097-4256-9d51-716686338625)) + S: * STATUS renamed (MAILBOXID (F2212ea87-6097-4256-9d51-71338625)) S: 9 OK Completed C: 10 status bar (mailboxid) - S: * STATUS bar (MAILBOXID (F6352ae03-b7f5-463c-896f-d47cf8b48ee3)) + S: * STATUS bar (MAILBOXID (F6352ae03-b7f5-463c-896f-d8b48ee3)) S: 10 OK Completed When the LIST-STATUS IMAP capability defined in [RFC5819] is also available, the STATUS command can be combined with the LIST command. Example: C: 11 list "" "*" return (status (mailboxid)) S: * LIST (\HasNoChildren) "." INBOX S: * STATUS INBOX (MAILBOXID (Ff8e3ead4-9389-4aff-adb1-d8d89efd8cbf)) S: * LIST (\HasNoChildren) "." bar - S: * STATUS bar (MAILBOXID (F6352ae03-b7f5-463c-896f-d47cf8b48ee3)) + S: * STATUS bar (MAILBOXID (F6352ae03-b7f5-463c-896f-d8b48ee3)) S: * LIST (\HasNoChildren) "." renamed - S: * STATUS renamed (MAILBOXID (F2212ea87-6097-4256-9d51-716686338625)) + S: * STATUS renamed (MAILBOXID (F2212ea87-6097-4256-9d51-71338625)) S: 11 OK Completed (0.001 secs 3 calls) 5. EMAILID object identifier and THREADID correlator This document defines the data items EMAILID and THREADID on messages. 5.1. EMAILID identifier for identical messages The EMAILID data item is an objectid which uniquely identifies the @@ -344,41 +344,41 @@ S: 11 OK [APPENDUID 1521475658 2] Completed C: 17 append inbox "20-Mar-2018 03:07:37 +1100" {736} [...] Subject: Message C Message-ID: [...] S: 17 OK [APPENDUID 1521475658 3] Completed C: 22 fetch 1:* (emailid threadid) -S: * 1 FETCH (EMAILID (M8976d99ac3275bb4e) THREADID (T4964b478a75b7ea9)) -S: * 2 FETCH (EMAILID (Md3c288836c4c7a762) THREADID (T4964b478a75b7ea9)) -S: * 3 FETCH (EMAILID (M2e25fdc09b49ea703) THREADID (T6311863d02dd95b5)) + S: * 1 FETCH (EMAILID (M6d99ac3275bb4e) THREADID (T64b478a75b7ea9)) + S: * 2 FETCH (EMAILID (M288836c4c7a762) THREADID (T64b478a75b7ea9)) + S: * 3 FETCH (EMAILID (M5fdc09b49ea703) THREADID (T11863d02dd95b5)) S: 22 OK Completed (0.000 sec) C: 23 move 2 foo S: * OK [COPYUID 1521475659 2 1] Completed S: * 2 EXPUNGE S: 23 OK Completed C: 24 fetch 1:* (emailid threadid) -S: * 1 FETCH (EMAILID (M8976d99ac3275bb4e) THREADID (T4964b478a75b7ea9)) -S: * 2 FETCH (EMAILID (M2e25fdc09b49ea703) THREADID (T6311863d02dd95b5)) + S: * 1 FETCH (EMAILID (M6d99ac3275bb4e) THREADID (T64b478a75b7ea9)) + S: * 2 FETCH (EMAILID (M5fdc09b49ea703) THREADID (T11863d02dd95b5)) S: 24 OK Completed (0.000 sec) C: 25 select "foo" C: 25 select "foo" [...] S: 25 OK [READ-WRITE] Completed C: 26 fetch 1:* (emailid threadid) -S: * 1 FETCH (EMAILID (Md3c288836c4c7a762) THREADID (T4964b478a75b7ea9)) + S: * 1 FETCH (EMAILID (M288836c4c7a762) THREADID (T64b478a75b7ea9)) S: 26 OK Completed (0.000 sec) Example: (no THREADID support) C: 26 fetch 1:* (emailid threadid) S: * 1 FETCH (EMAILID (M00000001) THREADID NIL) S: * 2 FETCH (EMAILID (M00000002) THREADID NIL) S: 26 OK Completed (0.000 sec) 6. New Filters on SEARCH command @@ -389,24 +389,24 @@ Messages whose EMAILID is exactly the specified objectid. THREADID Messages whose THREADID is exactly the specified objectid. Example: (as if run before the MOVE above when the mailbox had 3 messages) - C: 27 search emailid M8976d99ac3275bb4e + C: 27 search emailid M6d99ac3275bb4e S: * SEARCH 1 S: 27 OK Completed (1 msgs in 0.000 secs) - C: 28 search threadid T4964b478a75b7ea9 + C: 28 search threadid T64b478a75b7ea9 S: * SEARCH 1 2 S: 28 OK Completed (2 msgs in 0.000 secs) 7. Formal syntax The following syntax specification uses the Augmented Backus-Naur Form (ABNF) [RFC5234] notation. Elements not defined here can be found in the formal syntax of the ABNF [RFC5234], IMAP [RFC3501], and IMAP ABNF extensions [RFC4466] specifications. @@ -512,97 +512,107 @@ and message listings by THREADID could be proposed. 10. IANA Considerations IANA is requested to add "OBJECTID" to the "IMAP Capabilities" registry located at . IANA is requested to add "MAILBOXID" to the "IMAP Response Codes" registry located at with a Reference of [THIS RFC]. + codes> with a Reference of [[THIS RFC]]. 11. Security Considerations It is strongly advised that servers generate OBJECTIDs which are safe to use as filesystem names, and unlikely to be auto-detected as numbers. See implementation considerations. If a digest is used for ID generation, it must have a collision resistent property, so server implementations are advised to monitor current security research and choose secure digests. The use of a digest for ID generation may be used as proof that a particular sequence of bytes was seen by the server. 12. Changes To be removed by the editor before publication -12.1. draft-ietf-extra-imap-objectid-02 +12.1. draft-ietf-extra-imap-objectid-03 + + o added RFC3501 to Abstract + + o updated [[THIS RFC]] to not fail idnits + + o changed jmap-mail to be informative rather than normative + + o shortened IDs to stop wrapping and outdents in IMAP examples + +12.2. draft-ietf-extra-imap-objectid-02 o added "Client usage" section -12.2. draft-ietf-extra-imap-objectid-01 +12.3. draft-ietf-extra-imap-objectid-01 o added "updates" for RFC3501 o fixed domains in thread example o described threading in more detail - o added IANA request for Response Code o clarified RFC2119 references o simplified some waffle in wording o added security consideration to choose good digest o added MAILBOXID-UID suggestion for EMAILID generation + o updated ABNF normative reference to RFC5234 -12.3. draft-ietf-extra-imap-objectid-00 +12.4. draft-ietf-extra-imap-objectid-00 o renamed draft to be objectid rather than uniqueid o renamed UNIQUEID (capability) to OBJECTID o restricted objectid to 64 safe characters o added security considerations and advice about choosing objectid o wrapped all responses in () for RFC4466 compatibility o signifiant rewrite of all sections -12.4. draft-ietf-extra-imap-uniqueid-00 +12.5. draft-ietf-extra-imap-uniqueid-00 o renamed draft to be an EXTRA document o added example for LIST RETURN STATUS o started work on ABNF o attempted to add response codes for EMAILID and THREADID -12.5. draft-gondwana-imap-uniqueid-01 +12.6. draft-gondwana-imap-uniqueid-01 o renamed UNIQUEID (status item) to MAILBOXID o renamed MSGID to EMAILID o renamed THRID to THREADID o added TODO section -12.6. draft-gondwana-imap-uniqueid-00 +12.7. draft-gondwana-imap-uniqueid-00 o initial upload with names UNIQUEID/MSGID/THRID 13. Acknowledgments The EXTRA working group at IETF. In particular feedback from Arnt Gulbrandsen, Brandon Long, Chris Newman and Josef Sipek. The Gmail X-GM-THRID and X-GM-MSGID implementation as currently defined at . [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, . [RFC4315] Crispin, M., "Internet Message Access Protocol (IMAP) - @@ -683,20 +688,24 @@ DOI 10.17487/RFC5819, March 2010, . [RFC6851] Gulbrandsen, A. and N. Freed, Ed., "Internet Message Access Protocol (IMAP) - MOVE Extension", RFC 6851, DOI 10.17487/RFC6851, January 2013, . 14.2. Informative References + [I-D.ietf-jmap-mail] + Jenkins, N., "JMAP for Mail", draft-ietf-jmap-mail-05 + (work in progress), May 2018. + [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally Unique IDentifier (UUID) URN Namespace", RFC 4122, DOI 10.17487/RFC4122, July 2005, . [RFC5256] Crispin, M. and K. Murchison, "Internet Message Access Protocol - SORT and THREAD Extensions", RFC 5256, DOI 10.17487/RFC5256, June 2008, .