idnits 2.17.1 draft-ietf-extra-quota-08.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. -- The abstract seems to indicate that this document obsoletes RFC9051, but the header doesn't have an 'Obsoletes:' line to match this. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (21 October 2021) is 915 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 3501 (Obsoleted by RFC 9051) ** Downref: Normative reference to an Experimental RFC: RFC 5257 -- Obsolete informational reference (is this intentional?): RFC 2087 (Obsoleted by RFC 9208) Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Melnikov 3 Internet-Draft Isode 4 Obsoletes: 2087 (if approved) 21 October 2021 5 Intended status: Standards Track 6 Expires: 24 April 2022 8 IMAP QUOTA Extension 9 draft-ietf-extra-quota-08 11 Abstract 13 This document defines a QUOTA extension of the Internet Message 14 Access Protocol (RFC 3501/RFC 9051) that permits administrative 15 limits on resource usage (quotas) to be manipulated through the IMAP 16 protocol. 18 This document obsoletes RFC 2087, but attempts to remain backwards 19 compatible whenever possible. 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at https://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on 24 April 2022. 38 Copyright Notice 40 Copyright (c) 2021 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 45 license-info) in effect on the date of publication of this document. 46 Please review these documents carefully, as they describe your rights 47 and restrictions with respect to this document. Code Components 48 extracted from this document must include Simplified BSD License text 49 as described in Section 4.e of the Trust Legal Provisions and are 50 provided without warranty as described in the Simplified BSD License. 52 This document may contain material from IETF Documents or IETF 53 Contributions published or made publicly available before November 54 10, 2008. The person(s) controlling the copyright in some of this 55 material may not have granted the IETF Trust the right to allow 56 modifications of such material outside the IETF Standards Process. 57 Without obtaining an adequate license from the person(s) controlling 58 the copyright in such materials, this document may not be modified 59 outside the IETF Standards Process, and derivative works of it may 60 not be created outside the IETF Standards Process, except to format 61 it for publication as an RFC or to translate it into languages other 62 than English. 64 Table of Contents 66 1. Document Conventions . . . . . . . . . . . . . . . . . . . . 3 67 2. Introduction and Overview . . . . . . . . . . . . . . . . . . 3 68 3. Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 69 3.1. Resource . . . . . . . . . . . . . . . . . . . . . . . . 4 70 3.1.1. Name . . . . . . . . . . . . . . . . . . . . . . . . 4 71 3.1.2. Definition . . . . . . . . . . . . . . . . . . . . . 4 72 3.2. Quota Root . . . . . . . . . . . . . . . . . . . . . . . 5 73 4. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 6 74 4.1. Commands . . . . . . . . . . . . . . . . . . . . . . . . 6 75 4.1.1. GETQUOTA . . . . . . . . . . . . . . . . . . . . . . 6 76 4.1.2. GETQUOTAROOT . . . . . . . . . . . . . . . . . . . . 7 77 4.1.3. SETQUOTA . . . . . . . . . . . . . . . . . . . . . . 7 78 4.1.4. New STATUS attributes . . . . . . . . . . . . . . . . 9 79 4.2. Responses . . . . . . . . . . . . . . . . . . . . . . . . 10 80 4.2.1. QUOTA . . . . . . . . . . . . . . . . . . . . . . . . 10 81 4.2.2. QUOTAROOT . . . . . . . . . . . . . . . . . . . . . . 10 82 4.3. Response Codes . . . . . . . . . . . . . . . . . . . . . 10 83 4.3.1. OVERQUOTA . . . . . . . . . . . . . . . . . . . . . . 11 84 5. Resource Type Definitions . . . . . . . . . . . . . . . . . . 12 85 5.1. STORAGE . . . . . . . . . . . . . . . . . . . . . . . . . 12 86 5.2. MESSAGE . . . . . . . . . . . . . . . . . . . . . . . . . 13 87 5.3. MAILBOX . . . . . . . . . . . . . . . . . . . . . . . . . 13 88 5.4. ANNOTATION-STORAGE . . . . . . . . . . . . . . . . . . . 13 89 6. Interaction with IMAP ACL extension (RFC 4314) . . . . . . . 14 90 7. Formal syntax . . . . . . . . . . . . . . . . . . . . . . . . 14 91 8. Security Considerations . . . . . . . . . . . . . . . . . . . 16 92 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 93 9.1. Changes/additions to the IMAP4 capabilities registry . . 17 94 9.2. IMAP quota resource type registry . . . . . . . . . . . . 17 95 9.3. Registrations of IMAP Quota Resource Types . . . . . . . 18 96 10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 19 97 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 19 98 12. Changes since RFC 2087 . . . . . . . . . . . . . . . . . . . 19 99 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 20 100 13.1. Normative References . . . . . . . . . . . . . . . . . . 20 101 13.2. Informative References . . . . . . . . . . . . . . . . . 20 102 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 20 104 1. Document Conventions 106 In protocol examples, this document uses a prefix of "C: " to denote 107 lines sent by the client to the server, and "S: " for lines sent by 108 the server to the client. Lines prefixed with "// " are comments 109 explaining the previous protocol line. These prefixes and comments 110 are not part of the protocol. Lines without any of these prefixes 111 are continuations of the previous line, and no line break is present 112 in the protocol unless specifically mentioned. 114 Again, for examples, the hierarchy separator on the IMAP server is 115 presumed to be "/" throughout. None of these assumptions is required 116 nor recommended by this document. 118 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 119 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 120 "OPTIONAL" in this document are to be interpreted as described in BCP 121 14 [RFC2119] [RFC8174] when, and only when, they appear in all 122 capitals, as shown here. 124 Other capitalised words are IMAP keywords [RFC3501][RFC9051] or 125 keywords from this document. 127 2. Introduction and Overview 129 This document defines a couple of extensions to the Internet Message 130 Access Protocol [RFC3501] for querying and manipulating 131 administrative limits on resource usage (quotas). This extension is 132 compatible with both IMAP4rev1 [RFC3501] and IMAP4rev2 [RFC9051]. 134 The capability "QUOTA", denotes a RFC2087 [RFC2087] compliant server. 135 Some responses and response codes defined in this document are not 136 present in such servers (see Section 12 for more details), and 137 clients MUST NOT rely on their presence in the absence of any 138 capability beginning with "QUOTA=". 140 Any server compliant with this document MUST also return at least one 141 capability starting with "QUOTA=RES-" prefix, as described in 142 Section 3.1. 144 Any server compliant with this document that implements the SETQUOTA 145 command (see Section 4.1.3) MUST also return the "QUOTASET" 146 capability. 148 This document also reserves all other capabilities starting with 149 "QUOTA=" prefix for future IETF stream standard track, informational 150 or experimental extensions to this document. 152 Quotas can be used to restrict clients for administrative reasons, 153 but the QUOTA extension can also be used to indicate system limits 154 and current usage levels to clients. 156 Although RFC2087 [RFC2087] specified an IMAP4 QUOTA extension, and 157 this has seen deployment in servers, it has seen little deployment in 158 clients. Since the meaning of the resources was left implementation- 159 dependent, it was impossible for a client implementation to determine 160 which resources were supported, and impossible to determine which 161 mailboxes were in a given quota root (see Section 3.2), without a 162 priori knowledge of the implementation. 164 3. Terms 166 3.1. Resource 168 A resource has a name, a formal definition. 170 3.1.1. Name 172 The resource name is an atom, as defined in IMAP4rev1 [RFC3501]. 173 These MUST be registered with IANA. Implementation specific 174 resources begin with "V-" . 176 Supported resource names MUST be advertised as a capability, by 177 prepending the resource name with "QUOTA=RES-". A server compliant 178 with this specification is not required to support all reported 179 resource types on all quota roots. 181 3.1.2. Definition 183 The resource definition or document containing it, while not visible 184 through the protocol, SHOULD be registered with IANA. 186 The usage of a resource MUST be represented as a 63 bit unsigned 187 integer. 0 indicates that the resource is exhausted. Usage integers 188 don't necessarily represent proportional use, so clients MUST NOT 189 compare available resource between two separate quota roots on the 190 same or different servers. 192 Limits will be specified as, and MUST be represented as, an integer. 193 0 indicates that any usage is prohibited. 195 Limits may be hard or soft - that is, an implementation MAY choose, 196 or be configured, to disallow any command if the limit on a resource 197 is or would be exceeded. 199 All resources which the server handles MUST be advertised in a 200 CAPABILITY response/response code consisting of the resource name 201 prefixed by "QUOTA=RES-". 203 The resources STORAGE (Section 5.1), MESSAGE (Section 5.2), MAILBOX 204 (Section 5.3) and ANNOTATION-STORAGE (Section 5.4) are defined in 205 this document. 207 3.2. Quota Root 209 This document introduces a concept of a "quota root", as resource 210 limits can apply across multiple IMAP mailboxes. 212 Each mailbox has zero or more implementation-defined named "quota 213 roots". Each quota root has zero or more resource limits (quotas). 214 All mailboxes that share the same named quota root share the resource 215 limits of the quota root. 217 Quota root names need not be mailbox names, nor is there any 218 relationship defined by this document between a quota root name and a 219 mailbox name. A quota root name is an astring, as defined in IMAP4 220 [RFC3501]. It SHOULD be treated as an opaque string by any clients. 222 Quota roots are used since not all implementations may be able to 223 calculate usage, or apply quotas, on arbitrary mailboxes or mailbox 224 hierarchies. 226 Not all resources may be limitable or calculable for all quota roots. 227 Further, not all resources may support all limits - some limits may 228 be present in the underlying system. A server implementation of this 229 memo SHOULD advise the client of such inherent limits, by generating 230 QUOTA (Section 4.2.1) responses, and SHOULD advise the client of 231 which resources are limitable for a particular quota root. A 232 SETQUOTA (Section 4.1.3) command MAY also round a quota limit in an 233 implementation-dependent way, if the granularity of the underlying 234 system demands it. A client MUST be prepared for a SETQUOTA 235 (Section 4.1.3) command to fail if a limit cannot be set. 237 Implementation Notes: This means that, for example under UNIX, a 238 quota root may have a MESSAGE (Section 5.2) quota always set due to 239 the number of inodes available on the filesystem, and similarly 240 STORAGE (Section 5.1) may be rounded to the nearest block and limited 241 by free filesystem space. 243 4. Definitions 245 4.1. Commands 247 The following commands exist for manipulation and querying quotas. 249 4.1.1. GETQUOTA 251 Arguments: quota root 253 Responses: REQUIRED untagged responses: QUOTA 255 Result: OK - getquota completed 257 NO - getquota error: no such quota root, permission denied 259 BAD - command unknown or arguments invalid 261 The GETQUOTA command takes the name of a quota root and returns the 262 quota root's resource usage and limits in an untagged QUOTA response. 263 (Names of quota roots applicable to a particular mailbox can be 264 discovered by issuing the GETQUOTAROOT command, see Section 4.1.2.) 265 The client can try using any of the resource types returned in 266 CAPABILITY response (i.e. all capability items with "QUOTA=RES-" 267 prefix), however the server is not required to support any specific 268 resource type for any particular quota root. 270 Example: 272 S: * CAPABILITY [...] QUOTA QUOTA=RES-STORAGE [...] 274 [...] 276 C: G0001 GETQUOTA "!partition/sda4" 278 S: * QUOTA "!partition/sda4" (STORAGE 104 10923847) 280 S: G0001 OK Getquota complete 282 4.1.2. GETQUOTAROOT 284 Arguments: mailbox name 286 Responses: REQUIRED untagged responses: QUOTAROOT, QUOTA 288 Result: OK - getquotaroot completed 290 NO - getquotaroot error: permission denied 292 BAD - command unknown or arguments invalid 294 The GETQUOTAROOT command takes a mailbox name and returns the list of 295 quota roots for the mailbox in an untagged QUOTAROOT response. For 296 each listed quota root, it also returns the quota root's resource 297 usage and limits in an untagged QUOTA response. 299 Note that the mailbox name parameter doesn't have to reference an 300 existing mailbox. This can be handy in order to determine which 301 quotaroot would apply to a mailbox when it gets created. 303 Example: 305 S: * CAPABILITY [...] QUOTA QUOTA=RES-STORAGE QUOTA=RES-MESSAGE 306 [...] 308 [...] 310 C: G0002 GETQUOTAROOT INBOX 312 S: * QUOTAROOT INBOX "#user/alice" "!partition/sda4" 314 S: * QUOTA "#user/alice" (MESSAGE 42 1000) 316 S: * QUOTA "!partition/sda4" (STORAGE 104 10923847) 318 S: G0002 OK Getquotaroot complete 320 4.1.3. SETQUOTA 321 Arguments: quota root 323 list of resource limits 325 Responses: untagged responses: QUOTA 327 Result: OK - setquota completed 329 NO - setquota error: can't set that data 331 BAD - command unknown or arguments invalid 333 Note that unlike other command/responses/response codes defined in 334 this document, support for SETQUOTA command requires the server to 335 advertise "QUOTASET" capability. 337 The SETQUOTA command takes the name of a mailbox quota root and a 338 list of resource limits. The resource limits for the named quota 339 root are changed to be the specified limits. Any previous resource 340 limits for the named quota root are discarded. 342 If the named quota root did not previously exist, an implementation 343 may optionally create it and change the quota roots for any number of 344 existing mailboxes in an implementation-defined manner. 346 If the implementation chooses to change the quota roots for some 347 existing mailboxes such changes SHOULD be announced with untagged 348 QUOTA responses. 350 Example: 352 S: * CAPABILITY [...] QUOTA QUOTASET QUOTA=RES-STORAGE QUOTA=RES- 353 MESSAGE [...] 355 [...] 357 C: S0000 GETQUOTA "#user/alice" 359 S: * QUOTA "#user/alice" (STORAGE 54 111 MESSAGE 42 1000) 361 S: S0000 OK Getquota completed 363 C: S0001 SETQUOTA "#user/alice" (STORAGE 510) 365 S: * QUOTA "#user/alice" (STORAGE 58 512) 366 // The server has rounded the STORAGE quota limit requested to the 367 nearest 512 blocks of 1024 octects, or else another client has 368 performed a near simultaneous SETQUOTA, using a limit of 512. 370 S: S0001 OK Rounded quota 372 C: S0002 SETQUOTA "!partition/sda4" (STORAGE 99999999) 374 S: * QUOTA "!partition/sda4" (STORAGE 104 10923847) 376 // The server has not changed the quota, since this is a 377 filesystem limit, and cannot be changed. The QUOTA response here 378 is entirely optional. 380 S: S0002 NO Cannot change system limit 382 4.1.4. New STATUS attributes 384 DELETED and DELETED-STORAGE status data items allow to estimate the 385 amount of resource freed by an EXPUNGE on a mailbox. 387 The DELETED status data item requests the server to return the number 388 of messages with \Deleted flag set. The DELETED status data item is 389 only required to be implemented when the server advertises QUOTA=RES- 390 MESSAGE capability. 392 The DELETED-STORAGE status data item requests the server to return 393 the amount of storage space that can be reclaimed by performing 394 EXPUNGE on the mailbox. The server SHOULD return the exact value, 395 however it is recognized that the server may have to do non-trivial 396 amount of work to calculate it. If the calculation of the exact 397 value would take a long time, the server MAY instead return the sum 398 of RFC822.SIZEs of messages with the \Deleted flag set. The DELETED- 399 STORAGE status data item is only required to be implemented when the 400 server advertises QUOTA=RES-STORAGE capability. 402 Example: 404 S: * CAPABILITY [...] QUOTA QUOTA=RES-STORAGE QUOTA=RES-MESSAGE 405 [...] 407 [...] 409 C: S0003 STATUS INBOX (MESSAGES DELETED DELETED-STORAGE) 411 S: * STATUS INBOX (MESSAGES 12 DELETED 4 DELETED-STORAGE 8) 412 // 12 messages, 4 of which would be deleted when an EXPUNGE 413 happens. 415 S: S0003 OK Status complete. 417 4.2. Responses 419 The following responses may be sent by the server. 421 4.2.1. QUOTA 423 Data: quota root name 425 list of resource names, usages, and limits 427 This response occurs as a result of a GETQUOTA, a GETQUOTAROOT or a 428 SETQUOTA command. The first string is the name of the quota root for 429 which this quota applies. 431 The name is followed by a S-expression format list of the resource 432 usage and limits of the quota root. The list contains zero or more 433 triplets. Each triplet contains a resource name, the current usage 434 of the resource, and the resource limit. 436 Resources not named in the list are not limited in the quota root. 437 Thus, an empty list means there are no administrative resource limits 438 in the quota root. 440 Example: S: * QUOTA "" (STORAGE 10 512) 442 4.2.2. QUOTAROOT 444 Data: mailbox name 446 zero or more quota root names 448 This response occurs as a result of a GETQUOTAROOT command. The 449 first string is the mailbox and the remaining strings are the names 450 of the quota roots for the mailbox. 452 Example: 454 S: * QUOTAROOT INBOX "" 456 S: * QUOTAROOT comp.mail.mime 458 4.3. Response Codes 459 4.3.1. OVERQUOTA 461 OVERQUOTA response code SHOULD be returned in the tagged NO response 462 to an APPEND/COPY/MOVE when the addition of the message(s) puts the 463 target mailbox over any one of its quota limits. 465 Example 1: C: A003 APPEND saved-messages (\Seen) {326} 466 S: + Ready for literal data 467 C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) 468 C: From: Fred Foobar 469 C: Subject: afternoon meeting 470 C: To: mooch@owatagu.siam.edu.example 471 C: Message-Id: 472 C: MIME-Version: 1.0 473 C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII 474 C: 475 C: Hello Joe, do you think we can meet at 3:30 tomorrow? 476 C: 477 S: A003 NO [OVERQUOTA] APPEND Failed 479 The OVERQUOTA response code MAY also be returned in an untagged NO 480 response in the authenticated or the selected state, when a mailbox 481 exceeds soft quota. For example, such OVERQUOTA response code might 482 be sent as a result of an external event (e.g. LMTP delivery or 483 COPY/MOVE/APPEND in another IMAP connection) that causes the 484 currently selected mailbox to exceed soft quota. Note that such 485 OVERQUOTA response code might be ambiguous, because it might relate 486 to the target mailbox (as specified in COPY/MOVE/APPEND) or to the 487 currently selected mailbox. (The WG chose not to address this 488 deficiency due to syntactic limitations of IMAP response codes and 489 because such events are likely to be rare.) This form of the 490 OVERQUOTA response codes MUST NOT be returned if there is no mailbox 491 selected and no command in progress that adds a message to a mailbox 492 (e.g. APPEND). 494 Example 2: C: A003 APPEND saved-messages (\Seen) {326} 495 S: + Ready for literal data 496 C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) 497 C: From: Fred Foobar 498 C: Subject: afternoon meeting 499 C: To: mooch@owatagu.siam.edu.example 500 C: Message-Id: 501 C: MIME-Version: 1.0 502 C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII 503 C: 504 C: Hello Joe, do you think we can meet at 3:30 tomorrow? 505 C: 506 S: * NO [OVERQUOTA] Soft quota has been exceeded 507 S: A003 OK [APPENDUID 38505 3955] APPEND completed 509 Example 3: C: A004 COPY 2:4 MEETING 510 S: * NO [OVERQUOTA] Soft quota has been exceeded 511 S: A004 OK [COPYUID 38505 304,319:320 3956:3958] COPY 512 command completed 514 5. Resource Type Definitions 516 The following resource types are defined in this memo. A server 517 supporting a resource type MUST advertise this as a CAPABILITY with a 518 name consisting of the resource name prefixed by "QUOTA=RES-". A 519 server MAY support multiple resource types, and MUST advertise all 520 resource types it supports. 522 5.1. STORAGE 524 The physical space estimate, in units of 1024 octets, of the 525 mailboxes governed by the quota root. This MAY not be the same as 526 the sum of the RFC822.SIZE of the messages. Some implementations MAY 527 include metadata sizes for the messages and mailboxes, other 528 implementations MAY store messages in such a way that the physical 529 space used is smaller, for example due to use of compression. 530 Additional messages might not increase the usage. Client MUST NOT 531 use the usage figure for anything other than informational purposes, 532 for example, they MUST NOT refuse to APPEND a message if the limit 533 less the usage is smaller than the RFC822.SIZE divided by 1024 of the 534 message, but it MAY warn about such condition. 536 The usage figure may change as a result of performing actions not 537 associated with adding new messages to the mailbox, such as SEARCH, 538 since this may increase the amount of metadata included in the 539 calculations. 541 When the server supports this resource type, it MUST also support the 542 DELETED-STORAGE status data item. 544 Support for this resource MUST be indicated by the server by 545 advertising the CAPABILITY "QUOTA=RES-STORAGE". 547 A resource named the same was also given as an example in RFC2087 548 [RFC2087]. This document provides a more precise definition. 550 5.2. MESSAGE 552 The number of messages stored within the mailboxes governed by the 553 quota root. This MUST be an exact number, however, clients MUST NOT 554 assume that a change in the usage indicates a change in the number of 555 messages available, since the quota root may include mailboxes the 556 client has no access to. 558 When the server supports this resource type, it MUST also support the 559 DELETED status data item. 561 Support for this resource MUST be indicated by the server by 562 advertising the CAPABILITY "QUOTA=RES-MESSAGE". 564 A resource named the same was also given as an example in RFC2087 565 [RFC2087]. This document provides a more precise definition. 567 5.3. MAILBOX 569 The number of mailboxes governed by the quota root. This MUST be an 570 exact number, however, clients MUST NOT assume that a change in the 571 usage indicates a change in the number of mailboxes, since the quota 572 root may include mailboxes the client has no access to. 574 Support for this resource MUST be indicated by the server by 575 advertising the CAPABILITY "QUOTA=RES-MAILBOX". 577 5.4. ANNOTATION-STORAGE 579 The maximum size of all annotations [RFC5257], in units of 1024 580 octets, associated with all messages in the mailboxes governed by the 581 quota root. 583 Support for this resource MUST be indicated by the server by 584 advertising the CAPABILITY "QUOTA=RES-ANNOTATION-STORAGE". 586 6. Interaction with IMAP ACL extension (RFC 4314) 588 This section lists [RFC4314] rights required to execute quota related 589 commands when both RFC 4314 and this document are implemented. 591 +===================+=+=+===+===+===+===+===+===+===+===+=====+=====+ 592 | Operations\Rights |l|r| s | w | i | c | x | t | e | a | Any | Non | 593 +===================+=+=+===+===+===+===+===+===+===+===+=====+=====+ 594 | GETQUOTA | | | | | | | | | | | | + | 595 +-------------------+-+-+---+---+---+---+---+---+---+---+-----+-----+ 596 | GETQUOTAROOT | |*| | | | | | | | | | * | 597 +-------------------+-+-+---+---+---+---+---+---+---+---+-----+-----+ 598 | SETQUOTA | | | | | | | | | | + | | | 599 +-------------------+-+-+---+---+---+---+---+---+---+---+-----+-----+ 601 Table 1 603 See Section 4 of RFC 4314 for conventions used in this table. 605 Legend: 607 + - The right is required 609 * - Only one of the rights marked with * is required 611 "Any" - at least one of the "l", "r", "i", "k", "x", "a" rights is 612 required 614 "Non" - no rights required to perform the command 616 7. Formal syntax 618 The following syntax specification uses the Augmented Backus-Naur 619 Form (ABNF) notation as specified in [ABNF]. 621 Non-terminals referenced but not defined below are as defined by 622 IMAP4 [RFC3501]. 624 Except as noted otherwise, all alphabetic characters are case- 625 insensitive. The use of upper or lower case characters to define 626 token strings is for editorial clarity only. Implementations MUST 627 accept these strings in a case-insensitive fashion. 629 getquota = "GETQUOTA" SP quota-root-name 631 getquotaroot = "GETQUOTAROOT" SP mailbox 633 quota-list = "(" quota-resource *(SP quota-resource) ")" 634 quota-resource = resource-name SP resource-usage SP resource-limit 636 quota-response = "QUOTA" SP quota-root-name SP quota-list 638 quotaroot-response = "QUOTAROOT" SP mailbox *(SP quota-root-name) 640 setquota = "SETQUOTA" SP quota-root-name SP setquota-list 642 setquota-list = "(" [setquota-resource *(SP setquota-resource)] 643 ")" 645 setquota-resource = resource-name SP resource-limit 647 quota-root-name = astring 649 resource-limit = number64 651 resource-name = "STORAGE" / "MESSAGE" / "MAILBOX" / 653 "ANNOTATION-STORAGE" / resource-name-vnd / 655 resource-name-ext 657 resource-name-vnd = "V-" atom 659 ;; Vendor specific, must be registered with IANA. 661 ;; The "V-" prefix should be followed by a domain 662 name 664 ;; under vendor's control. 666 resource-name-ext = atom 668 ;; Not starting with V- and defined 670 ;; in an IETF Stream RFC 672 resource-usage = number64 674 ;; must be less than corresponding resource-limit 676 capability-quota = capa-quota-res / "QUOTASET" 678 ;; One or more capa-quota-res must be returned. 680 ;; Also "QUOTASET" can optionally be returned. 682 capa-quota-res = "QUOTA=RES-" resource-name 684 status-att =/ "DELETED" / "DELETED-STORAGE" 686 ;; DELETED status data item MUST be supported 688 ;; when "QUOTA=RES-MESSAGE" capability is 690 ;; advertised. 692 ;; DELETED-STORAGE status data item MUST be 694 ;; supported when "QUOTA=RES-STORAGE" capability 696 ;; is advertised. 698 status-att-val =/ status-att-deleted / 700 status-att-deleted-storage 702 status-att-deleted = "DELETED" SP number 704 ;; DELETED status data item MUST be supported 706 ;; when "QUOTA=RES-MESSAGE" capability is 708 ;; advertised. 710 status-att-deleted-storage = "DELETED-STORAGE" SP number64 712 ;; DELETED-STORAGE status data item MUST be 714 ;; supported when "QUOTA=RES-STORAGE" capability 716 ;; is advertised. 718 resp-text-code =/ "OVERQUOTA" 720 number64 = 722 8. Security Considerations 724 Implementors should be careful to make sure the implementation of 725 these commands does not violate the site's security policy. The 726 resource usage of other users is likely to be considered confidential 727 information and should not be divulged to unauthorized persons. In 728 particular, no quota information should be disclosed to anonymous 729 users. 731 Note that computing resource usage might incur a heavy load on the 732 server. Server implementers should consider implementation 733 techniques that lower load on servers, such as caching of resource 734 usage information or usage of less precise computations when under 735 heavy load. 737 9. IANA Considerations 739 9.1. Changes/additions to the IMAP4 capabilities registry 741 IMAP4 capabilities are registered by publishing a standards track or 742 IESG approved Informational or Experimental RFC. The registry is 743 currently located at: 745 https://www.iana.org/assignments/imap4-capabilities 747 IANA is requested to update definition of the QUOTA extension to 748 point to this document. IANA is also requested to add the "QUOTASET" 749 capability to the IMAP4 capabilities registry, with this document as 750 the reference. 752 IANA is requested to reserve the prefix "QUOTA=RES-" in the IMAP4 753 capabilities registry and add a pointer to this document and to the 754 IMAP quota resource type registry (see Section 9.2). 756 IANA is requested to reserve all other capabilities starting with 757 "QUOTA=" prefix for future IETF Stream extensions to this document. 759 9.2. IMAP quota resource type registry 761 IANA is requested to create a new registry for IMAP quota resource 762 types. Registration policy for this registry is "Specification 763 Required". When registering a new quota resource type, the 764 registrant need to provide the following: Name of the quota resource 765 type, Author/Change Controller name and email address, short 766 description, extra (if any) required and optional IMAP commands/ 767 responses, and a reference to a specification that describes the 768 quota resource type in more details. 770 Designated Experts should check that provided references are correct, 771 that they describe the quota resource type being registered in 772 sufficient details to be implementable, that syntax of any optional 773 commands/responses is correct (e.g. ABNF validates), and their 774 syntax/description complies with rules and limitations imposed by 775 IMAP [RFC3501][RFC9051]. Designated Experts should avoid registering 776 multiple identical quota resource types under different names and 777 should provide advice to requestors about other possible quota 778 resource types to use. 780 This document includes initial registrations for the following IMAP 781 quota resource type: STORAGE (Section 5.1), MESSAGE (Section 5.2), 782 MAILBOX (Section 5.3) and "ANNOTATION-STORAGE" (Section 5.4). See 783 Section 9.3 for the registration templates. 785 9.3. Registrations of IMAP Quota Resource Types 787 Name of the quota resource type: STORAGE 789 Author: Alexey Melnikov 791 Change Controller: IESG 793 Description: The physical space estimate, in units of 1024 octets, 794 of the mailboxes governed by the quota root. 796 Extra required IMAP commands/responses: DELETED-STORAGE STATUS 797 request data item and response data item 799 Extra optional IMAP commands/responses: N/A 801 Reference: Section 5.1 of RFCXXXX 803 Name of the quota resource type: MESSAGE 805 Author: Alexey Melnikov 807 Change Controller: IESG 809 Description: The number of messages stored within the mailboxes 810 governed by the quota root. 812 Extra required IMAP commands/responses: DELETED STATUS request data 813 item and response data item 815 Extra optional IMAP commands/responses: N/A 817 Reference: Section 5.2 of RFCXXXX 819 Name of the quota resource type: MAILBOX 821 Author: Alexey Melnikov 823 Change Controller: IESG 825 Description: The number of mailboxes governed by the quota root. 827 Extra required IMAP commands/responses: N/A 828 Extra optional IMAP commands/responses: N/A 830 Reference: Section 5.3 of RFCXXXX 832 Name of the quota resource type: ANNOTATION-STORAGE 834 Author: Alexey Melnikov 836 Change Controller: IESG 838 Description: The maximum size of all annotations [RFC5257], in units 839 of 1024 octets, associated with all messages in the mailboxes 840 governed by the quota root. 842 Extra required IMAP commands/responses: N/A 844 Extra optional IMAP commands/responses: N/A 846 Reference: Section 5.4 of RFCXXXX 848 10. Contributors 850 Dave Cridland wrote lots of text in an earlier draft that became the 851 basis for this document. 853 11. Acknowledgments 855 Editor of this document would like to thank the following people who 856 provided useful comments or participated in discussions that lead to 857 this update to RFC 2087: John Myers, Cyrus Daboo, Lyndon Nerenberg, 858 Benjamin Kaduk, Roman Danyliw, Eric Vyncke. 860 This document is a revision of RFC 2087. It borrows a lot of text 861 from RFC 2087. Thus work of the RFC 2087 author John Myers is 862 appreciated. 864 12. Changes since RFC 2087 866 This document is a revision of RFC 2087. It tries to clarify the 867 meaning of different terms used by RFC 2087. It also provides more 868 examples, gives guidance on allowed server behaviour, defines IANA 869 registry for quota resource types and provides initial registrations 870 for 4 of them. 872 When compared with RFC 2087, this document defines two more commonly 873 used resource type, adds optional OVERQUOTA response code and defines 874 two extra STATUS data items ("DELETED" and "DELETED-STORAGE"). The 875 DELETED STATUS data item must be implemented if the QUOTA=RES-MESSAGE 876 capability is advertised. The DELETED-STORAGE STATUS data item must 877 be implemented if the QUOTA=RES-STORAGE capability is advertised. 878 For extensibility quota usage and quota limits are now 63 bit 879 unsigned integers. 881 13. References 883 13.1. Normative References 885 [ABNF] Crocker, D., Ed. and P. Overell, Ed., "Augmented BNF for 886 Syntax Specifications: ABNF", RFC 5234, January 2008, 887 . 889 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 890 Requirement Levels", BCP 14, RFC 2119, 891 DOI 10.17487/RFC2119, March 1997, 892 . 894 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 895 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 896 . 898 [RFC4314] Melnikov, A., "IMAP4 Access Control List (ACL) Extension", 899 RFC 4314, DOI 10.17487/RFC4314, December 2005, 900 . 902 [RFC5257] Daboo, C. and R. Gellens, "Internet Message Access 903 Protocol - ANNOTATE Extension", RFC 5257, 904 DOI 10.17487/RFC5257, June 2008, 905 . 907 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 908 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 909 May 2017, . 911 [RFC9051] Melnikov, A., Ed. and B. Leiba, Ed., "Internet Message 912 Access Protocol (IMAP) - Version 4rev2", RFC 9051, 913 DOI 10.17487/RFC9051, August 2021, 914 . 916 13.2. Informative References 918 [RFC2087] Myers, J., "IMAP4 QUOTA extension", RFC 2087, 919 DOI 10.17487/RFC2087, January 1997, 920 . 922 Author's Address 923 Alexey Melnikov 924 Isode Limited 926 Email: alexey.melnikov@isode.com 927 URI: https://www.isode.com