idnits 2.17.1 draft-ietf-imapext-condstore-08.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 14. -- Found old boilerplate from RFC 3978, Section 5.5 on line 1055. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1027. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1034. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1040. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document is more than 15 pages and seems to lack a Table of Contents. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 1) being 1242 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 270 instances of too long lines in the document, the longest one being 21 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (December 2005) is 6699 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'UNSEEN 12' is mentioned on line 773, but not defined == Missing Reference: 'UIDVALIDITY 3857529045' is mentioned on line 774, but not defined == Missing Reference: 'UIDNEXT 4392' is mentioned on line 775, but not defined == Missing Reference: 'HIGHESTMODSEQ 20010715194045007' is mentioned on line 778, but not defined == Missing Reference: 'HIGHESTMODSEQ 200012111230047' is mentioned on line 335, but not defined == Missing Reference: 'MODIFIED 7' is mentioned on line 364, but not defined -- Looks like a reference, but probably isn't: '9' on line 364 == Missing Reference: 'MODIFIED 12' is mentioned on line 374, but not defined == Missing Reference: 'MODIFIED 101' is mentioned on line 462, but not defined == Missing Reference: 'MODIFIED 2' is mentioned on line 496, but not defined == Unused Reference: 'ACAP' is defined on line 963, but no explicit reference was found in the text ** Obsolete normative reference: RFC 4234 (ref. 'ABNF') (Obsoleted by RFC 5234) ** Obsolete normative reference: RFC 3501 (ref. 'IMAP4') (Obsoleted by RFC 9051) -- Possible downref: Non-RFC (?) normative reference: ref. 'IMAPABNF' -- Obsolete informational reference (is this intentional?): RFC 2086 (ref. 'ACL') (Obsoleted by RFC 4314) -- Obsolete informational reference (is this intentional?): RFC 1305 (ref. 'NTP') (Obsoleted by RFC 5905) Summary: 7 errors (**), 0 flaws (~~), 13 warnings (==), 12 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Internet Draft: IMAP Extension for Conditional STORE A. Melnikov 2 Document: draft-ietf-imapext-condstore-08.txt Isode Ltd. 3 Expires: June 2006 S. Hole 4 ACI WorldWide/MessagingDirect 5 December 2005 7 IMAP Extension for Conditional STORE operation 9 Status of this Memo 11 By submitting this Internet-Draft, each author represents that any 12 applicable patent or other IPR claims of which he or she is aware 13 have been or will be disclosed, and any of which he or she becomes 14 aware will be disclosed, in accordance with Section 6 of BCP 79. 16 Internet-Drafts are working documents of the Internet Engineering 17 Task Force (IETF), its areas, and its working groups. Note that 18 other groups may also distribute working documents as Internet- 19 Drafts. 21 Internet-Drafts are draft documents valid for a maximum of six months 22 and may be updated, replaced, or obsoleted by other documents at any 23 time. It is inappropriate to use Internet-Drafts as reference 24 material or to cite them other than as "work in progress". 26 The list of current Internet-Drafts can be accessed at 27 http://www.ietf.org/ietf/1id-abstracts.txt 29 The list of Internet-Draft Shadow Directories can be accessed at 30 http://www.ietf.org/shadow.html. 32 Copyright Notice 34 Copyright (C) The Internet Society (2005). 36 Abstract 38 Often, multiple IMAP (RFC 3501) clients need to coordinate changes to 39 a common IMAP mailbox. Examples include different clients working on behalf 40 of the same user, and multiple users accessing shared mailboxes. These clients 41 need a mechanism to synchronize state changes for messages within the 42 mailbox. They must be able to guarantee that only one client can change 43 message state (e.g., message flags) at any time. An 44 example of such an application is use of an IMAP mailbox as a message 45 queue with multiple dequeueing clients. 47 The Conditional Store facility provides a protected update mechanism for 48 message state information that can detect and resolve conflicts between 49 multiple writing mail clients. 51 This document defines an extension to IMAP (RFC 3501). 53 Table of Contents 55 1 Conventions Used in This Document ......................... X 56 2 Introduction and Overview ................................. X 57 3 IMAP Protocol Changes ..................................... X 58 3.1 New OK untagged responses for SELECT and EXAMINE ......... X 59 3.1.1 HIGHESTMODSEQ response code ............................ X 60 3.1.2 NOMODSEQ response code ................................. X 61 3.2 STORE and UID STORE Commands ............................. X 62 3.3 FETCH and UID FETCH Commands ............................. X 63 3.3.1 FETCH modifiers ........................................ X 64 3.3.2 MODSEQ message data item in FETCH Command .............. X 65 3.4 MODSEQ search criterion in SEARCH ........................ X 66 3.5 Modified SEARCH untagged response ........................ X 67 3.6 HIGHESTMODSEQ status data items .......................... X 68 3.7 CONDSTORE parameter to SELECT and EXAMINE ................ X 69 4 Formal Syntax ............................................. X 70 5 Server implementation considerations ...................... X 71 6 Security Considerations ................................... X 72 7 References ................................................ X 73 7.1 Normative References ..................................... X 74 7.2 Informative References ................................... X 75 8 IANA Considerations ....................................... X 76 9 Acknowledgments ........................................... X 77 10 Author's Addresses ........................................ X 78 11 Intellectual Property Rights .............................. X 79 12 Full Copyright Statement .................................. X 81 1. Conventions Used in This Document 83 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 84 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 85 document are to be interpreted as described in RFC 2119 [KEYWORDS]. 87 In examples, lines beginning with "S:" are sent by the IMAP server, and 88 lines beginning with "C:" are sent by the client. Line breaks may appear 89 in example commands solely for editorial clarity; when present in 90 the actual message they are represented by "CRLF". 92 Formal syntax is defined using ABNF [ABNF]. 94 The term "metadata" or "metadata item" is used throughout this document. 95 It refers to any system or user defined keyword. Future documents 96 may extend "metadata" to include other dynamic message data. 98 Some IMAP mailboxes are private, accessible only to the owning user. 99 Other mailboxes are not, either because the owner has set an ACL 100 [ACL] which permits access by other users, or because it is a 101 shared mailbox. Let's call a metadata item "shared" for the mailbox 102 if any changes to the metadata items are persistent and visible to all 103 other users accessing the mailbox. Otherwise the metadata item is called 104 "private". Note, that private metadata items are still visible to all 105 sessions accessing the mailbox as the same user. Also note, that different 106 mailboxes may have different metadata items as shared. 108 See the next section for the definition of a "CONDSTORE-aware client" 109 and a "CONDSTORE enabling command". 111 2. Introduction and Overview 113 The Conditional STORE extension is present in any IMAP4 implementation 114 which returns "CONDSTORE" as one of the supported capabilities in the 115 CAPABILITY command response. 117 Every IMAP message has an associated positive unsigned 64-bit value called a 118 modification sequence (mod-sequence). This is an opaque value updated by 119 the server whenever a metadata item is modified. The value is intended to 120 be used only for comparisons within a server. However, the server MUST 121 guarantee that each STORE command performed on the same mailbox, including 122 simultaneous stores to different metadata items from different connections, 123 will get a different mod-sequence value. Also, for any two successful 124 STORE operations performed in the same session on the same mailbox, 125 the mod-sequence of the second completed operation MUST be greater than 126 the mod-sequence of the first completed. Note that the latter rule disallows 127 the use of the system clock as a mod-sequence, because if system time changes 128 (e.g., a NTP [NTP] client adjusting the time), the next generated value might 129 be less than the previous one. 131 Mod-sequences allow a client that supports the CONDSTORE extension to 132 determine if a message metadata has changed since some known 133 moment. Whenever the state of a flag changes (i.e., the flag is added where 134 previously it wasn't set, or the flag is removed and before it was set) the 135 value of the modification sequence for the message MUST be updated. 136 Adding the flag when it is already present or removing when it is not 137 present SHOULD NOT change the mod-sequence. 139 When a message is appended to a mailbox (via the IMAP APPEND command, 140 COPY to the mailbox or using an external mechanism) the server 141 generates a new modification sequence that is higher than the highest 142 modification sequence of all messages in the mailbox and assigns it to 143 the appended message. 145 The server MAY store separate (per message) modification sequence values for 146 different metadata items. If the server does so, per message mod-sequence is 147 the highest mod-sequence of all metadata items for the specified message. 149 The server that supports this extension is not required to be able to store 150 mod-sequences for every available mailbox. Section 3.1.2 describes how 151 the server may act if a particular mailbox doesn't support the persistent 152 storage of mod-sequences. 154 This extension makes the following changes to the IMAP4 protocol: 156 a) extends the syntax of the STORE command to allow STORE 157 modifiers 159 b) adds the MODIFIED response code which should be used with 160 an OK response to the STORE command 162 c) adds a new MODSEQ message data item for use with the FETCH command 164 d) extends the syntax of the FETCH command to allow FETCH 165 modifiers 167 e) adds a new MODSEQ search criterion 169 f) extends the syntax of untagged SEARCH responses to include mod-sequence 171 g) adds new OK untagged responses for the SELECT and EXAMINE commands 173 h) defines an additional parameter to SELECT/EXAMINE commands 175 i) adds the HIGHESTMODSEQ status data item to the STATUS command 177 A client supporting CONDSTORE extension indicates its willingness to receive 178 mod-sequence updates in all untagged FETCH responses by issuing a SELECT or 179 EXAMINE command with the CONDSTORE parameter, or STATUS (HIGHESTMODSEQ) command, 180 or a FETCH, or SEARCH command that includes 181 the MODSEQ message data item, a FETCH command with the CHANGEDSINCE modifier, 182 or a STORE command with the UNCHANGEDSINCE modifier. 183 The server MUST include mod-sequence data in all subsequent untagged FETCH 184 responses, whether they were caused by a regular STORE, STORE with 185 UNCHANGEDSINCE modifier, or an external agent, until the connection is closed. 187 This document uses the term "CONSTORE-aware client" to refer to a client 188 that announces its willingness to receive mod-sequence updates as described 189 above. The term "CONDSTORE enabling command" will refer any of the commands 190 listed above. A future extension to this document may extend the list of 191 CONDSTORE enabling commands. A first CONDSTORE enabling command executed in 192 the session MUST cause the server to return HIGHESTMODSEQ (section 3.1.1) unless 193 the server has sent NOMODSEQ (section 3.1.2) response code when the currently 194 selected mailbox was selected. 196 The rest of this document describes the protocol changes more rigorously. 198 3. IMAP Protocol Changes 200 3.1. New OK untagged responses for SELECT and EXAMINE 202 This document adds two new response codes HIGHESTMODSEQ and NOMODSEQ. 203 One of those response codes MUST be returned in the OK untagged 204 response for a successful SELECT/EXAMINE command. 206 When opening a mailbox the server must check if the mailbox supports 207 the persistent storage of mod-sequences. If the mailbox supports 208 the persistent storage of mod-sequences and mailbox open operation succeeds, 209 the server MUST send the OK untagged response including HIGHESTMODSEQ 210 response code. If the persistent storage for the mailbox is not supported, 211 the server MUST send the OK untagged response including NOMODSEQ response 212 code instead. 214 3.1.1. HIGHESTMODSEQ response code 216 This document adds a new response code that is returned in the OK 217 untagged response for the SELECT and EXAMINE commands. A server 218 supporting the persistent storage of mod-sequences for the mailbox MUST 219 send the OK untagged response including HIGHESTMODSEQ response code with 220 every successful SELECT or EXAMINE command: 222 OK [HIGHESTMODSEQ ] 224 Where is the highest mod-sequence value of all 225 messages in the mailbox. When the server changes UIDVALIDITY for a 226 mailbox, it doesn't have to keep the same HIGHESTMODSEQ for the 227 mailbox. 229 A disconnected client can use the value of HIGHESTMODSEQ to check if 230 it has to refetch metadata from the server. If the 231 UIDVALIDITY value has changed for the selected mailbox, the client 232 MUST delete the cached value of HIGHESTMODSEQ. If UIDVALIDITY for 233 the mailbox is the same and if the HIGHESTMODSEQ value stored in 234 the client's cache is less than the value returned by the server, 235 then some metadata items on the server have changed since the last 236 synchronization, and the client needs to update its cache. The client 237 MAY use SEARCH MODSEQ as described in section 3.4 to find out exactly 238 which metadata items have changed. Alternatively the client MAY issue 239 FETCH with CHANGEDSINCE modifier (section 3.3.1) in order to fetch data 240 for all messages that have metadata items changed since some known 241 modification sequence. 243 Example: C: A142 SELECT INBOX 244 S: * 172 EXISTS 245 S: * 1 RECENT 246 S: * OK [UNSEEN 12] Message 12 is first unseen 247 S: * OK [UIDVALIDITY 3857529045] UIDs valid 248 S: * OK [UIDNEXT 4392] Predicted next UID 249 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 250 S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited 251 S: * OK [HIGHESTMODSEQ 20010715194045007] 252 S: A142 OK [READ-WRITE] SELECT completed 254 3.1.2 NOMODSEQ response code 256 A server that doesn't support the persistent storage of mod-sequences for 257 the mailbox MUST send the OK untagged response including NOMODSEQ response 258 code with every successful SELECT or EXAMINE command. 260 Example: C: A142 SELECT INBOX 261 S: * 172 EXISTS 262 S: * 1 RECENT 263 S: * OK [UNSEEN 12] Message 12 is first unseen 264 S: * OK [UIDVALIDITY 3857529045] UIDs valid 265 S: * OK [UIDNEXT 4392] Predicted next UID 266 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 267 S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited 268 S: * OK [NOMODSEQ] Sorry, this mailbox format doesn't support modsequences 269 S: A142 OK [READ-WRITE] SELECT completed 271 3.2. STORE and UID STORE Commands 273 Arguments: message set 274 OPTIONAL store modifiers 275 message data item name 276 value for message data item 278 Responses: untagged responses: FETCH 280 Result: OK - store completed 281 NO - store error: can't store that data 282 BAD - command unknown or arguments invalid 284 This document extends the syntax of the STORE and UID STORE 285 commands (see section 6.4.6 of [IMAP4]) to include an optional STORE 286 modifier. The document defines the following modifier: 288 UNCHANGEDSINCE 289 For each message specified in the message set the server performs 290 the following. If the mod-sequence of any metadata item of the 291 message is equal or less than the specified UNCHANGEDSINCE value, 292 then the requested operation (as described by the 293 message data item) is performed. If the operation is successful 294 the server MUST update the mod-sequence attribute of the message. 295 An untagged FETCH response MUST be sent, even if the .SILENT suffix 296 is specified and the response MUST include the MODSEQ message data 297 item. This is required to update the client's cache with the correct 298 mod-sequence values. See section 3.3.2 for more details. 300 However, if the mod-sequence of any metadata item of the 301 message is greater than the specified UNCHANGEDSINCE value, than 302 the requested operation MUST NOT be performed. In this case, 303 the mod-sequence attribute of the message is not updated, and the 304 message number (or unique identifier in the case of the UID STORE 305 command) is added to the list of messages that failed the UNCHANGESINCE test. 307 When the server finished performing the operation on all the messages 308 in the message set, it checks for a non-empty list of messages that 309 failed the UNCHANGESINCE test. If this list is non-empty, the server MUST 310 return in the tagged response a MODIFIED response code. The MODIFIED 311 response code includes the message set (for STORE) or set of UIDs 312 (for UID STORE) of all messages that failed the UNCHANGESINCE test. 314 Example : 316 All messages pass the UNCHANGESINCE test. 318 C: a103 UID STORE 6,4,8 (UNCHANGEDSINCE 200012121230045) 319 +FLAGS.SILENT (\Deleted) 320 S: * 1 FETCH (UID 4 MODSEQ (200012121231000)) 321 S: * 2 FETCH (UID 6 MODSEQ (200012121230852)) 322 S: * 4 FETCH (UID 8 MODSEQ (200012121130956)) 323 S: a103 OK Conditional Store completed 325 Example: 327 C: a104 STORE * (UNCHANGEDSINCE 200012121230045) +FLAGS.SILENT 328 (\Deleted $Processed) 329 S: * 50 FETCH (MODSEQ (200012111230047)) 330 S: a104 OK Store (conditional) completed 332 Example: 333 C: c101 STORE 1 (UNCHANGEDSINCE 200012121230045) -FLAGS.SILENT 334 (\Deleted) 335 S: * OK [HIGHESTMODSEQ 200012111230047] 336 S: * 50 FETCH (MODSEQ (200012111230048)) 337 S: c101 OK Store (conditional) completed 339 HIGHESTMODSEQ response code was sent by the server 340 presumably because this was the first CONDSTORE enabling 341 command. 343 Example: 345 In spite of the failure of the conditional STORE operation 346 for message 7, the server continues to process the conditional 347 STORE in order to find all messages which fail the test. 349 C: a105 STORE 7,5,9 (UNCHANGEDSINCE 20000320162338) 350 +FLAGS.SILENT (\Deleted) 351 S: * 5 FETCH (MODSEQ (20000320162350)) 352 S: a105 OK [MODIFIED 7,9] Conditional STORE failed 354 Example: 356 Same as above, but the server follows SHOULD recommendation 357 in section 6.4.6 of [IMAP4]. 359 C: a105 STORE 7,5,9 (UNCHANGEDSINCE 20000320162338) 360 +FLAGS.SILENT (\Deleted) 361 S: * 7 FETCH (MODSEQ (20000320162342) FLAGS (\Seen \Deleted)) 362 S: * 5 FETCH (MODSEQ (20000320162350)) 363 S: * 9 FETCH (MODSEQ (20000320162349) FLAGS (\Answered)) 364 S: a105 OK [MODIFIED 7,9] Conditional STORE failed 366 Use of UNCHANGEDSINCE with a modification sequence of 0 367 always fails if the metadata item exists. A system flag 368 MUST always be considered existent, whether it was set or not. 370 Example: 372 C: a102 STORE 12 (UNCHANGEDSINCE 0) 373 +FLAGS.SILENT ($MDNSent) 374 S: a102 OK [MODIFIED 12] Conditional STORE failed 376 The client has tested the presence of the $MDNSent user defined 377 keyword. 379 Note: A client trying to make an atomic change to the state of a particular 380 metadata item (or a set of metadata items) should be prepared 381 to deal with the case when the server returns MODIFIED response code 382 if the state of the metadata item being watched hasn't changed (but 383 the state of some other metadata item has). This is necessary, because 384 some servers don't store separate mod-sequences for different metadata 385 items. However, a server implementation SHOULD avoid generating 386 spurious MODIFIED responses for +FLAGS/-FLAGS STORE operations, 387 even when the server stores a single mod-sequence per message. Section 388 5 describes how this can be achieved. 390 Unless the server has included an unsolicited FETCH to update client's 391 knowledge about message(s) that has failed UNCHANGEDSINCE test, upon the 392 receipt of MODIFIED response code the client SHOULD try to 393 figure out if the required metadata items have indeed changed by issuing 394 FETCH or NOOP command. It is RECOMMENDED that the server avoids the 395 need for the client to do that by sending an unsolicited FETCH response 396 (see two following examples). 398 If the required metadata items haven't changed the client SHOULD retry 399 the command with the new modsequence. The client SHOULD allow for a 400 configurable but reasonable number of retries (at least 2). 402 Example: 403 In the example below the server returns MODIFIED response code 404 without sending information describing why the STORE UNCHANGEDSINCE 405 operation has failed. 407 C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) 408 +FLAGS.SILENT ($Processed) 409 S: * 100 FETCH (MODSEQ (200303181230852)) 410 S: * 102 FETCH (MODSEQ (200303181230852)) 411 ... 412 S: * 150 FETCH (MODSEQ (200303181230852)) 413 S: a106 OK [MODIFIED 101] Conditional STORE failed 415 the flag $Processed was set on the message 101 ... 416 C: a107 NOOP 417 S: * 101 FETCH (MODSEQ (200303011130956) FLAGS ($Processed)) 418 S: a107 OK 420 Or the flag hasn't changed, but another has (note, that this 421 server behaviour is discouraged. Server implementors should also see 422 section 5) ... 424 C: b107 NOOP 425 S: * 101 FETCH (MODSEQ (200303011130956) FLAGS (\Deleted \Answered)) 426 S: b107 OK 428 ... and the client retries the operation for the message 101 429 with the updated UNCHANGEDSINCE value 431 C: b108 STORE 101 (UNCHANGEDSINCE 200303011130956) 432 +FLAGS.SILENT ($Processed) 433 S: * 101 FETCH (MODSEQ (200303181230852)) 434 S: b108 OK Conditional Store completed 436 Example: 437 Same as above, but the server avoids the need for the client to 438 poll for changes. 440 the flag $Processed was set on the message 101 by another client ... 442 C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) 443 +FLAGS.SILENT ($Processed) 444 S: * 100 FETCH (MODSEQ (200303181230852)) 445 S: * 101 FETCH (MODSEQ (200303011130956) FLAGS ($Processed)) 446 S: * 102 FETCH (MODSEQ (200303181230852)) 447 ... 448 S: * 150 FETCH (MODSEQ (200303181230852)) 449 S: a106 OK [MODIFIED 101] Conditional STORE failed 451 Or the flag hasn't changed, but another has (note, that this 452 server behaviour is discouraged. Server implementors should also see 453 section 5) ... 455 C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) 456 +FLAGS.SILENT ($Processed) 457 S: * 100 FETCH (MODSEQ (200303181230852)) 458 S: * 101 FETCH (MODSEQ (200303011130956) FLAGS (\Deleted \Answered)) 459 S: * 102 FETCH (MODSEQ (200303181230852)) 460 ... 461 S: * 150 FETCH (MODSEQ (200303181230852)) 462 S: a106 OK [MODIFIED 101] Conditional STORE failed 464 ... and the client retries the operation for the message 101 465 with the updated UNCHANGEDSINCE value 467 C: b108 STORE 101 (UNCHANGEDSINCE 200303011130956) 468 +FLAGS.SILENT ($Processed) 469 S: * 101 FETCH (MODSEQ (200303181230852)) 470 S: b108 OK Conditional Store completed 472 Or the flag hasn't changed, but another has (nice server behaviour. 473 Server implementors should also see section 5) ... 475 C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) 476 +FLAGS.SILENT ($Processed) 477 S: * 100 FETCH (MODSEQ (200303181230852)) 478 S: * 101 FETCH (MODSEQ (200303011130956) FLAGS ($Processed \Deleted \Answered)) 479 S: * 102 FETCH (MODSEQ (200303181230852)) 480 ... 481 S: * 150 FETCH (MODSEQ (200303181230852)) 482 S: a106 OK Conditional STORE completed 484 Example: 486 The following example is based on the example from the section 4.2.3 of 487 [RFC-2180] and demonstrates that the MODIFIED response code may be also 488 returned in the tagged NO response. 490 Client tries to conditionally STORE flags on a mixture of expunged 491 and non-expunged messages, one message fails the UNCHANGEDSINCE test. 493 C: B001 STORE 1:7 (UNCHANGEDSINCE 20000320172338) +FLAGS (\SEEN) 494 S: * 1 FETCH (MODSEQ (20000320172342) FLAGS (\SEEN)) 495 S: * 3 FETCH (MODSEQ (20000320172342) FLAGS (\SEEN)) 496 S: B001 NO [MODIFIED 2] Some of the messages no longer exist. 498 C: B002 NOOP 499 S: * 4 EXPUNGE 500 S: * 4 EXPUNGE 501 S: * 4 EXPUNGE 502 S: * 4 EXPUNGE 503 S: * 2 FETCH (MODSEQ (20000320172340) FLAGS (\Deleted \Answered)) 504 S: B002 OK NOOP Completed. 506 By receiving FETCH responses for messages 1 and 3, and EXPUNGE 507 responses that indicate that messages 4:7 have been expunged, 508 the client retries the operation only for the message 2. The 509 updated UNCHANGEDSINCE value is used. 511 C: b003 STORE 2 (UNCHANGEDSINCE 20000320172340) +FLAGS (\Seen) 512 S: * 2 FETCH (MODSEQ (20000320180050)) 513 S: b003 OK Conditional Store completed 515 Note: If a message is specified multiple times in the message 516 set, and the server doesn't internally eliminate duplicates from 517 the message set, it MUST NOT fail the conditional STORE 518 operation for the second (or subsequent) occurrence of the message 519 if the operation completed successfully for the first occurrence. 520 For example, if the client specifies: 522 a105 STORE 7,3:9 (UNCHANGEDSINCE 200012121230045) 523 +FLAGS.SILENT (\Deleted) 525 the server must not fail the operation for message 7 as part of 526 processing "3:9" if it succeeded when message 7 was processed 527 the first time. 529 Once the client specified the UNCHANGEDSINCE modifier in a STORE command, 530 the server MUST include the MODSEQ fetch response data items in all 531 subsequent unsolicited FETCH responses. 533 This document also changes the behaviour of the server when it has performed 534 a STORE or UID STORE command and the UNCHANGEDSINCE modifier is not specified. 535 If the operation is successful for a message, the server MUST update 536 the mod-sequence attribute of the message. The server is REQUIRED to 537 include the mod-sequence value whenever it decides to send the 538 unsolicited FETCH response to all CONDSTORE-aware clients that have opened 539 the mailbox containing the message. 541 3.3 FETCH and UID FETCH Commands 543 3.3.1 FETCH modifiers 545 Arguments: sequence set 546 message data item names or macro 547 OPTIONAL fetch modifiers 549 Responses: untagged responses: FETCH 551 Result: OK - fetch completed 552 NO - fetch error: can't fetch that data 553 BAD - command unknown or arguments invalid 555 This document extends the syntax of the FETCH and UID FETCH 556 commands (see section 6.4.5 of [IMAP4]) to include an optional FETCH 557 modifier. The document defines the following modifier: 559 CHANGEDSINCE 561 CHANGEDSINCE FETCH modifier allows to further subset the list of 562 messages described by sequence set. The information described by 563 message data items is only returned for messages that have 564 mod-sequence bigger than . 566 When CHANGEDSINCE FETCH modifier is specified, it implicitly adds 567 MODSEQ FETCH message data item (section 3.3.2). 569 Example: 571 C: s100 UID FETCH 1:* (FLAGS) (CHANGEDSINCE 12345) 572 S: * 1 FETCH (UID 4 MODSEQ (65402) FLAGS (\Seen)) 573 S: * 2 FETCH (UID 6 MODSEQ (75403) FLAGS (\Deleted)) 574 S: * 4 FETCH (UID 8 MODSEQ (29738) FLAGS ($NoJunk $AutoJunk $MDNSent)) 575 S: s100 OK FETCH completed 577 3.3.2 MODSEQ message data item in FETCH Command 579 This extension adds a MODSEQ message data item to the FETCH command. 580 The MODSEQ message data item allows clients to retrieve mod-sequence 581 values for a range of messages in the currently selected mailbox. 583 Once the client specified the MODSEQ message data item in a FETCH request, 584 the server MUST include the MODSEQ fetch response data items in all 585 subsequent unsolicited FETCH responses. 587 Syntax: MODSEQ 589 The MODSEQ message data item causes the server to return MODSEQ fetch 590 response data items. 592 Syntax: MODSEQ ( ) 594 MODSEQ response data items contain per-message mod-sequences. 596 The MODSEQ response data item is returned if the client issued FETCH with 597 MODSEQ message data item. It also allows the server to notify the client 598 about mod-sequence changes caused by conditional STOREs (section 3.2) and/or 599 changes caused by external sources. 601 Example: 603 C: a FETCH 1:3 (MODSEQ) 604 S: * 1 FETCH (MODSEQ (20000624140003)) 605 S: * 2 FETCH (MODSEQ (20000624140007)) 606 S: * 3 FETCH (MODSEQ (20000624140005)) 607 S: a OK Fetch complete 609 In this example the client requests per message mod-sequences for a 610 set of messages. 612 When a flag for a message is modified in a different session, the server 613 sends an unsolicited FETCH response containing the mod-sequence for the 614 message. 616 Example: 618 (Session 1, authenticated as a user "alex"). The user adds a shared 619 flag \Deleted: 621 C: A142 SELECT INBOX 622 ... 623 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 624 S: * OK [PERMANENTFLAGS (\Answered \Deleted \Seen \*)] Limited 625 ... 627 C: A160 STORE 7 +FLAGS.SILENT (\Deleted) 628 S: * 7 FETCH (MODSEQ (200012121231000)) 629 S: A160 OK Store completed 631 (Session 2, also authenticated as the user "alex"). Any changes to flags 632 are always reported to all sessions authenticated as the same user as in 633 the session 1. 635 C: C180 NOOP 636 S: * 7 FETCH (FLAGS (\Deleted \Answered) MODSEQ (200012121231000)) 637 S: C180 OK Noop completed 639 (Session 3, authenticated as a user "andrew"). As \Deleted is a shared 640 flag, changes in the session 1 are also reported in the session 3: 642 C: D210 NOOP 643 S: * 7 FETCH (FLAGS (\Deleted \Answered) MODSEQ (200012121231000)) 644 S: D210 OK Noop completed 646 The user modifies a private flag \Seen in the session 1 ... 648 C: A240 STORE 7 +FLAGS.SILENT (\Seen) 649 S: * 7 FETCH (MODSEQ (200012121231777)) 650 S: A240 OK Store completed 652 ... which is only reported in the session 2 ... 654 C: C270 NOOP 655 S: * 7 FETCH (FLAGS (\Deleted \Answered \Seen) MODSEQ (200012121231777)) 656 S: C270 OK Noop completed 658 ... but not in the session 3. 660 C: D300 NOOP 661 S: D300 OK Noop completed 663 And finally the user removes flags \Answered (shared) and \Seen (private) 664 in the session 1. 666 C: A330 STORE 7 -FLAGS.SILENT (\Answered \Seen) 667 S: * 7 FETCH (MODSEQ (200012121245160)) 668 S: A330 OK Store completed 670 Both changes are reported in the session 2 ... 672 C: C360 NOOP 673 S: * 7 FETCH (FLAGS (\Deleted) MODSEQ (200012121245160)) 674 S: C360 OK Noop completed 676 ... and only changes to shared flags are reported in session 3. 678 C: D390 NOOP 679 S: * 7 FETCH (FLAGS (\Deleted) MODSEQ (200012121245160)) 680 S: D390 OK Noop completed 682 3.4. MODSEQ search criterion in SEARCH 684 The MODSEQ criterion for the SEARCH command allows a client to search 685 for the metadata items that were modified since a specified moment. 687 Syntax: MODSEQ [ ] 689 Messages that have modification values which are equal to or 690 greater than . This allows a client, 691 for example, to find out which messages contain metadata items 692 that have changed since the last time it updated its disconnected 693 cache. The client may also specify (name of metadata 694 item) and (type of metadata item) before 695 . can be one of "shared", 696 "priv" (private) or "all". The latter means that the server should use 697 the biggest value among "priv" and "shared" mod-sequences for the 698 metadata item. If the server doesn't store internally separate 699 mod-sequences for different metadata items, it MUST ignore 700 and . Otherwise the server should 701 use them to narrow down the search. 703 For a flag the corresponding has a form 704 "/flags/" as defined in [IMAPABNF]. Note, that 705 the leading "\" character that denotes a system flag has to be 706 escaped as per Section 4.3 of [IMAP4], as the uses 707 syntax for quoted strings. 709 If client specifies a MODSEQ criterion in a SEARCH command and 710 the server returns a non-empty SEARCH result, the server MUST also 711 append (to the end of the untagged SEARCH response) the highest 712 mod-sequence for all messages being returned. See also section 3.5. 714 Example: 715 C: a SEARCH MODSEQ "/flags/\\draft" all 20010320162338 716 S: * SEARCH 2 5 6 7 11 12 18 19 20 23 (MODSEQ 20010917162500) 717 S: a OK Search complete 719 In the above example, the message numbers of any messages 720 containing the string "IMAP4" in the "value" attribute of the 721 "/comment" entry and having a mod-sequence equal to or 722 greater than 20010320162338 for the "\Draft" flag are returned in 723 the search results. 725 Example: 726 C: a SEARCH OR NOT MODSEQ 20010320162338 LARGER 50000 727 S: * SEARCH 728 S: a OK Search complete, nothing found 730 3.5. Modified SEARCH untagged response 732 Data: zero or more numbers 733 mod-sequence value (omitted if no match) 735 This document extends syntax of the untagged SEARCH response 736 to include the highest mod-sequence for all messages being returned. 738 If a client specifies a MODSEQ criterion in a SEARCH (or UID SEARCH) 739 command and the server returns a non-empty SEARCH result, the server 740 MUST also append (to the end of the untagged SEARCH response) the 741 highest mod-sequence for all messages being returned. See section 742 3.4 for examples. 744 3.6. HIGHESTMODSEQ status data items 746 This document defines a new status data item: 748 HIGHESTMODSEQ 749 The highest mod-sequence value all messages 750 in the mailbox. This is the same value that is returned by the server 751 in the HIGHESTMODSEQ response code in OK untagged response 752 (see section 3.1.1). 754 Example: C: A042 STATUS blurdybloop (UIDNEXT MESSAGES HIGHESTMODSEQ) 755 S: * STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292 756 HIGHESTMODSEQ 200201011231777) 757 S: A042 OK STATUS completed 759 3.7. CONDSTORE parameter to SELECT and EXAMINE 761 The CONDSTORE extension defines a single optional select parameter 762 "CONDSTORE", which tells the server that it MUST include the MODSEQ 763 fetch response data items in all subsequent unsolicited FETCH responses. 765 The CONDSTORE parameter to SELECT/EXAMINE helps to avoid a race condition 766 that might arise when a metadata item(s) is(are) modified in another session 767 after the server has sent the HIGHESTMODSEQ response code and before the 768 client was able to issue a CONDSTORE enabling command. 770 Example: C: A142 SELECT INBOX (CONDSTORE) 771 S: * 172 EXISTS 772 S: * 1 RECENT 773 S: * OK [UNSEEN 12] Message 12 is first unseen 774 S: * OK [UIDVALIDITY 3857529045] UIDs valid 775 S: * OK [UIDNEXT 4392] Predicted next UID 776 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 777 S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited 778 S: * OK [HIGHESTMODSEQ 20010715194045007] 779 S: A142 OK [READ-WRITE] SELECT completed, CONDSTORE is now enabled 781 4. Formal Syntax 783 The following syntax specification uses the Augmented Backus-Naur 784 Form (ABNF) [ABNF] notation. Elements not defined here can be found in 785 the formal syntax of the ABNF [ABNF], IMAP [IMAP4], and IMAP ABNF extensions 786 [IMAPABNF] specifications. 788 Except as noted otherwise, all alphabetic characters are case- 789 insensitive. The use of upper or lower case characters to define token 790 strings is for editorial clarity only. Implementations MUST accept 791 these strings in a case-insensitive fashion. 793 capability =/ "CONDSTORE" 795 status-att =/ "HIGHESTMODSEQ" 796 ;; extends non-terminal defined in RFC 3501. 798 status-att-val =/ "HIGHESTMODSEQ" SP mod-sequence-value 800 store-modifier =/ "UNCHANGEDSINCE" SP mod-sequence-valzer 801 ;; Only a single "UNCHANGEDSINCE" may be specified 802 ;; in a STORE operation 804 fetch-modifier =/ chgsince-fetch-mod 805 ;; conforms to the generic "fetch-modifier" syntax 806 ;; defined in [IMAPABNF]. 808 chgsince-fetch-mod = "CHANGEDSINCE" SP mod-sequence-value 809 ;; CHANGEDSINCE FETCH modifier conforms to 810 ;; the fetch-modifier syntax 812 fetch-att =/ fetch-mod-sequence 813 ;; modifies original IMAP4 fetch-att 815 fetch-mod-sequence = "MODSEQ" 817 fetch-mod-resp = "MODSEQ" SP "(" permsg-modsequence ")" 819 msg-att-dynamic =/ fetch-mod-resp 821 search-key =/ search-modsequence 822 ;; modifies original IMAP4 search-key 823 ;; 824 ;; This change applies to all command referencing this 825 ;; non-terminal, in particular SEARCH. 827 search-modsequence = "MODSEQ" [search-modseq-ext] SP mod-sequence-valzer 829 search-modseq-ext = SP entry-name SP entry-type-req 831 resp-text-code =/ "HIGHESTMODSEQ" SP mod-sequence-value / 832 "NOMODSEQ" / 833 "MODIFIED" SP set 835 entry-name = entry-flag-name 837 entry-flag-name = DQUOTE "/flags/" attr-flag DQUOTE 838 ;; each system or user defined flag 839 ;; is mapped to "/flags/". 840 ;; 841 ;; follows the escape rules used 842 ;; by "quoted" string as described in Section 843 ;; 4.3 of [IMAP4], e.g. for the flag \Seen 844 ;; the corresponding is 845 ;; "/flags/\\seen", and for the flag 846 ;; $MDNSent, the corresponding 847 ;; is "/flags/$mdnsent". 849 entry-type-resp = "priv" / "shared" 850 ;; metadata item type 852 entry-type-req = entry-type-resp / "all" 853 ;; perform SEARCH operation on private 854 ;; metadata item, shared metadata item or both 856 permsg-modsequence = mod-sequence-value 857 ;; per message mod-sequence 859 mod-sequence-value = 1*DIGIT 860 ;; Positive unsigned 64-bit integer (mod-sequence) 861 ;; (1 <= n < 18,446,744,073,709,551,615) 863 mod-sequence-valzer = "0" / mod-sequence-value 865 search-sort-mod-seq = "(" "MODSEQ" SP mod-sequence-value ")" 867 select-param =/ condstore-param 868 ;; conforms to the generic "select-param" non-terminal 869 ;; syntax defined in [IMAPABNF]. 871 condstore-param = "CONDSTORE" 873 mailbox-data =/ "SEARCH" [1*(SP nz-number) SP search-sort-mod-seq] 875 attr-flag = "\\Answered" / "\\Flagged" / "\\Deleted" / 876 "\\Seen" / "\\Draft" / attr-flag-keyword / 877 attr-flag-extension 878 ;; Does not include "\\Recent" 880 attr-flag-extension = "\\" atom 881 ;; Future expansion. Client implementations 882 ;; MUST accept flag-extension flags. Server 883 ;; implementations MUST NOT generate 884 ;; flag-extension flags except as defined by 885 ;; future standard or standards-track 886 ;; revisions of [IMAP4]. 888 attr-flag-keyword = atom 890 5. Server implementation considerations 892 This section describes how a server implementation that 893 doesn't store separate per-metadata modsequences for different metadata 894 items can avoid sending MODIFIED response to any of the following 895 conditional STORE operations: 896 +FLAGS 897 -FLAGS 898 +FLAGS.SILENT 899 -FLAGS.SILENT 901 Note, that the optimization described in this section can't be performed 902 in case of a conditional STORE FLAGS operation. 904 Let's use the following example. The client has issued 906 C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) 907 +FLAGS.SILENT ($Processed) 909 When the server receives the command and parses it successfully it 910 iterates through the message set and tries to execute the conditional 911 STORE command for each message. 913 Each server internally works as a client, i.e. it has to cache the 914 current state of all IMAP flags as it is known to the client. 915 In order to report flag changes to the client the server compares the 916 cached values with the values in its database for IMAP flags. 918 Imagine that another client has changed the state of a flag \Deleted on 919 message 101 and the change updated the modsequence for the message. 920 The server knows that the modsequence for the mailbox has changed, however 921 it also knows that 923 a) The client is not interested in \Deleted flag, as it hasn't included 924 it in +FLAGS.SILENT operation. 925 b) The state of the flag $Processed hasn't changed (server can determine 926 this by comparing cached flag state with the state of the flag in the 927 database), 928 so the server doesn't have to report MODIFIED to the client. Instead the 929 server may set $Processed flag, update the modsequence for the message 101 930 once again and send an untagged FETCH response with new modsequence and 931 flags: 933 S: * 101 FETCH (MODSEQ (200303011130956) FLAGS ($Processed \Deleted \Answered)) 935 6. Security Considerations 937 It is believed that the Conditional STORE extension doesn't raise 938 any new security concerns that are not already discussed in [IMAP4]. 939 However, the availability of this extension may make it possible 940 for IMAP4 to be used in critical applications it could not be used 941 for previously, making correct IMAP server implementation and 942 operation even more important. 944 7. References 946 7.1. Normative References 948 [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate 949 Requirement Levels", RFC 2119, Harvard University, March 1997. 951 [ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications: 952 ABNF", RFC 4234, October 2005. 954 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version 955 4rev1", RFC 3501, University of Washington, March 2003. 957 [IMAPABNF] Melnikov, A., "Collected extensions to IMAP4 ABNF", 958 work in progress. 959 961 7.2. Informative References 963 [ACAP] Newman, Myers, "ACAP -- Application Configuration Access 964 Protocol", RFC 2244, Innosoft, Netscape, November 1997. 965 967 [ACL] Myers, "IMAP4 ACL extension", RFC 2086, Carnegie Mellon, 968 January 1997. 969 971 [NTP] Mills, D, "Network Time Protocol (Version 3) Specification, 972 Implementation and Analysis", RFC 1305, March 1992. 973 975 [RFC-2180] Gahrns, M., "IMAP4 Multi-Accessed Mailbox Practice", 976 RFC 2180, July 1997. 977 979 8. IANA Considerations 981 IMAP4 capabilities are registered by publishing a standards track or 982 IESG approved experimental RFC. The registry is currently located 983 at: 985 http://www.iana.org/assignments/imap4-capabilities 987 This document defines the CONDSTORE IMAP capability. 988 IANA should add them to the registry accordingly. 990 9. Acknowledgments 992 Some text was borrowed from "IMAP ANNOTATE Extension" by Randall Gellens 993 and Cyrus Daboo, and "ACAP -- Application Configuration Access Protocol" 994 by Chris Newman and John Myers. 996 Many thanks to Randall Gellens for his thorough review of the document. 998 The authors also acknowledge the feedback provided by Cyrus Daboo, Larry 999 Greenfield, Chris Newman, Harrie Hazewinkel, Arnt Gulbrandsen, Timo 1000 Sirainen, Mark Crispin, Ned Freed, Ken Murchison and Dave Cridland. 1002 10. Author's Addresses 1004 Alexey Melnikov 1005 mailto: Alexey.Melnikov@isode.com 1007 Isode Limited 1008 5 Castle Business Village, 36 Station Road, 1009 Hampton, Middlesex, TW12 2BX, United Kingdom 1011 Steve Hole 1012 mailto: Steve.Hole@messagingdirect.com 1014 ACI WorldWide/MessagingDirect 1015 #900, 10117 Jasper Avenue, 1016 Edmonton, Alberta, T5J 1W8, CANADA 1018 11. Intellectual Property Statement 1020 The IETF takes no position regarding the validity or scope of any 1021 Intellectual Property Rights or other rights that might be claimed to 1022 pertain to the implementation or use of the technology described in 1023 this document or the extent to which any license under such rights 1024 might or might not be available; nor does it represent that it has 1025 made any independent effort to identify any such rights. Information 1026 on the procedures with respect to rights in RFC documents can be 1027 found in BCP 78 and BCP 79. 1029 Copies of IPR disclosures made to the IETF Secretariat and any 1030 assurances of licenses to be made available, or the result of an 1031 attempt made to obtain a general license or permission for the use of 1032 such proprietary rights by implementers or users of this 1033 specification can be obtained from the IETF on-line IPR repository at 1034 http://www.ietf.org/ipr. 1036 The IETF invites any interested party to bring to its attention any 1037 copyrights, patents or patent applications, or other proprietary 1038 rights that may cover technology that may be required to implement 1039 this standard. Please address the information to the IETF at 1040 ietf-ipr@ietf.org. 1042 The IETF has been notified of intellectual property rights claimed in 1043 regard to some or all of the specification contained in this 1044 document. For more information consult the online list of claimed 1045 rights. 1047 Disclaimer of Validity 1049 This document and the information contained herein are provided on an 1050 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1051 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 1052 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 1053 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 1054 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1055 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1057 Copyright Statement 1059 Copyright (C) The Internet Society (2005). This document is subject 1060 to the rights, licenses and restrictions contained in BCP 78, and 1061 except as set forth therein, the authors retain all their rights. 1063 Acknowledgment 1065 Funding for the RFC Editor function is currently provided by the 1066 Internet Society. 1068 Appendix A. Change History 1070 Note that this appendix will be removed before publication. 1072 0.1. Change History 1074 Changes from draft-ietf-imapext-condstore-05 1075 1. Reworded not to have a normative reference to ANNOTATE. 1076 2. Updated ABNF to reference IMAP ABNF. 1077 3. Clarified that STATUS (HIGHESTMODSEQ) also enables 1078 CONDSTORE notifications. 1079 4. Fixed few typos in examples or example titles. 1080 5. Updated boilerplate, references. 1082 Changes from draft-ietf-imapext-condstore-04 1083 1. Fixed typo in an example, added more examples. 1084 2. Clarified client behavior regarding retrying the request 1085 when the server returns MODIFIED (IESG comment) 1086 3. Added new section describing how a CONDSTORE server implementation 1087 should avoid sending MODIFIED when the client has requested 1088 a conditional store on a flag A and a flag B was modified 1089 by another client. (IESG comment) 1091 Changes from draft-ietf-imapext-condstore-03 1092 1. ABNF corrections from Ned Freed. 1093 2. Minor spelling/wording corrections from Ned Freed. 1095 Changes from draft-ietf-imapext-condstore-02 1096 1. Added FETCH modifiers. 1097 2. Added example for using ANNOTATE with UNCHANGEDSINCE STORE 1098 modifier. 1099 3. Added a new requirement to send HIGHESTMODSEQ response code 1100 when implicit enabling is used. 1101 4. Fixed syntax in an example in section 3.2. 1103 Changes from draft-ietf-imapext-condstore-01 1104 1. Fixed missing \\ in one example. 1105 2. Added explanatory comment that search-key modifications apply at 1106 least to SEARCH and SORT command. 1107 3. Don't require from a conditional store operation to be atomic accross 1108 message set, updated text and examples. 1109 4. Added SORT=MODSEQ extension and reworked text in the Introduction section. 1110 5. Added Conditional STORE example based on suggestions from RFC 2180. 1111 6. Removed the paragraph about DOS attack from the Security considerations 1112 section, as it doesn't apply anymore. 1113 7. Updated entry-name ABNF. 1114 8. Added an optional CONDSTORE parameter to SELECT/EXAMINE. 1116 Changes from draft-ietf-imapext-condstore-00 1117 1. Dropped "/message" prefix in entry names as per decision in San Francisco. 1118 2. Fixed ABNF for SEARCH and SORT untagged responses. 1119 3. Changed "private" to "priv" to be consistent with ANNOTATE. 1120 4. MODIFIED response code is now returned in OK response, not NO. 1121 5. Added NOMODSEQ response code. 1123 Changes from draft-melnikov-imap-condstore-09: 1124 1. Some text clarifications based on suggestions by Harrie Hazewinkel 1125 2. Added paragraph about mailbox locking and DOS when conditional STORE 1126 operation is performed on a large mailbox. 1127 3. Fixed syntax of to match the ANNOTATE extension. 1128 4. Added sentence that a system flag MUST always be considered existent, 1129 when UNCHANGEDSINCE 0 is used. Is this a good idea? 1130 5. Clarified client behavior upon receipt of MODIFIED response code. 1131 6. Updated ABNF to clarify where 0 is allowed as mod-sequence and where 1132 it is not. 1133 7. Got rid of MODSEQ response code and return this data in the untagged 1134 SEARCH/SORT responses. 1135 8. Updated RFC number for the IMAP4rev1 document. 1137 Changes from -08 to -09: 1138 1. Added an extended example about reporting regular (non-conditional) flag 1139 changes to other sessions. 1140 2. Simplified FETCH MODSEQ syntax by removing per-metadata requests and 1141 responses. 1143 Changes from -07 to -08: 1144 1. Added note saying the change to UIDVALIDITY also invalidates HIGHESTMODSEQ. 1145 2. Fixed several bugs in ABNF for STATUS and STORE commands. 1147 Changes from -06 to -07: 1148 1. Added clarification that when a server does command reordering, the second 1149 completed operation gets the higher mod sequence. 1150 2. Renamed annotation type specifier "both" to "all" as per suggestion 1151 from Minneapolis meeting. 1152 3. Removed PERFLAGMODSEQ capability, as it doesn't buy anything: a client 1153 has to work with both types of servers (i.e. servers that support per 1154 message per flag modseqs and servers that support only per message 1155 modseqs) anyway. 1156 4. Per flag mod-sequences are optional for a server to return. Updated syntax. 1157 5. Allow MODSEQ response code only as a result of SEARCH/SORT as suggested 1158 by John Myers. MODSEQ response code is not allowed after FETCH or STORE. 1160 Changes from -05 to -06: 1161 1. Replaced "/message/flags/system" with "/message/flags" to 1162 match ANNOTATE draft. 1163 2. Extended FETCH/SEARCH/SORT syntax to allow for specifying 1164 whether an operation should be performed on a shared or a private 1165 annotation (or both). 1166 3. Corrected some examples. 1168 Changes from -04 to -05: 1169 1. Added support for SORT extension. 1170 2. Multiple language/spelling fixes by Randall Gellens. 1172 Changes from -03 to -04: 1173 1. Added text saying that MODSEQ fetch data items cause server 1174 to include MODSEQ data response in all subsuquent unsolicited FETCH 1175 responses. 1176 2. Added "authors address" section. 1178 Changes from -02 to -03: 1179 1. Changed MODTIME untagged response to MODTIME response code. 1180 2. Added MODTIME response code to the tagged OK response for SEARCH. 1181 Updated examples accordingly. 1182 3. Changed rule for sending untagged FETCH response as a result of 1183 STORE when .SILENT prefix is used. If .SILENT prefix is used, 1184 server doesn't have to send untagged FETCH response, because 1185 MODTIME response code already contains modtime. 1186 4. Renamed MODTIME to MODSEQ to make sure there is no confusion 1187 between mod-sequence and ACAP modtime. 1188 5. Minor ABNF changes. 1189 6. Minor language corrections. 1191 Changes from -01 to -02: 1192 1. Added MODTIME data item to STATUS command. 1193 2. Added OK untagged response to SELECT/EXAMINE. 1194 3. Clarified that MODIFIED response code contains list of UIDs for 1195 conditional UID STORE and message set for STORE. 1196 4. Added per-message modtime. 1197 5. Added PERFLAGMODTIME capability. 1198 6. Fixed several bugs in examples. 1199 7. Added more comments to ABNF. 1201 Changes from -00 to -01: 1202 1. Refreshed the list of Open Issues. 1203 2. Changed "attr-name" to "entry-name", because modtime applies to 1204 entry, not attribute. 1205 3. Added MODTIME untagged response. 1206 4. Cleaned up ABNF. 1207 5. Added "Acknowledgments" section. 1208 6. Fixed some spelling mistakes.