rfc3348.IMAP4_Child_Mailbox_extension.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. Network Working Group M. Gahrns
  2. Request for Comments: 3348 R. Cheng
  3. Category: Informational Microsoft
  4. July 2002
  5. The Internet Message Action Protocol (IMAP4)
  6. Child Mailbox Extension
  7. Status of this Memo
  8. This memo provides information for the Internet community. It does
  9. not specify an Internet standard of any kind. Distribution of this
  10. memo is unlimited.
  11. Copyright Notice
  12. Copyright (C) The Internet Society (2002). All Rights Reserved.
  13. Abstract
  14. The Internet Message Action Protocol (IMAP4) CHILDREN extension
  15. provides a mechanism for a client to efficiently determine if a
  16. particular mailbox has children, without issuing a LIST "" * or a
  17. LIST "" % for each mailbox.
  18. 1. Conventions used in this document
  19. In examples, "C:" and "S:" indicate lines sent by the client and
  20. server respectively. If such lines are wrapped without a new "C:" or
  21. "S:" label, then the wrapping is for editorial clarity and is not
  22. part of the command.
  23. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  24. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  25. document are to be interpreted as described in [RFC-2119].
  26. 2. Introduction and Overview
  27. Many IMAP4 [RFC-2060] clients present to the user a hierarchical view
  28. of the mailboxes that a user has access to. Rather than initially
  29. presenting to the user the entire mailbox hierarchy, it is often
  30. preferable to show to the user a collapsed outline list of the
  31. mailbox hierarchy (particularly if there is a large number of
  32. mailboxes). The user can then expand the collapsed outline hierarchy
  33. as needed. It is common to include within the collapsed hierarchy a
  34. Gahrns, et al. Informational [Page 1]
  35. RFC 3348 IMAP4 Child Mailbox Extension July 2002
  36. visual clue (such as a "+") to indicate that there are child
  37. mailboxes under a particular mailbox. When the visual clue is
  38. clicked the hierarchy list is expanded to show the child mailboxes.
  39. Several IMAP vendors implemented this proposal, and it is proposed to
  40. document this behavior and functionality as an Informational RFC.
  41. There is interest in addressing the general extensibility of the IMAP
  42. LIST command through an IMAP LIST Extension draft. Similar
  43. functionality to the \HasChildren and \HasNoChildren flags could be
  44. incorporated into this new LIST Extension. It is proposed that the
  45. more general LIST Extension draft proceed on the standards track with
  46. this proposal being relegated to informational status only.
  47. If the functionality of the \HasChildren and \HasNoChildren flags
  48. were incorporated into a more general LIST extension, this would have
  49. the advantage that a client could then have the opportunity to
  50. request whether or not the server should return this information.
  51. This would be an advantage over the current draft for servers where
  52. this information is expensive to compute, since the server would only
  53. need to compute the information when it knew that the client
  54. requesting the information was able to consume it.
  55. 3. Requirements
  56. IMAP4 servers that support this extension MUST list the keyword
  57. CHILDREN in their CAPABILITY response.
  58. The CHILDREN extension defines two new attributes that MAY be
  59. returned within a LIST response.
  60. \HasChildren - The presence of this attribute indicates that the
  61. mailbox has child mailboxes.
  62. Servers SHOULD NOT return \HasChildren if child mailboxes exist, but
  63. none will be displayed to the current user in a LIST response (as
  64. should be the case where child mailboxes exist, but a client does not
  65. have permissions to access them.) In this case, \HasNoChildren
  66. SHOULD be used.
  67. In many cases, however, a server may not be able to efficiently
  68. compute whether a user has access to all child mailboxes, or multiple
  69. users may be accessing the same account and simultaneously changing
  70. the mailbox hierarchy. As such a client MUST be prepared to accept
  71. the \HasChildren attribute as a hint. That is, a mailbox MAY be
  72. flagged with the \HasChildren attribute, but no child mailboxes will
  73. appear in a subsequent LIST response.
  74. Gahrns, et al. Informational [Page 2]
  75. RFC 3348 IMAP4 Child Mailbox Extension July 2002
  76. Example 3.1:
  77. ============
  78. /*** Consider a server that has the following mailbox hierarchy:
  79. INBOX
  80. ITEM_1
  81. ITEM_1A
  82. ITEM_2
  83. TOP_SECRET
  84. Where INBOX, ITEM_1 and ITEM_2 are top level mailboxes. ITEM_1A is a
  85. child mailbox of ITEM_1 and TOP_SECRET is a child mailbox of ITEM_2
  86. that the currently logged on user does NOT have access to.
  87. Note that in this case, the server is not able to efficiently compute
  88. access rights to child mailboxes and responds with a \HasChildren
  89. attribute for mailbox ITEM_2, even though ITEM_2/TOP_SECRET does not
  90. appear in the list response. ***/
  91. C: A001 LIST "" *
  92. S: * LIST (\HasNoChildren) "/" INBOX
  93. S: * LIST (\HasChildren) "/" ITEM_1
  94. S: * LIST (\HasNoChildren) "/" ITEM_1/ITEM_1A
  95. S: * LIST (\HasChildren) "/" ITEM_2
  96. S: A001 OK LIST Completed
  97. \HasNoChildren - The presence of this attribute indicates that the
  98. mailbox has NO child mailboxes that are accessible to the currently
  99. authenticated user. If a mailbox has the \Noinferiors attribute, the
  100. \HasNoChildren attribute is redundant and SHOULD be omitted in the
  101. LIST response.
  102. In some instances a server that supports the CHILDREN extension MAY
  103. NOT be able to determine whether a mailbox has children. For example
  104. it may have difficulty determining whether there are child mailboxes
  105. when LISTing mailboxes while operating in a particular namespace.
  106. In these cases, a server MAY exclude both the \HasChildren and
  107. \HasNoChildren attributes in the LIST response. As such, a client
  108. can not make any assumptions about whether a mailbox has children
  109. based upon the absence of a single attribute.
  110. It is an error for the server to return both a \HasChildren and a
  111. \HasNoChildren attribute in a LIST response.
  112. Gahrns, et al. Informational [Page 3]
  113. RFC 3348 IMAP4 Child Mailbox Extension July 2002
  114. It is an error for the server to return both a \HasChildren and a
  115. \NoInferiors attribute in a LIST response.
  116. Note: the \HasNoChildren attribute should not be confused with the
  117. IMAP4 [RFC-2060] defined attribute \Noinferiors which indicates that
  118. no child mailboxes exist now and none can be created in the future.
  119. The \HasChildren and \HasNoChildren attributes might not be returned
  120. in response to a LSUB response. Many servers maintain a simple
  121. mailbox subscription list that is not updated when the underlying
  122. mailbox structure is changed. A client MUST NOT assume that
  123. hierarchy information will be maintained in the subscription list.
  124. RLIST is a command defined in [RFC-2193] that includes in a LIST
  125. response mailboxes that are accessible only via referral. That is, a
  126. client must explicitly issue an RLIST command to see a list of these
  127. mailboxes. Thus in the case where a mailbox has child mailboxes that
  128. are available only via referral, the mailboxes would appear as
  129. \HasNoChildren in response to the LIST command, and \HasChildren in
  130. response to the RLIST command.
  131. 5. Formal Syntax
  132. The following syntax specification uses the augmented Backus-Naur
  133. Form (BNF) as described in [ABNF].
  134. Two new mailbox attributes are defined as flag_extensions to the
  135. IMAP4 mailbox_list response:
  136. HasChildren = "\HasChildren"
  137. HasNoChildren = "\HasNoChildren"
  138. 6. Security Considerations
  139. This extension provides a client a more efficient means of
  140. determining whether a particular mailbox has children. If a mailbox
  141. has children, but the currently authenticated user does not have
  142. access to any of them, the server SHOULD respond with a
  143. \HasNoChildren attribute. In many cases, however, a server may not
  144. be able to efficiently compute whether a user has access to all child
  145. mailboxes. If such a server responds with a \HasChildren attribute,
  146. when in fact the currently authenticated user does not have access to
  147. any child mailboxes, potentially more information is conveyed about
  148. the mailbox than intended. A server designed with such levels of
  149. security in mind SHOULD NOT attach the \HasChildren attribute to a
  150. mailbox unless the server is certain that the user has access to at
  151. least one of the child mailboxes.
  152. Gahrns, et al. Informational [Page 4]
  153. RFC 3348 IMAP4 Child Mailbox Extension July 2002
  154. 7. References
  155. [RFC-2060] Crispin, M., "Internet Message Access Protocol - Version
  156. 4rev1", RFC 2060, December 1996.
  157. [RFC-2119] Bradner, S., "Key words for use in RFCs to Indicate
  158. Requirement Levels", BCP 14, RFC 2119, March 1997.
  159. [RFC-2234] Crocker, D. and P. Overell, Editors, "Augmented BNF for
  160. Syntax Specifications: ABNF", RFC 2234, November 1997.
  161. [RFC-2193] Gahrns, M., "IMAP4 Mailbox Referrals", RFC 2193, September
  162. 1997.
  163. 8. Acknowledgments
  164. The authors would like to thank the participants of several IMC Mail
  165. Connect events for their input when this idea was originally
  166. presented and refined.
  167. 9. Author's Address
  168. Mike Gahrns
  169. Microsoft
  170. One Microsoft Way
  171. Redmond, WA, 98052
  172. Phone: (425) 936-9833
  173. EMail: mikega@microsoft.com
  174. Raymond Cheng
  175. Microsoft
  176. One Microsoft Way
  177. Redmond, WA, 98052
  178. Phone: (425) 703-4913
  179. EMail: raych@microsoft.com
  180. Gahrns, et al. Informational [Page 5]
  181. RFC 3348 IMAP4 Child Mailbox Extension July 2002
  182. 10. Full Copyright Statement
  183. Copyright (C) The Internet Society (2002). All Rights Reserved.
  184. This document and translations of it may be copied and furnished to
  185. others, and derivative works that comment on or otherwise explain it
  186. or assist in its implementation may be prepared, copied, published
  187. and distributed, in whole or in part, without restriction of any
  188. kind, provided that the above copyright notice and this paragraph are
  189. included on all such copies and derivative works. However, this
  190. document itself may not be modified in any way, such as by removing
  191. the copyright notice or references to the Internet Society or other
  192. Internet organizations, except as needed for the purpose of
  193. developing Internet standards in which case the procedures for
  194. copyrights defined in the Internet Standards process must be
  195. followed, or as required to translate it into languages other than
  196. English.
  197. The limited permissions granted above are perpetual and will not be
  198. revoked by the Internet Society or its successors or assigns.
  199. This document and the information contained herein is provided on an
  200. "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  201. TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  202. BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  203. HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  204. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  205. Acknowledgement
  206. Funding for the RFC Editor function is currently provided by the
  207. Internet Society.
  208. Gahrns, et al. Informational [Page 6]