| < draft-gulbrandsen-imap-enable-04.txt | draft-gulbrandsen-imap-enable-05.txt > | |||
|---|---|---|---|---|
| Network Working Group Arnt Gulbrandsen | Network Working Group Arnt Gulbrandsen | |||
| Internet-Draft Oryx Mail Systems GmbH | Internet-Draft Oryx Mail Systems GmbH | |||
| Intended Status: Proposed Standard Alexey Melnikov | Intended Status: Proposed Standard Alexey Melnikov | |||
| Isode Limited | Isode Limited | |||
| December 14, 2007 | December 16, 2007 | |||
| The IMAP ENABLE Extension | The IMAP ENABLE Extension | |||
| draft-gulbrandsen-imap-enable-04.txt | draft-gulbrandsen-imap-enable-05.txt | |||
| Status of this Memo | Status of this Memo | |||
| By submitting this Internet-Draft, each author represents that any | By submitting this Internet-Draft, each author represents that any | |||
| applicable patent or other IPR claims of which he or she is aware | applicable patent or other IPR claims of which he or she is aware | |||
| have been or will be disclosed, and any of which he or she becomes | have been or will be disclosed, and any of which he or she becomes | |||
| aware will be disclosed, in accordance with Section 6 of BCP 79. | aware will be disclosed, in accordance with Section 6 of BCP 79. | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF), its areas, and its working groups. Note that | Task Force (IETF), its areas, and its working groups. Note that | |||
| skipping to change at page 2, line 21 ¶ | skipping to change at page 2, line 21 ¶ | |||
| document are to be interpreted as described in [RFC2119]. | document are to be interpreted as described in [RFC2119]. | |||
| Formal syntax is defined by [RFC4234] as modified by [RFC3501]. | Formal syntax is defined by [RFC4234] as modified by [RFC3501]. | |||
| Example lines prefaced by "C:" are sent by the client and ones | Example lines prefaced by "C:" are sent by the client and ones | |||
| prefaced by "S:" by the server. The five characters [...] means that | prefaced by "S:" by the server. The five characters [...] means that | |||
| something has been elided. | something has been elided. | |||
| 2. Overview | 2. Overview | |||
| CONSTORE ([RFC4551]), ANNOTATE ([ANNOTATE]) and some extensions | Several IMAP extensions allow the server to return unsolicited | |||
| under consideration at the moment use various commands to enable | responses specific to these extensions in certain circumstances. | |||
| server extensions. (CONDSTORE uses a SELECT or FETCH parameter, and | However, servers cannot send those unsolicited responses until they | |||
| ANNOTATE uses a side effect of FETCH.) This extension adds a | know that the clients support such extensions and thus won't choke | |||
| command, ENABLE, which enables such extensions without causing any | on the extension response data. | |||
| other effect. | ||||
| Up until now extensions have typically stated that a server cannot | ||||
| send the unsolicited responses until after the client has used a | ||||
| command with the extension data (i.e. at that point the server knows | ||||
| the client is aware of the extension). CONSTORE ([RFC4551]), | ||||
| ANNOTATE ([ANNOTATE]) and some extensions under consideration at the | ||||
| moment use various commands to enable server extensions. For example | ||||
| CONDSTORE uses a SELECT or FETCH parameter, and ANNOTATE uses a side | ||||
| effect of FETCH. | ||||
| The ENABLE extension provides an explicit indication from the client | ||||
| that it supports particular extensions. This is done using a new | ||||
| ENABLE command. | ||||
| An IMAP server which supports ENABLE advertises this by including | An IMAP server which supports ENABLE advertises this by including | |||
| the word ENABLE in its capability list. | the word ENABLE in its capability list. | |||
| Most IMAP extensions do not require the client to enable the | Most IMAP extensions do not require the client to enable the | |||
| extension in any way. | extension in any way. | |||
| 3. Protocol changes | 3. Protocol changes | |||
| 3.1 The ENABLE Command | 3.1 The ENABLE Command | |||
| Arguments: capability names | Arguments: capability names | |||
| Result: OK: Relevant capabilities enabled | Result: OK: Relevant capabilities enabled | |||
| BAD: No arguments, or syntax error in an argument | BAD: No arguments, or syntax error in an argument | |||
| Internet-draft December 2007 | ||||
| The ENABLE command takes a list of capability names, and requests | The ENABLE command takes a list of capability names, and requests | |||
| the server to enable the named extensions. Once enabled using | the server to enable the named extensions. Once enabled using | |||
| ENABLE, each extension remains active until the IMAP connection is | ENABLE, each extension remains active until the IMAP connection is | |||
| closed. For each argument, the server does the following: | closed. For each argument, the server does the following: | |||
| - If the argument is not an extension known to the server, the | - If the argument is not an extension known to the server, the | |||
| server MUST ignore the argument. | server MUST ignore the argument. | |||
| - If the argument is an extension known to the server, and it is not | - If the argument is an extension known to the server, and it is not | |||
| specifically permitted to be enabled using ENABLE, the server MUST | specifically permitted to be enabled using ENABLE, the server MUST | |||
| ignore the argument. (Note that knowing about an extension doesn't | ignore the argument. (Note that knowing about an extension doesn't | |||
| Internet-draft December 2007 | ||||
| necessarily imply supporting that extension.) | necessarily imply supporting that extension.) | |||
| - If the argument is an extension is supported by the server and | - If the argument is an extension is supported by the server and | |||
| which needs to be enabled, the server MUST enable the extension | which needs to be enabled, the server MUST enable the extension | |||
| for the duration of the connection. At present this applies only | for the duration of the connection. At present this applies only | |||
| to CONDSTORE ([RFC4551]). Note that once an extension is enabled, | to CONDSTORE ([RFC4551]). Note that once an extension is enabled, | |||
| there is no way to disable it. | there is no way to disable it. | |||
| If the ENABLE command is successful, the server MUST result in the | If the ENABLE command is successful, the server MUST send an | |||
| ENABLED response (see Section 3.2). | untagged ENABLED response (see Section 3.2). | |||
| Clients SHOULD only include extensions that need to be enabled in | Clients SHOULD only include extensions that need to be enabled by | |||
| the server. At the time this RFC is published CONDSTORE is the only | the server. At the time this RFC is published CONDSTORE is the only | |||
| such extension (ie. ENABLE CONDSTORE is an additional "Condstore | such extension (ie. ENABLE CONDSTORE is an additional "Condstore | |||
| enabling command" as defined in [RFC4551]). Future RFCs may add to | enabling command" as defined in [RFC4551]). Future RFCs may add to | |||
| this list. [Note to the RFC Editor: If the IMAP ANNOTATE document | this list. [Note to the RFC Editor: If the IMAP ANNOTATE document | |||
| has been published already, ANNOTATE should be mentioned as well as | has been published already, ANNOTATE should be mentioned as well as | |||
| CONDSTORE.] | CONDSTORE.] | |||
| The ENABLE command is only valid in Authenticated state (see | The ENABLE command is only valid in Authenticated state (see | |||
| [RFC3501]), before any mailbox is selected. Clients MUST NOT issue | [RFC3501]), before any mailbox is selected. Clients MUST NOT issue | |||
| ENABLE once they select a mailbox, however server implementations | ENABLE once they SELECT/EXAMINE a mailbox, however server | |||
| don't have to check that no mailbox is selected or was previously | implementations don't have to check that no mailbox is selected or | |||
| selected during the duration of a connection. | was previously selected during the duration of a connection. | |||
| The ENABLE command can be issued multiple times in a session. It is | The ENABLE command can be issued multiple times in a session. It is | |||
| additive, i.e. "ENABLE a b", followed by "ENABLE c" is the same as a | additive, i.e. "ENABLE a b", followed by "ENABLE c" is the same as a | |||
| single command "ENABLE a b c". | single command "ENABLE a b c". When multiple ENABLE commands are | |||
| issued, each corresponding ENABLED response SHOULD only contain | ||||
| extensions enabled by the corresponding ENABLE command. | ||||
| There are no limitations on pipelining ENABLE. For example, it is | There are no limitations on pipelining ENABLE. For example, it is | |||
| possible to send ENABLE and then immediately AUTHENTICATE. | possible to send ENABLE and then immediately SELECT, or a LOGIN | |||
| immediately followed by ENABLE. | ||||
| The server MUST NOT change the CAPABILITY list as a result of | The server MUST NOT change the CAPABILITY list as a result of | |||
| executing ENABLE, i.e. a CAPABILITY command issued right after an | executing ENABLE, i.e. a CAPABILITY command issued right after an | |||
| Internet-draft December 2007 | ||||
| ENABLE command MUST list the same capabilities as a CAPABILITY | ENABLE command MUST list the same capabilities as a CAPABILITY | |||
| command issued before the ENABLE command. The following example | command issued before the ENABLE command. The following example | |||
| demonstrates that: | demonstrates that: | |||
| C: t1 CAPABILITY | C: t1 CAPABILITY | |||
| S: * CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 AUTH=DIGEST-MD5 ID | S: * CAPABILITY IMAP4rev1 ID LITERAL+ ENABLE X-GOOD-IDEA | |||
| LITERAL+ ENABLE | ||||
| S: t1 OK foo | S: t1 OK foo | |||
| C: t2 ENABLE CONDSTORE X-GOOD-IDEA | C: t2 ENABLE CONDSTORE X-GOOD-IDEA | |||
| S: * ENABLED X-GOOD-IDEA | S: * ENABLED X-GOOD-IDEA | |||
| S: t2 OK foo | S: t2 OK foo | |||
| C: t3 CAPABILITY | C: t3 CAPABILITY | |||
| S: * CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 AUTH=DIGEST-MD5 ID | S: * CAPABILITY IMAP4rev1 ID LITERAL+ ENABLE X-GOOD-IDEA | |||
| LITERAL+ ENABLE | ||||
| Internet-draft December 2007 | ||||
| S: t3 OK foo again | S: t3 OK foo again | |||
| In the example above the server chose not to advertise support for | ||||
| some IMAP extensions until after authentication. This is so, because | ||||
| X-GOOD-IDEA was successfully enabled but is not advertised in the | ||||
| CAPABILITY response. | ||||
| In the following example, the client enables CONDSTORE: | In the following example, the client enables CONDSTORE: | |||
| C: a1 ENABLE CONDSTORE | C: a1 ENABLE CONDSTORE | |||
| S: * ENABLED CONDSTORE | S: * ENABLED CONDSTORE | |||
| S: a1 OK Conditional Store enabled | S: a1 OK Conditional Store enabled | |||
| Note that according to [RFC3501] the list of advertised capabilities | ||||
| MAY change after a STARTTLS and/or AUTHENTICATE/LOGIN command. The | ||||
| ENABLE command doesn't change that. | ||||
| In the next example, the client asks about the server capabilities, | ||||
| the server tells the client only what's usable prior to login, the | ||||
| client enables CONDSTORE and X-GOOD-IDEA, then it logs in. | ||||
| C: b1 CAPABILITY | ||||
| S: * CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 AUTH=DIGEST-MD5 ID | ||||
| LITERAL+ ENABLE | ||||
| S: b1 OK foo | ||||
| C: b2 ENABLE CONDSTORE X-GOOD-IDEA | ||||
| S: * ENABLED CONDSTORE | ||||
| S: b2 OK foo | ||||
| C: b3 LOGIN d e | ||||
| S: b3 OK foo | ||||
| C: b4 CAPABILITY | ||||
| S: * CAPABILITY IMAP4rev1 ID LITERAL+ CONDSTORE | ||||
| S: b4 OK foo | ||||
| After command b2, the client learns that the server supports and | ||||
| successfully enabled CONDSTORE but not X-GOOD-IDEA. | ||||
| 3.2 The ENABLED Response | 3.2 The ENABLED Response | |||
| Contents: capability listing | Contents: capability listing | |||
| The ENABLED response occurs as a result of an ENABLE command. The | The ENABLED response occurs as a result of an ENABLE command. The | |||
| capability listing contains a space-separated listing of capability | capability listing contains a space-separated listing of capability | |||
| names that the server supports and that were successfully enabled. | names that the server supports and that were successfully enabled. | |||
| The ENABLED response may contain no capabilities, which means that | The ENABLED response may contain no capabilities, which means that | |||
| no extensions listed by the client were successfully enabled. | no extensions listed by the client were successfully enabled. | |||
| Internet-draft December 2007 | 3.3 Note to designers of extensions that may use the ENABLE command | |||
| Designers of IMAP extensions are discouraged from creating | ||||
| extensions that require ENABLE unless there is no good alternative | ||||
| design. Specifically, extensions that cause potentially | ||||
| incompatible behavior changes to deployed server responses (and thus | ||||
| benefit from ENABLE) have a higher complexity cost than extensions | ||||
| that do not. | ||||
| 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 [RFC4234]. [RFC3501] defines | Form (ABNF) notation as specified in [RFC4234] including the core | |||
| the non-terminals "capability" and "command-any". | rules in Appendix B.1. [RFC3501] defines the non-terminals | |||
| "capability" and "command-any". | ||||
| Internet-draft December 2007 | ||||
| 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 | insensitive. The use of upper or lower case characters to define | |||
| token strings is for editorial clarity only. Implementations MUST | token strings is for editorial clarity only. Implementations MUST | |||
| accept these strings in a case-insensitive fashion. | accept these strings in a case-insensitive fashion. | |||
| capability =/ "ENABLE" | capability =/ "ENABLE" | |||
| command-any =/ "ENABLE" 1*(SP capability) | command-any =/ "ENABLE" 1*(SP capability) | |||
| response-data =/ "*" SP enable-data CRLF | response-data =/ "*" SP enable-data CRLF | |||
| enable-data = "ENABLED" *(SP capability) | enable-data = "ENABLED" *(SP capability) | |||
| 5. Security considerations | 5. Security considerations | |||
| The ENABLE command may be executed before authentication, so it can | It is believed that this extension doesn't add any new security | |||
| be used by malevolent clients. Servers should parse and implement it | considerations that are not already present in the base IMAP | |||
| with particular care. | protocol [RFC3501]. | |||
| It is possible to use ENABLE to find out whether a server implements | ||||
| certain IMAP extensions. For example, if a server does not advertise | ||||
| IDLE (see [RFC2177]) in unauthenticated mode, an unauthenticated | ||||
| client can send ENABLE IDLE and use the response to find out whether | ||||
| the server supports IDLE. This is believed to be harmless, since the | ||||
| relevant extensions are necessarily not available to the client. | ||||
| 6. IANA considerations | 6. IANA considerations | |||
| The IANA is requested to add ENABLE to the IMAP4 Capabilities | The IANA is requested to add ENABLE to the IMAP4 Capabilities | |||
| Registry. [TO BE REMOVED: This registration should take place at | Registry. [[Note to RFC-editor: please remove the following before | |||
| the following location: | publication: This registration should take place at the following | |||
| http://www.iana.org/assignments/imap4-capabilities] | location: http://www.iana.org/assignments/imap4-capabilities]] | |||
| 7. Acknowledgements | 7. Acknowledgements | |||
| The idea came from Randy Gellens. Alexey Melnikov thought it was a | Editors would like to thank Randy Gellens, Chris Newman, Peter | |||
| good idea. The so-called author of this document typed it down and | Coates, Dave Cridland, Mark Crispin, Ned Freed, Dan Karp, Cyrus | |||
| added the open issues section. | Daboo, Ken Murchison and Eric Burger for comments and corrections. | |||
| However this doesn't necessarily mean that they endorse this | ||||
| Internet-draft December 2007 | extension, agree with all details or responsible for errors | |||
| introduced by editors. | ||||
| 8. Normative References | 8. Normative References | |||
| [RFC2119] Bradner, "Key words for use in RFCs to Indicate | [RFC2119] Bradner, "Key words for use in RFCs to Indicate | |||
| Requirement Levels", RFC 2119, Harvard University, March | Requirement Levels", RFC 2119, Harvard University, March | |||
| 1997. | 1997. | |||
| [RFC3501] Crispin, "Internet Message Access Protocol - Version | [RFC3501] Crispin, "Internet Message Access Protocol - Version | |||
| Internet-draft December 2007 | ||||
| 4rev1", RFC 3501, University of Washington, June 2003. | 4rev1", RFC 3501, University of Washington, June 2003. | |||
| [RFC4234] Crocker, Overell, "Augmented BNF for Syntax | [RFC4234] Crocker, Overell, "Augmented BNF for Syntax | |||
| Specifications: ABNF", RFC 4234, Brandenburg | Specifications: ABNF", RFC 4234, Brandenburg | |||
| Internetworking, Demon Internet Ltd, October 2005. | Internetworking, Demon Internet Ltd, October 2005. | |||
| [RFC4551] Melnikov, Hole, "IMAP Extension for Conditional STORE | [RFC4551] Melnikov, Hole, "IMAP Extension for Conditional STORE | |||
| Operation or Quick Flag Changes Resynchronization", RFC | Operation or Quick Flag Changes Resynchronization", RFC | |||
| 4551, Isode Ltd., June 2006. | 4551, Isode Ltd., June 2006. | |||
| skipping to change at page 8, line 9 ¶ | skipping to change at page 8, line 9 ¶ | |||
| Acknowledgment | Acknowledgment | |||
| Funding for the RFC Editor function is currently provided by the | Funding for the RFC Editor function is currently provided by the | |||
| Internet Society. | Internet Society. | |||
| Internet-draft December 2007 | Internet-draft December 2007 | |||
| (RFC Editor: Please delete everything after this point) | (RFC Editor: Please delete everything after this point) | |||
| Open Issues | ||||
| None any more. | ||||
| It would be nice to have some text explaining that well-designed | ||||
| extensions don't need ENABLE, and why, but my attempts at such text | ||||
| have not come out well. | ||||
| Changes since -00 | Changes since -00 | |||
| - The IANA asked me to specify the IANA registry exactly | - The IANA asked me to specify the IANA registry exactly | |||
| - Say "clients should only use ENABLE when it's really necessary" | - Say "clients should only use ENABLE when it's really necessary" | |||
| - Better abstract | - Better abstract | |||
| - Wording. | - Wording. | |||
| skipping to change at page 9, line 5 ¶ | skipping to change at page 8, line 43 ¶ | |||
| - Nits | - Nits | |||
| - Unique tags in examples | - Unique tags in examples | |||
| - Note specifically that a server can reply BAD to ENABLE ID, even | - Note specifically that a server can reply BAD to ENABLE ID, even | |||
| if it doesn't support ID. All it needs is to know that ID cannot | if it doesn't support ID. All it needs is to know that ID cannot | |||
| be ENABLEd. | be ENABLEd. | |||
| Changes since -03 | Changes since -03 | |||
| Internet-draft December 2007 | ||||
| - Added ENABLED response as per discussion on the mailing list | - Added ENABLED response as per discussion on the mailing list | |||
| - Changed ENABLE to never return BAD | - Changed ENABLE to never return BAD | |||
| - Only allow ENABLE in the authenticated state as per consensus in | - Only allow ENABLE in the authenticated state as per consensus in | |||
| Vancouver | Vancouver | |||
| - Clarified [lack of] interaction with the CAPABILITY response | - Clarified [lack of] interaction with the CAPABILITY response | |||
| Internet-draft December 2007 | ||||
| - Clarified that the ENABLE command is additive | - Clarified that the ENABLE command is additive | |||
| - Added more examples | - Added more examples | |||
| Changes since -04 | ||||
| - Added rationale for the ENABLE extension | ||||
| - Fixed several inconsistencies caused by restring ENABLE to | ||||
| authentication state only. | ||||
| End of changes. 25 change blocks. | ||||
| 86 lines changed or deleted | 68 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||