7Internet Engineering Task Force (IETF)                      K. Murchison
 
8Request for Comments: 8440                                   B. Gondwana
 
9Category: Standards Track                                       FastMail
 
10ISSN: 2070-1721                                              August 2018
 
13  IMAP4 Extension for Returning MYRIGHTS Information in Extended LIST
 
17   This document defines an extension to the Internet Message Access
 
18   Protocol (IMAP) LIST command that allows the client to request the
 
19   set of rights that the logged-in user has been granted on mailboxes,
 
20   along with other information typically returned by the LIST command.
 
24   This is an Internet Standards Track document.
 
26   This document is a product of the Internet Engineering Task Force
 
27   (IETF).  It represents the consensus of the IETF community.  It has
 
28   received public review and has been approved for publication by the
 
29   Internet Engineering Steering Group (IESG).  Further information on
 
30   Internet Standards is available in Section 2 of RFC 7841.
 
32   Information about the current status of this document, any errata,
 
33   and how to provide feedback on it may be obtained at
 
34   https://www.rfc-editor.org/info/rfc8440.
 
38   Copyright (c) 2018 IETF Trust and the persons identified as the
 
39   document authors.  All rights reserved.
 
41   This document is subject to BCP 78 and the IETF Trust's Legal
 
42   Provisions Relating to IETF Documents
 
43   (https://trustee.ietf.org/license-info) in effect on the date of
 
44   publication of this document.  Please review these documents
 
45   carefully, as they describe your rights and restrictions with respect
 
46   to this document.  Code Components extracted from this document must
 
47   include Simplified BSD License text as described in Section 4.e of
 
48   the Trust Legal Provisions and are provided without warranty as
 
49   described in the Simplified BSD License.
 
58Murchison & Gondwana         Standards Track                    [Page 1]
 
60RFC 8440                   IMAP LIST-MYRIGHTS                August 2018
 
65   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
 
66   2.  Conventions Used in This Document . . . . . . . . . . . . . .   2
 
67   3.  MYRIGHTS Return Option to LIST Command  . . . . . . . . . . .   2
 
68   4.  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . .   3
 
69   5.  Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . .   4
 
70   6.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
 
71   7.  Privacy Considerations  . . . . . . . . . . . . . . . . . . .   4
 
72   8.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   4
 
73     8.1.  Registration of IMAP Capability LIST-MYRIGHTS . . . . . .   4
 
74     8.2.  Registration of LIST-EXTENDED Option MYRIGHTS . . . . . .   4
 
75   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   5
 
76     9.1.  Normative References  . . . . . . . . . . . . . . . . . .   5
 
77     9.2.  Informative References  . . . . . . . . . . . . . . . . .   6
 
78   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .   6
 
79   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   6
 
83   IMAP [RFC3501] clients typically fetch the set of rights granted on
 
84   mailboxes so they can expose the allowed functionality to the logged-
 
85   in user.  In order to do that, the client is forced to issue a LIST
 
86   or LSUB command to list all available mailboxes, followed by a
 
87   MYRIGHTS command for each mailbox found.  This document defines an
 
88   extension to the to IMAP LIST command that is identified by the
 
89   capability string "LIST-MYRIGHTS".  The LIST-MYRIGHTS extension
 
90   allows the client to request the set of rights that the logged-in
 
91   user has been granted on mailboxes, along with other information
 
92   typically returned by the LIST command.
 
942.  Conventions Used in This Document
 
96   In examples, "C:" indicates lines sent by a client that is connected
 
97   to a server.  "S:" indicates lines sent by the server to the client.
 
99   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
 
100   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
 
101   "OPTIONAL" in this document are to be interpreted as described in
 
102   BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
 
103   capitals, as shown here.
 
1053.  MYRIGHTS Return Option to LIST Command
 
107   [RFC4314] defines the MYRIGHTS command, which is used by an IMAP
 
108   client to determine the set of rights that the logged-in user has
 
109   been granted on a given mailbox.  Frequently, a client will have to
 
110   look up the rights for some or all of the mailboxes returned by the
 
114Murchison & Gondwana         Standards Track                    [Page 2]
 
116RFC 8440                   IMAP LIST-MYRIGHTS                August 2018
 
119   LIST command.  Doing so in multiple MYRIGHTS commands wastes
 
120   bandwidth and can degrade performance if the client does not pipeline
 
123   This document extends the LIST command with a new "MYRIGHTS" return
 
124   option [RFC5258] that allows the client to request all of the desired
 
125   information in a single command.  For each listable mailbox matching
 
126   the list pattern and selection options, the server MUST return an
 
127   untagged LIST response and SHOULD also return an untagged MYRIGHTS
 
128   response containing the set of rights granted to the logged-in user.
 
129   The ordering of the responses is significant only in that the server
 
130   MUST NOT send a MYRIGHTS response for a given mailbox before it sends
 
131   the LIST response for that mailbox.
 
133   If the server is unable to look up the set of rights for a given
 
134   mailbox, it does not send the MYRIGHTS reply for that mailbox.
 
136   Client authors ought to note that generating the MYRIGHTS responses
 
137   for a large number of mailboxes may be an expensive operation for the
 
138   server.  Clients SHOULD use a suitable match pattern and/or selection
 
139   option to limit the set of mailboxes returned to only those in whose
 
140   rights they are interested.
 
144   In this example, the "bar" mailbox doesn't exist, so it has no
 
147   C: A01 LIST "" % RETURN (MYRIGHTS)
 
148   S: * LIST () "." "INBOX"
 
149   S: * MYRIGHTS "INBOX" lrswipkxtecda
 
150   S: * LIST () "." "foo"
 
151   S: * MYRIGHTS "foo" lrs
 
152   S: * LIST (\NonExistent) "." "bar"
 
153   S: A01 OK List completed.
 
155   In this example, the LIST reply for the "foo" mailbox is returned
 
156   because it has matching children, but no MYRIGHTS reply is returned,
 
157   because "foo" itself doesn't match the selection criteria.
 
159   C: A02 LIST (SUBSCRIBED RECURSIVEMATCH) "" % RETURN (MYRIGHTS)
 
160   S: * LIST (\Subscribed) "." "INBOX"
 
161   S: * MYRIGHTS "INBOX" lrswipkxtecda
 
162   S: * LIST () "." "foo" (CHILDINFO ("SUBSCRIBED"))
 
163   S: A02 OK List completed.
 
170Murchison & Gondwana         Standards Track                    [Page 3]
 
172RFC 8440                   IMAP LIST-MYRIGHTS                August 2018
 
177   The following syntax specification uses the augmented Backus-Naur
 
178   Form (BNF) as described in [RFC5234].  Terms not defined here are
 
179   taken from [RFC5258].
 
181   return-option =/ "MYRIGHTS"
 
1836.  Security Considerations
 
185   In addition to the security considerations described in [RFC4314],
 
186   this extension makes it a bit easier for clients to overload the
 
187   server by requesting MYRIGHTS information for a large number of
 
188   mailboxes.  However, as noted in the introduction, existing clients
 
189   already try to do that by generating a large number of MYRIGHTS
 
190   commands for each mailbox in which they are interested.  While
 
191   performing MYRIGHTS information retrieval for big lists of mailboxes,
 
192   a server implementation needs to make sure that it can still serve
 
193   other IMAP connections and yield execution to other connections, when
 
1967.  Privacy Considerations
 
198   This specification does not introduce any additional privacy concerns
 
199   beyond those described in [RFC4314].
 
2018.  IANA Considerations
 
2038.1.  Registration of IMAP Capability LIST-MYRIGHTS
 
205   This document defines the "LIST-MYRIGHTS" IMAP capability that has
 
206   been added to the "IMAP Capabilities" registry [CAPABILITIES].
 
2088.2.  Registration of LIST-EXTENDED Option MYRIGHTS
 
210   This section registers the "MYRIGHTS" option that has been added to
 
211   the "LIST-EXTENDED options" registry [EXTENDED].
 
213   LIST-EXTENDED option name:  MYRIGHTS
 
215   LIST-EXTENDED option type:  RETURN
 
217   LIST-EXTENDED option description:  Causes the LIST command to return
 
218      MYRIGHTS responses in addition to LIST responses.
 
220   Published specification:  RFC 8440, Section 3
 
222   Security considerations:  RFC 8440, Section 6
 
226Murchison & Gondwana         Standards Track                    [Page 4]
 
228RFC 8440                   IMAP LIST-MYRIGHTS                August 2018
 
231   Intended usage:  COMMON
 
233   Person and email address to contact for further information:
 
234      Kenneth Murchison <murch@fastmailteam.com>
 
236   Owner/Change controller:  IESG <iesg@ietf.org>
 
2409.1.  Normative References
 
243              IANA, "Internet Message Access Protocol (IMAP)
 
244              Capabilities Registry", <https://www.iana.org/assignments/
 
245              imap-capabilities/imap-capabilities>.
 
248              IANA, "Internet Message Access Protocol (IMAP) LIST
 
250              <https://www.iana.org/assignments/imap-list-extended>.
 
252   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
 
253              Requirement Levels", BCP 14, RFC 2119,
 
254              DOI 10.17487/RFC2119, March 1997,
 
255              <https://www.rfc-editor.org/info/rfc2119>.
 
257   [RFC3501]  Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
 
258              4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003,
 
259              <https://www.rfc-editor.org/info/rfc3501>.
 
261   [RFC4314]  Melnikov, A., "IMAP4 Access Control List (ACL) Extension",
 
262              RFC 4314, DOI 10.17487/RFC4314, December 2005,
 
263              <https://www.rfc-editor.org/info/rfc4314>.
 
265   [RFC5234]  Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
 
266              Specifications: ABNF", STD 68, RFC 5234,
 
267              DOI 10.17487/RFC5234, January 2008,
 
268              <https://www.rfc-editor.org/info/rfc5234>.
 
270   [RFC5258]  Leiba, B. and A. Melnikov, "Internet Message Access
 
271              Protocol version 4 - LIST Command Extensions", RFC 5258,
 
272              DOI 10.17487/RFC5258, June 2008,
 
273              <https://www.rfc-editor.org/info/rfc5258>.
 
275   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
 
276              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
 
277              May 2017, <https://www.rfc-editor.org/info/rfc8174>.
 
282Murchison & Gondwana         Standards Track                    [Page 5]
 
284RFC 8440                   IMAP LIST-MYRIGHTS                August 2018
 
2879.2.  Informative References
 
289   [RFC5819]  Melnikov, A. and T. Sirainen, "IMAP4 Extension for
 
290              Returning STATUS Information in Extended LIST", RFC 5819,
 
291              DOI 10.17487/RFC5819, March 2010,
 
292              <https://www.rfc-editor.org/info/rfc5819>.
 
296   This document is based largely on [RFC5819].  The authors would like
 
297   to thank the authors of that document for providing both inspiration
 
298   and some borrowed text for this document.  The authors would also
 
299   like to thank Barry Leiba for contributing his ideas and support for
 
300   writing this specification.
 
306   Level 2, 114 William Street
 
310   Email: murch@fastmailteam.com
 
315   Level 2, 114 William Street
 
319   Email: brong@fastmailteam.com
 
338Murchison & Gondwana         Standards Track                    [Page 6]