idnits 2.17.1 draft-ietf-imapext-condstore-07.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 1115. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1087. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1094. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1100. ** 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 1303 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 285 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 (November 2005) is 6736 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 826, but not defined == Missing Reference: 'UIDVALIDITY 3857529045' is mentioned on line 827, but not defined == Missing Reference: 'UIDNEXT 4392' is mentioned on line 828, but not defined == Missing Reference: 'HIGHESTMODSEQ 20010715194045007' is mentioned on line 831, but not defined == Missing Reference: 'HIGHESTMODSEQ 200012111230047' is mentioned on line 348, but not defined == Missing Reference: 'MODIFIED 7' is mentioned on line 377, but not defined -- Looks like a reference, but probably isn't: '9' on line 377 == Missing Reference: 'MODIFIED 12' is mentioned on line 387, but not defined == Missing Reference: 'MODIFIED 101' is mentioned on line 475, but not defined == Missing Reference: 'MODIFIED 2' is mentioned on line 509, but not defined == Unused Reference: 'ACAP' is defined on line 1023, 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. 'SORT' -- 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 (==), 13 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-07.txt Isode Ltd. 3 Expires: May 2006 S. Hole 4 ACI WorldWide/MessagingDirect 5 November 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 MODSEQ Sort Criterion .................................... X 67 3.6 Modified SEARCH and SORT untagged responses .............. X 68 3.7 HIGHESTMODSEQ status data items .......................... X 69 3.8 CONDSTORE parameter to SELECT and EXAMINE ................ X 70 4 Formal Syntax ............................................. X 71 5 Server implementation considerations ...................... X 72 6 Security Considerations ................................... X 73 7 References ................................................ X 74 7.1 Normative References ..................................... X 75 7.2 Informative References ................................... X 76 8 IANA Considerations ....................................... X 77 9 Acknowledgments ........................................... X 78 10 Author's Addresses ........................................ X 79 11 Intellectual Property Rights .............................. X 80 12 Full Copyright Statement .................................. X 82 1. Conventions Used in This Document 84 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 85 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 86 document are to be interpreted as described in RFC 2119 [KEYWORDS]. 88 In examples, lines beginning with "S:" are sent by the IMAP server, and 89 lines beginning with "C:" are sent by the client. Line breaks may appear 90 in example commands solely for editorial clarity; when present in 91 the actual message they are represented by "CRLF". 93 Formal syntax is defined using ABNF [ABNF]. 95 The term "metadata" or "metadata item" is used throughout this document. 96 It refers to any system or user defined keyword. Future documents 97 may extend "metadata" to include other dynamic message data. 99 Some IMAP mailboxes are private, accessible only to the owning user. 100 Other mailboxes are not, either because the owner has set an ACL 101 [ACL] which permits access by other users, or because it is a 102 shared mailbox. Let's call a metadata item "shared" for the mailbox 103 if any changes to the metadata items are persistent and visible to all 104 other users accessing the mailbox. Otherwise the metadata item is called 105 "private". Note, that private metadata items are still visible to all 106 sessions accessing the mailbox as the same user. Also note, that different 107 mailboxes may have different metadata items as shared. 109 See the next section for the definition of a "CONDSTORE-aware client" 110 and a "CONDSTORE enabling command". 112 2. Introduction and Overview 114 The Conditional STORE extension is present in any IMAP4 implementation 115 which returns "CONDSTORE" as one of the supported capabilities in the 116 CAPABILITY command response. 118 Every IMAP message has an associated positive unsigned 64-bit value called a 119 modification sequence (mod-sequence). This is an opaque value updated by 120 the server whenever a metadata item is modified. The value is intended to 121 be used only for comparisons within a server. However, the server MUST 122 guarantee that each STORE command performed on the same mailbox, including 123 simultaneous stores to different metadata items from different connections, 124 will get a different mod-sequence value. Also, for any two successful 125 STORE operations performed in the same session on the same mailbox, 126 the mod-sequence of the second completed operation MUST be greater than 127 the mod-sequence of the first completed. Note that the latter rule disallows 128 the use of the system clock as a mod-sequence, because if system time changes 129 (e.g., a NTP [NTP] client adjusting the time), the next generated value might 130 be less than the previous one. 132 Mod-sequences allow a client that supports the CONDSTORE extension to 133 determine if a message metadata has changed since some known 134 moment. Whenever the state of a flag changes (i.e., the flag is added where 135 previously it wasn't set, or the flag is removed and before it was set) the 136 value of the modification sequence for the message MUST be updated. 137 Adding the flag when it is already present or removing when it is not 138 present SHOULD NOT change the mod-sequence. 140 When a message is appended to a mailbox (via the IMAP APPEND command, 141 COPY to the mailbox or using an external mechanism) the server 142 generates a new modification sequence that is higher than the highest 143 modification sequence of all messages in the mailbox and assigns it to 144 the appended message. 146 The server MAY store separate (per message) modification sequence values for 147 different metadata items. If the server does so, per message mod-sequence is 148 the highest mod-sequence of all metadata items for the specified message. 150 The server that supports this extension is not required to be able to store 151 mod-sequences for every available mailbox. Section 3.1.2 describes how 152 the server may act if a particular mailbox doesn't support the persistent 153 storage of mod-sequences. 155 This extension makes the following changes to the IMAP4 protocol: 157 a) extends the syntax of the STORE command to allow STORE 158 modifiers 160 b) adds the MODIFIED response code which should be used with 161 an OK response to the STORE command 163 c) adds a new MODSEQ message data item for use with the FETCH command 165 d) extends the syntax of the FETCH command to allow FETCH 166 modifiers 168 e) adds a new MODSEQ search criterion 170 f) extends the syntax of untagged SEARCH responses to include mod-sequence 172 g) adds new OK untagged responses for the SELECT and EXAMINE commands 174 h) defines an additional parameter to SELECT/EXAMINE commands 176 i) adds the HIGHESTMODSEQ status data item to the STATUS command 178 A client supporting CONDSTORE extension indicates its willingness to receive 179 mod-sequence updates in all untagged FETCH responses by issuing a SELECT or 180 EXAMINE command with the CONDSTORE parameter, or STATUS (HIGHESTMODSEQ) command, 181 or a FETCH, SEARCH, or SORT 182 (if it also supports SORT=MODSEQ extension, see below) command that includes 183 the MODSEQ message data item, a FETCH command with the CHANGEDSINCE modifier, 184 or a STORE command with the UNCHANGEDSINCE modifier. 185 The server MUST include mod-sequence data in all subsequent untagged FETCH 186 responses, whether they 187 were caused by a regular STORE, STORE with UNCHANGEDSINCE modifier, or an external 188 agent, until the connection is closed. 190 This document uses the term "CONSTORE-aware client" to refer to a client 191 that announces its willingness to receive mod-sequence updates as described 192 above. The term "CONDSTORE enabling command" will refer any of the commands 193 listed above. A first CONDSTORE enabling command executed in the session 194 MUST cause the server to return HIGHESTMODSEQ (section 3.1.1) unless the 195 server has sent NOMODSEQ (section 3.1.2) response code when the currently 196 selected mailbox was selected. 198 This document also defines a new SORT extension with a capability name 199 "SORT=MODSEQ". This extension is upwards compatible with the SORT extension 200 defined in [SORT]. Server implementations that support both the CONDSTORE and 201 SORT extensions SHOULD also support the SORT=MODSEQ extension. The 202 SORT=MODSEQ extension makes the following additions to the SORT extension: 204 a) extends syntax of untagged SORT responses to include mod-sequence 205 (see section 3.6) 207 b) adds a new MODSEQ sort criterion (see sections 3.4 and 3.5) 209 The rest of this document describes the protocol changes more rigorously. 211 3. IMAP Protocol Changes 213 3.1. New OK untagged responses for SELECT and EXAMINE 215 This document adds two new response codes HIGHESTMODSEQ and NOMODSEQ. 216 One of those response codes MUST be returned in the OK untagged 217 response for a successful SELECT/EXAMINE command. 219 When opening a mailbox the server must check if the mailbox supports 220 the persistent storage of mod-sequences. If the mailbox supports 221 the persistent storage of mod-sequences and mailbox open operation succeeds, 222 the server MUST send the OK untagged response including HIGHESTMODSEQ 223 response code. If the persistent storage for the mailbox is not supported, 224 the server MUST send the OK untagged response including NOMODSEQ response 225 code instead. 227 3.1.1. HIGHESTMODSEQ response code 229 This document adds a new response code that is returned in the OK 230 untagged response for the SELECT and EXAMINE commands. A server 231 supporting the persistent storage of mod-sequences for the mailbox MUST 232 send the OK untagged response including HIGHESTMODSEQ response code with 233 every successful SELECT or EXAMINE command: 235 OK [HIGHESTMODSEQ ] 237 Where is the highest mod-sequence value of all 238 messages in the mailbox. When the server changes UIDVALIDITY for a 239 mailbox, it doesn't have to keep the same HIGHESTMODSEQ for the 240 mailbox. 242 A disconnected client can use the value of HIGHESTMODSEQ to check if 243 it has to refetch metadata from the server. If the 244 UIDVALIDITY value has changed for the selected mailbox, the client 245 MUST delete the cached value of HIGHESTMODSEQ. If UIDVALIDITY for 246 the mailbox is the same and if the HIGHESTMODSEQ value stored in 247 the client's cache is less than the value returned by the server, 248 then some metadata items on the server have changed since the last 249 synchronization, and the client needs to update its cache. The client 250 MAY use SEARCH MODSEQ as described in section 3.4 to find out exactly 251 which metadata items have changed. Alternatively the client MAY issue 252 FETCH with CHANGEDSINCE modifier (section 3.3.1) in order to fetch data 253 for all messages that have metadata items changed since some known 254 modification sequence. 256 Example: C: A142 SELECT INBOX 257 S: * 172 EXISTS 258 S: * 1 RECENT 259 S: * OK [UNSEEN 12] Message 12 is first unseen 260 S: * OK [UIDVALIDITY 3857529045] UIDs valid 261 S: * OK [UIDNEXT 4392] Predicted next UID 262 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 263 S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited 264 S: * OK [HIGHESTMODSEQ 20010715194045007] 265 S: A142 OK [READ-WRITE] SELECT completed 267 3.1.2 NOMODSEQ response code 269 A server that doesn't support the persistent storage of mod-sequences for 270 the mailbox MUST send the OK untagged response including NOMODSEQ response 271 code with every successful SELECT or EXAMINE command. 273 Example: C: A142 SELECT INBOX 274 S: * 172 EXISTS 275 S: * 1 RECENT 276 S: * OK [UNSEEN 12] Message 12 is first unseen 277 S: * OK [UIDVALIDITY 3857529045] UIDs valid 278 S: * OK [UIDNEXT 4392] Predicted next UID 279 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 280 S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited 281 S: * OK [NOMODSEQ] Sorry, this mailbox format doesn't support modsequences 282 S: A142 OK [READ-WRITE] SELECT completed 284 3.2. STORE and UID STORE Commands 286 Arguments: message set 287 OPTIONAL store modifiers 288 message data item name 289 value for message data item 291 Responses: untagged responses: FETCH 293 Result: OK - store completed 294 NO - store error: can't store that data 295 BAD - command unknown or arguments invalid 297 This document extends the syntax of the STORE and UID STORE 298 commands (see section 6.4.6 of [IMAP4]) to include an optional STORE 299 modifier. The document defines the following modifier: 301 UNCHANGEDSINCE 302 For each message specified in the message set the server performs 303 the following. If the mod-sequence of any metadata item of the 304 message is equal or less than the specified UNCHANGEDSINCE value, 305 then the requested operation (as described by the 306 message data item) is performed. If the operation is successful 307 the server MUST update the mod-sequence attribute of the message. 308 An untagged FETCH response MUST be sent, even if the .SILENT suffix 309 is specified and the response MUST include the MODSEQ message data 310 item. This is required to update the client's cache with the correct 311 mod-sequence values. See section 3.3.2 for more details. 313 However, if the mod-sequence of any metadata item of the 314 message is greater than the specified UNCHANGEDSINCE value, than 315 the requested operation MUST NOT be performed. In this case, 316 the mod-sequence attribute of the message is not updated, and the 317 message number (or unique identifier in the case of the UID STORE 318 command) is added to the list of messages that failed the UNCHANGESINCE test. 320 When the server finished performing the operation on all the messages 321 in the message set, it checks for a non-empty list of messages that 322 failed the UNCHANGESINCE test. If this list is non-empty, the server MUST 323 return in the tagged response a MODIFIED response code. The MODIFIED 324 response code includes the message set (for STORE) or set of UIDs 325 (for UID STORE) of all messages that failed the UNCHANGESINCE test. 327 Example : 329 All messages pass the UNCHANGESINCE test. 331 C: a103 UID STORE 6,4,8 (UNCHANGEDSINCE 200012121230045) 332 +FLAGS.SILENT (\Deleted) 333 S: * 1 FETCH (UID 4 MODSEQ (200012121231000)) 334 S: * 2 FETCH (UID 6 MODSEQ (200012121230852)) 335 S: * 4 FETCH (UID 8 MODSEQ (200012121130956)) 336 S: a103 OK Conditional Store completed 338 Example: 340 C: a104 STORE * (UNCHANGEDSINCE 200012121230045) +FLAGS.SILENT 341 (\Deleted $Processed) 342 S: * 50 FETCH (MODSEQ (200012111230047)) 343 S: a104 OK Store (conditional) completed 345 Example: 346 C: c101 STORE 1 (UNCHANGEDSINCE 200012121230045) -FLAGS.SILENT 347 (\Deleted) 348 S: * OK [HIGHESTMODSEQ 200012111230047] 349 S: * 50 FETCH (MODSEQ (200012111230048)) 350 S: c101 OK Store (conditional) completed 352 HIGHESTMODSEQ response code was sent by the server 353 presumably because this was the first CONDSTORE enabling 354 command. 356 Example: 358 In spite of the failure of the conditional STORE operation 359 for message 7, the server continues to process the conditional 360 STORE in order to find all messages which fail the test. 362 C: a105 STORE 7,5,9 (UNCHANGEDSINCE 20000320162338) 363 +FLAGS.SILENT (\Deleted) 364 S: * 5 FETCH (MODSEQ (20000320162350)) 365 S: a105 OK [MODIFIED 7,9] Conditional STORE failed 367 Example: 369 Same as above, but the server follows SHOULD recommendation 370 in section 6.4.6 of [IMAP4]. 372 C: a105 STORE 7,5,9 (UNCHANGEDSINCE 20000320162338) 373 +FLAGS.SILENT (\Deleted) 374 S: * 7 FETCH (MODSEQ (20000320162342) FLAGS (\Seen \Deleted)) 375 S: * 5 FETCH (MODSEQ (20000320162350)) 376 S: * 9 FETCH (MODSEQ (20000320162349) FLAGS (\Answered)) 377 S: a105 OK [MODIFIED 7,9] Conditional STORE failed 379 Use of UNCHANGEDSINCE with a modification sequence of 0 380 always fails if the metadata item exists. A system flag 381 MUST always be considered existent, whether it was set or not. 383 Example: 385 C: a102 STORE 12 (UNCHANGEDSINCE 0) 386 +FLAGS.SILENT ($MDNSent) 387 S: a102 OK [MODIFIED 12] Conditional STORE failed 389 The client has tested the presence of the $MDNSent user defined 390 keyword. 392 Note: A client trying to make an atomic change to the state of a particular 393 metadata item (or a set of metadata items) should be prepared 394 to deal with the case when the server returns MODIFIED response code 395 if the state of the metadata item being watched hasn't changed (but 396 the state of some other metadata item has). This is necessary, because 397 some servers don't store separate mod-sequences for different metadata 398 items. However, a server implementation SHOULD avoid generating 399 spurious MODIFIED responses for +FLAGS/-FLAGS STORE operations, 400 even when the server stores a single mod-sequence per message. Section 401 5 describes how this can be achieved. 403 Unless the server has included an unsolicited FETCH to update client's 404 knowledge about message(s) that has failed UNCHANGEDSINCE test, upon the 405 receipt of MODIFIED response code the client SHOULD try to 406 figure out if the required metadata items have indeed changed by issuing 407 FETCH or NOOP command. It is RECOMMENDED that the server avoids the 408 need for the client to do that by sending an unsolicited FETCH response 409 (see two following examples). 411 If the required metadata items haven't changed the client SHOULD retry 412 the command with the new modsequence. The client SHOULD allow for a 413 configurable but reasonable number of retries (at least 2). 415 Example: 416 In the example below the server returns MODIFIED response code 417 without sending information describing why the STORE UNCHANGEDSINCE 418 operation has failed. 420 C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) 421 +FLAGS.SILENT ($Processed) 422 S: * 100 FETCH (MODSEQ (200303181230852)) 423 S: * 102 FETCH (MODSEQ (200303181230852)) 424 ... 425 S: * 150 FETCH (MODSEQ (200303181230852)) 426 S: a106 OK [MODIFIED 101] Conditional STORE failed 428 the flag $Processed was set on the message 101 ... 429 C: a107 NOOP 430 S: * 101 FETCH (MODSEQ (200303011130956) FLAGS ($Processed)) 431 S: a107 OK 433 Or the flag hasn't changed, but another has (note, that this 434 server behaviour is discouraged. Server implementors should also see 435 section 5) ... 437 C: b107 NOOP 438 S: * 101 FETCH (MODSEQ (200303011130956) FLAGS (\Deleted \Answered)) 439 S: b107 OK 441 ... and the client retries the operation for the message 101 442 with the updated UNCHANGEDSINCE value 444 C: b108 STORE 101 (UNCHANGEDSINCE 200303011130956) 445 +FLAGS.SILENT ($Processed) 446 S: * 101 FETCH (MODSEQ (200303181230852)) 447 S: b108 OK Conditional Store completed 449 Example: 450 Same as above, but the server avoids the need for the client to 451 poll for changes. 453 the flag $Processed was set on the message 101 by another client ... 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 ($Processed)) 459 S: * 102 FETCH (MODSEQ (200303181230852)) 460 ... 461 S: * 150 FETCH (MODSEQ (200303181230852)) 462 S: a106 OK [MODIFIED 101] Conditional STORE failed 464 Or the flag hasn't changed, but another has (note, that this 465 server behaviour is discouraged. Server implementors should also see 466 section 5) ... 468 C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) 469 +FLAGS.SILENT ($Processed) 470 S: * 100 FETCH (MODSEQ (200303181230852)) 471 S: * 101 FETCH (MODSEQ (200303011130956) FLAGS (\Deleted \Answered)) 472 S: * 102 FETCH (MODSEQ (200303181230852)) 473 ... 474 S: * 150 FETCH (MODSEQ (200303181230852)) 475 S: a106 OK [MODIFIED 101] Conditional STORE failed 477 ... and the client retries the operation for the message 101 478 with the updated UNCHANGEDSINCE value 480 C: b108 STORE 101 (UNCHANGEDSINCE 200303011130956) 481 +FLAGS.SILENT ($Processed) 482 S: * 101 FETCH (MODSEQ (200303181230852)) 483 S: b108 OK Conditional Store completed 485 Or the flag hasn't changed, but another has (nice server behaviour. 486 Server implementors should also see section 5) ... 488 C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) 489 +FLAGS.SILENT ($Processed) 490 S: * 100 FETCH (MODSEQ (200303181230852)) 491 S: * 101 FETCH (MODSEQ (200303011130956) FLAGS ($Processed \Deleted \Answered)) 492 S: * 102 FETCH (MODSEQ (200303181230852)) 493 ... 494 S: * 150 FETCH (MODSEQ (200303181230852)) 495 S: a106 OK Conditional STORE completed 497 Example: 499 The following example is based on the example from the section 4.2.3 of 500 [RFC-2180] and demonstrates that the MODIFIED response code may be also 501 returned in the tagged NO response. 503 Client tries to conditionally STORE flags on a mixture of expunged 504 and non-expunged messages, one message fails the UNCHANGEDSINCE test. 506 C: B001 STORE 1:7 (UNCHANGEDSINCE 20000320172338) +FLAGS (\SEEN) 507 S: * 1 FETCH (MODSEQ (20000320172342) FLAGS (\SEEN)) 508 S: * 3 FETCH (MODSEQ (20000320172342) FLAGS (\SEEN)) 509 S: B001 NO [MODIFIED 2] Some of the messages no longer exist. 511 C: B002 NOOP 512 S: * 4 EXPUNGE 513 S: * 4 EXPUNGE 514 S: * 4 EXPUNGE 515 S: * 4 EXPUNGE 516 S: * 2 FETCH (MODSEQ (20000320172340) FLAGS (\Deleted \Answered)) 517 S: B002 OK NOOP Completed. 519 By receiving FETCH responses for messages 1 and 3, and EXPUNGE 520 responses that indicate that messages 4:7 have been expunged, 521 the client retries the operation only for the message 2. The 522 updated UNCHANGEDSINCE value is used. 524 C: b003 STORE 2 (UNCHANGEDSINCE 20000320172340) +FLAGS (\Seen) 525 S: * 2 FETCH (MODSEQ (20000320180050)) 526 S: b003 OK Conditional Store completed 528 Note: If a message is specified multiple times in the message 529 set, and the server doesn't internally eliminate duplicates from 530 the message set, it MUST NOT fail the conditional STORE 531 operation for the second (or subsequent) occurrence of the message 532 if the operation completed successfully for the first occurrence. 533 For example, if the client specifies: 535 a105 STORE 7,3:9 (UNCHANGEDSINCE 200012121230045) 536 +FLAGS.SILENT (\Deleted) 538 the server must not fail the operation for message 7 as part of 539 processing "3:9" if it succeeded when message 7 was processed 540 the first time. 542 Once the client specified the UNCHANGEDSINCE modifier in a STORE command, 543 the server MUST include the MODSEQ fetch response data items in all 544 subsequent unsolicited FETCH responses. 546 This document also changes the behaviour of the server when it has performed 547 a STORE or UID STORE command and the UNCHANGEDSINCE modifier is not specified. 548 If the operation is successful for a message, the server MUST update 549 the mod-sequence attribute of the message. The server is REQUIRED to 550 include the mod-sequence value whenever it decides to send the 551 unsolicited FETCH response to all CONDSTORE-aware clients that have opened 552 the mailbox containing the message. 554 3.3 FETCH and UID FETCH Commands 556 3.3.1 FETCH modifiers 558 Arguments: sequence set 559 message data item names or macro 560 OPTIONAL fetch modifiers 562 Responses: untagged responses: FETCH 564 Result: OK - fetch completed 565 NO - fetch error: can't fetch that data 566 BAD - command unknown or arguments invalid 568 This document extends the syntax of the FETCH and UID FETCH 569 commands (see section 6.4.5 of [IMAP4]) to include an optional FETCH 570 modifier. The document defines the following modifier: 572 CHANGEDSINCE 574 CHANGEDSINCE FETCH modifier allows to further subset the list of 575 messages described by sequence set. The information described by 576 message data items is only returned for messages that have 577 mod-sequence bigger than . 579 When CHANGEDSINCE FETCH modifier is specified, it implicitly adds 580 MODSEQ FETCH message data item (section 3.3.2). 582 Example: 584 C: s100 UID FETCH 1:* (FLAGS) (CHANGEDSINCE 12345) 585 S: * 1 FETCH (UID 4 MODSEQ (65402) FLAGS (\Seen)) 586 S: * 2 FETCH (UID 6 MODSEQ (75403) FLAGS (\Deleted)) 587 S: * 4 FETCH (UID 8 MODSEQ (29738) FLAGS ($NoJunk $AutoJunk $MDNSent)) 588 S: s100 OK FETCH completed 590 3.3.2 MODSEQ message data item in FETCH Command 592 This extension adds a MODSEQ message data item to the FETCH command. 593 The MODSEQ message data item allows clients to retrieve mod-sequence 594 values for a range of messages in the currently selected mailbox. 596 Once the client specified the MODSEQ message data item in a FETCH request, 597 the server MUST include the MODSEQ fetch response data items in all 598 subsequent unsolicited FETCH responses. 600 Syntax: MODSEQ 602 The MODSEQ message data item causes the server to return MODSEQ fetch 603 response data items. 605 Syntax: MODSEQ ( ) 607 MODSEQ response data items contain per-message mod-sequences. 609 The MODSEQ response data item is returned if the client issued FETCH with 610 MODSEQ message data item. It also allows the server to notify the client 611 about mod-sequence changes caused by conditional STOREs (section 3.2) and/or 612 changes caused by external sources. 614 Example: 616 C: a FETCH 1:3 (MODSEQ) 617 S: * 1 FETCH (MODSEQ (20000624140003)) 618 S: * 2 FETCH (MODSEQ (20000624140007)) 619 S: * 3 FETCH (MODSEQ (20000624140005)) 620 S: a OK Fetch complete 622 In this example the client requests per message mod-sequences for a 623 set of messages. 625 When a flag for a message is modified in a different session, the server 626 sends an unsolicited FETCH response containing the mod-sequence for the 627 message. 629 Example: 631 (Session 1, authenticated as a user "alex"). The user adds a shared 632 flag \Deleted: 634 C: A142 SELECT INBOX 635 ... 636 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 637 S: * OK [PERMANENTFLAGS (\Answered \Deleted \Seen \*)] Limited 638 ... 640 C: A160 STORE 7 +FLAGS.SILENT (\Deleted) 641 S: * 7 FETCH (MODSEQ (200012121231000)) 642 S: A160 OK Store completed 644 (Session 2, also authenticated as the user "alex"). Any changes to flags 645 are always reported to all sessions authenticated as the same user as in 646 the session 1. 648 C: C180 NOOP 649 S: * 7 FETCH (FLAGS (\Deleted \Answered) MODSEQ (200012121231000)) 650 S: C180 OK Noop completed 652 (Session 3, authenticated as a user "andrew"). As \Deleted is a shared 653 flag, changes in the session 1 are also reported in the session 3: 655 C: D210 NOOP 656 S: * 7 FETCH (FLAGS (\Deleted \Answered) MODSEQ (200012121231000)) 657 S: D210 OK Noop completed 659 The user modifies a private flag \Seen in the session 1 ... 661 C: A240 STORE 7 +FLAGS.SILENT (\Seen) 662 S: * 7 FETCH (MODSEQ (200012121231777)) 663 S: A240 OK Store completed 665 ... which is only reported in the session 2 ... 667 C: C270 NOOP 668 S: * 7 FETCH (FLAGS (\Deleted \Answered \Seen) MODSEQ (200012121231777)) 669 S: C270 OK Noop completed 671 ... but not in the session 3. 673 C: D300 NOOP 674 S: D300 OK Noop completed 676 And finally the user removes flags \Answered (shared) and \Seen (private) 677 in the session 1. 679 C: A330 STORE 7 -FLAGS.SILENT (\Answered \Seen) 680 S: * 7 FETCH (MODSEQ (200012121245160)) 681 S: A330 OK Store completed 683 Both changes are reported in the session 2 ... 685 C: C360 NOOP 686 S: * 7 FETCH (FLAGS (\Deleted) MODSEQ (200012121245160)) 687 S: C360 OK Noop completed 689 ... and only changes to shared flags are reported in session 3. 691 C: D390 NOOP 692 S: * 7 FETCH (FLAGS (\Deleted) MODSEQ (200012121245160)) 693 S: D390 OK Noop completed 695 3.4. MODSEQ search criterion in SEARCH 697 The MODSEQ criterion for the SEARCH command allows a client to search 698 for the metadata items that were modified since a specified moment. 700 Syntax: MODSEQ [ ] 702 Messages that have modification values which are equal to or 703 greater than . This allows a client, 704 for example, to find out which messages contain metadata items 705 that have changed since the last time it updated its disconnected 706 cache. The client may also specify (name of metadata 707 item) and (type of metadata item) before 708 . can be one of "shared", 709 "priv" (private) or "all". The latter means that the server should use 710 the biggest value among "priv" and "shared" mod-sequences for the 711 metadata item. If the server doesn't store internally separate 712 mod-sequences for different metadata items, it MUST ignore 713 and . Otherwise the server should 714 use them to narrow down the search. 716 For a flag the corresponding has a form 717 "/flags/" as defined in [IMAPABNF]. Note, that 718 the leading "\" character that denotes a system flag has to be 719 escaped as per Section 4.3 of [IMAP4], as the uses 720 syntax for quoted strings. 722 If client specifies a MODSEQ criterion in a SEARCH command and 723 the server returns a non-empty SEARCH result, the server MUST also 724 append (to the end of the untagged SEARCH response) the highest 725 mod-sequence for all messages being returned. See also section 3.6. 727 Example: 728 C: a SEARCH MODSEQ "/flags/\\draft" all 20010320162338 729 S: * SEARCH 2 5 6 7 11 12 18 19 20 23 (MODSEQ 20010917162500) 730 S: a OK Search complete 732 In the above example, the message numbers of any messages 733 containing the string "IMAP4" in the "value" attribute of the 734 "/comment" entry and having a mod-sequence equal to or 735 greater than 20010320162338 for the "\Draft" flag are returned in 736 the search results. 738 Example: 739 C: a SEARCH OR NOT MODSEQ 20010320162338 LARGER 50000 740 S: * SEARCH 741 S: a OK Search complete, nothing found 743 3.5. MODSEQ Sort Criterion 745 If a server implementing CONDSTORE also implements the SORT 746 extension as defined by [SORT], it SHOULD implement the 747 SORT=MODSEQ extension that allows for sorting on per-message 748 mod-sequence. SORT=MODSEQ extension adds MODSEQ sort criterion 749 that allows to sort the matching messages based on their mod-sequence. 751 If client specifies a MODSEQ search (as per section 3.4) or sort 752 criterion in the SORT command and the server returns a non-empty 753 SORT result, the server MUST also append (to the end of the untagged 754 SORT response) the highest mod-sequence for all messages being returned. 755 See also section 3.6. 757 Example (MODSEQ sort criterion): 759 C: A282 SORT (SUBJECT MODSEQ) UTF-8 SINCE 1-Feb-2001 760 S: * SORT 2 81 83 84 82 882 (MODSEQ 117) 761 S: A282 OK SORT completed 763 Example (MODSEQ search criterion): 765 C: A283 SORT (SUBJECT REVERSE DATE) UTF-8 MODSEQ 21 766 S: * SORT 6 3 4 5 2 (MODSEQ 125) 767 S: A283 OK SORT completed 769 Example (MODSEQ search criterion and MODSEQ SORT criterion, 770 but no messages matching the search criteria): 772 C: A284 SORT (MODSEQ) KOI8-R OR NOT MODSEQ 20010320162338 773 SUBJECT "Privet" 774 S: * SORT 775 S: A284 OK Sort complete, nothing found 777 3.6. Modified SEARCH and SORT untagged responses 779 Data: zero or more numbers 780 mod-sequence value (omitted if no match) 782 This document extends syntax of the untagged SEARCH and SORT responses 783 to include the highest mod-sequence for all messages being returned. 785 If a client specifies a MODSEQ criterion in a SEARCH (or UID SEARCH) 786 command and the server returns a non-empty SEARCH result, the server 787 MUST also append (to the end of the untagged SEARCH response) the 788 highest mod-sequence for all messages being returned. See section 789 3.4 for examples. 791 If client specifies a MODSEQ search or sort criterion in a SORT 792 (or UID SORT) command and the server returns a non-empty SORT result, 793 the server MUST also append (to the end of the untagged SORT response) 794 the highest mod-sequence for all messages being returned. See section 795 3.5 for examples. 797 3.7. HIGHESTMODSEQ status data items 799 This document defines a new status data item: 801 HIGHESTMODSEQ 802 The highest mod-sequence value all messages 803 in the mailbox. This is the same value that is returned by the server 804 in the HIGHESTMODSEQ response code in OK untagged response 805 (see section 3.1.1). 807 Example: C: A042 STATUS blurdybloop (UIDNEXT MESSAGES HIGHESTMODSEQ) 808 S: * STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292 809 HIGHESTMODSEQ 200201011231777) 810 S: A042 OK STATUS completed 812 3.8. CONDSTORE parameter to SELECT and EXAMINE 814 The CONDSTORE extension defines a single optional select parameter 815 "CONDSTORE", which tells the server that it MUST include the MODSEQ 816 fetch response data items in all subsequent unsolicited FETCH responses. 818 The CONDSTORE parameter to SELECT/EXAMINE helps to avoid a race condition 819 that might arise when a metadata item(s) is(are) modified in another session 820 after the server has sent the HIGHESTMODSEQ response code and before the 821 client was able to issue a CONDSTORE enabling command. 823 Example: C: A142 SELECT INBOX (CONDSTORE) 824 S: * 172 EXISTS 825 S: * 1 RECENT 826 S: * OK [UNSEEN 12] Message 12 is first unseen 827 S: * OK [UIDVALIDITY 3857529045] UIDs valid 828 S: * OK [UIDNEXT 4392] Predicted next UID 829 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 830 S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited 831 S: * OK [HIGHESTMODSEQ 20010715194045007] 832 S: A142 OK [READ-WRITE] SELECT completed, CONDSTORE is now enabled 834 4. Formal Syntax 836 The following syntax specification uses the Augmented Backus-Naur 837 Form (ABNF) [ABNF] notation. Elements not defined here can be found in 838 the formal syntax of the ABNF [ABNF], IMAP [IMAP4], and IMAP ABNF extensions 839 [IMAPABNF] specifications. 841 Except as noted otherwise, all alphabetic characters are case- 842 insensitive. The use of upper or lower case characters to define token 843 strings is for editorial clarity only. Implementations MUST accept 844 these strings in a case-insensitive fashion. 846 capability =/ "CONDSTORE" / "SORT=MODSEQ" 848 status-att =/ "HIGHESTMODSEQ" 849 ;; extends non-terminal defined in RFC 3501. 851 status-att-val =/ "HIGHESTMODSEQ" SP mod-sequence-value 853 store-modifier =/ "UNCHANGEDSINCE" SP mod-sequence-valzer 854 ;; Only a single "UNCHANGEDSINCE" may be specified 855 ;; in a STORE operation 857 fetch-modifier =/ chgsince-fetch-mod 858 ;; conforms to the generic "fetch-modifier" syntax 859 ;; defined in [IMAPABNF]. 861 chgsince-fetch-mod = "CHANGEDSINCE" SP mod-sequence-value 862 ;; CHANGEDSINCE FETCH modifier conforms to 863 ;; the fetch-modifier syntax 865 fetch-att =/ fetch-mod-sequence 866 ;; modifies original IMAP4 fetch-att 868 fetch-mod-sequence = "MODSEQ" 870 fetch-mod-resp = "MODSEQ" SP "(" permsg-modsequence ")" 872 msg-att-dynamic =/ fetch-mod-resp 874 search-key =/ search-modsequence 875 ;; modifies original IMAP4 search-key 876 ;; 877 ;; This change applies to all command referencing this 878 ;; non-terminal, in particular SEARCH and SORT. 880 search-modsequence = "MODSEQ" [search-modseq-ext] SP mod-sequence-valzer 882 search-modseq-ext = SP entry-name SP entry-type-req 884 resp-text-code =/ "HIGHESTMODSEQ" SP mod-sequence-value / 885 "NOMODSEQ" / 886 "MODIFIED" SP set 888 entry-name = entry-flag-name 890 entry-flag-name = DQUOTE "/flags/" attr-flag DQUOTE 891 ;; each system or user defined flag 892 ;; is mapped to "/flags/". 893 ;; 894 ;; follows the escape rules used 895 ;; by "quoted" string as described in Section 896 ;; 4.3 of [IMAP4], e.g. for the flag \Seen 897 ;; the corresponding is 898 ;; "/flags/\\seen", and for the flag 899 ;; $MDNSent, the corresponding 900 ;; is "/flags/$mdnsent". 902 entry-type-resp = "priv" / "shared" 903 ;; metadata item type 905 entry-type-req = entry-type-resp / "all" 906 ;; perform SEARCH operation on private 907 ;; metadata item, shared metadata item or both 909 permsg-modsequence = mod-sequence-value 910 ;; per message mod-sequence 912 mod-sequence-value = 1*DIGIT 913 ;; Positive unsigned 64-bit integer (mod-sequence) 914 ;; (1 <= n < 18,446,744,073,709,551,615) 916 mod-sequence-valzer = "0" / mod-sequence-value 918 search-sort-mod-seq = "(" "MODSEQ" SP mod-sequence-value ")" 920 select-param =/ condstore-param 921 ;; conforms to the generic "select-param" non-terminal 922 ;; syntax defined in [IMAPABNF]. 924 sort-key =/ "MODSEQ" 926 condstore-param = "CONDSTORE" 928 mailbox-data =/ "SEARCH" [1*(SP nz-number) SP search-sort-mod-seq] / 929 "SORT" [1*(SP nz-number) SP search-sort-mod-seq] 931 attr-flag = "\\Answered" / "\\Flagged" / "\\Deleted" / 932 "\\Seen" / "\\Draft" / attr-flag-keyword / 933 attr-flag-extension 934 ;; Does not include "\\Recent" 936 attr-flag-extension = "\\" atom 937 ;; Future expansion. Client implementations 938 ;; MUST accept flag-extension flags. Server 939 ;; implementations MUST NOT generate 940 ;; flag-extension flags except as defined by 941 ;; future standard or standards-track 942 ;; revisions of [IMAP4]. 944 attr-flag-keyword = atom 946 5. Server implementation considerations 948 This section describes how a server implementation that 949 doesn't store separate per-metadata modsequences for different metadata 950 items can avoid sending MODIFIED response to any of the following 951 conditional STORE operations: 952 +FLAGS 953 -FLAGS 954 +FLAGS.SILENT 955 -FLAGS.SILENT 957 Note, that the optimization described in this section can't be performed 958 in case of a conditional STORE FLAGS operation. 960 Let's use the following example. The client has issued 962 C: a106 STORE 100:150 (UNCHANGEDSINCE 200212030000000) 963 +FLAGS.SILENT ($Processed) 965 When the server receives the command and parses it successfully it 966 iterates through the message set and tries to execute the conditional 967 STORE command for each message. 969 Each server internally works as a client, i.e. it has to cache the 970 current state of all IMAP flags as it is known to the client. 971 In order to report flag changes to the client the server compares the 972 cached values with the values in its database for IMAP flags. 974 Imagine that another client has changed the state of a flag \Deleted on 975 message 101 and the change updated the modsequence for the message. 976 The server knows that the modsequence for the mailbox has changed, however 977 it also knows that 979 a) The client is not interested in \Deleted flag, as it hasn't included 980 it in +FLAGS.SILENT operation. 981 b) The state of the flag $Processed hasn't changed (server can determine 982 this by comparing cached flag state with the state of the flag in the 983 database), 984 so the server doesn't have to report MODIFIED to the client. Instead the 985 server may set $Processed flag, update the modsequence for the message 101 986 once again and send an untagged FETCH response with new modsequence and 987 flags: 989 S: * 101 FETCH (MODSEQ (200303011130956) FLAGS ($Processed \Deleted \Answered)) 991 6. Security Considerations 993 It is believed that the Conditional STORE extension doesn't raise 994 any new security concerns that are not already discussed in [IMAP4]. 995 However, the availability of this extension may make it possible 996 for IMAP4 to be used in critical applications it could not be used 997 for previously, making correct IMAP server implementation and 998 operation even more important. 1000 7. References 1002 7.1. Normative References 1004 [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate 1005 Requirement Levels", RFC 2119, Harvard University, March 1997. 1007 [ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications: 1008 ABNF", RFC 4234, October 2005. 1010 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version 1011 4rev1", RFC 3501, University of Washington, March 2003. 1013 [SORT] Crispin, M., Murchison, K., "Internet Message Access Protocol -- 1014 SORT AND THREAD EXTENSIONS", work in progress. 1015 1017 [IMAPABNF] Melnikov, A., "Collected extensions to IMAP4 ABNF", 1018 work in progress. 1019 1021 7.2. Informative References 1023 [ACAP] Newman, Myers, "ACAP -- Application Configuration Access 1024 Protocol", RFC 2244, Innosoft, Netscape, November 1997. 1025 1027 [ACL] Myers, "IMAP4 ACL extension", RFC 2086, Carnegie Mellon, 1028 January 1997. 1029 1031 [NTP] Mills, D, "Network Time Protocol (Version 3) Specification, 1032 Implementation and Analysis", RFC 1305, March 1992. 1033 1035 [RFC-2180] Gahrns, M., "IMAP4 Multi-Accessed Mailbox Practice", 1036 RFC 2180, July 1997. 1037 1039 8. IANA Considerations 1041 IMAP4 capabilities are registered by publishing a standards track or 1042 IESG approved experimental RFC. The registry is currently located 1043 at: 1045 http://www.iana.org/assignments/imap4-capabilities 1047 This document defines the CONDSTORE and SORT=MODSEQ IMAP capabilities. 1048 IANA should add them to the registry accordingly. 1050 9. Acknowledgments 1052 Some text was borrowed from "IMAP ANNOTATE Extension" by Randall Gellens 1053 and Cyrus Daboo, and "ACAP -- Application Configuration Access Protocol" 1054 by Chris Newman and John Myers. 1056 Many thanks to Randall Gellens for his thorough review of the document. 1058 The authors also acknowledge the feedback provided by Cyrus Daboo, Larry 1059 Greenfield, Chris Newman, Harrie Hazewinkel, Arnt Gulbrandsen, Timo 1060 Sirainen, Mark Crispin, Ned Freed, Ken Murchison and Dave Cridland. 1062 10. Author's Addresses 1064 Alexey Melnikov 1065 mailto: Alexey.Melnikov@isode.com 1067 Isode Limited 1068 5 Castle Business Village, 36 Station Road, 1069 Hampton, Middlesex, TW12 2BX, United Kingdom 1071 Steve Hole 1072 mailto: Steve.Hole@messagingdirect.com 1074 ACI WorldWide/MessagingDirect 1075 #900, 10117 Jasper Avenue, 1076 Edmonton, Alberta, T5J 1W8, CANADA 1078 11. Intellectual Property Statement 1080 The IETF takes no position regarding the validity or scope of any 1081 Intellectual Property Rights or other rights that might be claimed to 1082 pertain to the implementation or use of the technology described in 1083 this document or the extent to which any license under such rights 1084 might or might not be available; nor does it represent that it has 1085 made any independent effort to identify any such rights. Information 1086 on the procedures with respect to rights in RFC documents can be 1087 found in BCP 78 and BCP 79. 1089 Copies of IPR disclosures made to the IETF Secretariat and any 1090 assurances of licenses to be made available, or the result of an 1091 attempt made to obtain a general license or permission for the use of 1092 such proprietary rights by implementers or users of this 1093 specification can be obtained from the IETF on-line IPR repository at 1094 http://www.ietf.org/ipr. 1096 The IETF invites any interested party to bring to its attention any 1097 copyrights, patents or patent applications, or other proprietary 1098 rights that may cover technology that may be required to implement 1099 this standard. Please address the information to the IETF at 1100 ietf-ipr@ietf.org. 1102 The IETF has been notified of intellectual property rights claimed in 1103 regard to some or all of the specification contained in this 1104 document. For more information consult the online list of claimed 1105 rights. 1107 Disclaimer of Validity 1109 This document and the information contained herein are provided on an 1110 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1111 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 1112 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 1113 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 1114 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1115 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1117 Copyright Statement 1119 Copyright (C) The Internet Society (2005). This document is subject 1120 to the rights, licenses and restrictions contained in BCP 78, and 1121 except as set forth therein, the authors retain all their rights. 1123 Acknowledgment 1125 Funding for the RFC Editor function is currently provided by the 1126 Internet Society. 1128 Appendix A. Change History 1130 Note that this appendix will be removed before publication. 1132 0.1. Change History 1134 Changes from draft-ietf-imapext-condstore-05 1135 1. Reworded not to have a normative reference to ANNOTATE. 1136 2. Updated ABNF to reference IMAP ABNF. 1137 3. Clarified that STATUS (HIGHESTMODSEQ) also enables 1138 CONDSTORE notifications. 1139 4. Fixed few typos in examples or example titles. 1140 5. Updated boilerplate, references. 1142 Changes from draft-ietf-imapext-condstore-04 1143 1. Fixed typo in an example, added more examples. 1144 2. Clarified client behavior regarding retrying the request 1145 when the server returns MODIFIED (IESG comment) 1146 3. Added new section describing how a CONDSTORE server implementation 1147 should avoid sending MODIFIED when the client has requested 1148 a conditional store on a flag A and a flag B was modified 1149 by another client. (IESG comment) 1151 Changes from draft-ietf-imapext-condstore-03 1152 1. ABNF corrections from Ned Freed. 1153 2. Minor spelling/wording corrections from Ned Freed. 1155 Changes from draft-ietf-imapext-condstore-02 1156 1. Added FETCH modifiers. 1157 2. Added example for using ANNOTATE with UNCHANGEDSINCE STORE 1158 modifier. 1159 3. Added a new requirement to send HIGHESTMODSEQ response code 1160 when implicit enabling is used. 1161 4. Fixed syntax in an example in section 3.2. 1163 Changes from draft-ietf-imapext-condstore-01 1164 1. Fixed missing \\ in one example. 1165 2. Added explanatory comment that search-key modifications apply at 1166 least to SEARCH and SORT command. 1167 3. Don't require from a conditional store operation to be atomic accross 1168 message set, updated text and examples. 1169 4. Added SORT=MODSEQ extension and reworked text in the Introduction section. 1170 5. Added Conditional STORE example based on suggestions from RFC 2180. 1171 6. Removed the paragraph about DOS attack from the Security considerations 1172 section, as it doesn't apply anymore. 1173 7. Updated entry-name ABNF. 1174 8. Added an optional CONDSTORE parameter to SELECT/EXAMINE. 1176 Changes from draft-ietf-imapext-condstore-00 1177 1. Dropped "/message" prefix in entry names as per decision in San Francisco. 1178 2. Fixed ABNF for SEARCH and SORT untagged responses. 1179 3. Changed "private" to "priv" to be consistent with ANNOTATE. 1180 4. MODIFIED response code is now returned in OK response, not NO. 1181 5. Added NOMODSEQ response code. 1183 Changes from draft-melnikov-imap-condstore-09: 1184 1. Some text clarifications based on suggestions by Harrie Hazewinkel 1185 2. Added paragraph about mailbox locking and DOS when conditional STORE 1186 operation is performed on a large mailbox. 1187 3. Fixed syntax of to match the ANNOTATE extension. 1188 4. Added sentence that a system flag MUST always be considered existent, 1189 when UNCHANGEDSINCE 0 is used. Is this a good idea? 1190 5. Clarified client behavior upon receipt of MODIFIED response code. 1191 6. Updated ABNF to clarify where 0 is allowed as mod-sequence and where 1192 it is not. 1193 7. Got rid of MODSEQ response code and return this data in the untagged 1194 SEARCH/SORT responses. 1195 8. Updated RFC number for the IMAP4rev1 document. 1197 Changes from -08 to -09: 1198 1. Added an extended example about reporting regular (non-conditional) flag 1199 changes to other sessions. 1200 2. Simplified FETCH MODSEQ syntax by removing per-metadata requests and 1201 responses. 1203 Changes from -07 to -08: 1204 1. Added note saying the change to UIDVALIDITY also invalidates HIGHESTMODSEQ. 1205 2. Fixed several bugs in ABNF for STATUS and STORE commands. 1207 Changes from -06 to -07: 1208 1. Added clarification that when a server does command reordering, the second 1209 completed operation gets the higher mod sequence. 1210 2. Renamed annotation type specifier "both" to "all" as per suggestion 1211 from Minneapolis meeting. 1212 3. Removed PERFLAGMODSEQ capability, as it doesn't buy anything: a client 1213 has to work with both types of servers (i.e. servers that support per 1214 message per flag modseqs and servers that support only per message 1215 modseqs) anyway. 1216 4. Per flag mod-sequences are optional for a server to return. Updated syntax. 1217 5. Allow MODSEQ response code only as a result of SEARCH/SORT as suggested 1218 by John Myers. MODSEQ response code is not allowed after FETCH or STORE. 1220 Changes from -05 to -06: 1221 1. Replaced "/message/flags/system" with "/message/flags" to 1222 match ANNOTATE draft. 1223 2. Extended FETCH/SEARCH/SORT syntax to allow for specifying 1224 whether an operation should be performed on a shared or a private 1225 annotation (or both). 1226 3. Corrected some examples. 1228 Changes from -04 to -05: 1229 1. Added support for SORT extension. 1230 2. Multiple language/spelling fixes by Randall Gellens. 1232 Changes from -03 to -04: 1233 1. Added text saying that MODSEQ fetch data items cause server 1234 to include MODSEQ data response in all subsuquent unsolicited FETCH 1235 responses. 1236 2. Added "authors address" section. 1238 Changes from -02 to -03: 1239 1. Changed MODTIME untagged response to MODTIME response code. 1240 2. Added MODTIME response code to the tagged OK response for SEARCH. 1241 Updated examples accordingly. 1242 3. Changed rule for sending untagged FETCH response as a result of 1243 STORE when .SILENT prefix is used. If .SILENT prefix is used, 1244 server doesn't have to send untagged FETCH response, because 1245 MODTIME response code already contains modtime. 1246 4. Renamed MODTIME to MODSEQ to make sure there is no confusion 1247 between mod-sequence and ACAP modtime. 1248 5. Minor ABNF changes. 1249 6. Minor language corrections. 1251 Changes from -01 to -02: 1252 1. Added MODTIME data item to STATUS command. 1253 2. Added OK untagged response to SELECT/EXAMINE. 1254 3. Clarified that MODIFIED response code contains list of UIDs for 1255 conditional UID STORE and message set for STORE. 1256 4. Added per-message modtime. 1257 5. Added PERFLAGMODTIME capability. 1258 6. Fixed several bugs in examples. 1259 7. Added more comments to ABNF. 1261 Changes from -00 to -01: 1262 1. Refreshed the list of Open Issues. 1263 2. Changed "attr-name" to "entry-name", because modtime applies to 1264 entry, not attribute. 1265 3. Added MODTIME untagged response. 1266 4. Cleaned up ABNF. 1267 5. Added "Acknowledgments" section. 1268 6. Fixed some spelling mistakes.