draft-ietf-imapext-condstore-08.txt   draft-ietf-imapext-condstore-09.txt 
Internet Draft: IMAP Extension for Conditional STORE A. Melnikov Internet Draft: IMAP Extension for Conditional STORE A. Melnikov
Document: draft-ietf-imapext-condstore-08.txt Isode Ltd. Document: draft-ietf-imapext-condstore-09.txt Isode Ltd.
Expires: June 2006 S. Hole Expires: August 2006 S. Hole
ACI WorldWide/MessagingDirect ACI WorldWide/MessagingDirect
December 2005 February 2006
IMAP Extension for Conditional STORE operation IMAP Extension for Conditional STORE operation
or quick flag changes resynchronization
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79. aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
skipping to change at line 34 skipping to change at line 35
material or to cite them other than as "work in progress". material or to cite them other than as "work in progress".
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt http://www.ietf.org/ietf/1id-abstracts.txt
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2005). Copyright (C) The Internet Society (2006).
Abstract Abstract
Often, multiple IMAP (RFC 3501) clients need to coordinate changes to Often, multiple IMAP (RFC 3501) clients need to coordinate changes to
a common IMAP mailbox. Examples include different clients working on behalf a common IMAP mailbox. Examples include different clients working on
of the same user, and multiple users accessing shared mailboxes. These clients behalf of the same user, and multiple users accessing shared mailboxes.
need a mechanism to synchronize state changes for messages within the These clients need a mechanism to synchronize state changes for messages
mailbox. They must be able to guarantee that only one client can change within the mailbox. They must be able to guarantee that only one client
message state (e.g., message flags) at any time. An can change message state (e.g., message flags) at any time. An
example of such an application is use of an IMAP mailbox as a message example of such an application is use of an IMAP mailbox as a message
queue with multiple dequeueing clients. queue with multiple dequeueing clients.
The Conditional Store facility provides a protected update mechanism for The Conditional Store facility provides a protected update mechanism for
message state information that can detect and resolve conflicts between message state information that can detect and resolve conflicts between
multiple writing mail clients. multiple writing mail clients.
The Conditional Store facility also allows a client to quickly
resynchronize mailbox flag changes.
This document defines an extension to IMAP (RFC 3501). This document defines an extension to IMAP (RFC 3501).
Table of Contents Table of Contents
1 Conventions Used in This Document ......................... X 1 Conventions Used in This Document ......................... X
2 Introduction and Overview ................................. X 2 Introduction and Overview ................................. X
3 IMAP Protocol Changes ..................................... X 3 IMAP Protocol Changes ..................................... X
3.1 New OK untagged responses for SELECT and EXAMINE ......... X 3.1 New OK untagged responses for SELECT and EXAMINE ......... X
3.1.1 HIGHESTMODSEQ response code ............................ X 3.1.1 HIGHESTMODSEQ response code ............................ X
3.1.2 NOMODSEQ response code ................................. X 3.1.2 NOMODSEQ response code ................................. X
3.2 STORE and UID STORE Commands ............................. X 3.2 STORE and UID STORE Commands ............................. X
3.3 FETCH and UID FETCH Commands ............................. X 3.3 FETCH and UID FETCH Commands ............................. X
3.3.1 FETCH modifiers ........................................ X 3.3.1 CHANGEDSINCE FETCH modifier ............................ X
3.3.2 MODSEQ message data item in FETCH Command .............. X 3.3.2 MODSEQ message data item in FETCH Command .............. X
3.4 MODSEQ search criterion in SEARCH ........................ X 3.4 MODSEQ search criterion in SEARCH ........................ X
3.5 Modified SEARCH untagged response ........................ X 3.5 Modified SEARCH untagged response ........................ X
3.6 HIGHESTMODSEQ status data items .......................... X 3.6 HIGHESTMODSEQ status data items .......................... X
3.7 CONDSTORE parameter to SELECT and EXAMINE ................ X 3.7 CONDSTORE parameter to SELECT and EXAMINE ................ X
3.8 Additional quality of implementation issues .............. X
4 Formal Syntax ............................................. X 4 Formal Syntax ............................................. X
5 Server implementation considerations ...................... X 5 Server implementation considerations ...................... X
6 Security Considerations ................................... X 6 Security Considerations ................................... X
7 References ................................................ X 7 References ................................................ X
7.1 Normative References ..................................... X 7.1 Normative References ..................................... X
7.2 Informative References ................................... X 7.2 Informative References ................................... X
8 IANA Considerations ....................................... X 8 IANA Considerations ....................................... X
9 Acknowledgments ........................................... X 9 Acknowledgments ........................................... X
10 Author's Addresses ........................................ X 10 Author's Addresses ........................................ X
11 Intellectual Property Rights .............................. X 11 Intellectual Property Rights .............................. X
skipping to change at line 117 skipping to change at line 122
See the next section for the definition of a "CONDSTORE-aware client" See the next section for the definition of a "CONDSTORE-aware client"
and a "CONDSTORE enabling command". and a "CONDSTORE enabling command".
2. Introduction and Overview 2. Introduction and Overview
The Conditional STORE extension is present in any IMAP4 implementation The Conditional STORE extension is present in any IMAP4 implementation
which returns "CONDSTORE" as one of the supported capabilities in the which returns "CONDSTORE" as one of the supported capabilities in the
CAPABILITY command response. CAPABILITY command response.
Every IMAP message has an associated positive unsigned 64-bit value called a An IMAP server that supports this extension MUST associate a positive
modification sequence (mod-sequence). This is an opaque value updated by unsigned 64-bit value called a modification sequence (mod-sequence)
the server whenever a metadata item is modified. The value is intended to with every IMAP message. This is an opaque value updated by
be used only for comparisons within a server. However, the server MUST the server whenever a metadata item is modified. The server MUST
guarantee that each STORE command performed on the same mailbox, including guarantee that each STORE command performed on the same mailbox, including
simultaneous stores to different metadata items from different connections, simultaneous stores to different metadata items from different connections,
will get a different mod-sequence value. Also, for any two successful will get a different mod-sequence value. Also, for any two successful
STORE operations performed in the same session on the same mailbox, STORE operations performed in the same session on the same mailbox,
the mod-sequence of the second completed operation MUST be greater than the mod-sequence of the second completed operation MUST be greater than
the mod-sequence of the first completed. Note that the latter rule disallows the mod-sequence of the first completed. Note that the latter rule disallows
the use of the system clock as a mod-sequence, because if system time changes the use of the system clock as a mod-sequence, because if system time changes
(e.g., a NTP [NTP] client adjusting the time), the next generated value might (e.g., a NTP [NTP] client adjusting the time), the next generated value might
be less than the previous one. be less than the previous one.
skipping to change at line 156 skipping to change at line 161
different metadata items. If the server does so, per message mod-sequence is different metadata items. If the server does so, per message mod-sequence is
the highest mod-sequence of all metadata items for the specified message. the highest mod-sequence of all metadata items for the specified message.
The server that supports this extension is not required to be able to store The server that supports this extension is not required to be able to store
mod-sequences for every available mailbox. Section 3.1.2 describes how mod-sequences for every available mailbox. Section 3.1.2 describes how
the server may act if a particular mailbox doesn't support the persistent the server may act if a particular mailbox doesn't support the persistent
storage of mod-sequences. storage of mod-sequences.
This extension makes the following changes to the IMAP4 protocol: This extension makes the following changes to the IMAP4 protocol:
a) extends the syntax of the STORE command to allow STORE a) adds UNCHANGEDSINCE STORE modifier
modifiers
b) adds the MODIFIED response code which should be used with b) adds the MODIFIED response code which should be used with
an OK response to the STORE command an OK response to the STORE command. (It can also be used
in a NO response.)
c) adds a new MODSEQ message data item for use with the FETCH command c) adds a new MODSEQ message data item for use with the FETCH command
d) extends the syntax of the FETCH command to allow FETCH d) adds CHANGEDSINCE FETCH modifier
modifiers
e) adds a new MODSEQ search criterion e) adds a new MODSEQ search criterion
f) extends the syntax of untagged SEARCH responses to include mod-sequence f) extends the syntax of untagged SEARCH responses to include mod-sequence
g) adds new OK untagged responses for the SELECT and EXAMINE commands g) adds new OK untagged responses for the SELECT and EXAMINE commands
h) defines an additional parameter to SELECT/EXAMINE commands h) defines an additional parameter to SELECT/EXAMINE commands
i) adds the HIGHESTMODSEQ status data item to the STATUS command i) adds the HIGHESTMODSEQ status data item to the STATUS command
skipping to change at line 251 skipping to change at line 255
modification sequence. modification sequence.
Example: C: A142 SELECT INBOX Example: C: A142 SELECT INBOX
S: * 172 EXISTS S: * 172 EXISTS
S: * 1 RECENT S: * 1 RECENT
S: * OK [UNSEEN 12] Message 12 is first unseen S: * OK [UNSEEN 12] Message 12 is first unseen
S: * OK [UIDVALIDITY 3857529045] UIDs valid S: * OK [UIDVALIDITY 3857529045] UIDs valid
S: * OK [UIDNEXT 4392] Predicted next UID S: * OK [UIDNEXT 4392] Predicted next UID
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited
S: * OK [HIGHESTMODSEQ 20010715194045007] S: * OK [HIGHESTMODSEQ 715194045007]
S: A142 OK [READ-WRITE] SELECT completed S: A142 OK [READ-WRITE] SELECT completed
3.1.2 NOMODSEQ response code 3.1.2. NOMODSEQ response code
A server that doesn't support the persistent storage of mod-sequences for A server that doesn't support the persistent storage of mod-sequences for
the mailbox MUST send the OK untagged response including NOMODSEQ response the mailbox MUST send the OK untagged response including NOMODSEQ response
code with every successful SELECT or EXAMINE command. code with every successful SELECT or EXAMINE command.
Example: C: A142 SELECT INBOX Example: C: A142 SELECT INBOX
S: * 172 EXISTS S: * 172 EXISTS
S: * 1 RECENT S: * 1 RECENT
S: * OK [UNSEEN 12] Message 12 is first unseen S: * OK [UNSEEN 12] Message 12 is first unseen
S: * OK [UIDVALIDITY 3857529045] UIDs valid S: * OK [UIDVALIDITY 3857529045] UIDs valid
S: * OK [UIDNEXT 4392] Predicted next UID S: * OK [UIDNEXT 4392] Predicted next UID
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited
S: * OK [NOMODSEQ] Sorry, this mailbox format doesn't support modsequences S: * OK [NOMODSEQ] Sorry, this mailbox format doesn't support modsequences
S: A142 OK [READ-WRITE] SELECT completed S: A142 OK [READ-WRITE] SELECT completed
3.2. STORE and UID STORE Commands 3.2. STORE and UID STORE Commands
Arguments: message set This document defines the following STORE modifier (see section
OPTIONAL store modifiers 2.5 of [IMAPABNF]):
message data item name
value for message data item
Responses: untagged responses: FETCH
Result: OK - store completed
NO - store error: can't store that data
BAD - command unknown or arguments invalid
This document extends the syntax of the STORE and UID STORE
commands (see section 6.4.6 of [IMAP4]) to include an optional STORE
modifier. The document defines the following modifier:
UNCHANGEDSINCE <mod-sequence> UNCHANGEDSINCE <mod-sequence>
For each message specified in the message set the server performs For each message specified in the message set the server performs
the following. If the mod-sequence of any metadata item of the the following. If the mod-sequence of any metadata item of the
message is equal or less than the specified UNCHANGEDSINCE value, message is equal or less than the specified UNCHANGEDSINCE value,
then the requested operation (as described by the then the requested operation (as described by the
message data item) is performed. If the operation is successful message data item) is performed. If the operation is successful
the server MUST update the mod-sequence attribute of the message. the server MUST update the mod-sequence attribute of the message.
An untagged FETCH response MUST be sent, even if the .SILENT suffix An untagged FETCH response MUST be sent, even if the .SILENT suffix
is specified and the response MUST include the MODSEQ message data is specified and the response MUST include the MODSEQ message data
skipping to change at line 318 skipping to change at line 310
in the message set, it checks for a non-empty list of messages that in the message set, it checks for a non-empty list of messages that
failed the UNCHANGESINCE test. If this list is non-empty, the server MUST failed the UNCHANGESINCE test. If this list is non-empty, the server MUST
return in the tagged response a MODIFIED response code. The MODIFIED return in the tagged response a MODIFIED response code. The MODIFIED
response code includes the message set (for STORE) or set of UIDs response code includes the message set (for STORE) or set of UIDs
(for UID STORE) of all messages that failed the UNCHANGESINCE test. (for UID STORE) of all messages that failed the UNCHANGESINCE test.
Example : Example :
All messages pass the UNCHANGESINCE test. All messages pass the UNCHANGESINCE test.
C: a103 UID STORE 6,4,8 (UNCHANGEDSINCE 200012121230045) C: a103 UID STORE 6,4,8 (UNCHANGEDSINCE 12121230045)
+FLAGS.SILENT (\Deleted) +FLAGS.SILENT (\Deleted)
S: * 1 FETCH (UID 4 MODSEQ (200012121231000)) S: * 1 FETCH (UID 4 MODSEQ (12121231000))
S: * 2 FETCH (UID 6 MODSEQ (200012121230852)) S: * 2 FETCH (UID 6 MODSEQ (12121230852))
S: * 4 FETCH (UID 8 MODSEQ (200012121130956)) S: * 4 FETCH (UID 8 MODSEQ (12121130956))
S: a103 OK Conditional Store completed S: a103 OK Conditional Store completed
Example: Example:
C: a104 STORE * (UNCHANGEDSINCE 200012121230045) +FLAGS.SILENT C: a104 STORE * (UNCHANGEDSINCE 12121230045) +FLAGS.SILENT
(\Deleted $Processed) (\Deleted $Processed)
S: * 50 FETCH (MODSEQ (200012111230047)) S: * 50 FETCH (MODSEQ (12111230047))
S: a104 OK Store (conditional) completed S: a104 OK Store (conditional) completed
Example: Example:
C: c101 STORE 1 (UNCHANGEDSINCE 200012121230045) -FLAGS.SILENT C: c101 STORE 1 (UNCHANGEDSINCE 12121230045) -FLAGS.SILENT
(\Deleted) (\Deleted)
S: * OK [HIGHESTMODSEQ 200012111230047] S: * OK [HIGHESTMODSEQ 12111230047]
S: * 50 FETCH (MODSEQ (200012111230048)) S: * 50 FETCH (MODSEQ (12111230048))
S: c101 OK Store (conditional) completed S: c101 OK Store (conditional) completed
HIGHESTMODSEQ response code was sent by the server HIGHESTMODSEQ response code was sent by the server
presumably because this was the first CONDSTORE enabling presumably because this was the first CONDSTORE enabling
command. command.
Example: Example:
In spite of the failure of the conditional STORE operation In spite of the failure of the conditional STORE operation
for message 7, the server continues to process the conditional for message 7, the server continues to process the conditional
STORE in order to find all messages which fail the test. STORE in order to find all messages which fail the test.
C: a105 STORE 7,5,9 (UNCHANGEDSINCE 20000320162338) C: d105 STORE 7,5,9 (UNCHANGEDSINCE 320162338)
+FLAGS.SILENT (\Deleted) +FLAGS.SILENT (\Deleted)
S: * 5 FETCH (MODSEQ (20000320162350)) S: * 5 FETCH (MODSEQ (320162350))
S: a105 OK [MODIFIED 7,9] Conditional STORE failed S: d105 OK [MODIFIED 7,9] Conditional STORE failed
Example: Example:
Same as above, but the server follows SHOULD recommendation Same as above, but the server follows SHOULD recommendation
in section 6.4.6 of [IMAP4]. in section 6.4.6 of [IMAP4].
C: a105 STORE 7,5,9 (UNCHANGEDSINCE 20000320162338) C: d105 STORE 7,5,9 (UNCHANGEDSINCE 320162338)
+FLAGS.SILENT (\Deleted) +FLAGS.SILENT (\Deleted)
S: * 7 FETCH (MODSEQ (20000320162342) FLAGS (\Seen \Deleted)) S: * 7 FETCH (MODSEQ (320162342) FLAGS (\Seen \Deleted))
S: * 5 FETCH (MODSEQ (20000320162350)) S: * 5 FETCH (MODSEQ (320162350))
S: * 9 FETCH (MODSEQ (20000320162349) FLAGS (\Answered)) S: * 9 FETCH (MODSEQ (320162349) FLAGS (\Answered))
S: a105 OK [MODIFIED 7,9] Conditional STORE failed S: d105 OK [MODIFIED 7,9] Conditional STORE failed
Use of UNCHANGEDSINCE with a modification sequence of 0 Use of UNCHANGEDSINCE with a modification sequence of 0
always fails if the metadata item exists. A system flag always fails if the metadata item exists. A system flag
MUST always be considered existent, whether it was set or not. MUST always be considered existent, whether it was set or not.
Example: Example:
C: a102 STORE 12 (UNCHANGEDSINCE 0) C: a102 STORE 12 (UNCHANGEDSINCE 0)
+FLAGS.SILENT ($MDNSent) +FLAGS.SILENT ($MDNSent)
S: a102 OK [MODIFIED 12] Conditional STORE failed S: a102 OK [MODIFIED 12] Conditional STORE failed
skipping to change at line 407 skipping to change at line 399
If the required metadata items haven't changed the client SHOULD retry If the required metadata items haven't changed the client SHOULD retry
the command with the new modsequence. The client SHOULD allow for a the command with the new modsequence. The client SHOULD allow for a
configurable but reasonable number of retries (at least 2). configurable but reasonable number of retries (at least 2).
Example: Example:
In the example below the server returns MODIFIED response code In the example below the server returns MODIFIED response code
without sending information describing why the STORE UNCHANGEDSINCE without sending information describing why the STORE UNCHANGEDSINCE
operation has failed. operation has failed.
C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) C: a106 STORE 100:150 (UNCHANGEDSINCE 212030000000)
+FLAGS.SILENT ($Processed) +FLAGS.SILENT ($Processed)
S: * 100 FETCH (MODSEQ (200303181230852)) S: * 100 FETCH (MODSEQ (303181230852))
S: * 102 FETCH (MODSEQ (200303181230852)) S: * 102 FETCH (MODSEQ (303181230852))
... ...
S: * 150 FETCH (MODSEQ (200303181230852)) S: * 150 FETCH (MODSEQ (303181230852))
S: a106 OK [MODIFIED 101] Conditional STORE failed S: a106 OK [MODIFIED 101] Conditional STORE failed
the flag $Processed was set on the message 101 ... the flag $Processed was set on the message 101 ...
C: a107 NOOP C: a107 NOOP
S: * 101 FETCH (MODSEQ (200303011130956) FLAGS ($Processed)) S: * 101 FETCH (MODSEQ (303011130956) FLAGS ($Processed))
S: a107 OK S: a107 OK
Or the flag hasn't changed, but another has (note, that this Or the flag hasn't changed, but another has (note, that this
server behaviour is discouraged. Server implementors should also see server behaviour is discouraged. Server implementors should also see
section 5) ... section 5) ...
C: b107 NOOP C: b107 NOOP
S: * 101 FETCH (MODSEQ (200303011130956) FLAGS (\Deleted \Answered)) S: * 101 FETCH (MODSEQ (303011130956) FLAGS (\Deleted \Answered))
S: b107 OK S: b107 OK
... and the client retries the operation for the message 101 ... and the client retries the operation for the message 101
with the updated UNCHANGEDSINCE value with the updated UNCHANGEDSINCE value
C: b108 STORE 101 (UNCHANGEDSINCE 200303011130956) C: b108 STORE 101 (UNCHANGEDSINCE 303011130956)
+FLAGS.SILENT ($Processed) +FLAGS.SILENT ($Processed)
S: * 101 FETCH (MODSEQ (200303181230852)) S: * 101 FETCH (MODSEQ (303181230852))
S: b108 OK Conditional Store completed S: b108 OK Conditional Store completed
Example: Example:
Same as above, but the server avoids the need for the client to Same as above, but the server avoids the need for the client to
poll for changes. poll for changes.
the flag $Processed was set on the message 101 by another client ... the flag $Processed was set on the message 101 by another client ...
C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) C: a106 STORE 100:150 (UNCHANGEDSINCE 212030000000)
+FLAGS.SILENT ($Processed) +FLAGS.SILENT ($Processed)
S: * 100 FETCH (MODSEQ (200303181230852)) S: * 100 FETCH (MODSEQ (303181230852))
S: * 101 FETCH (MODSEQ (200303011130956) FLAGS ($Processed)) S: * 101 FETCH (MODSEQ (303011130956) FLAGS ($Processed))
S: * 102 FETCH (MODSEQ (200303181230852)) S: * 102 FETCH (MODSEQ (303181230852))
... ...
S: * 150 FETCH (MODSEQ (200303181230852)) S: * 150 FETCH (MODSEQ (303181230852))
S: a106 OK [MODIFIED 101] Conditional STORE failed S: a106 OK [MODIFIED 101] Conditional STORE failed
Or the flag hasn't changed, but another has (note, that this Or the flag hasn't changed, but another has (note, that this
server behaviour is discouraged. Server implementors should also see server behaviour is discouraged. Server implementors should also see
section 5) ... section 5) ...
C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) C: a106 STORE 100:150 (UNCHANGEDSINCE 212030000000)
+FLAGS.SILENT ($Processed) +FLAGS.SILENT ($Processed)
S: * 100 FETCH (MODSEQ (200303181230852)) S: * 100 FETCH (MODSEQ (303181230852))
S: * 101 FETCH (MODSEQ (200303011130956) FLAGS (\Deleted \Answered)) S: * 101 FETCH (MODSEQ (303011130956) FLAGS (\Deleted \Answered))
S: * 102 FETCH (MODSEQ (200303181230852)) S: * 102 FETCH (MODSEQ (303181230852))
... ...
S: * 150 FETCH (MODSEQ (200303181230852)) S: * 150 FETCH (MODSEQ (303181230852))
S: a106 OK [MODIFIED 101] Conditional STORE failed S: a106 OK [MODIFIED 101] Conditional STORE failed
... and the client retries the operation for the message 101 ... and the client retries the operation for the message 101
with the updated UNCHANGEDSINCE value with the updated UNCHANGEDSINCE value
C: b108 STORE 101 (UNCHANGEDSINCE 200303011130956) C: b108 STORE 101 (UNCHANGEDSINCE 303011130956)
+FLAGS.SILENT ($Processed) +FLAGS.SILENT ($Processed)
S: * 101 FETCH (MODSEQ (200303181230852)) S: * 101 FETCH (MODSEQ (303181230852))
S: b108 OK Conditional Store completed S: b108 OK Conditional Store completed
Or the flag hasn't changed, but another has (nice server behaviour. Or the flag hasn't changed, but another has (nice server behaviour.
Server implementors should also see section 5) ... Server implementors should also see section 5) ...
C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) C: a106 STORE 100:150 (UNCHANGEDSINCE 212030000000)
+FLAGS.SILENT ($Processed) +FLAGS.SILENT ($Processed)
S: * 100 FETCH (MODSEQ (200303181230852)) S: * 100 FETCH (MODSEQ (303181230852))
S: * 101 FETCH (MODSEQ (200303011130956) FLAGS ($Processed \Deleted \Answered)) S: * 101 FETCH (MODSEQ (303011130956) FLAGS ($Processed \Deleted \Answered))
S: * 102 FETCH (MODSEQ (200303181230852)) S: * 102 FETCH (MODSEQ (303181230852))
... ...
S: * 150 FETCH (MODSEQ (200303181230852)) S: * 150 FETCH (MODSEQ (303181230852))
S: a106 OK Conditional STORE completed S: a106 OK Conditional STORE completed
Example: Example:
The following example is based on the example from the section 4.2.3 of The following example is based on the example from the section 4.2.3 of
[RFC-2180] and demonstrates that the MODIFIED response code may be also [RFC-2180] and demonstrates that the MODIFIED response code may be also
returned in the tagged NO response. returned in the tagged NO response.
Client tries to conditionally STORE flags on a mixture of expunged Client tries to conditionally STORE flags on a mixture of expunged
and non-expunged messages, one message fails the UNCHANGEDSINCE test. and non-expunged messages, one message fails the UNCHANGEDSINCE test.
C: B001 STORE 1:7 (UNCHANGEDSINCE 20000320172338) +FLAGS (\SEEN) C: B001 STORE 1:7 (UNCHANGEDSINCE 320172338) +FLAGS (\SEEN)
S: * 1 FETCH (MODSEQ (20000320172342) FLAGS (\SEEN)) S: * 1 FETCH (MODSEQ (320172342) FLAGS (\SEEN))
S: * 3 FETCH (MODSEQ (20000320172342) FLAGS (\SEEN)) S: * 3 FETCH (MODSEQ (320172342) FLAGS (\SEEN))
S: B001 NO [MODIFIED 2] Some of the messages no longer exist. S: B001 NO [MODIFIED 2] Some of the messages no longer exist.
C: B002 NOOP C: B002 NOOP
S: * 4 EXPUNGE S: * 4 EXPUNGE
S: * 4 EXPUNGE S: * 4 EXPUNGE
S: * 4 EXPUNGE S: * 4 EXPUNGE
S: * 4 EXPUNGE S: * 4 EXPUNGE
S: * 2 FETCH (MODSEQ (20000320172340) FLAGS (\Deleted \Answered)) S: * 2 FETCH (MODSEQ (320172340) FLAGS (\Deleted \Answered))
S: B002 OK NOOP Completed. S: B002 OK NOOP Completed.
By receiving FETCH responses for messages 1 and 3, and EXPUNGE By receiving FETCH responses for messages 1 and 3, and EXPUNGE
responses that indicate that messages 4:7 have been expunged, responses that indicate that messages 4:7 have been expunged,
the client retries the operation only for the message 2. The the client retries the operation only for the message 2. The
updated UNCHANGEDSINCE value is used. updated UNCHANGEDSINCE value is used.
C: b003 STORE 2 (UNCHANGEDSINCE 20000320172340) +FLAGS (\Seen) C: b003 STORE 2 (UNCHANGEDSINCE 320172340) +FLAGS (\Seen)
S: * 2 FETCH (MODSEQ (20000320180050)) S: * 2 FETCH (MODSEQ (320180050))
S: b003 OK Conditional Store completed S: b003 OK Conditional Store completed
Note: If a message is specified multiple times in the message Note: If a message is specified multiple times in the message
set, and the server doesn't internally eliminate duplicates from set, and the server doesn't internally eliminate duplicates from
the message set, it MUST NOT fail the conditional STORE the message set, it MUST NOT fail the conditional STORE
operation for the second (or subsequent) occurrence of the message operation for the second (or subsequent) occurrence of the message
if the operation completed successfully for the first occurrence. if the operation completed successfully for the first occurrence.
For example, if the client specifies: For example, if the client specifies:
a105 STORE 7,3:9 (UNCHANGEDSINCE 200012121230045) e105 STORE 7,3:9 (UNCHANGEDSINCE 12121230045)
+FLAGS.SILENT (\Deleted) +FLAGS.SILENT (\Deleted)
the server must not fail the operation for message 7 as part of the server must not fail the operation for message 7 as part of
processing "3:9" if it succeeded when message 7 was processed processing "3:9" if it succeeded when message 7 was processed
the first time. the first time.
Once the client specified the UNCHANGEDSINCE modifier in a STORE command, Once the client specified the UNCHANGEDSINCE modifier in a STORE command,
the server MUST include the MODSEQ fetch response data items in all the server MUST include the MODSEQ fetch response data items in all
subsequent unsolicited FETCH responses. subsequent unsolicited FETCH responses.
This document also changes the behaviour of the server when it has performed This document also changes the behaviour of the server when it has performed
a STORE or UID STORE command and the UNCHANGEDSINCE modifier is not specified. a STORE or UID STORE command and the UNCHANGEDSINCE modifier is not specified.
If the operation is successful for a message, the server MUST update If the operation is successful for a message, the server MUST update
the mod-sequence attribute of the message. The server is REQUIRED to the mod-sequence attribute of the message. The server is REQUIRED to
include the mod-sequence value whenever it decides to send the include the mod-sequence value whenever it decides to send the
unsolicited FETCH response to all CONDSTORE-aware clients that have opened unsolicited FETCH response to all CONDSTORE-aware clients that have opened
the mailbox containing the message. the mailbox containing the message.
3.3 FETCH and UID FETCH Commands Server implementors should also see section 3.8 for additional quality of
implementation issues related to the STORE command.
3.3.1 FETCH modifiers
Arguments: sequence set
message data item names or macro
OPTIONAL fetch modifiers
Responses: untagged responses: FETCH 3.3. FETCH and UID FETCH Commands
Result: OK - fetch completed 3.3.1. CHANGEDSINCE FETCH modifier
NO - fetch error: can't fetch that data
BAD - command unknown or arguments invalid
This document extends the syntax of the FETCH and UID FETCH This document defines the following FETCH modifier (see section
commands (see section 6.4.5 of [IMAP4]) to include an optional FETCH 2.4 of [IMAPABNF]):
modifier. The document defines the following modifier:
CHANGEDSINCE <mod-sequence> CHANGEDSINCE <mod-sequence>
CHANGEDSINCE FETCH modifier allows to further subset the list of CHANGEDSINCE FETCH modifier allows to further subset the list of
messages described by sequence set. The information described by messages described by sequence set. The information described by
message data items is only returned for messages that have message data items is only returned for messages that have
mod-sequence bigger than <mod-sequence>. mod-sequence bigger than <mod-sequence>.
When CHANGEDSINCE FETCH modifier is specified, it implicitly adds When CHANGEDSINCE FETCH modifier is specified, it implicitly adds
MODSEQ FETCH message data item (section 3.3.2). MODSEQ FETCH message data item (section 3.3.2).
Example: Example:
C: s100 UID FETCH 1:* (FLAGS) (CHANGEDSINCE 12345) C: s100 UID FETCH 1:* (FLAGS) (CHANGEDSINCE 12345)
S: * 1 FETCH (UID 4 MODSEQ (65402) FLAGS (\Seen)) S: * 1 FETCH (UID 4 MODSEQ (65402) FLAGS (\Seen))
S: * 2 FETCH (UID 6 MODSEQ (75403) FLAGS (\Deleted)) S: * 2 FETCH (UID 6 MODSEQ (75403) FLAGS (\Deleted))
S: * 4 FETCH (UID 8 MODSEQ (29738) FLAGS ($NoJunk $AutoJunk $MDNSent)) S: * 4 FETCH (UID 8 MODSEQ (29738) FLAGS ($NoJunk $AutoJunk $MDNSent))
S: s100 OK FETCH completed S: s100 OK FETCH completed
3.3.2 MODSEQ message data item in FETCH Command 3.3.2. MODSEQ message data item in FETCH Command
This extension adds a MODSEQ message data item to the FETCH command. This extension adds a MODSEQ message data item to the FETCH command.
The MODSEQ message data item allows clients to retrieve mod-sequence The MODSEQ message data item allows clients to retrieve mod-sequence
values for a range of messages in the currently selected mailbox. values for a range of messages in the currently selected mailbox.
Once the client specified the MODSEQ message data item in a FETCH request, Once the client specified the MODSEQ message data item in a FETCH request,
the server MUST include the MODSEQ fetch response data items in all the server MUST include the MODSEQ fetch response data items in all
subsequent unsolicited FETCH responses. subsequent unsolicited FETCH responses.
Syntax: MODSEQ Syntax: MODSEQ
skipping to change at line 604 skipping to change at line 588
MODSEQ response data items contain per-message mod-sequences. MODSEQ response data items contain per-message mod-sequences.
The MODSEQ response data item is returned if the client issued FETCH with The MODSEQ response data item is returned if the client issued FETCH with
MODSEQ message data item. It also allows the server to notify the client MODSEQ message data item. It also allows the server to notify the client
about mod-sequence changes caused by conditional STOREs (section 3.2) and/or about mod-sequence changes caused by conditional STOREs (section 3.2) and/or
changes caused by external sources. changes caused by external sources.
Example: Example:
C: a FETCH 1:3 (MODSEQ) C: a FETCH 1:3 (MODSEQ)
S: * 1 FETCH (MODSEQ (20000624140003)) S: * 1 FETCH (MODSEQ (624140003))
S: * 2 FETCH (MODSEQ (20000624140007)) S: * 2 FETCH (MODSEQ (624140007))
S: * 3 FETCH (MODSEQ (20000624140005)) S: * 3 FETCH (MODSEQ (624140005))
S: a OK Fetch complete S: a OK Fetch complete
In this example the client requests per message mod-sequences for a In this example the client requests per message mod-sequences for a
set of messages. set of messages.
When a flag for a message is modified in a different session, the server When a flag for a message is modified in a different session, the server
sends an unsolicited FETCH response containing the mod-sequence for the sends an unsolicited FETCH response containing the mod-sequence for the
message. message.
Example: Example:
skipping to change at line 628 skipping to change at line 612
(Session 1, authenticated as a user "alex"). The user adds a shared (Session 1, authenticated as a user "alex"). The user adds a shared
flag \Deleted: flag \Deleted:
C: A142 SELECT INBOX C: A142 SELECT INBOX
... ...
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
S: * OK [PERMANENTFLAGS (\Answered \Deleted \Seen \*)] Limited S: * OK [PERMANENTFLAGS (\Answered \Deleted \Seen \*)] Limited
... ...
C: A160 STORE 7 +FLAGS.SILENT (\Deleted) C: A160 STORE 7 +FLAGS.SILENT (\Deleted)
S: * 7 FETCH (MODSEQ (200012121231000)) S: * 7 FETCH (MODSEQ (2121231000))
S: A160 OK Store completed S: A160 OK Store completed
(Session 2, also authenticated as the user "alex"). Any changes to flags (Session 2, also authenticated as the user "alex"). Any changes to flags
are always reported to all sessions authenticated as the same user as in are always reported to all sessions authenticated as the same user as in
the session 1. the session 1.
C: C180 NOOP C: C180 NOOP
S: * 7 FETCH (FLAGS (\Deleted \Answered) MODSEQ (200012121231000)) S: * 7 FETCH (FLAGS (\Deleted \Answered) MODSEQ (12121231000))
S: C180 OK Noop completed S: C180 OK Noop completed
(Session 3, authenticated as a user "andrew"). As \Deleted is a shared (Session 3, authenticated as a user "andrew"). As \Deleted is a shared
flag, changes in the session 1 are also reported in the session 3: flag, changes in the session 1 are also reported in the session 3:
C: D210 NOOP C: D210 NOOP
S: * 7 FETCH (FLAGS (\Deleted \Answered) MODSEQ (200012121231000)) S: * 7 FETCH (FLAGS (\Deleted \Answered) MODSEQ (12121231000))
S: D210 OK Noop completed S: D210 OK Noop completed
The user modifies a private flag \Seen in the session 1 ... The user modifies a private flag \Seen in the session 1 ...
C: A240 STORE 7 +FLAGS.SILENT (\Seen) C: A240 STORE 7 +FLAGS.SILENT (\Seen)
S: * 7 FETCH (MODSEQ (200012121231777)) S: * 7 FETCH (MODSEQ (12121231777))
S: A240 OK Store completed S: A240 OK Store completed
... which is only reported in the session 2 ... ... which is only reported in the session 2 ...
C: C270 NOOP C: C270 NOOP
S: * 7 FETCH (FLAGS (\Deleted \Answered \Seen) MODSEQ (200012121231777)) S: * 7 FETCH (FLAGS (\Deleted \Answered \Seen) MODSEQ (12121231777))
S: C270 OK Noop completed S: C270 OK Noop completed
... but not in the session 3. ... but not in the session 3.
C: D300 NOOP C: D300 NOOP
S: D300 OK Noop completed S: D300 OK Noop completed
And finally the user removes flags \Answered (shared) and \Seen (private) And finally the user removes flags \Answered (shared) and \Seen (private)
in the session 1. in the session 1.
C: A330 STORE 7 -FLAGS.SILENT (\Answered \Seen) C: A330 STORE 7 -FLAGS.SILENT (\Answered \Seen)
S: * 7 FETCH (MODSEQ (200012121245160)) S: * 7 FETCH (MODSEQ (12121245160))
S: A330 OK Store completed S: A330 OK Store completed
Both changes are reported in the session 2 ... Both changes are reported in the session 2 ...
C: C360 NOOP C: C360 NOOP
S: * 7 FETCH (FLAGS (\Deleted) MODSEQ (200012121245160)) S: * 7 FETCH (FLAGS (\Deleted) MODSEQ (12121245160))
S: C360 OK Noop completed S: C360 OK Noop completed
... and only changes to shared flags are reported in session 3. ... and only changes to shared flags are reported in session 3.
C: D390 NOOP C: D390 NOOP
S: * 7 FETCH (FLAGS (\Deleted) MODSEQ (200012121245160)) S: * 7 FETCH (FLAGS (\Deleted) MODSEQ (12121245160))
S: D390 OK Noop completed S: D390 OK Noop completed
Server implementors should also see section 3.8 for additional quality of
implementation issues related to the FETCH command.
3.4. MODSEQ search criterion in SEARCH 3.4. MODSEQ search criterion in SEARCH
The MODSEQ criterion for the SEARCH command allows a client to search The MODSEQ criterion for the SEARCH command allows a client to search
for the metadata items that were modified since a specified moment. for the metadata items that were modified since a specified moment.
Syntax: MODSEQ [<entry-name> <entry-type-req>] <mod-sequence-valzer> Syntax: MODSEQ [<entry-name> <entry-type-req>] <mod-sequence-valzer>
Messages that have modification values which are equal to or Messages that have modification values which are equal to or
greater than <mod-sequence-valzer>. This allows a client, greater than <mod-sequence-valzer>. This allows a client,
for example, to find out which messages contain metadata items for example, to find out which messages contain metadata items
skipping to change at line 715 skipping to change at line 702
the leading "\" character that denotes a system flag has to be the leading "\" character that denotes a system flag has to be
escaped as per Section 4.3 of [IMAP4], as the <entry-name> uses escaped as per Section 4.3 of [IMAP4], as the <entry-name> uses
syntax for quoted strings. syntax for quoted strings.
If client specifies a MODSEQ criterion in a SEARCH command and If client specifies a MODSEQ criterion in a SEARCH command and
the server returns a non-empty SEARCH result, the server MUST also the server returns a non-empty SEARCH result, the server MUST also
append (to the end of the untagged SEARCH response) the highest append (to the end of the untagged SEARCH response) the highest
mod-sequence for all messages being returned. See also section 3.5. mod-sequence for all messages being returned. See also section 3.5.
Example: Example:
C: a SEARCH MODSEQ "/flags/\\draft" all 20010320162338 C: a SEARCH MODSEQ "/flags/\\draft" all 620162338
S: * SEARCH 2 5 6 7 11 12 18 19 20 23 (MODSEQ 20010917162500) S: * SEARCH 2 5 6 7 11 12 18 19 20 23 (MODSEQ 917162500)
S: a OK Search complete S: a OK Search complete
In the above example, the message numbers of any messages In the above example, the message numbers of any messages
containing the string "IMAP4" in the "value" attribute of the containing the string "IMAP4" in the "value" attribute of the
"/comment" entry and having a mod-sequence equal to or "/comment" entry and having a mod-sequence equal to or
greater than 20010320162338 for the "\Draft" flag are returned in greater than 620162338 for the "\Draft" flag are returned in
the search results. the search results.
Example: Example:
C: a SEARCH OR NOT MODSEQ 20010320162338 LARGER 50000 C: t SEARCH OR NOT MODSEQ 720162338 LARGER 50000
S: * SEARCH S: * SEARCH
S: a OK Search complete, nothing found S: t OK Search complete, nothing found
3.5. Modified SEARCH untagged response 3.5. Modified SEARCH untagged response
Data: zero or more numbers Data: zero or more numbers
mod-sequence value (omitted if no match) mod-sequence value (omitted if no match)
This document extends syntax of the untagged SEARCH response This document extends syntax of the untagged SEARCH response
to include the highest mod-sequence for all messages being returned. to include the highest mod-sequence for all messages being returned.
If a client specifies a MODSEQ criterion in a SEARCH (or UID SEARCH) If a client specifies a MODSEQ criterion in a SEARCH (or UID SEARCH)
skipping to change at line 756 skipping to change at line 743
This document defines a new status data item: This document defines a new status data item:
HIGHESTMODSEQ HIGHESTMODSEQ
The highest mod-sequence value all messages The highest mod-sequence value all messages
in the mailbox. This is the same value that is returned by the server in the mailbox. This is the same value that is returned by the server
in the HIGHESTMODSEQ response code in OK untagged response in the HIGHESTMODSEQ response code in OK untagged response
(see section 3.1.1). (see section 3.1.1).
Example: C: A042 STATUS blurdybloop (UIDNEXT MESSAGES HIGHESTMODSEQ) Example: C: A042 STATUS blurdybloop (UIDNEXT MESSAGES HIGHESTMODSEQ)
S: * STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292 S: * STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292
HIGHESTMODSEQ 200201011231777) HIGHESTMODSEQ 7011231777)
S: A042 OK STATUS completed S: A042 OK STATUS completed
3.7. CONDSTORE parameter to SELECT and EXAMINE 3.7. CONDSTORE parameter to SELECT and EXAMINE
The CONDSTORE extension defines a single optional select parameter The CONDSTORE extension defines a single optional select parameter
"CONDSTORE", which tells the server that it MUST include the MODSEQ "CONDSTORE", which tells the server that it MUST include the MODSEQ
fetch response data items in all subsequent unsolicited FETCH responses. fetch response data items in all subsequent unsolicited FETCH responses.
The CONDSTORE parameter to SELECT/EXAMINE helps to avoid a race condition The CONDSTORE parameter to SELECT/EXAMINE helps to avoid a race condition
that might arise when a metadata item(s) is(are) modified in another session that might arise when a metadata item(s) is(are) modified in another session
skipping to change at line 778 skipping to change at line 765
client was able to issue a CONDSTORE enabling command. client was able to issue a CONDSTORE enabling command.
Example: C: A142 SELECT INBOX (CONDSTORE) Example: C: A142 SELECT INBOX (CONDSTORE)
S: * 172 EXISTS S: * 172 EXISTS
S: * 1 RECENT S: * 1 RECENT
S: * OK [UNSEEN 12] Message 12 is first unseen S: * OK [UNSEEN 12] Message 12 is first unseen
S: * OK [UIDVALIDITY 3857529045] UIDs valid S: * OK [UIDVALIDITY 3857529045] UIDs valid
S: * OK [UIDNEXT 4392] Predicted next UID S: * OK [UIDNEXT 4392] Predicted next UID
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited
S: * OK [HIGHESTMODSEQ 20010715194045007] S: * OK [HIGHESTMODSEQ 715194045007]
S: A142 OK [READ-WRITE] SELECT completed, CONDSTORE is now enabled S: A142 OK [READ-WRITE] SELECT completed, CONDSTORE is now enabled
3.8. Additional quality of implementation issues.
Server implementations should follow the following rule, which applies
to any successfully completed STORE/UID STORE (with and without UNCHANGEDSINCE
modifier), as well as FETCH command which implicitly sets \Seen flag:
Adding the flag when it is already present or removing when it is not
present SHOULD NOT change the mod-sequence.
This will prevent spurious client synchronization requests.
However note that client implementors MUST NOT rely on this server behaviour.
Client can't distinguish between the case when a server has violated the SHOULD
mentioned above, or one or more client(s) setting and unsetting (or unsetting and
setting) the flag in another session(s).
4. Formal Syntax 4. Formal Syntax
The following syntax specification uses the Augmented Backus-Naur The following syntax specification uses the Augmented Backus-Naur
Form (ABNF) [ABNF] notation. Elements not defined here can be found in Form (ABNF) [ABNF] notation. Elements not defined here can be found in
the formal syntax of the ABNF [ABNF], IMAP [IMAP4], and IMAP ABNF extensions the formal syntax of the ABNF [ABNF], IMAP [IMAP4], and IMAP ABNF extensions
[IMAPABNF] specifications. [IMAPABNF] specifications.
Except as noted otherwise, all alphabetic characters are case- Except as noted otherwise, all alphabetic characters are case-
insensitive. The use of upper or lower case characters to define token insensitive. The use of upper or lower case characters to define token
strings is for editorial clarity only. Implementations MUST accept strings is for editorial clarity only. Implementations MUST accept
these strings in a case-insensitive fashion. these strings in a case-insensitive fashion.
capability =/ "CONDSTORE" capability =/ "CONDSTORE"
status-att =/ "HIGHESTMODSEQ" status-att =/ "HIGHESTMODSEQ"
;; extends non-terminal defined in RFC 3501. ;; extends non-terminal defined in RFC 3501.
status-att-val =/ "HIGHESTMODSEQ" SP mod-sequence-value status-att-val =/ "HIGHESTMODSEQ" SP mod-sequence-value
;; extends non-terminal defined in [IMAPABNF].
store-modifier =/ "UNCHANGEDSINCE" SP mod-sequence-valzer store-modifier =/ "UNCHANGEDSINCE" SP mod-sequence-valzer
;; Only a single "UNCHANGEDSINCE" may be specified ;; Only a single "UNCHANGEDSINCE" may be specified
;; in a STORE operation ;; in a STORE operation
fetch-modifier =/ chgsince-fetch-mod fetch-modifier =/ chgsince-fetch-mod
;; conforms to the generic "fetch-modifier" syntax ;; conforms to the generic "fetch-modifier" syntax
;; defined in [IMAPABNF]. ;; defined in [IMAPABNF].
chgsince-fetch-mod = "CHANGEDSINCE" SP mod-sequence-value chgsince-fetch-mod = "CHANGEDSINCE" SP mod-sequence-value
skipping to change at line 906 skipping to change at line 910
+FLAGS +FLAGS
-FLAGS -FLAGS
+FLAGS.SILENT +FLAGS.SILENT
-FLAGS.SILENT -FLAGS.SILENT
Note, that the optimization described in this section can't be performed Note, that the optimization described in this section can't be performed
in case of a conditional STORE FLAGS operation. in case of a conditional STORE FLAGS operation.
Let's use the following example. The client has issued Let's use the following example. The client has issued
C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) C: a106 STORE 100:150 (UNCHANGEDSINCE 212030000000)
+FLAGS.SILENT ($Processed) +FLAGS.SILENT ($Processed)
When the server receives the command and parses it successfully it When the server receives the command and parses it successfully it
iterates through the message set and tries to execute the conditional iterates through the message set and tries to execute the conditional
STORE command for each message. STORE command for each message.
Each server internally works as a client, i.e. it has to cache the Each server internally works as a client, i.e. it has to cache the
current state of all IMAP flags as it is known to the client. current state of all IMAP flags as it is known to the client.
In order to report flag changes to the client the server compares the In order to report flag changes to the client the server compares the
cached values with the values in its database for IMAP flags. cached values with the values in its database for IMAP flags.
skipping to change at line 933 skipping to change at line 937
a) The client is not interested in \Deleted flag, as it hasn't included a) The client is not interested in \Deleted flag, as it hasn't included
it in +FLAGS.SILENT operation. it in +FLAGS.SILENT operation.
b) The state of the flag $Processed hasn't changed (server can determine b) The state of the flag $Processed hasn't changed (server can determine
this by comparing cached flag state with the state of the flag in the this by comparing cached flag state with the state of the flag in the
database), database),
so the server doesn't have to report MODIFIED to the client. Instead the so the server doesn't have to report MODIFIED to the client. Instead the
server may set $Processed flag, update the modsequence for the message 101 server may set $Processed flag, update the modsequence for the message 101
once again and send an untagged FETCH response with new modsequence and once again and send an untagged FETCH response with new modsequence and
flags: flags:
S: * 101 FETCH (MODSEQ (200303011130956) FLAGS ($Processed \Deleted \Answered)) S: * 101 FETCH (MODSEQ (303011130956)
FLAGS ($Processed \Deleted \Answered))
See also section 3.8 for additional quality of implementation issues.
6. Security Considerations 6. Security Considerations
It is believed that the Conditional STORE extension doesn't raise It is believed that the Conditional STORE extension doesn't raise
any new security concerns that are not already discussed in [IMAP4]. any new security concerns that are not already discussed in [IMAP4].
However, the availability of this extension may make it possible However, the availability of this extension may make it possible
for IMAP4 to be used in critical applications it could not be used for IMAP4 to be used in critical applications it could not be used
for previously, making correct IMAP server implementation and for previously, making correct IMAP server implementation and
operation even more important. operation even more important.
skipping to change at line 967 skipping to change at line 974
[IMAPABNF] Melnikov, A., "Collected extensions to IMAP4 ABNF", [IMAPABNF] Melnikov, A., "Collected extensions to IMAP4 ABNF",
work in progress. work in progress.
<http://www.ietf.org/internet-drafts/draft-melnikov-imap-ext-abnf-xx.txt> <http://www.ietf.org/internet-drafts/draft-melnikov-imap-ext-abnf-xx.txt>
7.2. Informative References 7.2. Informative References
[ACAP] Newman, Myers, "ACAP -- Application Configuration Access [ACAP] Newman, Myers, "ACAP -- Application Configuration Access
Protocol", RFC 2244, Innosoft, Netscape, November 1997. Protocol", RFC 2244, Innosoft, Netscape, November 1997.
<ftp://ftp.isi.edu/in-notes/rfc2244.txt> <ftp://ftp.isi.edu/in-notes/rfc2244.txt>
[ACL] Myers, "IMAP4 ACL extension", RFC 2086, Carnegie Mellon, [ACL] Melnikov, A., "IMAP4 Access Control List (ACL) Extension",
January 1997. RFC 4314, December 2005.
<ftp://ftp.isi.edu/in-notes/rfc2086.txt> <ftp://ftp.isi.edu/in-notes/rfc4314.txt>
[NTP] Mills, D, "Network Time Protocol (Version 3) Specification, [NTP] Mills, D, "Network Time Protocol (Version 3) Specification,
Implementation and Analysis", RFC 1305, March 1992. Implementation and Analysis", RFC 1305, March 1992.
<ftp://ftp.isi.edu/in-notes/rfc1305.txt> <ftp://ftp.isi.edu/in-notes/rfc1305.txt>
[RFC-2180] Gahrns, M., "IMAP4 Multi-Accessed Mailbox Practice", [RFC-2180] Gahrns, M., "IMAP4 Multi-Accessed Mailbox Practice",
RFC 2180, July 1997. RFC 2180, July 1997.
<ftp://ftp.isi.edu/in-notes/rfc2180.txt> <ftp://ftp.isi.edu/in-notes/rfc2180.txt>
8. IANA Considerations 8. IANA Considerations
skipping to change at line 1015 skipping to change at line 1022
mailto: Alexey.Melnikov@isode.com mailto: Alexey.Melnikov@isode.com
Isode Limited Isode Limited
5 Castle Business Village, 36 Station Road, 5 Castle Business Village, 36 Station Road,
Hampton, Middlesex, TW12 2BX, United Kingdom Hampton, Middlesex, TW12 2BX, United Kingdom
Steve Hole Steve Hole
mailto: Steve.Hole@messagingdirect.com mailto: Steve.Hole@messagingdirect.com
ACI WorldWide/MessagingDirect ACI WorldWide/MessagingDirect
#900, 10117 Jasper Avenue,
Edmonton, Alberta, T5J 1W8, CANADA
11. Intellectual Property Statement 11. Intellectual Property Statement
The IETF takes no position regarding the validity or scope of any The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be on the procedures with respect to rights in RFC documents can be
skipping to change at line 1059 skipping to change at line 1064
This document and the information contained herein are provided on an This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Copyright Statement Copyright Statement
Copyright (C) The Internet Society (2005). This document is subject Copyright (C) The Internet Society (2006). This document is subject
to the rights, licenses and restrictions contained in BCP 78, and to the rights, licenses and restrictions contained in BCP 78, and
except as set forth therein, the authors retain all their rights. except as set forth therein, the authors retain all their rights.
Acknowledgment Acknowledgment
Funding for the RFC Editor function is currently provided by the Funding for the RFC Editor function is currently provided by the
Internet Society. Internet Society.
Appendix A. Change History Appendix A. Change History
Note that this appendix will be removed before publication. [[Note to RFC editor: please remove this appendix before publication.]]
0.1. Change History 0.1. Change History
Changes from draft-ietf-imapext-condstore-08
1. Updated examples not to use time-like modification sequences,
in order not to confuse implementors. (As per comment from
Mark Crispin)
2. Clarified beginning of the second paragraph of section 2,
as per GenArt comment.
3. Updated (informative) reference to ACL RFC.
4. Some other editorial changes to reference [IMAPABNF] content.
5. Repeated and explained the requirement on server implementations
not to bump modification sequence when a flag change operation
results in no flag changes.
6. Explained in Abstract that the CONDSTORE extension can also
be used for quick mailbox resynchronization.
Changes from draft-ietf-imapext-condstore-07
1. Reworded not to have any normative references to SORT.
SORT=MODSEQ has been moved to a separate draft.
Changes from draft-ietf-imapext-condstore-06
1. Minor ABNF update to reference IMAP ABNF properly.
Changes from draft-ietf-imapext-condstore-05 Changes from draft-ietf-imapext-condstore-05
1. Reworded not to have a normative reference to ANNOTATE. 1. Reworded not to have a normative reference to ANNOTATE.
2. Updated ABNF to reference IMAP ABNF. 2. Updated ABNF to reference IMAP ABNF.
3. Clarified that STATUS (HIGHESTMODSEQ) also enables 3. Clarified that STATUS (HIGHESTMODSEQ) also enables
CONDSTORE notifications. CONDSTORE notifications.
4. Fixed few typos in examples or example titles. 4. Fixed few typos in examples or example titles.
5. Updated boilerplate, references. 5. Updated boilerplate, references.
Changes from draft-ietf-imapext-condstore-04 Changes from draft-ietf-imapext-condstore-04
1. Fixed typo in an example, added more examples. 1. Fixed typo in an example, added more examples.
 End of changes. 77 change blocks. 
126 lines changed or deleted 152 lines changed or added

This html diff was produced by rfcdiff 1.29, available from http://www.levkowetz.com/ietf/tools/rfcdiff/