rfc5161.IMAP_ENABLE_extension.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. Network Working Group A. Gulbrandsen, Ed.
  2. Request for Comments: 5161 Oryx Mail Systems GmbH
  3. Category: Standards Track A. Melnikov, Ed.
  4. Isode Limited
  5. March 2008
  6. The IMAP ENABLE Extension
  7. Status of This Memo
  8. This document specifies an Internet standards track protocol for the
  9. Internet community, and requests discussion and suggestions for
  10. improvements. Please refer to the current edition of the "Internet
  11. Official Protocol Standards" (STD 1) for the standardization state
  12. and status of this protocol. Distribution of this memo is unlimited.
  13. Abstract
  14. Most IMAP extensions are used by the client when it wants to and the
  15. server supports it. However, a few extensions require the server to
  16. know whether a client supports that extension. The ENABLE extension
  17. allows an IMAP client to say which extensions it supports.
  18. 1. Overview
  19. Several IMAP extensions allow the server to return unsolicited
  20. responses specific to these extensions in certain circumstances.
  21. However, servers cannot send those unsolicited responses until they
  22. know that the clients support such extensions and thus won't choke on
  23. the extension response data.
  24. Up until now, extensions have typically stated that a server cannot
  25. send the unsolicited responses until after the client has used a
  26. command with the extension data (i.e., at that point the server knows
  27. the client is aware of the extension). CONDSTORE ([RFC4551]),
  28. ANNOTATE ([ANNOTATE]), and some extensions under consideration at the
  29. moment use various commands to enable server extensions. For
  30. example, CONDSTORE uses a SELECT or FETCH parameter, and ANNOTATE
  31. uses a side effect of FETCH.
  32. The ENABLE extension provides an explicit indication from the client
  33. that it supports particular extensions. This is done using a new
  34. ENABLE command.
  35. An IMAP server that supports ENABLE advertises this by including the
  36. word ENABLE in its capability list.
  37. Gulbrandsen & Melnikov Standards Track [Page 1]
  38. RFC 5161 The IMAP ENABLE Extension March 2008
  39. Most IMAP extensions do not require the client to enable the
  40. extension in any way.
  41. 2. Conventions Used in This Document
  42. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  43. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  44. document are to be interpreted as described in [RFC2119].
  45. Formal syntax is defined by [RFC5234] and [RFC3501].
  46. Example lines prefaced by "C:" are sent by the client and ones
  47. prefaced by "S:" by the server. The five characters [...] means that
  48. something has been elided.
  49. 3. Protocol Changes
  50. 3.1. The ENABLE Command
  51. Arguments: capability names
  52. Result: OK: Relevant capabilities enabled
  53. BAD: No arguments, or syntax error in an argument
  54. The ENABLE command takes a list of capability names, and requests the
  55. server to enable the named extensions. Once enabled using ENABLE,
  56. each extension remains active until the IMAP connection is closed.
  57. For each argument, the server does the following:
  58. - If the argument is not an extension known to the server, the server
  59. MUST ignore the argument.
  60. - If the argument is an extension known to the server, and it is not
  61. specifically permitted to be enabled using ENABLE, the server MUST
  62. ignore the argument. (Note that knowing about an extension doesn't
  63. necessarily imply supporting that extension.)
  64. - If the argument is an extension that is supported by the server and
  65. that needs to be enabled, the server MUST enable the extension for
  66. the duration of the connection. At present, this applies only to
  67. CONDSTORE ([RFC4551]). Note that once an extension is enabled,
  68. there is no way to disable it.
  69. If the ENABLE command is successful, the server MUST send an untagged
  70. ENABLED response (see Section 3.2).
  71. Gulbrandsen & Melnikov Standards Track [Page 2]
  72. RFC 5161 The IMAP ENABLE Extension March 2008
  73. Clients SHOULD only include extensions that need to be enabled by the
  74. server. At the time of publication, CONDSTORE is the only such
  75. extension (i.e., ENABLE CONDSTORE is an additional "CONDSTORE
  76. enabling command" as defined in [RFC4551]). Future RFCs may add to
  77. this list.
  78. The ENABLE command is only valid in the authenticated state (see
  79. [RFC3501]), before any mailbox is selected. Clients MUST NOT issue
  80. ENABLE once they SELECT/EXAMINE a mailbox; however, server
  81. implementations don't have to check that no mailbox is selected or
  82. was previously selected during the duration of a connection.
  83. The ENABLE command can be issued multiple times in a session. It is
  84. additive; i.e., "ENABLE a b", followed by "ENABLE c" is the same as a
  85. single command "ENABLE a b c". When multiple ENABLE commands are
  86. issued, each corresponding ENABLED response SHOULD only contain
  87. extensions enabled by the corresponding ENABLE command.
  88. There are no limitations on pipelining ENABLE. For example, it is
  89. possible to send ENABLE and then immediately SELECT, or a LOGIN
  90. immediately followed by ENABLE.
  91. The server MUST NOT change the CAPABILITY list as a result of
  92. executing ENABLE; i.e., a CAPABILITY command issued right after an
  93. ENABLE command MUST list the same capabilities as a CAPABILITY
  94. command issued before the ENABLE command. This is demonstrated in
  95. the following example:
  96. C: t1 CAPABILITY
  97. S: * CAPABILITY IMAP4rev1 ID LITERAL+ ENABLE X-GOOD-IDEA
  98. S: t1 OK foo
  99. C: t2 ENABLE CONDSTORE X-GOOD-IDEA
  100. S: * ENABLED X-GOOD-IDEA
  101. S: t2 OK foo
  102. C: t3 CAPABILITY
  103. S: * CAPABILITY IMAP4rev1 ID LITERAL+ ENABLE X-GOOD-IDEA
  104. S: t3 OK foo again
  105. In the following example, the client enables CONDSTORE:
  106. C: a1 ENABLE CONDSTORE
  107. S: * ENABLED CONDSTORE
  108. S: a1 OK Conditional Store enabled
  109. Gulbrandsen & Melnikov Standards Track [Page 3]
  110. RFC 5161 The IMAP ENABLE Extension March 2008
  111. 3.2. The ENABLED Response
  112. Contents: capability listing
  113. The ENABLED response occurs as a result of an ENABLE command. The
  114. capability listing contains a space-separated listing of capability
  115. names that the server supports and that were successfully enabled.
  116. The ENABLED response may contain no capabilities, which means that no
  117. extensions listed by the client were successfully enabled.
  118. 3.3. Note to Designers of Extensions That May Use the ENABLE Command
  119. Designers of IMAP extensions are discouraged from creating extensions
  120. that require ENABLE unless there is no good alternative design.
  121. Specifically, extensions that cause potentially incompatible behavior
  122. changes to deployed server responses (and thus benefit from ENABLE)
  123. have a higher complexity cost than extensions that do not.
  124. 4. Formal Syntax
  125. The following syntax specification uses the Augmented Backus-Naur
  126. Form (ABNF) notation as specified in [RFC5234] including the core
  127. rules in Appendix B.1. [RFC3501] defines the non-terminals
  128. "capability" and "command-any".
  129. Except as noted otherwise, all alphabetic characters are
  130. case-insensitive. The use of upper or lower case characters to
  131. define token strings is for editorial clarity only. Implementations
  132. MUST accept these strings in a case-insensitive fashion.
  133. capability =/ "ENABLE"
  134. command-any =/ "ENABLE" 1*(SP capability)
  135. response-data =/ "*" SP enable-data CRLF
  136. enable-data = "ENABLED" *(SP capability)
  137. 5. Security Considerations
  138. It is believed that this extension doesn't add any security
  139. considerations that are not already present in the base IMAP protocol
  140. [RFC3501].
  141. 6. IANA Considerations
  142. The IANA has added ENABLE to the IMAP4 Capabilities Registry.
  143. Gulbrandsen & Melnikov Standards Track [Page 4]
  144. RFC 5161 The IMAP ENABLE Extension March 2008
  145. 7. Acknowledgments
  146. The editors would like to thank Randy Gellens, Chris Newman, Peter
  147. Coates, Dave Cridland, Mark Crispin, Ned Freed, Dan Karp, Cyrus
  148. Daboo, Ken Murchison, and Eric Burger for comments and corrections.
  149. However, this doesn't necessarily mean that they endorse this
  150. extension, agree with all details, or are responsible for errors
  151. introduced by the editors.
  152. 8. Normative References
  153. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  154. Requirement Levels", BCP 14, RFC 2119, March 1997.
  155. [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
  156. 4rev1", RFC 3501, March 2003.
  157. [RFC5234] Crocker, D., Ed., and P. Overell, "Augmented BNF for
  158. Syntax Specifications: ABNF", STD 68, RFC 5234, January
  159. 2008.
  160. [RFC4551] Melnikov, A. and S. Hole, "IMAP Extension for Conditional
  161. STORE Operation or Quick Flag Changes Resynchronization",
  162. RFC 4551, June 2006.
  163. 9. Informative References
  164. [ANNOTATE] Daboo, C. and R. Gellens, "IMAP ANNOTATE Extension", Work
  165. in Progress, August 2006.
  166. Gulbrandsen & Melnikov Standards Track [Page 5]
  167. RFC 5161 The IMAP ENABLE Extension March 2008
  168. Editors' Addresses
  169. Arnt Gulbrandsen
  170. Oryx Mail Systems GmbH
  171. Schweppermannstr. 8
  172. D-81671 Muenchen
  173. Germany
  174. Fax: +49 89 4502 9758
  175. EMail: arnt@oryx.com
  176. Alexey Melnikov
  177. Isode Ltd
  178. 5 Castle Business Village
  179. 36 Station Road
  180. Hampton, Middlesex TW12 2BX
  181. UK
  182. EMail: Alexey.Melnikov@isode.com
  183. Gulbrandsen & Melnikov Standards Track [Page 6]
  184. RFC 5161 The IMAP ENABLE Extension March 2008
  185. Full Copyright Statement
  186. Copyright (C) The IETF Trust (2008).
  187. This document is subject to the rights, licenses and restrictions
  188. contained in BCP 78, and except as set forth therein, the authors
  189. retain all their rights.
  190. This document and the information contained herein are provided on an
  191. "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
  192. OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
  193. THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
  194. OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
  195. THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
  196. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  197. Intellectual Property
  198. The IETF takes no position regarding the validity or scope of any
  199. Intellectual Property Rights or other rights that might be claimed to
  200. pertain to the implementation or use of the technology described in
  201. this document or the extent to which any license under such rights
  202. might or might not be available; nor does it represent that it has
  203. made any independent effort to identify any such rights. Information
  204. on the procedures with respect to rights in RFC documents can be
  205. found in BCP 78 and BCP 79.
  206. Copies of IPR disclosures made to the IETF Secretariat and any
  207. assurances of licenses to be made available, or the result of an
  208. attempt made to obtain a general license or permission for the use of
  209. such proprietary rights by implementers or users of this
  210. specification can be obtained from the IETF on-line IPR repository at
  211. http://www.ietf.org/ipr.
  212. The IETF invites any interested party to bring to its attention any
  213. copyrights, patents or patent applications, or other proprietary
  214. rights that may cover technology that may be required to implement
  215. this standard. Please address the information to the IETF at
  216. ietf-ipr@ietf.org.
  217. Gulbrandsen & Melnikov Standards Track [Page 7]