idnits 2.17.1 draft-ietf-imapext-acl-09.txt: ** The Abstract section seems to be numbered Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity. ** The document is more than 15 pages and seems to lack a Table of Contents. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 1) being 1348 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 226 instances of too long lines in the document, the longest one being 19 characters in excess of 72. ** The abstract seems to contain references ([IMAP4]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (August 2003) is 7559 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'EXT' is mentioned on line 727, but not defined == Missing Reference: 'UNSEEN 12' is mentioned on line 1087, but not defined == Missing Reference: 'UIDVALIDITY 3857529045' is mentioned on line 1088, but not defined == Missing Reference: 'UIDNEXT 4392' is mentioned on line 1089, but not defined == Unused Reference: 'UTF-8' is defined on line 1112, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2234 (ref. 'ABNF') (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 3501 (ref. 'IMAP4') (Obsoleted by RFC 9051) ** Obsolete normative reference: RFC 2279 (ref. 'UTF-8') (Obsoleted by RFC 3629) == Outdated reference: A later version (-18) exists of draft-ietf-imapext-list-extensions-02 Summary: 11 errors (**), 0 flaws (~~), 9 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 IMAPEXT Working Group A. Melnikov 2 Internet Draft Editor 3 Document: draft-ietf-imapext-acl-09.txt August 2003 5 IMAP4 ACL extension 7 Status of this Memo 9 This document is an Internet Draft and is in full conformance with 10 all provisions of Section 10 of RFC 2026. 12 Internet Drafts are working documents of the Internet Engineering 13 Task Force (IETF), its Areas, and its Working Groups. Note that 14 other groups may also distribute working documents as Internet 15 Drafts. Internet Drafts are draft documents valid for a maximum of 16 six months. Internet Drafts may be updated, replaced, or obsoleted 17 by other documents at any time. It is not appropriate to use 18 Internet Drafts as reference material or to cite them other than as 19 ``work in progress''. 21 The list of current Internet-Drafts can be accessed at 22 http://www.ietf.org/ietf/1id-abstracts.txt 24 The list of Internet-Draft Shadow Directories can be accessed at 25 http://www.ietf.org/shadow.html. 27 Directories on ds.internic.net, nic.nordu.net, ftp.isi.edu, or 28 munnari.oz.au. 30 A revised version of this draft document will be submitted to the RFC 31 editor as a Proposed Standard for the Internet Community. Discussion 32 and suggestions for improvement are requested. Distribution of this 33 draft is unlimited. 35 0. Open issues and ToDo list 37 This section will be removed when the draft will be published as RFC. 38 It is intended to simplify discussion. 40 1). Require support for special identifier "disabled" for 41 "ACL2=MOST-SPECIFIC" model? Can the same result be achieved with 42 ? 44 2). Do we need a special command for inserting at 45 any position (this is meaningless for the MOST-SPECIFIC model only). 47 3). IANA registry for prefix in identifiers? 49 4). Do we need the following functionality: discover the set of rights 50 which may be granted to a given identifier in the ACL for a given 51 mailbox? 53 5). Cleanup appendix A before publication as RFC, as some changes don't 54 apply to RFC 2086. 56 6). Other editorial comments/questions are enclosed in << and >>. 58 Table of Contents 59 1 Abstract .................................................. X 60 2 Conventions Used in this Document ......................... X 61 3 Introduction and Overview ................................. X 62 3.1 Access Control ........................................... X 63 3.2 Access calculation model ................................. X 64 3.3 Rights required to perform different IMAP4rev1 commands .. X 65 4 ACL manipulation commands ................................. X 66 4.1 ACL STORE ................................................ X 67 4.2 ACL DELETE ............................................... X 68 4.3 ACL SET .................................................. X 69 4.4 LIST with the ACL parameter .............................. X 70 4.5 LIST with the MYRIGHTS parameter ......................... X 71 4.6 LIST with the POSTADDRESS parameter ...................... X 72 5 ACL related responses ..................................... X 73 5.1 Extended LIST response with ACL information .............. X 74 5.2 RIGHTS-INFO .............................................. X 75 5.3 ACLFAILED untagged response .............................. X 76 5.4 Extended LIST response with MYRIGHTS information ......... X 77 5.5 Extended LIST response with POSTADDRESS information ...... X 78 5.6 MYRIGHTS response code ................................... X 79 6 Formal Syntax ............................................. X 80 7 IANA considerations ....................................... X 81 7.1 ACL access calculation rule Registration Template ........ X 82 7.2 Initial Registrations .................................... X 83 7.2.1 Registration: UNION access calculation rule ............ X 84 7.2.2 Registration: MOST-SPECIFIC access calculation rule .... X 85 8 Security Considerations ................................... X 86 9 Other considerations ...................................... X 87 9.1 Compatibility with RFC 2086 .............................. X 88 9.2 Mapping of ACL rights to READ-WRITE and READ-ONLY 89 response codes ........................................... X 90 9.4 Additional requirements and Implementation notes ......... X 91 10 Normative References ..................................... X 92 11 Informative References ................................... X 93 12 Aknowledgement ........................................... X 94 13 Editor's Address ......................................... X 95 14 Full Copyright Statement ................................. X 97 1. Abstract 99 The ACL (Access Control List) extension of the Internet Message Access 100 Protocol [IMAP4] permits mailbox access control lists to be manipulated 101 through the IMAP protocol. 103 2. Conventions Used in this Document 105 In examples, "C:" and "S:" indicate lines sent by the client and 106 server respectively. 108 In all examples "/" character is used as hierarchy separator. 110 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 111 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 112 document are to be interpreted as described in RFC 2119 [KEYWORDS]. 114 3. Introduction and Overview 116 The ACL (Access Control List) extension of the Internet Message Access 117 Protocol [IMAP4] permits mailbox access control lists to be retrieved 118 and manipulated through the IMAP protocol. 120 The ACL extension is present in any IMAP4 implementation which 121 returns a capability starting with "ACL2=" prefix as one of the 122 supported capabilities to the CAPABILITY command. The prefix is 123 followed by "rule identifier" as described in 7.1. 125 The document contains the following parts: section 3.1 provides the 126 definition of different classes of identifiers and defines standard 127 rights; section 3.2 introduces access calculation model, i.e. it 128 describes how to calculate from an ACL which rigths apply to a particular 129 user; section 3.3 summarizes relationship of different access rights with 130 IMAP commands; section 4 introduces new IMAP commands the client can use 131 to manipulate ACLs; section 5 defines new ACL related responses; and 132 section 9 lists important considerations for compatibility with [IMAP4], 133 RFC 2086 and some IMAP extensions. 135 3.1. Access Control 137 An access control list is an ordered list of pairs. 138 An ACL applies to a mailbox. 140 Identifier is a UTF-8 string. An identifier may have one of the following 141 forms: 142 a). "anonymous" - special group that refers to the universal identity 143 (all authentications, including anonymous). A special identifier 144 "anyone" is a synonym for the "anonymous". 145 b). "authuser" - special group that refer to all authenticated users, 146 but not anonymous. 147 c). "owner" - special user identifier that refers to the owner of a mailbox 148 (if any). 149 d). "administrators" - special group that refers to all users with 150 administrative rights for the server. 151 e). "user=" - refers to a user. Here "" is a user name 152 string accepted by the LOGIN or AUTHENTICATE commands. 153 f). "group=" - refers to a group. Here "" is a group 154 name. 155 g). "vendor=." - refers to a vendor specific special 156 identifier, not covered by a).-f). 157 h). "-", where is one of a).-g). This is 158 reserved for "negative rights", described below. 160 Note, that a server is not required to implement any special identifier mentioned 161 above. However if it allows a user to perform ACL operations on any one of them, 162 server MUST use the semantic as described above. 164 Also note, that this document doesn't define how groups and administrators 165 are managed. 167 All other identifier names are reserved for future definition in an 168 extension or revision to this specification (also known as ACL2). 170 Rights is a string listing a (possibly empty) set of alphanumeric 171 characters, each character listing a set of operations which is being 172 controlled. Letters are reserved for ''standard'' rights, listed 173 below. The set of standard rights may only be extended by a 174 standards-track document. Digits are reserved for implementation or 175 site defined rights. The currently defined standard rights are: 177 l - lookup (mailbox is visible to LIST/LSUB commands, SUBSCRIBE mailbox) 178 r - read (SELECT the mailbox, perform STATUS, CHECK, FETCH, SEARCH, 179 COPY from mailbox) 180 s - keep seen/unseen information across sessions (set or clear \SEEN flag 181 via STORE, APPEND or COPY) 182 w - write (set or clear flags other than \SEEN and \DELETED via STORE, 183 APPEND or COPY) 184 i - insert (perform APPEND, COPY into mailbox) 185 p - post (send mail to submission address for mailbox, 186 not enforced by IMAP4 itself. LIST (POSTADDRESS) command can be used 187 to get an email address, that can be used for posting to the mailbox, 188 if one exist) 189 c - create mailboxes (CREATE new sub-mailboxes in any 190 implementation-defined hierarchy, parent mailbox for the new 191 mailbox name in RENAME) 192 When a new mailbox is created it SHOULD inherit rights from 193 the parent mailbox (if one exists) in the defined hierarchy. 194 x - delete mailbox (DELETE mailbox, old mailbox name in RENAME) 195 t - delete messages (set or clear \DELETED flag via STORE, set \DELETED flag 196 during APPEND/COPY) 197 e - perform EXPUNGE and expunge as a part of CLOSE 198 d - This right is defined for backward compatibility with ACL 199 extension (RFC 2086). If a client sets "d" right, the server MUST 200 set "x", "e" and "t" rights. When the client clears the "d" right, 201 the server MUST clear "x", "e" and "t" rights. When all three of "x", 202 "e" and "t" are set, the server MUST return "d" right in response to 203 a LIST (ACL) command. If "x", "e" and "t" rights are not tied together, 204 "d" right MUST NOT be returned in a RIGHTS-INFO response. 205 a - administer (perform ACL STORE, ACL SET and ACL DELETE) 207 An implementation may tie rights together or may force rights to 208 always or never be granted to particular identifiers. For example, 209 in an implementation that uses unix mode bits, the rights "swite" are 210 tied, the "a" right is always granted to the owner of a mailbox and 211 is never granted to another user. If rights are tied in an 212 implementation, the implementation must be conservative in granting 213 rights in response to ACL STORE commands--unless all rights in a tied 214 set are specified, none of that set should be included in the ACL 215 entry for that identifier. If the server fails an ACL modification 216 command (ACL STORE or ACL SET) because some rights are tied, it MUST 217 return RIGHTS-INFO untagged response (see section 5.2). 219 When an identifier in an ACL starts with a dash ("-"), that indicates 220 that associated rights are to be removed from the identifier that is 221 prefixed by the dash. This is referred to as a "negative right". 222 This differs from ACL DELETE in that a negative right is added to the 223 ACL, and is part of the calculation of the rights. 225 For example, if the identifier "-user=fred" is granted the "w" right, 226 that indicates that the "w" right is to be removed from users matching 227 the identifier "user=fred", even though the user "fred" might have 228 the "w" right as a consequence of some other identifier in the ACL. 229 A ACL DELETE of "user=fred" simply deletes the identifier "user=fred" 230 from the ACL; it does not affect any rights that the user "fred" 231 may get from another ACL. 233 Server implementations are not required to support "negative right" 234 identifiers. 236 3.2. Access calculation model 238 It is possible for multiple identifiers in an access control list to 239 apply to a given user (or other authentication identity). For 240 example, an ACL may include rights to be granted to the identifier 241 matching the user, one or more implementation-defined identifiers 242 matching groups which include the user, and/or the identifier 243 "anyone". How these rights are combined to determine the user's 244 access is implementation-defined. The set of rules that describes 245 how access is calculated is defined by a rule identifier (rule-ID). 246 This document doesn't define any commands for manipulating a group 247 membership. 249 A client may determine the set of rights granted to the logged-in user 250 for a given mailbox by using the LIST (MYRIGHTS) command. 252 This document defines two initial access calculation models: UNION and 253 MOST-SPECIFIC. 255 If a server implementing ACL2 uses the union of the rights granted to 256 the applicable identifiers minus the union of the negative rights 257 in order to calculate access, it MUST report "ACL2=UNION" in the server's 258 capability list. See also section 7.2.1. 260 An implementation may instead choose to only use those rights granted 261 to the most specific identifier present in the ACL. In this case the 262 server MUST report "ACL2=MOST-SPECIFIC" in the server's capability 263 list. See also section 7.2.2. 265 If the server implements any other policy for rights calculation, 266 it MUST be either registered with IANA using the template provided in 7.1 267 or start with "X-". The server MUST report one and only one "ACL2=" 268 capability in its CAPABILITY response. 270 3.3. Rights required to perform different IMAP4rev1 commands 272 Before executing a command an ACL2 compliant server must check which rights 273 are required to perform it. This section groups command by functions 274 they perform and list the rights required. It also gives the detailed 275 description of any special processing required. 277 The table below summarizes different rights or their combinations that are 278 required in order to perform different IMAP operations. As it is not always 279 possible to express complex right checking and interactions, the description 280 after the table should be used as the primary reference. 282 +---------------------+---+---+---+---+---+---+---+---+---+---+-----+------+ 283 | Operations\Rights | l | r | s | w | i | c | x | t | e | a | Any | None | 284 +---------------------+---+---+---+---+---+---+---+---+---+---+-----+------+ 285 | LIST | + | | | | | | | | | | | | 286 | SUBSCRIBE | * | | | | | | | | | | | * | 287 | UNSUBSCRIBE | | | | | | | | | | | | + | 288 | LSUB | * | | | | | | | | | | | * | 289 | CREATE (for parent) | | | | | | + | | | | | | | 290 | DELETE | | | | | | | + | | | | | | 291 | RENAME | | | | | | + | + | | | | | | 292 | COPY/APPEND | | | ? | ? | + | | | ? | | | | | 293 | EXPUNGE/CLOSE | | | | | | | | | + | | | | 294 |SELECT/EXAMINE/STATUS| | | | | | | | | | | | | 295 | FETCH | | | ? | | | | | | | | | | 296 | STORE flags | | | ? | ? | | | | ? | | | | | 297 |ACL STORE/DELETE/SET | ? | | | | | | | | | + | | | 298 | LIST (ACL) | ? | | | | | | | | | + | | | 299 | LIST (MYRIGHTS)| | | | | | | | | | | + | | 300 +---------------------+---+---+---+---+---+---+---+---+---+---+-----+------+ 302 Legend: 303 + - The right is required 304 * - Only one of the rights marked with * is required (see description below) 305 ? - The right is optional (see description below) 306 "Any" - at least one of the "l", "r", "i", "c", "x", "e", "a" rights is 307 required 308 "None" - No rights required to perform the command 310 Listing and subscribing/unsubscribing mailboxes: 311 LIST - "l" right is required. 313 Note, that if the user has "l" right to a mailbox "A/B", but not to its parent 314 mailbox "A", the LIST command should behave as if the mailbox "A" doesn't exist, 315 for example: 316 C: A777 LIST "" * 317 S: * LIST (\NoInferiors) "/" "A/B" 318 S: * LIST () "/" "C" 319 S: * LIST (\NoInferiors) "/" "C/D" 320 S: A777 OK LIST completed 322 SUBSCRIBE - "l" right is required only if the server checks for mailbox existence 323 when performing SUBSCRIBE. 325 UNSUBSCRIBE - no rights required to perform this operation. 327 LSUB - "l" right is required only if the server checks for mailbox existence when 328 performing SUBSCRIBE. 330 Mailbox management: 331 CREATE - "c" right on a nearest existing parent mailbox. When a new mailbox 332 is created it SHOULD inherit rights from the parent mailbox 333 (if one exists) in the defined hierarchy. 335 DELETE - "x" right on the mailbox. 337 RENAME - Moving a mailbox from one parent to another 338 requires "x" right on the mailbox itself and "c" right for the new parent. 339 For example, if the user wants to rename mailbox named "A/B/C" 340 to "D/E", the user must have "x" right 341 for the mailbox "A/B/C" and "c" right for the mailbox "D". 343 Copying or appending messages: 345 Before performing a COPY/APPEND command the server MUST check if the user has "i" right 346 for the target mailbox. If the user doesn't have "i" right, the operation fails. 347 Otherwise for each copied/appended message the server MUST check if the user has 348 "t" right - when the message has \Deleted flag set 349 "s" right - when the message has \Seen flag set 350 "w" right for all other message flags. 351 Only when the user has a particular right the corresponding flags are stored for the 352 newly created message. The server MUST NOT fail a COPY/APPEND if the user has no rights 353 to set a particular flag. 355 Example: C: A003 LIST (MYRIGHTS) "" TargetMailbox 356 S: * LIST () "/" TargetMailbox (("MYRIGHTS" "rwis")) 357 S: A003 OK Myrights complete 359 C: A004 FETCH 1:3 (FLAGS) 360 S: * 1 FETCH (FLAGS (\Draft \Deleted) 361 S: * 2 FETCH (FLAGS (\Answered) 362 S: * 3 FETCH (FLAGS ($Forwarded \Seen) 363 S: A004 OK Fetch Completed 365 C: A005 COPY 1:3 TargetMailbox 366 S: A005 OK Copy completed 368 C: A006 SELECT TargetMailbox 369 ... 370 S: A006 Select Completed 372 Let's assume that the copied messages received message numbers 77:79. 374 C: A007 FETCH 77:79 (FLAGS) 375 S: * 77 FETCH (FLAGS (\Draft) 376 S: * 78 FETCH (FLAGS (\Answered) 377 S: * 79 FETCH (FLAGS ($Forwarded \Seen) 378 S: A007 OK Fetch Completed 380 \Deleted flag was lost on COPY, as the user has no "t" right in the 381 target mailbox. 383 If the LIST (MYRIGHT) command with the tag A003 would have returned: 384 S: * LIST () "/" TargetMailbox (("MYRIGHTS" "rsti")) 386 the response from the FETCH with the tag A007 would have been: 388 C: A007 FETCH 77:79 (FLAGS) 389 S: * 77 FETCH (FLAGS (\Deleted) 390 S: * 78 FETCH (FLAGS () 391 S: * 79 FETCH (FLAGS (\Seen) 392 S: A007 OK Fetch Completed 394 In the latter case \Answered, $Forwarded and \Draft flags were lost 395 on COPY, as the user has no "w" right in the target mailbox. 397 Expunging the selected mailbox: 398 EXPUNGE - "e" right on the selected mailbox. 400 CLOSE - "e" right on the selected mailbox. If the server is unable to 401 expunge the mailbox because the user doesn't have the "e" right, 402 the server MUST ignore expunge request, close the mailbox 403 and return tagged OK response. 405 Fetch information about a mailbox and its messages: 406 SELECT/EXAMINE/STATUS - "r" right on the mailbox. 408 FETCH - A FETCH request that implies setting \Seen flag MUST NOT set it, 409 if the current user doesn't have "s" right. 411 Changing flags: 412 STORE - the server MUST check if the user has 413 "t" right - when the user modifies \Deleted flag 414 "s" right - when the user modifies \Seen flag 415 "w" right for all other message flags. 416 STORE operation SHOULD NOT fail if the user has rights to modify at least 417 one flag specified in the STORE. 419 Changing ACLs: 420 ACL STORE/DELETE/SET - "a" right on the mailbox (*). 422 Reading ACLs: 423 LIST (ACL) - "a" right on the mailbox (*). 425 LIST (MYRIGHTS) - any of the following rights is required to perform 426 the operation: "l", "r", "i", "c", "x", "e", "a". 428 (*) Note, that when one or more mailbox pattern is specified, 429 'l' right is required for each mailbox matching the mailbox pattern(s). 431 4. ACL manipulation commands 433 All ACL commands (i.e. ACL STORE/DELETE/SET) 434 accept either a single mailbox name or several mailbox patterns as a 435 parameter. Mailbox pattern is a mailbox with wildcards, wildcards are 436 interpreted as described in [IMAP4] LIST command. In order to distinguish 437 between a mailbox name (that is allowed to have wildcard characters '*' 438 and '%') and a mailbox pattern, the latter is always represented as a 439 parenthesized list. 441 For simplicity the behaviour of ACL STORE/DELETE/SET commands 442 is described for a single mailbox case. When one or more mailbox pattern 443 is specified, the server internally performs LIST command for all specified 444 patterns and than it combines the results. Note, that only mailboxes for 445 which the user has 'l' right are included in the combined result. If the 446 combined result has no mailboxes, an ACL operation completes with success 447 and the tagged OK response is sent. Otherwise the requested operation is 448 performed for each mailbox in the combined result. If a particular mailbox 449 causes the operation to fail (e.g. insufficient permissions), instead of 450 failing the whole command, an untagged ACLFAILED or RIGHTS-INFO response 451 is sent for this mailbox and the operation continues for the rest of the 452 mailboxes. If the server knows that the operation will fail in the same 453 manner for all matching mailboxes (e.g. user doesn't exist), it SHOULD 454 return tagged NO response instead of sending several untagged ACLFAILED 455 responses. 457 Example: 459 In the example below ACL SET command fails for 2 mailboxes 460 "Personal/Jokes" and "Personal/Deaf and Blind". For the latter a human 461 readable error description is returned. Also, the ACL for the mailbox 462 "Personal/Secret" was updated to include the "r" right for a user 463 "user=Boss" as a side effect of the ACL SET command (see also 4.3). 465 C: A002 ACL SET (INBOX Personal/*) user=Fred rwist 466 S: * ACLFAILED Personal/Jokes 467 S: * ACLFAILED "Personal/Deaf and Blind" Temporary Error 468 S: * LIST () "/" Personal/Secret (("ACL" (("user=Boss" "r")))) 469 S: A002 OK acl set completed 471 Example: C: A002 ACL SET (Fruits/Apples/*) user=Zak lrs 472 S: A002 NO User Zak doesn't exist 474 4.1. ACL STORE 476 Arguments: mailbox name or one or more mailbox masks 477 authentication identifier 478 access right modification 480 Data: OPTIONAL untagged responses: LIST with ACL information (see 5.1) 482 Result: OK - ACL STORE completed 483 NO - ACL STORE failure: can't set acl 484 BAD - command unknown or arguments invalid 486 The ACL STORE command changes the access control list on the 487 specified mailbox so that the specified identifier is granted 488 permissions as specified in the third argument. 490 The third argument is a string containing an optional plus ("+") 491 or minus ("-") prefix, followed by zero or more rights characters. 492 If the string starts with a plus, the following rights are added 493 to any existing rights for the identifier. If the string starts 494 with a minus, the following rights are removed from any existing 495 rights for the identifier. If the string does not start with a 496 plus or minus, the rights replace any existing rights for the 497 identifier. The combined rights will be called the "resulting" rights. 499 If before execution of the command the identifier is not present 500 in the ACL, the pair is added to the end of 501 the ACL. Otherwise it replaces the rights for the identifier, 502 with the resulting rights. Note, that for the "ACL2=UNION" access 503 calculation model the rule MUST 504 be treated as . Also note that these 505 two commands don't have the same result for the "ACL2=MOST-SPECIFIC" 506 access calculation model. 508 An ACL2 server MAY modify one or more ACL for one or more identifier 509 ("additional modifications") as a side effect of modifying the ACL 510 specified in ACL STORE. For example, in some mail stores, a mailbox can 511 be a member of only one group. For such mailstore, doing an ACL STORE 512 that sets a different group from what is already in the ACL MAY have 513 the effect of doing an implicit ACL DELETE of the existing group's 514 identifier/rights pair. If the server does additional modification 515 it MUST send untagged LIST response with ACL information (see section 5.1) 516 to notify the client about the changes made. 518 If the server is unwilling to perform the command, because some rights 519 for the identifier are tied, it MUST return RIGHTS-INFO untagged response 520 (see section 5.2). 522 Example: C: A002 ACL STORE ~/Mail/saved user=smith cp 523 S: * RIGHTS-INFO ~/Mail/saved user=smith la r swi cdext p 524 S: A002 NO Acl store failed, some rights are tied 526 Client decides to grant both rights to the identifier: 528 C: A003 ACL STORE ~/Mail/saved user=smith cdextp 529 S: A003 OK Setacl complete 531 The following example demonstrates behaviour of a mail store that allows 532 a mailbox to be a member of only one group: 534 C: B001 LIST (ACL) "" INBOX 535 S: * LIST () "/" INBOX (("ACL" (("user=Fred" "rwipslextda") ( 536 "group=Devel" "rwipslt")))) 537 S: B001 OK List with acl info completed 538 C: B002 ACL STORE Inbox group=PSO rwipslte 539 S: * LIST () "/" INBOX (("ACL" (("user=Fred" "rwipslextda") ( 540 "group=PSO" "rwipslte")))) 541 S: B002 OK Setacl complete 543 4.2. ACL DELETE 545 Arguments: mailbox name or one or more mailbox masks 546 authentication identifier 548 Data: OPTIONAL untagged responses: LIST with ACL information (see 5.1) 550 Result: OK - ACL DELETE completed 551 NO - ACL DELETE failure: can't delete acl 552 BAD - command unknown or arguments invalid 554 The ACL DELETE command removes any pair for the 555 specified identifier from the access control list for the 556 specified mailbox. 558 An ACL2 server MAY modify one or more ACL for one or more identifier 559 as a side effect of modifying the ACL specified in ACL DELETE. If the 560 server does that it MUST send untagged LIST response with ACL information 561 (see section 5.1) to notify the client about the changes made. 563 4.3. ACL SET 565 Arguments: mailbox name or one or more mailbox masks 566 list of (authentication identifier, access rights) pairs 568 Data: OPTIONAL untagged responses: LIST with ACL information (see 5.1) 570 Result: OK - replaceacl completed 571 NO - replaceacl failure: can't replace acl 572 BAD - command unknown or arguments invalid 574 The ACL SET command replaces the access control list of the 575 specified mailbox with the one provided as the second parameter to 576 ACL SET. This command is semantically equivalent to the following 577 sequence of commands: 579 1). LIST (ACL) "" 580 2). For each (authentication identifier AID, access rights RD) pair returned 581 in the untagged LIST response that was caused by LIST (ACL), perform 582 ACL DELETE AID 583 3). For each (authentication identifier AIA, access rights RA) pair from 584 the second parameter of ACL SET perform 585 ACL STORE AIA RA 587 An ACL2 server MAY modify one or more ACL for one or more identifier 588 as a side effect of modifying the ACL specified in ACL SET. If the 589 server does that it MUST send untagged LIST response with ACL information 590 (see section 5.1) to notify the client about the changes made. 592 If the server is unwilling to perform the command, because some rights 593 for an identifier from the second list parameter are tied, it MUST 594 return RIGHTS-INFO untagged response (see section 5.2). 596 4.4. LIST with the ACL parameter 598 This document defines a new option ACL to the LIST command that requests 599 the server to return the corresponding ACLs for all mailboxes that 600 match the LIST mailbox name. The ACL option causes the server 601 to return LIST with the ACL information (see 5.1). 603 <> 605 Example: C: A002 LIST (ACL) "" INBOX 606 S: * LIST () "/" INBOX (("ACL" (("user=Fred" "rwipslextda")))) 607 S: A002 OK List with acl info completed 609 4.5. LIST with the MYRIGHTS parameter 611 This document defines a new option MYRIGHTS to the LIST command that requests 612 the server to return the set of rights that the user has to a mailbox, 613 that matches the LIST mailbox name. The MYRIGHTS option causes the server 614 to return LIST with MYRIGHTS information (see 5.4). 616 The user must have any of the following rights to perform this operation: 617 "l", "r", "i", "c", "x", "e", "a". 618 If the user doesn't have any right from the above list, the server 619 MUST behave as if the mailbox doesn't exist. 621 Example: C: A002 LIST (MYRIGHTS) "" INBOX 622 S: * LIST () "/" INBOX (("MYRIGHTS" "rwipsldexta")) 623 S: A002 OK List with acl info completed 625 4.6. LIST with the POSTADDRESS parameter 627 This document defines a new option POSTADDRESS to the LIST command that requests 628 the server to return an email address that can be used to post email to a mailbox, 629 that matches the LIST mailbox name. The POSTADDRESS option causes the server 630 to return LIST with POSTADDRESS information (see 5.5). 632 Example: C: A002 LIST (POSTADDRESS) "" INBOX 633 S: * LIST () "/" INBOX (("POSTADDRESS" "user1@example.com")) 634 S: A002 OK List with postaddress info completed 636 5. ACL related responses 638 5.1. Extended LIST response with ACL information 640 Contents: name attributes 641 hierarchy delimiter 642 mailbox name 643 ACL information (zero or more identifier rights pairs) 645 This version of LIST response occurs as a result of an LIST (ACL) command. 646 It MAY also occur as a result of ACL STORE/DELETE/SET. 647 The proposed syntax conforms to the syntax of an extended LIST response 648 as defined by mbox-list-extended ABNF element of [LISTEXT]. 650 The meaning of "name attributes" and "hierarchy delimiter" is described in 651 section 7.2.2 of [IMAP4]. Hierarchy delimiter is followed by a mailbox 652 name which this ACL applies to. This is followed by the extension part that 653 includes "ACL" tag followed by zero or more pairs of strings, each pair 654 contains the identifier followed by the set of rights that the identifier has. 656 <> 658 Example: S: * LIST () "/" INBOX (("ACL" (("user=Fred" "rwipslextda")))) 660 The example above shows that a user Fred is granted "rwipslextda" 661 rights to the mailbox "INBOX". 663 S: * LIST () ":" Drafts (("ACL" 664 (("user=Fred" "rwipslextda") ("group=Devel" "r")))) 666 The example above shows that a user Fred is granted "rwipslextda" 667 rights and a member of a group "Devel" is granted "r" right to 668 the mailbox "Drafts". 670 S: * LIST () NIL Manson (("ACL" NIL)) 672 The example above shows the mailbox "Manson" has an empty ACL. 674 5.2. RIGHTS-INFO 676 Data: mailbox name 677 identifier 678 required rights 679 list of optional rights 681 The RIGHTS-INFO response occurs as a result of a failed 682 ACL STORE or ACL SET command. The first two strings are 683 the mailbox name and identifier for which this rights list 684 applies. Following the identifier is a string containing 685 the (possibly empty) set of rights the identifier will always 686 be granted in the mailbox. 688 Following this are zero or more strings each containing a set of 689 rights the identifier may be granted in the mailbox. Rights 690 mentioned in the same string are tied together--either all must be 691 granted to the identifier in the mailbox or none may be granted. 693 The same right may not be listed more than once in the RIGHTS-INFO 694 response. 696 5.3. ACLFAILED untagged response 698 Contents: mailbox name 699 OPTIONAL response code and human readable text for failure 700 reason 702 The ACLFAILED response containing a mailbox name indicates that 703 the ACL operations failed for the specified mailbox. The reason for 704 failure may be described by the response code (if included). If 705 the command for the mailbox fails because some rights are tied, 706 the server MUST return RIGHTS-INFO response instead of ACLFAILED. 708 Example: C: A002 ACL SET (INBOX Personal/*) user=Fred rwist 709 S: * ACLFAILED Personal/ABC 710 S: A002 OK acl set complete 712 5.4. Extended LIST response with MYRIGHTS information 714 Contents: name attributes 715 hierarchy delimiter 716 mailbox name 717 MYRIGHTS information (list of rights) 719 This version of LIST response occurs as a result of a LIST (MYRIGHTS) 720 command. The proposed syntax conforms to the syntax of an extended 721 LIST response as defined by mbox-list-extended ABNF element of [LISTEXT]. 723 The meaning of "name attributes" and "hierarchy delimiter" is described in 724 section 7.2.2 of [IMAP4]. This is followed by the extension part that 725 includes "MYRIGHTS" tag followed by the set of rights that the user has. 727 <> 729 Example: S: * LIST () "/" Sent (("MYRIGHTS" "lrwiste")) 731 5.5. Extended LIST response with POSTADDRESS information 733 Contents: name attributes 734 hierarchy delimiter 735 mailbox name 736 email address for posting to the mailbox 738 This version of LIST response occurs as a result of a LIST (POSTADDRESS) 739 command. The proposed syntax conforms to the syntax of an extended 740 LIST response as defined by mbox-list-extended ABNF element of [LISTEXT]. 742 The meaning of "name attributes" and "hierarchy delimiter" is described in 743 section 7.2.2 of [IMAP4]. This is followed by the extension part that 744 includes "POSTADDRESS" tag followed by an email address that can be used 745 to post email to the mailbox. 747 Example: S: * LIST () "/" Sent (("POSTADDRESS" "user+Sent@imap.example.com")) 749 5.6. MYRIGHTS response code 751 Data: rights 753 The MYRIGHTS response code is sent in an untagged OK response 754 that results from SELECT/EXAMINE. Also this response code can be 755 sent at any time after opening a mailbox when the server detects 756 that the set of rights allowed for the logged in user has changed. 758 The MYRIGHTS response code is equivalent to the MYRIGHTS data returned 759 in an untagged LIST response for the selected mailbox. 761 6. Formal Syntax 763 Formal syntax is defined using ABNF [ABNF] as modified by [IMAP4]. 764 Non-terminals referenced but not defined below are as defined by 765 [IMAP4] or [LISTEXT]. 767 Except as noted otherwise, all alphabetic characters are 768 case-insensitive. The use of upper or lower case characters to 769 define token strings is for editorial clarity only. Implementations 770 MUST accept these strings in a case-insensitive fashion. 772 acl2_command = "ACL" SP acl2_subcommand | list 774 acl2_subcommand = replaceacl | deleteacl | updateacl 776 acl_list_data = "(" acl_list_tag SP acl_data ")" 777 ;; acl_list_data conforms to the syntax of 778 ;; mbox-list-extended-item from [LISTEXT] 780 acl_list_tag = <"> "ACL" <"> 782 ace = "(" identifier SP rights ")" 784 acl_data = "NIL" | acl_data_nonemp 785 ;; NIL, or one or more parenthesized identifier/rights pairs 787 acl_data_nonemp = "(" ace *( SP ace ) ")" 789 always_granted = rights 791 deleteacl = "DELETE" SP mbox_or_pat SP identifier 793 option =/ "ACL" | "MYRIGHTS" | "POSTADDRESS" 794 ;;