draft-ietf-imapext-condstore-03.txt   draft-ietf-imapext-condstore-04.txt 
Internet Draft: IMAP Extension for Conditional STORE A. Melnikov Internet Draft: IMAP Extension for Conditional STORE A. Melnikov
Document: draft-ietf-imapext-condstore-03.txt Isode Ltd. Document: draft-ietf-imapext-condstore-04.txt Isode Ltd.
Expires: February 2004 S. Hole Expires: April 2004 S. Hole
ACI WorldWide/MessagingDirect ACI WorldWide/MessagingDirect
August 2003 October 2003
IMAP Extension for Conditional STORE operation IMAP Extension for Conditional STORE operation
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC2026. Internet-Drafts are all provisions of Section 10 of RFC2026. Internet-Drafts are
working documents of the Internet Engineering Task Force (IETF), its working documents of the Internet Engineering Task Force (IETF), its
areas, and its working groups. Note that other groups may also areas, and its working groups. Note that other groups may also
distribute working documents as Internet-Drafts. distribute working documents as Internet-Drafts.
skipping to change at line 141 skipping to change at line 141
value of the modification sequence for the message MUST be updated. value of the modification sequence for the message MUST be updated.
Adding the flag when it is already present or removing when it is not Adding the flag when it is already present or removing when it is not
present SHOULD NOT change the mod-sequence. present SHOULD NOT change the mod-sequence.
When a message is appended to a mailbox (via the IMAP APPEND command, When a message is appended to a mailbox (via the IMAP APPEND command,
COPY to the mailbox or using an external mechanism) the server COPY to the mailbox or using an external mechanism) the server
generates a new modification sequence that is higher than the highest generates a new modification sequence that is higher than the highest
modification sequence of all messages in the mailbox and assigns it to modification sequence of all messages in the mailbox and assigns it to
the appended message. the appended message.
When an annotation is added, modified or removed the corresponding message When an annotation [ANNOTATE] is added, modified or removed the corresponding
mod-sequence MUST be updated. message mod-sequence MUST be updated.
The server MAY store separate (per message) modification sequence values for The server MAY store separate (per message) modification sequence values for
different metadata items. If the server does so, per message mod-sequence is different metadata items. If the server does so, per message mod-sequence is
the highest mod-sequence of all metadata items for the specified message. the highest mod-sequence of all metadata items for the specified message.
The server that supports this extention is not required to be able to store The server that supports this extension is not required to be able to store
mod-sequences for every available mailbox. Section 3.1.2 describes how mod-sequences for every available mailbox. Section 3.1.2 describes how
the server may act if a particular mailbox doesn't support the persistent the server may act if a particular mailbox doesn't support the persistent
storage of mod-sequences. storage of mod-sequences.
This extension makes the following changes to the IMAP4 protocol: This extension makes the following changes to the IMAP4 protocol:
a) extends the syntax of the STORE command to allow STORE a) extends the syntax of the STORE command to allow STORE
modifiers modifiers
b) adds the MODIFIED response code which should be used with b) adds the MODIFIED response code which should be used with
skipping to change at line 771 skipping to change at line 771
S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited S: * OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited
S: * OK [HIGHESTMODSEQ 20010715194045007] S: * OK [HIGHESTMODSEQ 20010715194045007]
S: A142 OK [READ-WRITE] SELECT completed, CONDSTORE is now enabled S: A142 OK [READ-WRITE] SELECT completed, CONDSTORE is now enabled
4. Formal Syntax 4. Formal Syntax
The following syntax specification uses the Augmented Backus-Naur The following syntax specification uses the Augmented Backus-Naur
Form (ABNF) notation as specified in [ABNF]. Form (ABNF) notation as specified in [ABNF].
Non-terminals referenced but not defined below are as defined by Non-terminals referenced but not defined below are as defined by
[IMAP4]. [IMAP4] or [ANNOTATE].
Except as noted otherwise, all alphabetic characters are case- Except as noted otherwise, all alphabetic characters are case-
insensitive. The use of upper or lower case characters to define token insensitive. The use of upper or lower case characters to define token
strings is for editorial clarity only. Implementations MUST accept strings is for editorial clarity only. Implementations MUST accept
these strings in a case-insensitive fashion. these strings in a case-insensitive fashion.
capability =/ "CONDSTORE" / "SORT=MODSEQ" capability =/ "CONDSTORE" / "SORT=MODSEQ"
status = "STATUS" SP mailbox SP status = "STATUS" SP mailbox SP
"(" status-att-req *(SP status-att-req) ")" "(" status-att-req *(SP status-att-req) ")"
;; redefine STATUS command syntax defined in [IMAP4] ;; redefine STATUS command syntax defined in [IMAP4]
status-att-req = status-att / "HIGHESTMODSEQ" status-att-req = status-att / "HIGHESTMODSEQ"
status-rsp-info = status-att SP number / status-rsp-info = status-att SP number /
"HIGHESTMODSEQ" SP mod-sequence-value "HIGHESTMODSEQ" SP mod-sequence-value
store = "STORE" SP set store-modifiers SP store-att-flags store = "STORE" SP sequence-set store-modifiers SP store-att-flags
store-modifiers = [ SP "(" store-modifier *(SP store-modifier) ")" ] store-modifiers = [ SP "(" store-modifier *(SP store-modifier) ")" ]
store-modifier = "UNCHANGEDSINCE" SP mod-sequence-valzer store-modifier = "UNCHANGEDSINCE" SP mod-sequence-valzer
;; Only a single "UNCHANGEDSINCE" may be specified ;; Only a single "UNCHANGEDSINCE" may be specified
;; in a STORE operation ;; in a STORE operation
fetch = "FETCH" SP sequence-set SP ("ALL" / "FULL" / fetch = "FETCH" SP sequence-set SP ("ALL" / "FULL" /
"FAST" / fetch-att / "FAST" / fetch-att /
"(" fetch-att *(SP fetch-att) ")") [SP fetch-modifiers] "(" fetch-att *(SP fetch-att) ")") [SP fetch-modifiers]
skipping to change at line 841 skipping to change at line 841
;; non-terminal, in particular SEARCH and SORT. ;; non-terminal, in particular SEARCH and SORT.
search-modsequence = "MODSEQ" [search-modseq-ext] SP mod-sequence-valzer search-modsequence = "MODSEQ" [search-modseq-ext] SP mod-sequence-valzer
search-modseq-ext = SP entry-name SP entry-type-req search-modseq-ext = SP entry-name SP entry-type-req
resp-text-code =/ "HIGHESTMODSEQ" SP mod-sequence-value / resp-text-code =/ "HIGHESTMODSEQ" SP mod-sequence-value /
"NOMODSEQ" / "NOMODSEQ" /
"MODIFIED" SP set "MODIFIED" SP set
entry-name = entry-name-flag / entry-annotate-name entry-name = entry-flag-name / entry-annotate-name
;; The server MUST understand entry-name-flag. ;; The server MUST understand entry-flag-name.
;; If the server also supports [ANNOTATE], it MUST ;; If the server also supports [ANNOTATE], it MUST
;; also support entry-annotate-name. ;; also support entry-annotate-name.
entry-flag-name = '"' "/flags/" attr-flag '"' entry-flag-name = DQUOTE "/flags/" attr-flag DQUOTE
;; each system or user defined flag <flag> ;; each system or user defined flag <flag>
;; is mapped to "/flags/<flag>". ;; is mapped to "/flags/<flag>".
;; ;;
;; <entry-flag-name> follows the escape rules used ;; <entry-flag-name> follows the escape rules used
;; by "quoted" string as described in Section ;; by "quoted" string as described in Section
;; 4.3 of [IMAP4], e.g. for the flag \Seen ;; 4.3 of [IMAP4], e.g. for the flag \Seen
;; the corresponding <entry-name> is ;; the corresponding <entry-name> is
;; "/flags/\\seen", and for the flag ;; "/flags/\\seen", and for the flag
;; $MDNSent, the corresponding <entry-name> ;; $MDNSent, the corresponding <entry-name>
;; is "/flags/$mdnsent". ;; is "/flags/$mdnsent".
entry-annotate-name = entry entry-annotate-name = entry
;; <entry> is defined in [ANNOTATE] ;; <entry> is defined in [ANNOTATE]
entry-type-resp = "priv" | "shared" entry-type-resp = "priv" / "shared"
;; metadata item type ;; metadata item type
entry-type-req = entry-type-resp | "all" entry-type-req = entry-type-resp / "all"
;; perform SEARCH operation on private ;; perform SEARCH operation on private
;; metadata item, shared metadata item or both ;; metadata item, shared metadata item or both
permsg-modsequence = mod-sequence-value permsg-modsequence = mod-sequence-value
;; per message mod-sequence ;; per message mod-sequence
mod-sequence-value = 1*DIGIT mod-sequence-value = 1*DIGIT
;; Positive unsigned 64-bit integer (mod-sequence) ;; Positive unsigned 64-bit integer (mod-sequence)
;; (1 <= n < 18,446,744,073,709,551,615) ;; (1 <= n < 18,446,744,073,709,551,615)
mod-sequence-valzer = "0" | mod-sequence-value mod-sequence-valzer = "0" / mod-sequence-value
search_sort_mod_seq = "(" "MODSEQ" SP mod-sequence-value ")" search-sort-mod-seq = "(" "MODSEQ" SP mod-sequence-value ")"
sort-key =/ "MODSEQ" sort-key =/ "MODSEQ"
condstore-param = "CONDSTORE" condstore-param = "CONDSTORE"
;; defines the select parameter used with ;; defines the select parameter used with
;; CONDSTORE extension ;; CONDSTORE extension
mailbox-data =/ "STATUS" SP mailbox SP "(" mailbox-data =/ "STATUS" SP mailbox SP "("
[status-rsp-info *(SP status-rsp-info)] ")" / [status-rsp-info *(SP status-rsp-info)] ")" /
"SEARCH" [1*(SP nz-number) SP search_sort_mod_seq] / "SEARCH" [1*(SP nz-number) SP search-sort-mod-seq] /
"SORT" [1*(SP nz-number) SP search_sort_mod_seq] "SORT" [1*(SP nz-number) SP search-sort-mod-seq]
attr-flag = "\\Answered" / "\\Flagged" / "\\Deleted" / attr-flag = "\\Answered" / "\\Flagged" / "\\Deleted" /
"\\Seen" / "\\Draft" / attr-flag-keyword / "\\Seen" / "\\Draft" / attr-flag-keyword /
attr-flag-extension attr-flag-extension
;; Does not include "\\Recent" ;; Does not include "\\Recent"
attr-flag-extension = "\\" atom attr-flag-extension = "\\" atom
;; Future expansion. Client implementations ;; Future expansion. Client implementations
;; MUST accept flag-extension flags. Server ;; MUST accept flag-extension flags. Server
;; implementations MUST NOT generate ;; implementations MUST NOT generate
;; flag-extension flags except as defined by ;; flag-extension flags except as defined by
;; future standard or standards-track ;; future standard or standards-track
;; revisions of [IMAP4]. ;; revisions of [IMAP4].
attr-flag-keyword = atom attr-flag-keyword = atom
5. Security Considerations 5. Security Considerations
It is believed that the Conditional STORE extension doesn't raise It is believed that the Conditional STORE extension doesn't raise
any new security concerns that are not already discussed in [IMAP4]. any new security concerns that are not already discussed in [IMAP4].
However, the availability of this extension may make it possible
for IMAP4 to be used in critical applications it could not be used
for previously, making correct IMAP server implementation and
operation in even more important.
6. References 6. References
6.1. Normative References 6.1. Normative References
[KEYWORDS] Bradner, "Key words for use in RFCs to Indicate [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
Requirement Levels", RFC 2119, Harvard University, March 1997. Requirement Levels", RFC 2119, Harvard University, March 1997.
[ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications: [ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications:
ABNF", RFC 2234, Internet Mail Consortium, Demon Internet Ltd, ABNF", RFC 2234, Internet Mail Consortium, Demon Internet Ltd,
skipping to change at line 958 skipping to change at line 962
<ftp://ftp.isi.edu/in-notes/rfc2180.txt> <ftp://ftp.isi.edu/in-notes/rfc2180.txt>
7. IANA Considerations 7. IANA Considerations
IMAP4 capabilities are registered by publishing a standards track or IMAP4 capabilities are registered by publishing a standards track or
IESG approved experimental RFC. The registry is currently located IESG approved experimental RFC. The registry is currently located
at: at:
http://www.iana.org/assignments/imap4-capabilities http://www.iana.org/assignments/imap4-capabilities
This document consitutes registration of the CONDSTORE and SORT=MODSEQ This document defines the CONDSTORE and SORT=MODSEQ IMAP capabilities.
IMAP capabilities. IANA should add them to the registry accordingly.
8. Acknowledgments 8. Acknowledgments
Some text was borrowed from "IMAP ANNOTATE Extension" by Randall Gellens Some text was borrowed from "IMAP ANNOTATE Extension" by Randall Gellens
and Cyrus Daboo, and "ACAP -- Application Configuration Access Protocol" and Cyrus Daboo, and "ACAP -- Application Configuration Access Protocol"
by Chris Newman and John Myers. by Chris Newman and John Myers.
Many thanks to Randall Gellens for his comments on how CONDSTORE should Many thanks to Randall Gellens for his comments on how CONDSTORE should
interact with ANNOTATE extension and for thorough review of the document. interact with ANNOTATE extension and for thorough review of the document.
Authors also acknowledge the feedback provided by Cyrus Daboo, Larry The authors also acknowledge the feedback provided by Cyrus Daboo, Larry
Greenfield, Chris Newman, Harrie Hazewinkel, Arnt Gulbrandsen, Timo Greenfield, Chris Newman, Harrie Hazewinkel, Arnt Gulbrandsen, Timo
Sirainen and Mark Crispin. Sirainen, Mark Crispin and Ned Freed.
9. Author's Addresses 9. Author's Addresses
Alexey Melnikov Alexey Melnikov
mailto: mel@isode.com mailto: Alexey.Melnikov@isode.com
Isode Limited Isode Limited
5 Castle Business Village, 36 Station Road,
Hampton, Middlesex, TW12 2BX, United Kingdom
Steve Hole Steve Hole
mailto: Steve.Hole@messagingdirect.com mailto: Steve.Hole@messagingdirect.com
ACI WorldWide/MessagingDirect ACI WorldWide/MessagingDirect
#900, 10117 Jasper Avenue, #900, 10117 Jasper Avenue,
Edmonton, Alberta, T5J 1W8, CANADA Edmonton, Alberta, T5J 1W8, CANADA
10. Intellectual Property Rights 10. Intellectual Property Rights
skipping to change at line 1049 skipping to change at line 1055
Funding for the RFC Editor function is currently provided by the Funding for the RFC Editor function is currently provided by the
Internet Society. Internet Society.
Appendix A. Open Issues and Change History Appendix A. Open Issues and Change History
Note that this appendix will be removed before publication. Note that this appendix will be removed before publication.
0.1. Change History 0.1. Change History
Changes from draft-ietf-imapext-condstore-03
1. ABNF corrections from Ned Freed.
2. Minor spelling/wording corrections from Ned Freed.
Changes from draft-ietf-imapext-condstore-02 Changes from draft-ietf-imapext-condstore-02
1. Added FETCH modifiers. 1. Added FETCH modifiers.
2. Added example for using ANNOTATE with UNCHANGEDSINCE STORE 2. Added example for using ANNOTATE with UNCHANGEDSINCE STORE
modifier. modifier.
3. Added a new requirement to send HIGHESTMODSEQ response code 3. Added a new requirement to send HIGHESTMODSEQ response code
when implicit enabling is used. when implicit enabling is used.
4. Fixed syntax in an example in section 3.2. 4. Fixed syntax in an example in section 3.2.
Changes from draft-ietf-imapext-condstore-01 Changes from draft-ietf-imapext-condstore-01
1. Fixed missing \\ in one example. 1. Fixed missing \\ in one example.
skipping to change at line 1081 skipping to change at line 1091
1. Dropped "/message" prefix in entry names as per decision in San Francisco. 1. Dropped "/message" prefix in entry names as per decision in San Francisco.
2. Fixed ABNF for SEARCH and SORT untagged responses. 2. Fixed ABNF for SEARCH and SORT untagged responses.
3. Changed "private" to "priv" to be consistent with ANNOTATE. 3. Changed "private" to "priv" to be consistent with ANNOTATE.
4. MODIFIED response code is now returned in OK response, not NO. 4. MODIFIED response code is now returned in OK response, not NO.
5. Added NOMODSEQ response code. 5. Added NOMODSEQ response code.
Changes from draft-melnikov-imap-condstore-09: Changes from draft-melnikov-imap-condstore-09:
1. Some text clarifications based on suggestions by Harrie Hazewinkel 1. Some text clarifications based on suggestions by Harrie Hazewinkel
2. Added paragraph about mailbox locking and DOS when conditional STORE 2. Added paragraph about mailbox locking and DOS when conditional STORE
operation is performed on a large mailbox. operation is performed on a large mailbox.
3. Fixed syntax of <entry-name> to match the ANNOTATE extention. 3. Fixed syntax of <entry-name> to match the ANNOTATE extension.
4. Added sentence that a system flag MUST always be considered existent, 4. Added sentence that a system flag MUST always be considered existent,
when UNCHANGEDSINCE 0 is used. Is this a good idea? when UNCHANGEDSINCE 0 is used. Is this a good idea?
5. Clarified client behavior upon receipt of MODIFIED response code. 5. Clarified client behavior upon receipt of MODIFIED response code.
6. Updated ABNF to clarify where 0 is allowed as mod-sequence and where 6. Updated ABNF to clarify where 0 is allowed as mod-sequence and where
it is not. it is not.
7. Got rid of MODSEQ response code and return this data in the untagged 7. Got rid of MODSEQ response code and return this data in the untagged
SEARCH/SORT responses. SEARCH/SORT responses.
8. Updated RFC number for the IMAP4rev1 document. 8. Updated RFC number for the IMAP4rev1 document.
Changes from -08 to -09: Changes from -08 to -09:
 End of changes. 

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