rfc2359.IMAP4_UIDPLUS_extension.txt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. Network Working Group J. Myers
  2. Request for Comments: 2359 Netscape Communications
  3. Category: Standards Track June 1998
  4. IMAP4 UIDPLUS extension
  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 (1998). All Rights Reserved.
  13. IESG NOTE
  14. The IMAP extension described here assumes a particular means of using
  15. IMAP to support disconnected operation. However, this means of
  16. supporting disconnected operation is not yet documented. Also, there
  17. are multiple theories about how best to do disconnected operation in
  18. IMAP, and as yet, there is no consensus on which one should be
  19. adopted as a standard.
  20. This document is being approved as a Proposed Standard because it
  21. does not appear to have technical flaws in itelf. However, approval
  22. of this document as a Proposed Standard should not be considered an
  23. IETF endorsement of any particular means of doing disconnected
  24. operation in IMAP.
  25. Table of Contents
  26. 1. Abstract .............................................. 2
  27. 2. Conventions Used in this Document ..................... 2
  28. 3. Introduction and Overview ............................. 2
  29. 4. Features .............................................. 2
  30. 4.1. UID EXPUNGE Command ................................... 2
  31. 4.2. APPENDUID response code ............................... 3
  32. 4.3. COPYUID response code ................................. 4
  33. 5. Formal Syntax ......................................... 4
  34. 6. References ............................................ 4
  35. 7. Security Considerations ............................... 5
  36. 8. Author's Address ...................................... 5
  37. 9. Full Copyright Statement .............................. 6
  38. Myers Standards Track [Page 1]
  39. RFC 2359 IMAP4 UIDPLUS extension June 1998
  40. 1. Abstract
  41. The UIDPLUS extension of the Internet Message Access Protocol [IMAP4]
  42. provides a set of features intended to reduce the amount of time and
  43. resources used by some client operations. The features in UIDPLUS
  44. are primarily intended for disconnected-use clients.
  45. 2. Conventions Used in this Document
  46. In examples, "C:" and "S:" indicate lines sent by the client and
  47. server respectively.
  48. The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
  49. in this document are to be interpreted as defined in "Key words for
  50. use in RFCs to Indicate Requirement Levels" [KEYWORDS].
  51. 3. Introduction and Overview
  52. The UIDPLUS extension is present in any IMAP4 server implementation
  53. which returns "UIDPLUS" as one of the supported capabilities to the
  54. CAPABILITY command. The UIDPLUS extension contains one additional
  55. command and additional data returned with successful APPEND and COPY
  56. commands.
  57. Clients that wish to use the new command in UIDPLUS must of course
  58. first test for the presence of the extension by issuing a CAPABILITY
  59. command. Each of the features in UIDPLUS are optimizations; clients
  60. can provide the same functionality, albeit more slowly, by using
  61. commands in the base protocol. With each feature, this document
  62. recommends a fallback approach to take when the UIDPLUS extension is
  63. not supported by the server.
  64. 4. Features
  65. 4.1. UID EXPUNGE Command
  66. Arguments: message set
  67. Data: untagged responses: EXPUNGE
  68. Result: OK - expunge completed
  69. NO - expunge failure (e.g. permission denied)
  70. BAD - command unknown or arguments invalid
  71. Myers Standards Track [Page 2]
  72. RFC 2359 IMAP4 UIDPLUS extension June 1998
  73. The UID EXPUNGE command permanently removes from the currently
  74. selected mailbox all messages that both have the \Deleted flag set
  75. and have a UID that is included in the specified message set. If
  76. a message either does not have the \Deleted flag set or is has a
  77. UID that is not included in the specified message set, it is not
  78. affected.
  79. This command may be used to ensure that a replayed EXPUNGE command
  80. does not remove any messages that have been marked as \Deleted
  81. between the time that the user requested the expunge operation and
  82. the time the server processes the command.
  83. If the server does not support the UIDPLUS capability, the client
  84. should fall back to using the STORE command to temporarily remove
  85. the \Deleted flag from messages it does not want to remove. The
  86. client could alternatively fall back to using the EXPUNGE command,
  87. risking the unintended removal of some messages.
  88. Example: C: A003 UID EXPUNGE 3000:3002
  89. S: * 3 EXPUNGE
  90. S: * 3 EXPUNGE
  91. S: * 3 EXPUNGE
  92. S: A003 OK UID EXPUNGE completed
  93. 4.2. APPENDUID response code
  94. Successful APPEND commands return an APPENDUID response code in the
  95. tagged OK response. The APPENDUID response code contains as
  96. arguments the UIDVALIDITY of the destination mailbox and the UID
  97. assigned to the appended message.
  98. If the server does not support the UIDPLUS capability, the client can
  99. only discover this information by selecting the destination mailbox
  100. and issuing FETCH commands.
  101. Example: C: A003 APPEND saved-messages (\Seen) {310}
  102. C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
  103. C: From: Fred Foobar <foobar@Blurdybloop.COM>
  104. C: Subject: afternoon meeting
  105. C: To: mooch@owatagu.siam.edu
  106. C: Message-Id: <B27397-0100000@Blurdybloop.COM>
  107. C: MIME-Version: 1.0
  108. C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
  109. C:
  110. C: Hello Joe, do you think we can meet at 3:30 tomorrow?
  111. C:
  112. S: A003 OK [APPENDUID 38505 3955] APPEND completed
  113. Myers Standards Track [Page 3]
  114. RFC 2359 IMAP4 UIDPLUS extension June 1998
  115. 4.3. COPYUID response code
  116. Successful COPY and UID COPY commands return a COPYUID response code
  117. in the tagged OK response whenever at least one message was copied.
  118. The COPYUID response code contains as an argument the UIDVALIDITY of
  119. the appended-to mailbox, a message set containing the UIDs of the
  120. messages copied to the destination mailbox, in the order they were
  121. copied, and a message containing the UIDs assigned to the copied
  122. messages, in the order they were assigned. Neither of the message
  123. sets may contain extraneous UIDs or the symbol '*'.
  124. If the server does not support the UIDPLUS capability, the client can
  125. only discover this information by selecting the destination mailbox
  126. and issuing FETCH commands.
  127. Example: C: A003 COPY 2:4 MEETING
  128. S: A003 OK [COPYUID 38505 304,319:320 3956:3958] Done
  129. C: A003 UID COPY 305:310 MEETING
  130. S: A003 OK Done
  131. 5. Formal Syntax
  132. The following syntax specification uses the augmented Backus-Naur
  133. Form (BNF) notation as specified in [RFC-822] as modified by [IMAP4].
  134. Non-terminals referenced but not defined below are as defined by
  135. [IMAP4].
  136. Except as noted otherwise, all alphabetic characters are case-
  137. insensitive. The use of upper or lower case characters to define
  138. token strings is for editorial clarity only. Implementations MUST
  139. accept these strings in a case-insensitive fashion.
  140. resp_code_apnd ::= "APPENDUID" SPACE nz_number SPACE uniqueid
  141. resp_code_copy ::= "COPYUID" SPACE nz_number SPACE set SPACE set
  142. uid_expunge ::= "UID" SPACE "EXPUNGE" SPACE set
  143. 6. References
  144. [IMAP4] Crispin, M., "Internet Message Access Protocol -
  145. Version 4rev1", RFC 2060, December 1996.
  146. [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
  147. Requirement Levels", BCP 14, RFC 2119, March 1997.
  148. [RFC-822] Crocker, D., "Standard for the Format of ARPA Internet
  149. Text Messages", STD 11, RFC 822, August 1982.
  150. Myers Standards Track [Page 4]
  151. RFC 2359 IMAP4 UIDPLUS extension June 1998
  152. 7. Security Considerations
  153. There are no known security issues with this extension.
  154. 8. Author's Address
  155. John Gardiner Myers
  156. Netscape Communications
  157. 501 East Middlefield Road
  158. Mail Stop MV-029
  159. Mountain View, CA 94043
  160. EMail: jgmyers@netscape.com
  161. Myers Standards Track [Page 5]
  162. RFC 2359 IMAP4 UIDPLUS extension June 1998
  163. 9. Full Copyright Statement
  164. Copyright (C) The Internet Society (1998). All Rights Reserved.
  165. This document and translations of it may be copied and furnished to
  166. others, and derivative works that comment on or otherwise explain it
  167. or assist in its implementation may be prepared, copied, published
  168. and distributed, in whole or in part, without restriction of any
  169. kind, provided that the above copyright notice and this paragraph are
  170. included on all such copies and derivative works. However, this
  171. document itself may not be modified in any way, such as by removing
  172. the copyright notice or references to the Internet Society or other
  173. Internet organizations, except as needed for the purpose of
  174. developing Internet standards in which case the procedures for
  175. copyrights defined in the Internet Standards process must be
  176. followed, or as required to translate it into languages other than
  177. English.
  178. The limited permissions granted above are perpetual and will not be
  179. revoked by the Internet Society or its successors or assigns.
  180. This document and the information contained herein is provided on an
  181. "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  182. TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  183. BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  184. HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  185. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  186. Myers Standards Track [Page 6]