<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' []>
<rfc ipr="trust200902" category="std" docName="draft-ietf-extra-imap-objectid-04" updates="3501">
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc private=""?>
<?rfc topblock="yes"?>
<?rfc comments="no"?>
<front>
<title abbrev="IMAP ObjectID">IMAP Extension for object identifiers</title>

<author role="editor" initials="B." surname="Gondwana" fullname="Bron Gondwana">
<organization>FastMail</organization>
<address>
<postal>
<street>Level 2, 114 William St</street>
<city>Melbourne</city>
<code>VIC 3000</code>
<country>Australia</country>
<region></region>
</postal>
<phone></phone>
<email>brong@fastmailteam.com</email>
<uri>https://www.fastmail.com</uri>
</address>
</author>
<date year="2018" month="July" day="17"/>

<area>Applications</area>
<workgroup>EXTRA</workgroup>
<keyword>IMAP</keyword>
<keyword>email</keyword>


<abstract>
<t>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.
</t>
</abstract>


</front>

<middle>

<section anchor="introduction" title="Introduction">
<t>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.
<xref target="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 + UIDVALIDITY) and UID.  The triple of
mailbox name, UIDVALIDITY and UID is guaranteed to be immutable.
</t>
<t><xref target="RFC4315"/> defines a COPYUID response which allows a client which
copies messages to know the mapping between the UIDs in the
source and destination mailboxes, and hence update its local cache.
</t>
<t>If a mailbox is successfully renamed by a client, that client will know
that the same messages exist in the destination mailbox name as previously
existed in the source mailbox name.
</t>
<t>The result is that the client which copies (or <xref target="RFC6851"/> moves) messages or
renames a mailbox can update its local cache, but any other client connected
to the same store can not know with certainty that the messages are identical,
and so will re-download everything.
</t>
<t>This extension adds new properties to a message (EMAILID) and mailbox (MAILBOXID)
which allow a client to quickly identify messages or mailboxes which have been
renamed by another client.
</t>
<t>This extension also adds an optional thread identifier (THREADID) to messages,
which can be used by the server to indicate messages which it has identified
to be related.  A server that does not implement threading will return NIL
to all requests for THREADID.
</t>
</section>

<section anchor="conventions-used-in-this-document" title="Conventions Used In This Document">
<t>In examples, &quot;C:&quot; indicates lines sent by a client that is connected
to a server. &quot;S:&quot; indicates lines sent by the server to the client.
</t>
<t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;,
&quot;SHALL NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;,
&quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as
described in <xref target="RFC2119"/> when they appear in ALL CAPS.  These words may
also appear in this document in lower case as plain English words,
absent their normative meanings.
</t>
</section>

<section anchor="capability-identification" title="CAPABILITY Identification">
<t>IMAP servers that support this extension MUST include &quot;OBJECTID&quot; in
the response list to the CAPABILITY command.
</t>
</section>

<section anchor="mailboxid-object-identifier" title="MAILBOXID object identifier">
<t>The MAILBOXID is a server-allocated unique identifer for each mailbox.
</t>
<t>The server MUST return the same MAILBOXID for a mailbox with the same
name and UIDVALIDITY.
</t>
<t>The server MUST NOT report the same MAILBOXID for two mailboxes at the
same time.
</t>
<t>The server MUST NOT reuse the same MAILBOXID for a mailbox which does not
obey all the invarients that <xref target="RFC3501"/> defines for a mailbox which does
not change name or UIDVALIDITY.
</t>
<t>The server SHOULD NOT change MAILBOXID when renaming a folder, as this
loses the main benefit of having a unique identifier.
</t>

<section anchor="new-response-code-for-create" title="New response code for CREATE">
<t>This document extends the CREATE command to have the response code MAILBOXID
on successful mailbox creation.
</t>
<t>A server advertising the OBJECTID capability MUST include the MAILBOXID
response code in the tagged OK response to all successful CREATE commands.
</t>
<t>Syntax: &quot;MAILBOXID&quot; SP &quot;(&quot; &lt;objectid&gt; &quot;)&quot;
</t>

<figure align="center"><artwork align="center">
Response code in tagged OK for successful CREATE command.
</artwork></figure>
<t>Example:
</t>

<figure align="center"><artwork align="center">
C: 3 create foo
S: 3 OK [MAILBOXID (F2212ea87-6097-4256-9d51-71338625)] Completed
C: 4 create bar
S: 4 OK [MAILBOXID (F6352ae03-b7f5-463c-896f-d8b48ee3)] Completed
C: 5 create foo
S: 5 NO Mailbox already exists
</artwork></figure>
</section>

<section anchor="new-ok-untagged-response-for-select-and-examine" title="New OK Untagged Response for SELECT and EXAMINE">
<t>This document adds a new untagged response code to the SELECT and
EXAMINE commands.
</t>
<t>A server advertising the OBJECTID capability MUST return an untagged
OK response with the MAILBOXID response code on all successful SELECT
and EXAMINE commands.
</t>
<t>Syntax: &quot;OK&quot; SP &quot;[&quot; &quot;MAILBOXID&quot; SP &quot;(&quot; &lt;objectid&gt; &quot;)&quot; &quot;]&quot; text
</t>

<figure align="center"><artwork align="center">
Untagged OK response to SELECT or EXAMINE.
</artwork></figure>
<t>Example:
</t>

<figure align="center"><artwork align="center">
C: 27 select "foo"
[...]
S: * OK [MAILBOXID (F2212ea87-6097-4256-9d51-71338625)] Ok
[...]
S: 27 OK [READ-WRITE] Completed
</artwork></figure>
</section>

<section anchor="new-attribute-for-status" title="New attribute for STATUS">
<t>This document adds the MAILBOXID attribute to the STATUS command using
the extended syntax defined in <xref target="RFC4466"/>.
</t>
<t>A server that advertises the OBJECTID capability MUST support the
MAILBOXID status attribute.
</t>
<t>Syntax: &quot;MAILBOXID&quot;
</t>

<figure align="center"><artwork align="center">
The attribute in the STATUS command.
</artwork></figure>
<t>Syntax: &quot;MAILBOXID&quot; SP &quot;(&quot; &lt;objectid&gt; &quot;)&quot;
</t>

<figure align="center"><artwork align="center">
The response item in the STATUS response contains the objectid
assigned by the server for this mailbox.
</artwork></figure>
<t>Example:
</t>

<figure align="center"><artwork align="center">
C: 6 status foo (mailboxid)
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-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-71338625))
S: 9 OK Completed
C: 10 status bar (mailboxid)
S: * STATUS bar (MAILBOXID (F6352ae03-b7f5-463c-896f-d8b48ee3))
S: 10 OK Completed
</artwork></figure>
<t>When the LIST-STATUS IMAP capability defined in <xref target="RFC5819"/> is also
available, the STATUS command can be combined with the LIST command.
</t>
<t>Example:
</t>

<figure align="center"><artwork align="center">
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-d8b48ee3))
S: * LIST (\HasNoChildren) "." renamed
S: * STATUS renamed (MAILBOXID (F2212ea87-6097-4256-9d51-71338625))
S: 11 OK Completed (0.001 secs 3 calls)
</artwork></figure>
</section>
</section>

<section anchor="emailid-object-identifier-and-threadid-correlator" title="EMAILID object identifier and THREADID correlator">

<section anchor="emailid-identifier-for-identical-messages" title="EMAILID identifier for identical messages">
<t>The EMAILID data item is an objectid which uniquely identifies the
content of a single message.  Anything which must remain
immutable on a {name, uidvalidity, uid} triple must also be the
same between messages with the same EMAILID.
</t>
<t>The server MUST return the same EMAILID for the same triple,
hence EMAILID is immutable.
</t>
<t>The server MUST return the same EMAILID as the source message for
the matching destination message in the COPYUID pairing after a COPY
or <xref target="RFC6851"/> MOVE command.
</t>
<t>The server MAY assign the same EMAILID as an existing message upon
APPEND (e.g. if it detects that the new message has exactly identical
content to that of an existing message)
</t>
<t>NOTE: EMAILID only identifies the immutable content of the message.  In
particular, it is possible for different messages with the same EMAILID
to have different keywords.  This document does not specify a way to
STORE by EMAILID.
</t>
</section>

<section anchor="threadid-identifer-for-related-messages" title="THREADID identifer for related messages">
<t>The THREADID data item is an objectid which uniquely identifies
a set of messages which the server believes should be grouped
together when presented.
</t>
<t>THREADID calculation is generally based on some combination of References,
In-Reply-To and Subject, but the exact logic is left up to the server
implementation.  <xref target="RFC5256"/> describes some algorithms that could be used,
however this specfication does not mandate any particular strategy.
</t>
<t>The server MUST return the same THREADID for all messages with the
same EMAILID.
</t>
<t>The server SHOULD return the same THREADID for related messages even
if they are in different mailboxes.
</t>
<t>THREADID is optional, if the server doesn't support THREADID or
is unable to calculate relationships between messages, it MUST return
NIL to all FETCH responses for the THREADID data item, and a SEARCH for
THREADID MUST NOT match any messages.
</t>
<t>The server MUST NOT use the same objectid value for both EMAILIDs
and THREADIDs.  If they are stored with the same value internally, the
server can generate prefixed values (as shown in the examples below
with M and T prefixes) to avoid clashes.
</t>
</section>

<section anchor="new-message-data-items-in-fetch-and-uid-fetch-commands" title="New Message Data Items in FETCH and UID FETCH Commands">
<t>This document defines two FETCH items:
</t>
<t>Syntax: EMAILID
</t>

<figure align="center"><artwork align="center">
The EMAILID message data item causes the server to return EMAILID
FETCH response data items.
</artwork></figure>
<t>Syntax: THREADID
</t>

<figure align="center"><artwork align="center">
The THREADID message data item causes the server to return THREADID
FETCH response data items.
</artwork></figure>
<t>And the following responses:
</t>
<t>Syntax:  EMAILID ( &lt;objectid&gt; )
</t>

<figure align="center"><artwork align="center">
The EMAILID response data item contains the server-assigned objectid
for each message.
</artwork></figure>
<t>Syntax:  THREADID ( &lt;objectid&gt; )
</t>

<figure align="center"><artwork align="center">
The THREADID response data item contains the server-assigned objectid
for the set of related messages to which this message belongs.
</artwork></figure>
<t>Syntax:  THREADID NIL
</t>

<figure align="center"><artwork align="center">
The NIL value to the THREADID response data item is returned when
the server mailbox does not support THREADID calculation.
</artwork></figure>
<t>Example:
</t>

<figure align="center"><artwork align="center">
C: 5 append inbox "20-Mar-2018 03:07:37 +1100" {733}
[...]
Subject: Message A
Message-ID: &lt;fake.1521475657.54797@example.com&gt;
[...]
S: 5 OK [APPENDUID 1521475658 1] Completed

C: 11 append inbox "20-Mar-2018 03:07:37 +1100" {793}
[...]
Subject: Re: Message A
Message-ID: &lt;fake.1521475657.21213@example.org&gt;
References: &lt;fake.1521475657.54797@example.com&gt;
[...]
S: 11 OK [APPENDUID 1521475658 2] Completed

C: 17 append inbox "20-Mar-2018 03:07:37 +1100" {736}
[...]
Subject: Message C
Message-ID: &lt;fake.1521475657.60280@example.com&gt;
[...]
S: 17 OK [APPENDUID 1521475658 3] Completed

C: 22 fetch 1:* (emailid threadid)
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 (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 (M288836c4c7a762) THREADID (T64b478a75b7ea9))
S: 26 OK Completed (0.000 sec)
</artwork></figure>
<t>Example: (no THREADID support)
</t>

<figure align="center"><artwork align="center">
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)

</artwork></figure>
</section>
</section>

<section anchor="new-filters-on-search-command" title="New Filters on SEARCH command">
<t>This document defines filters EMAILID and THREADID on the SEARCH command.
</t>
<t>EMAILID &lt;objectid&gt;
</t>

<figure align="center"><artwork align="center">
Messages whose EMAILID is exactly the specified objectid.
</artwork></figure>
<t>THREADID &lt;objectid&gt;
</t>

<figure align="center"><artwork align="center">
Messages whose THREADID is exactly the specified objectid.
</artwork></figure>
<t>Example: (as if run before the MOVE above when the mailbox had 3 messages)
</t>

<figure align="center"><artwork align="center">
C: 27 search emailid M6d99ac3275bb4e
S: * SEARCH 1
S: 27 OK Completed (1 msgs in 0.000 secs)
C: 28 search threadid T64b478a75b7ea9
S: * SEARCH 1 2
S: 28 OK Completed (2 msgs in 0.000 secs)
</artwork></figure>
</section>

<section anchor="formal-syntax" title="Formal syntax">
<t>The following syntax specification uses the Augmented Backus-Naur
Form (ABNF) <xref target="RFC5234"/> notation.  Elements not defined here can be found
in the formal syntax of the ABNF <xref target="RFC5234"/>, IMAP <xref target="RFC3501"/>, and IMAP
ABNF extensions <xref target="RFC4466"/> specifications.
</t>
<t>Except as noted otherwise, all alphabetic characters are case-
insensitive.  The use of upper- or lowercase characters to define
token strings is for editorial clarity only.  Implementations MUST
accept these strings in a case-insensitive fashion.
</t>
<t>capability =/ &quot;OBJECTID&quot;
</t>
<t>fetch-att =/ &quot;EMAILID&quot; / &quot;THREADID&quot;
</t>
<t>fetch-emailid-resp = &quot;EMAILID&quot; SP &quot;(&quot; objectid &quot;)&quot;
        ; follows tagged-ext production from <xref target="RFC4466"/>
</t>
<t>fetch-threadid-resp = &quot;THREADID&quot; SP &quot;(&quot; objectid &quot;)&quot; /
                      &quot;THREADID&quot; NIL
        ; follows tagged-ext production from <xref target="RFC4466"/>
</t>
<t>objectid = 1*255(ALPHA / DIGIT / &quot;_&quot; / &quot;-&quot;)
        ; characters in object identifiers are case
        ; significant
</t>
<t>resp-text-code =/ &quot;MAILBOXID&quot; SP &quot;(&quot; objectid &quot;)&quot;
        ; incorporated before the expansion rule of
        ;  atom [SP 1*&lt;any TEXT-CHAR except &quot;]&quot;&gt;]
        ; that appears in <xref target="RFC3501"/>
</t>
<t>search-key =/ &quot;EMAILID&quot; SP objectid / &quot;THREADID&quot; SP objectid
</t>
<t>status-att =/ &quot;MAILBOXID&quot;
</t>
<t>status-att-value =/ &quot;MAILBOXID&quot; SP &quot;(&quot; objectid &quot;)&quot;
        ; follows tagged-ext production from <xref target="RFC4466"/>
</t>
</section>

<section anchor="implementation-considerations" title="Implementation considerations">

<section anchor="assigning-object-identifiers" title="Assigning object identifiers">
<t>All objectid values are allocated by the server.
</t>
<t>In the interests of reducing the possibilities of encoding mistakes, objectids
are restricted to a safe subset of possible byte values, and in order to allow
clients to allocate storage, they are restricted in length.
</t>
<t>An objectid is a string of 1 to 255 characters from the following set of
64 codepoints. a-z, A-Z, 0-9, '_', '-'.  These characters are safe to use
in almost any context (e.g. filesystems, URIs, IMAP atoms).
</t>
<t>For maximum safety, servers SHOULD also follow defensive allocation strategies
to avoid creating risks where glob completion or data type detection may be
present (e.g. on filesystems or in spreadsheets).  In particular it is wise to
avoid:
</t>
<t>
<list style="symbols">
<t>ids starting with -</t>
<t>ids starting with digits</t>
<t>ids which contain only digits</t>
<t>ids which differ only by ASCII case (A vs a)</t>
<t>the specific sequence of 3 characters NIL</t>
</list>
</t>
<t>A good solution to these issues is to prefix every ID with a single
alphabetical character.
</t>
</section>

<section anchor="interaction-with-special-cases" title="Interaction with special cases">
<t>The case of RENAME INBOX may need special handling, as it has special
behaviour as defined in <xref target="RFC3501"/> section 6.3.5.
</t>
<t>It is advisable (though not required) to have MAILBOXID be globally
unique, but it is only required to be unique within messages offered
to a single client login to a single server hostname.  For example,
a proxy which aggregates multiple independent servers MUST NOT
advertise the OBJECTID capability unless it can guarantee that
different objects will never use the same identifiers, even if
backend object collide.
</t>
</section>

<section anchor="client-usage" title="Client usage">
<t>Servers that implement both RFC 6154 and this specification SHOULD
optimize their execution of command like UID SEARCH OR EMAILID 1234 EMAILID
4321.
</t>
<t>Clients can assume that searching the all-mail mailbox using
OR/EMAILID or OR/THREADID is a fast way to find messages again if some
other client has moved them out of the mailbox where they were previously
seen.
</t>
<t>Clients that cache data offline SHOULD fetch the EMAILID of all new
messages to avoid re-downloading already cached message details.
</t>
<t>Clients SHOULD fetch the MAILBOXID for any new mailboxes before
discarding cache data for any mailbox which is no longer present
on the server, so that they can detect renames and avoid re-downloading
data.
</t>
</section>
</section>

<section anchor="future-considerations" title="Future considerations">
<t>This extension is intentionally defined to be compatible with the data
model in <xref target="I-D.ietf-jmap-mail"/>.
</t>
<t>A future extension could be proposed to give a way to SELECT a mailbox
by MAILBOXID rather than name.
</t>
<t>A future extension to <xref target="RFC5228"/> could allow fileinto by MAILBOXID
rather than name.
</t>
<t>An extension to allow fetching message content directly via EMAILID and
message listings by THREADID could be proposed.
</t>
</section>

<section anchor="iana-considerations" title="IANA Considerations">
<t>IANA is requested to add &quot;OBJECTID&quot; to the &quot;IMAP Capabilities&quot;
registry located at <eref target="http://www.iana.org/assignments/imap-capabilities"/>.
</t>
<t>IANA is requested to add &quot;MAILBOXID&quot; to the &quot;IMAP Response Codes&quot;
registry located at <eref target="https://www.iana.org/assignments/imap-response-codes"/>
with a Reference of [[THIS RFC]].
</t>
</section>

<section anchor="security-considerations" title="Security Considerations">
<t>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.
</t>
<t>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.  As the IDs are generated by the server,
it will be possible to migrate to a new hash by just creating new IDs with
the new algorithm.  This is particularly true if a prefix is used on each ID,
which can be changed when the algorithm changes.
</t>
<t>The use of a digest for ID generation may be used as proof that a particular
sequence of bytes was seen by the server, however this is only a risk if IDs
are leaked to clients who don't have permission to fetch the data directly.
Servers that are expected to handle highly sensitive data should consider
using a ID generation mechanism which doesn't derive from a digest.
</t>
<t>See also the security considerations in <xref target="RFC3501"/> section 11.
</t>
</section>

<section anchor="changes" title="Changes">
<t>To be removed by the editor before publication
</t>

<section anchor="draftietfextraimapobjectid04" title="draft-ietf-extra-imap-objectid-04">
<t>
<list style="symbols">
<t>described NIL THREADID in more detail (ad review)</t>
<t>made RFC5256 a normative reference (ad review)</t>
<t>fixed ABNF missing quote (ad review)</t>
<t>documented hash upgrade process (ad review)</t>
<t>referenced RFC3501 for INBOX rename (ad review)</t>
<t>referenced RFC3501 security considerations (secdir review)</t>
<t>turned mealy-mouthed &quot;SHOULDs&quot; in to &quot;MUSTs&quot; on immutability (genart review)</t>
<t>remove suggested algorithms which are no longer legitimate (genart review)</t>
<t>updated proxy advice to suggest rewriting ids (genart review)</t>
<t>fixed minor gramatical issues (genart review)</t>
<t>required that EMAILID and THREADID are not identical (own decision)</t>
</list>
</t>
</section>

<section anchor="draftietfextraimapobjectid03" title="draft-ietf-extra-imap-objectid-03">
<t>
<list style="symbols">
<t>added RFC3501 to Abstract</t>
<t>updated [[THIS RFC]] to not fail idnits</t>
<t>changed jmap-mail to be informative rather than normative</t>
<t>shortened IDs to stop wrapping and outdents in IMAP examples</t>
</list>
</t>
</section>

<section anchor="draftietfextraimapobjectid02" title="draft-ietf-extra-imap-objectid-02">
<t>
<list style="symbols">
<t>added &quot;Client usage&quot; section</t>
</list>
</t>
</section>

<section anchor="draftietfextraimapobjectid01" title="draft-ietf-extra-imap-objectid-01">
<t>
<list style="symbols">
<t>added &quot;updates&quot; for RFC3501</t>
<t>fixed domains in thread example</t>
<t>described threading in more detail</t>
<t>added IANA request for Response Code</t>
<t>clarified RFC2119 references</t>
<t>simplified some waffle in wording</t>
<t>added security consideration to choose good digest</t>
<t>added MAILBOXID-UID suggestion for EMAILID generation</t>
<t>updated ABNF normative reference to RFC5234</t>
</list>
</t>
</section>

<section anchor="draftietfextraimapobjectid00" title="draft-ietf-extra-imap-objectid-00">
<t>
<list style="symbols">
<t>renamed draft to be objectid rather than uniqueid</t>
<t>renamed UNIQUEID (capability) to OBJECTID</t>
<t>restricted objectid to 64 safe characters</t>
<t>added security considerations and advice about choosing objectid</t>
<t>wrapped all responses in () for RFC4466 compatibility</t>
<t>signifiant rewrite of all sections</t>
</list>
</t>
</section>

<section anchor="draftietfextraimapuniqueid00" title="draft-ietf-extra-imap-uniqueid-00">
<t>
<list style="symbols">
<t>renamed draft to be an EXTRA document</t>
<t>added example for LIST RETURN STATUS</t>
<t>started work on ABNF</t>
<t>attempted to add response codes for EMAILID and THREADID</t>
</list>
</t>
</section>

<section anchor="draftgondwanaimapuniqueid01" title="draft-gondwana-imap-uniqueid-01">
<t>
<list style="symbols">
<t>renamed UNIQUEID (status item) to MAILBOXID</t>
<t>renamed MSGID to EMAILID</t>
<t>renamed THRID to THREADID</t>
<t>added TODO section</t>
</list>
</t>
</section>

<section anchor="draftgondwanaimapuniqueid00" title="draft-gondwana-imap-uniqueid-00">
<t>
<list style="symbols">
<t>initial upload with names UNIQUEID/MSGID/THRID</t>
</list>
</t>
</section>
</section>

<section anchor="acknowledgments" title="Acknowledgments">
<t>The EXTRA working group at IETF.  In particular feedback from
Arnt Gulbrandsen, Brandon Long, Chris Newman and Josef Sipek.
</t>
<t>The Gmail X-GM-THRID and X-GM-MSGID implementation as currently defined
at <eref target="https://developers.google.com/gmail/imap/imap-extensions"/>.
</t>
<t>Dovecot X-GUID implementation.
</t>

<section anchor="appendix-1-ideas-for-implementing-object-identifiers" title="Appendix 1: ideas for implementing object identifiers">
<t>Ideas for calculating MAILBOXID:
</t>
<t>
<list style="symbols">
<t><xref target="RFC4122"/> UUID</t>
<t>Server assigned sequence number (guaranteed not to be reused)</t>
</list>
</t>
<t>Ideas for implementing EMAILID:
</t>
<t>
<list style="symbols">
<t>Digest of message content (RFC822 bytes) - expensive unless cached</t>
<t><xref target="RFC4122"/> UUID</t>
<t>Server assigned sequence number (guaranteed not to be reused)</t>
</list>
</t>
<t>Ideas for implementing THREADID:
</t>
<t>
<list style="symbols">
<t>Derive from EMAILID of first seen message in the thread.</t>
<t><xref target="RFC4122"/> UUID</t>
<t>Server assigned sequence number (guaranteed not to be reused)</t>
</list>
</t>
<t>There is a need to index and look up reference/in-reply-to data
at message creation to efficiently find matching messages
for threading.  Threading may be either across folders, or within
each folder only.  The server has significant leeway here.
</t>
</section>
</section>

</middle>
<back>
<references title="Normative References">
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"?>
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3501.xml"?>
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4315.xml"?>
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4466.xml"?>
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5228.xml"?>
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5234.xml"?>
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5256.xml"?>
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5819.xml"?>
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6851.xml"?>
</references>
<references title="Informative References">
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-jmap-mail.xml"?>
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4122.xml"?>
</references>

</back>
</rfc>
