rfc3691.IMAP_UNSELECT_command.txt 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. Network Working Group A. Melnikov
  2. Request for Comments: 3691 Isode Ltd.
  3. Category: Standards Track February 2004
  4. Internet Message Access Protocol (IMAP) UNSELECT command
  5. Status of this Memo
  6. This document specifies an Internet standards track protocol for the
  7. Internet community, and requests discussion and suggestions for
  8. improvements. Please refer to the current edition of the "Internet
  9. Official Protocol Standards" (STD 1) for the standardization state
  10. and status of this protocol. Distribution of this memo is unlimited.
  11. Copyright Notice
  12. Copyright (C) The Internet Society (2004). All Rights Reserved.
  13. Abstract
  14. This document defines an UNSELECT command that can be used to close
  15. the current mailbox in an Internet Message Access Protocol - version
  16. 4 (IMAP4) session without expunging it. Certain types of IMAP
  17. clients need to release resources associated with the selected
  18. mailbox without selecting a different mailbox. While IMAP4 provides
  19. this functionality (via a SELECT command with a nonexistent mailbox
  20. name or reselecting the same mailbox with EXAMINE command), a more
  21. clean solution is desirable.
  22. Table of Contents
  23. 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
  24. 2. UNSELECT command . . . . . . . . . . . . . . . . . . . . . . . 2
  25. 3. Security Considerations. . . . . . . . . . . . . . . . . . . . 3
  26. 4. Formal Syntax. . . . . . . . . . . . . . . . . . . . . . . . . 3
  27. 5. IANA Considerations. . . . . . . . . . . . . . . . . . . . . . 3
  28. 6. Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . 3
  29. 7. Normative References . . . . . . . . . . . . . . . . . . . . . 4
  30. 8. Author's Address . . . . . . . . . . . . . . . . . . . . . . . 4
  31. 9. Full Copyright Statement . . . . . . . . . . . . . . . . . . . 5
  32. Melnikov Standards Track [Page 1]
  33. RFC 3691 IMAP UNSELECT command February 2004
  34. 1. Introduction
  35. Certain types of IMAP clients need to release resources associated
  36. with the selected mailbox without selecting a different mailbox.
  37. While [IMAP4] provides this functionality (via a SELECT command with
  38. a nonexistent mailbox name or reselecting the same mailbox with
  39. EXAMINE command), a more clean solution is desirable.
  40. [IMAP4] defines the CLOSE command that closes the selected mailbox as
  41. well as permanently removes all messages with the \Deleted flag set.
  42. However [IMAP4] lacks a command that simply closes the mailbox
  43. without expunging it. This document defines the UNSELECT command for
  44. this purpose.
  45. A server which supports this extension indicates this with a
  46. capability name of "UNSELECT".
  47. "C:" and "S:" in examples show lines sent by the client and server
  48. respectively.
  49. The keywords "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" in
  50. this document when typed in uppercase are to be interpreted as
  51. defined in "Key words for use in RFCs to Indicate Requirement Levels"
  52. [KEYWORDS].
  53. 2. UNSELECT Command
  54. Arguments: none
  55. Responses: no specific responses for this command
  56. Result: OK - unselect completed, now in authenticated state
  57. BAD - no mailbox selected, or argument supplied but
  58. none permitted
  59. The UNSELECT command frees server's resources associated with the
  60. selected mailbox and returns the server to the authenticated
  61. state. This command performs the same actions as CLOSE, except
  62. that no messages are permanently removed from the currently
  63. selected mailbox.
  64. Example: C: A341 UNSELECT
  65. S: A341 OK Unselect completed
  66. Melnikov Standards Track [Page 2]
  67. RFC 3691 IMAP UNSELECT command February 2004
  68. 3. Security Considerations
  69. It is believed that this extension doesn't raise any additional
  70. security concerns not already discussed in [IMAP4].
  71. 4. Formal Syntax
  72. The following syntax specification uses the Augmented Backus-Naur
  73. Form (ABNF) notation as specified in [ABNF]. Non-terminals
  74. referenced but not defined below are as defined by [IMAP4].
  75. Except as noted otherwise, all alphabetic characters are case-
  76. insensitive. The use of upper or lower case characters to define
  77. token strings is for editorial clarity only. Implementations MUST
  78. accept these strings in a case-insensitive fashion.
  79. command-select /= "UNSELECT"
  80. 5. IANA Considerations
  81. IMAP4 capabilities are registered by publishing a standards track or
  82. IESG approved experimental RFC. The registry is currently located
  83. at:
  84. http://www.iana.org/assignments/imap4-capabilities
  85. This document defines the UNSELECT IMAP capabilities. IANA has added
  86. this capability to the registry.
  87. 6. Acknowledgments
  88. UNSELECT command was originally implemented by Tim Showalter in Cyrus
  89. IMAP server.
  90. Also, the author of the document would like to thank Vladimir Butenko
  91. and Mark Crispin for reminding that UNSELECT has to be documented.
  92. Also thanks to Simon Josefsson for pointing out that there are
  93. multiple ways to implement UNSELECT.
  94. Melnikov Standards Track [Page 3]
  95. RFC 3691 IMAP UNSELECT command February 2004
  96. 7. Normative References
  97. [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
  98. Requirement Levels", BCP 14, RFC 2119, March 1997.
  99. [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
  100. 4rev1", RFC 3501, March 2003.
  101. [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
  102. Specifications: ABNF", RFC 2234, November 1997.
  103. 8. Author's Address
  104. Alexey Melnikov
  105. Isode Limited
  106. 5 Castle Business Village
  107. Hampton, Middlesex TW12 2BX
  108. EMail: Alexey.Melnikov@isode.com
  109. URI: http://www.melnikov.ca/
  110. Melnikov Standards Track [Page 4]
  111. RFC 3691 IMAP UNSELECT command February 2004
  112. 9. Full Copyright Statement
  113. Copyright (C) The Internet Society (2004). This document is subject
  114. to the rights, licenses and restrictions contained in BCP 78 and
  115. except as set forth therein, the authors retain all their rights.
  116. This document and the information contained herein are provided on an
  117. "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
  118. REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE
  119. INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR
  120. IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
  121. THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
  122. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  123. Intellectual Property
  124. The IETF takes no position regarding the validity or scope of any
  125. Intellectual Property Rights or other rights that might be claimed
  126. to pertain to the implementation or use of the technology
  127. described in this document or the extent to which any license
  128. under such rights might or might not be available; nor does it
  129. represent that it has made any independent effort to identify any
  130. such rights. Information on the procedures with respect to
  131. rights in RFC documents can be found in BCP 78 and BCP 79.
  132. Copies of IPR disclosures made to the IETF Secretariat and any
  133. assurances of licenses to be made available, or the result of an
  134. attempt made to obtain a general license or permission for the use
  135. of such proprietary rights by implementers or users of this
  136. specification can be obtained from the IETF on-line IPR repository
  137. at http://www.ietf.org/ipr.
  138. The IETF invites any interested party to bring to its attention
  139. any copyrights, patents or patent applications, or other
  140. proprietary rights that may cover technology that may be required
  141. to implement this standard. Please address the information to the
  142. IETF at ietf-ipr@ietf.org.
  143. Acknowledgement
  144. Funding for the RFC Editor function is currently provided by the
  145. Internet Society.
  146. Melnikov Standards Track [Page 5]