idnits 2.17.1 draft-ietf-extra-quota-02.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 RFC2087, 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 lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). == 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 (July 1, 2020) is 1393 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) == Missing Reference: 'OVERQUOTA A003' is mentioned on line 475, but not defined ** 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 (~~), 5 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 Intended status: Standards Track July 1, 2020 5 Expires: January 2, 2021 7 IMAP QUOTA Extension 8 draft-ietf-extra-quota-02 10 Abstract 12 The QUOTA extension of the Internet Message Access Protocol (RFC 13 3501) permits administrative limits on resource usage (quotas) to be 14 manipulated through the IMAP protocol. 16 This memo obsoletes RFC 2087, but attempts to remain backwards 17 compatible whenever possible. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at https://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on January 2, 2021. 36 Copyright Notice 38 Copyright (c) 2020 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. 51 This document may contain material from IETF Documents or IETF 52 Contributions published or made publicly available before November 53 10, 2008. The person(s) controlling the copyright in some of this 54 material may not have granted the IETF Trust the right to allow 55 modifications of such material outside the IETF Standards Process. 56 Without obtaining an adequate license from the person(s) controlling 57 the copyright in such materials, this document may not be modified 58 outside the IETF Standards Process, and derivative works of it may 59 not be created outside the IETF Standards Process, except to format 60 it for publication as an RFC or to translate it into languages other 61 than English. 63 Table of Contents 65 1. Document Conventions . . . . . . . . . . . . . . . . . . . . 3 66 2. Introduction and Overview . . . . . . . . . . . . . . . . . . 3 67 3. Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 68 3.1. Resource . . . . . . . . . . . . . . . . . . . . . . . . 4 69 3.1.1. Name . . . . . . . . . . . . . . . . . . . . . . . . 4 70 3.1.2. Definition . . . . . . . . . . . . . . . . . . . . . 4 71 3.2. Quota Root . . . . . . . . . . . . . . . . . . . . . . . 5 72 4. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 6 73 4.1. Commands . . . . . . . . . . . . . . . . . . . . . . . . 6 74 4.1.1. GETQUOTA . . . . . . . . . . . . . . . . . . . . . . 6 75 4.1.2. GETQUOTAROOT . . . . . . . . . . . . . . . . . . . . 6 76 4.1.3. SETQUOTA . . . . . . . . . . . . . . . . . . . . . . 7 77 4.1.4. New STATUS attributes . . . . . . . . . . . . . . . . 8 78 4.2. Responses . . . . . . . . . . . . . . . . . . . . . . . . 9 79 4.2.1. QUOTA . . . . . . . . . . . . . . . . . . . . . . . . 9 80 4.2.2. QUOTAROOT . . . . . . . . . . . . . . . . . . . . . . 9 81 4.3. Response Codes . . . . . . . . . . . . . . . . . . . . . 9 82 4.3.1. OVERQUOTA . . . . . . . . . . . . . . . . . . . . . . 9 83 5. Resource Type Definitions . . . . . . . . . . . . . . . . . . 11 84 5.1. STORAGE . . . . . . . . . . . . . . . . . . . . . . . . . 11 85 5.2. MESSAGE . . . . . . . . . . . . . . . . . . . . . . . . . 11 86 5.3. MAILBOX . . . . . . . . . . . . . . . . . . . . . . . . . 12 87 5.4. ANNOTATION-STORAGE . . . . . . . . . . . . . . . . . . . 12 88 6. Interaction with IMAP ACL extension (RFC 4314) . . . . . . . 12 89 7. Formal syntax . . . . . . . . . . . . . . . . . . . . . . . . 12 90 8. Security Considerations . . . . . . . . . . . . . . . . . . . 14 91 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 92 9.1. Registrations of IMAP Quota Resource Types . . . . . . . 15 93 10. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 16 94 11. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 16 95 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 16 96 13. Changes since RFC 2087 . . . . . . . . . . . . . . . . . . . 16 97 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 98 14.1. Normative References . . . . . . . . . . . . . . . . . . 17 99 14.2. Informative References . . . . . . . . . . . . . . . . . 17 100 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 17 102 1. Document Conventions 104 In protocol examples, this document uses a prefix of "C: " to denote 105 lines sent by the client to the server, and "S: " for lines sent by 106 the server to the client. Lines prefixed with "// " are comments 107 explaining the previous protocol line. These prefixes and comments 108 are not part of the protocol. Lines without any of these prefixes 109 are continuations of the previous line, and no line break is present 110 in the protocol unless specifically mentioned. 112 Again, for examples, the hierarchy separator on the server is 113 presumed to be "/" throughout. None of these assumptions is required 114 nor recommended by this document. 116 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 117 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 118 "OPTIONAL" in this document are to be interpreted as described in BCP 119 14 RFC2119 [RFC2119] 8174 [RFC8174] when, and only when, they appear 120 in all capitals, as shown here. 122 Other capitalised words are IMAP4 [RFC3501] keywords or keywords from 123 this document. 125 2. Introduction and Overview 127 This document defines a couple of extension to the Internet Message 128 Access Protocol [RFC3501] for querying and manipulating 129 administrative limits on resource usage (quotas). 131 The capability "QUOTA", denotes a RFC2087 [RFC2087] compliant server. 132 Some responses and response codes defined in this document are not 133 present in such servers (see Section 13 for more details), and 134 clients MUST NOT rely on their presence in the absence of any 135 capability beginning with "QUOTA=". 137 Any server compliant with this document MUST also return at least one 138 capability starting with "QUOTA=RES-" prefix, as described in 139 Section 3.1. 141 Any server compliant with this document that implements the SETQUOTA 142 command (see Section 4.1.3) MUST also return the "QUOTASET" 143 capability. 145 This document also reserves all other capabilities starting with 146 "QUOTA=" prefix for future IETF stream standard track or experimental 147 extensions to this document. 149 Quotas can be used to restrict clients for administrative reasons, 150 but the QUOTA extension can also be used to indicate system limits 151 and current usage levels to clients. 153 Although RFC2087 [RFC2087] specified an IMAP4 QUOTA extension, and 154 this has seen deployment in servers, it has seen little deployment in 155 clients. Since the meaning of the resources was left implementation- 156 dependant, it was impossible for a client implementation to determine 157 which resources were supported, and impossible to determine which 158 mailboxes were in a given quota root, without a priori knowledge of 159 the implementation. 161 3. Terms 163 3.1. Resource 165 A resource has a name, a formal definition. 167 3.1.1. Name 169 The resource name is an atom, as defined in IMAP4rev1 [RFC3501]. 170 These MUST be registered with IANA. Implementation specific 171 resources begin with "V-" . 173 Supported resource names MUST be advertised as a capability, by 174 prepending the resource name with "QUOTA=RES-". A server compliant 175 with this specification is not required to support all reported 176 resource types on all quota roots. 178 3.1.2. Definition 180 The resource definition or document containing it, while not visible 181 through the protocol, SHOULD be registered with IANA. 183 The usage of a resource MUST be represented as a 32 bit unsigned 184 integer. 0 indicates that the resource is exhausted. Usage integers 185 don't necessarily represent proportional use, so clients MUST NOT 186 compare available resource between two separate quota roots on the 187 same or different servers. 189 Limits will be specified as, and MUST be represented as, an integer. 190 0 indicates that any usage is prohibited. 192 Limits may be hard or soft - that is, an implementation MAY choose, 193 or be configured, to disallow any command if the limit on a resource 194 is or would be exceeded. 196 All resources which the server handles must be advertised in a 197 CAPABILITY constisting of the resource name prefixed by "QUOTA=RES-". 198 For compatability with RFC 2087 [RFC2087], a client which discovers 199 resources available on the server which are not advertised through 200 this mechanism MUST treat them as if they were completely opaque, and 201 without any meaning. 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 Each mailbox has zero or more implementation-defined named "quota 210 roots". Each quota root has zero or more resource limits (quotas). 211 All mailboxes that share the same named quota root share the resource 212 limits of the quota root. 214 Quota root names need not be mailbox names, nor is there any 215 relationship defined by this memo between a Quota root name and a 216 mailbox name. A quota root name is an astring, as defined in IMAP4 217 [RFC3501]. It SHOULD be treated as an opaque string by any clients. 219 Quota roots are used since not all implementations may be able to 220 calculate usage, or apply quotas, on arbitary mailboxes or mailbox 221 hierarchies. 223 Not all resources may be limitable or calculatable for all quota 224 roots. Further, not all resources may support all limits - some 225 limits may be present in the underlying system. A server 226 implementation of this memo SHOULD advise the client of such inherent 227 limits, by generating QUOTA (Section 4.2.1) responses and SHOULD 228 advise the client of which resources are limitable for a particular 229 quota root. A SETQUOTA (Section 4.1.3) command MAY also round a 230 quota limit in an implementation dependant way, if the granularity of 231 the underlying system demands it. A client MUST be prepared for a 232 SETQUOTA (Section 4.1.3) command to fail if a limit cannot be set. 234 Implementation Notes: 235 This means that, for example under UNIX, a quota root may have a 236 MESSAGE (Section 5.2) quota always set due to the number of inodes 237 available on the filesystem, and similarly STORAGE (Section 5.1) may 238 be rounded to the nearest block and limited by free filesystem space. 240 4. Definitions 242 4.1. Commands 244 The following commands exist for manipulation and querying quotas. 246 4.1.1. GETQUOTA 248 Arguments: quota root 250 Responses: REQUIRED untagged responses: QUOTA 252 Result: OK - getquota completed 253 NO - getquota error: no such quota root, permission denied 254 BAD - command unknown or arguments invalid 256 The GETQUOTA command takes the name of a quota root and returns the 257 quota root's resource usage and limits in an untagged QUOTA response. 258 The client can try using any of the resource types returned in 259 CAPABILITY response (i.e. all capability items with "QUOTA=RES-" 260 prefix), however the server is not required to support any specific 261 resource type for any particular quota root. 263 Example: 265 S: * CAPABILITY [...] QUOTA QUOTA=RES-STORAGE [...] 266 [...] 267 C: G0001 GETQUOTA "!partition/sda4" 268 S: * QUOTA "!partition/sda4" (STORAGE 104 10923847) 269 S: G0001 OK Getquota complete 271 4.1.2. GETQUOTAROOT 273 Arguments: mailbox name 275 Responses: REQUIRED untagged responses: QUOTAROOT, QUOTA 277 Result: OK - getquotaroot completed 278 NO - getquotaroot error: permission denied 279 BAD - command unknown or arguments invalid 281 The GETQUOTAROOT command takes a mailbox name and returns the list of 282 quota roots for the mailbox in an untagged QUOTAROOT response. For 283 each listed quota root, it also returns the quota root's resource 284 usage and limits in an untagged QUOTA response. 286 Note that the mailbox name parameter doesn't have to reference an 287 existing mailbox. This can be handy in order to determine which 288 quotaroot would apply to a mailbox when it gets created. 290 Example: 292 S: * CAPABILITY [...] QUOTA QUOTA=RES-STORAGE QUOTA=RES-MESSAGE 293 [...] 294 [...] 295 C: G0002 GETQUOTAROOT INBOX 296 S: * QUOTAROOT INBOX "#user/alice" "!partition/sda4" 297 S: * QUOTA "#user/alice" (MESSAGE 42 1000) 298 S: * QUOTA "!partition/sda4" (STORAGE 104 10923847) 299 S: G0002 OK Getquotaroot complete 301 4.1.3. SETQUOTA 303 Arguments: quota root 305 list of resource limits 307 Responses: untagged responses: QUOTA 309 Result: OK - setquota completed 310 NO - setquota error: can't set that data 311 BAD - command unknown or arguments invalid 313 Note that unlike other command/responses/response codes defined in 314 this document, support for SETQUOTA command requires the server to 315 advertise "QUOTASET" capability. 317 The SETQUOTA command takes the name of a mailbox quota root and a 318 list of resource limits. The resource limits for the named quota 319 root are changed to be the specified limits. Any previous resource 320 limits for the named quota root are discarded. 322 If the named quota root did not previously exist, an implementation 323 may optionally create it and change the quota roots for any number of 324 existing mailboxes in an implementation-defined manner. 326 If the implementation chooses to change the quota roots for some 327 existing mailboxes such changes SHOULD be announced with untagged 328 QUOTA responses. 330 Example: 332 S: * CAPABILITY [...] QUOTA QUOTASET QUOTA=RES-STORAGE QUOTA=RES- 333 MESSAGE [...] 335 [...] 336 C: S0000 GETQUOTA "#user/alice" 337 S: * QUOTA "#user/alice" (STORAGE 54 111 MESSAGE 42 1000) 338 S: S0000 OK Getquota completed 339 C: S0001 SETQUOTA "#user/alice" (STORAGE 510) 340 S: * QUOTA "#user/alice" (STORAGE 58 512) 342 // The server has rounded the STORAGE quota limit requested to the 343 nearest 512 blocks of 1024 octects, or else another client has 344 performed a near simultaneous SETQUOTA, using a limit of 512. 346 S: S0001 OK Rounded quota 347 C: S0002 SETQUOTA "!partition/sda4" (STORAGE 99999999) 348 S: * QUOTA "!partition/sda4" (STORAGE 104 10923847) 350 // The server has not changed the quota, since this is a 351 filesystem limit, and cannot be changed. The QUOTA response here 352 is entirely optional. 354 S: S0002 NO Cannot change system limit 356 4.1.4. New STATUS attributes 358 DELETED and DELETED-STORAGE status data items allow to estimate the 359 amount of resource freed by an EXPUNGE on a mailbox. 361 DELETED status data item requests the server to return the number of 362 messages with \Deleted flag set. 364 DELETED-STORAGE status data item requests the server to return the 365 amount of storage space that can be reclaimed by performing EXPUNGE 366 on the mailbox. The server SHOULD return the exact value, however it 367 is recognized that the server may have to do non-trivial amount of 368 work to calculate it. If the calculation of the exact value would 369 take a long time, the server MAY instead return the sum of 370 RFC822.SIZEs of messages with the \Deleted flag set. 372 Example: 374 S: * CAPABILITY [...] QUOTA QUOTA=RES-STORAGE QUOTA-RES-MESSAGE 375 [...] 376 [...] 377 C: S0003 STATUS INBOX (MESSAGES DELETED DELETED-STORAGE) 378 S: * STATUS INBOX (MESSAGES 12 DELETED 4 DELETED-STORAGE 8) 380 // 12 messages, 4 of which would be deleted when an EXPUNGE 381 happens. 383 S: S0003 OK Status complete. 385 4.2. Responses 387 The following responses may be sent by the server. 389 4.2.1. QUOTA 391 Data: quota root name 392 list of resource names, usages, and limits 394 This response occurs as a result of a GETQUOTA or GETQUOTAROOT 395 command. The first string is the name of the quota root for which 396 this quota applies. 398 The name is followed by a S-expression format list of the resource 399 usage and limits of the quota root. The list contains zero or more 400 triplets. Each triplet contains a resource name, the current usage 401 of the resource, and the resource limit. 403 Resources not named in the list are not limited in the quota root. 404 Thus, an empty list means there are no administrative resource limits 405 in the quota root. 407 Example: S: * QUOTA "" (STORAGE 10 512) 409 4.2.2. QUOTAROOT 411 Data: mailbox name 412 zero or more quota root names 414 This response occurs as a result of a GETQUOTAROOT command. The 415 first string is the mailbox and the remaining strings are the names 416 of the quota roots for the mailbox. 418 Example: 420 S: * QUOTAROOT INBOX "" 422 S: * QUOTAROOT comp.mail.mime 424 4.3. Response Codes 426 4.3.1. OVERQUOTA 428 OVERQUOTA response code SHOULD be returned in the tagged NO response 429 to an APPEND/COPY/MOVE when the addition of the message(s) puts the 430 target mailbox over any one of its quota limits. 432 Example: 434 S: C: A003 APPEND Drafts (\Seen $MDNSent) {310} 435 S: + Ready for literal data 436 C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) 437 C: From: Fred Foobar 438 C: Subject: afternoon meeting 439 C: To: mooch@owatagu.siam.edu 440 C: Message-Id: 441 C: MIME-Version: 1.0 442 C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII 443 C: 444 C: Hello Joe, do you think we can meet at 3:30 tomorrow? 445 C: 446 S: A003 NO [OVERQUOTA] APPEND Failed 448 The OVERQUOTA response code MAY also be returned in an untagged NO 449 response when a mailbox exceeds soft quota. Such responses have 2 450 forms. If it is followed by a tag, the tag refers to the command 451 that caused this (such as APPEND or COPY) and the OVERQUOTA response 452 code applies to the target mailbox specified by such command. If the 453 OVERQUOTA response code is not followed by the tag, this means that 454 an external event (e.g. LMTP delivery or APPEND/COPY in another IMAP 455 connection) caused this event and the event applies to the currently 456 selected mailbox. In particular, this means that such OVERQUOTA 457 response codes MUST NOT be returned if there is no mailbox selected 458 or if a mailbox other than the currently selected one exceeds soft 459 quota. 461 Example: 463 S: C: A003 APPEND Drafts (\Seen $MDNSent) {310} 464 S: + Ready for literal data 465 C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST) 466 C: From: Fred Foobar 467 C: Subject: afternoon meeting 468 C: To: mooch@owatagu.siam.edu 469 C: Message-Id: 470 C: MIME-Version: 1.0 471 C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII 472 C: 473 C: Hello Joe, do you think we can meet at 3:30 tomorrow? 474 C: 475 S: * NO [OVERQUOTA A003] Soft quota has been exceeded 476 S: A003 OK [APPENDUID 38505 3955] APPEND completed 478 5. Resource Type Definitions 480 The following resource types are defined in this memo. A server 481 supporting a resource type MUST advertise this as a CAPABILITY with a 482 name consisting of the resource name prefixed by "QUOTA=RES-". A 483 server MAY support mupltiple resource types, and MUST advertise all 484 resource types it supports. 486 5.1. STORAGE 488 The physical space estimate, in units of 1024 octets, of the 489 mailboxes governed by the quota root. This MAY not be the same as 490 the sum of the RFC822.SIZE of the messages. Some implementations MAY 491 include metadata sizes for the messages and mailboxes, other 492 implementations MAY store messages in such a way that the physical 493 space used is smaller, for example due to use of compression. 494 Additional messages might not increase the usage. Client MUST NOT 495 use the usage figure for anything other than informational purposes, 496 for example, they MUST NOT refuse to APPEND a message if the limit 497 less the usage is smaller than the RFC822.SIZE divided by 1024 of the 498 message, but it MAY warn about such condition. 500 The usage figure may change as a result of performing actions not 501 associated with adding new messages to the mailbox, such as SEARCH, 502 since this may increase the amount of metadata included in the 503 calculations. 505 Support for this resource MUST be indicated by the server by 506 advertising the CAPABILITY "QUOTA=RES-STORAGE". 508 A resource named the same was also given as an example in RFC2087 509 [RFC2087]. This document provides a more precise definition. 511 5.2. MESSAGE 513 The number of messages stored within the mailboxes governed by the 514 quota root. This MUST be an exact number, however, clients MUST NOT 515 assume that a change in the usage indicates a change in the number of 516 messages available, since the quota root may include mailboxes the 517 client has no access to. 519 Support for this resource MUST be indicated by the server by 520 advertising the CAPABILITY "QUOTA=RES-MESSAGE". 522 A resource named the same was also given as an example in RFC2087 523 [RFC2087]. This document provides a more precise definition. 525 5.3. MAILBOX 527 The number of mailboxes governed by the quota root. This MUST be an 528 exact number, however, clients MUST NOT assume that a change in the 529 usage indicates a change in the number of mailboxes, since the quota 530 root may include mailboxes the client has no access to. 532 Support for this resource MUST be indicated by the server by 533 advertising the CAPABILITY "QUOTA=RES-MAILBOX". 535 5.4. ANNOTATION-STORAGE 537 [[CREF1: Bron to check whether this is a sensible description and 538 whether it is needed at all:]] The maximum size of all annotations 539 [RFC5257], in units of 1024 octets, associated with all messages in 540 the mailboxes governed by the quota root. 542 Support for this resource MUST be indicated by the server by 543 advertising the CAPABILITY "QUOTA=RES-ANNOTATION-STORAGE". 545 6. Interaction with IMAP ACL extension (RFC 4314) 547 This section lists [RFC4314] rights required to execute quota related 548 commands when both RFC 4314 and this document are implemented. 550 +---------------+---+---+---+---+---+---+---+---+---+---+-----+-----+ 551 | Operations\Ri | l | r | s | w | i | c | x | t | e | a | Any | Non | 552 | ghts | | | | | | | | | | | | | 553 +---------------+---+---+---+---+---+---+---+---+---+---+-----+-----+ 554 | GETQUOTA | | | | | | | | | | | | * | 555 | GETQUOTAROOT | | * | | | | | | | | | | * | 556 | SETQUOTA | | | | | | | | | | + | | | 557 +---------------+---+---+---+---+---+---+---+---+---+---+-----+-----+ 559 See Section 4 of RFC 4314 for conventions used in this table. 561 [[CREF2: The above table needs to be reviewed based on feedback from 562 existing and planned implementations.]] 564 7. Formal syntax 566 The following syntax specification uses the Augmented Backus-Naur 567 Form (ABNF) notation as specified in [ABNF]. 569 Non-terminals referenced but not defined below are as defined by 570 IMAP4 [RFC3501]. 572 Except as noted otherwise, all alphabetic characters are case- 573 insensitive. The use of upper or lower case characters to define 574 token strings is for editorial clarity only. Implementations MUST 575 accept these strings in a case-insensitive fashion. 577 getquota = "GETQUOTA" SP quota-root-name 579 getquotaroot = "GETQUOTAROOT" SP mailbox 581 quota-list = "(" quota-resource *(SP quota-resource) ")" 583 quota-resource = resource-name SP resource-usage SP resource- 584 limit 586 quota-response = "QUOTA" SP quota-root-name SP quota-list 588 quotaroot-response = "QUOTAROOT" SP mailbox *(SP quota-root-name) 590 setquota = "SETQUOTA" SP quota-root-name SP setquota-list 592 setquota-list = "(" [setquota-resource *(SP setquota-resource)] 593 ")" 595 setquota-resource = resource-name SP resource-limit 597 quota-root-name = astring 599 resource-limit = number64 601 resource-name = "STORAGE" / "MESSAGE" / "MAILBOX" / 602 "ANNOTATION-STORAGE" / resource-name-vnd / 603 resource-name-ext 605 resource-name-vnd = "V-" atom 606 ;; Vendor specific, must be registered with IANA. 607 ;; The "V-" prefix should be followed by a domain 608 name 609 ;; under vendor's control. 611 resource-name-ext = atom 612 ;; Not starting with V- and defined 613 ;; in a Standard Track or Experimental RFC 615 resource-names = "(" [resource-name *(SP resource-name)] ")" 617 resource-usage = number64 618 ;; must be less than corresponding resource-limit 620 capability-quota = capa-quota-res / "QUOTASET" 621 ;; One or more capa-quota-res must be returned. 622 ;; Also "QUOTASET" can optionally be returned. 624 capa-quota-res = "QUOTA=RES-" resource-name 626 status-att =/ "DELETED" / "DELETED-STORAGE" 628 status-att-val =/ ("DELETED" SP number) / 629 ("DELETED-STORAGE" SP number64) 631 resp-text-code =/ "OVERQUOTA" [SP tag] 633 number64 = 1*DIGIT ;; Unsigned 63-bit integer. 634 ;; (0 <= n <= 9,223,372,036,854,775,807) 636 8. Security Considerations 638 Implementors should be careful to make sure the implementation of 639 these commands does not violate the site's security policy. The 640 resource usage of other users is likely to be considered confidential 641 information and should not be divulged to unauthorized persons. 643 9. IANA Considerations 645 IMAP4 capabilities are registered by publishing a standards track or 646 IESG approved experimental RFC. The registry is currently located 647 at: 649 http://www.iana.org/assignments/imap4-capabilities 651 IANA is requested to update definition of the QUOTA extension to 652 point to this document. 654 IANA is also requested to create a new registry for IMAP quota 655 resource types. Registration policy for this registry is 656 "Specification Required". When registering a new quota resource 657 type, the registrant need to provide the following: Name of the quota 658 resource type, Author/Change Controller name and email address, short 659 description and a reference to a specification that describes the 660 quota resource type in more details. 662 This document includes initial registrations for the following IMAP 663 quota resource type: STORAGE (Section 5.1), MESSAGE (Section 5.2), 664 MAILBOX (Section 5.3) and "ANNOTATION-STORAGE" (Section 5.4). See 665 details below. 667 IANA is requested to reserve the prefix "QUOTA=RES-" in the IMAP4 668 capabilities registry and add a pointer to this document and to the 669 IMAP quota resource type registry established above. 671 IANA is requested to reserve all other capabilities starting with 672 "QUOTA=" prefix for future IETF stream standard track or experimental 673 extensions to this document. 675 9.1. Registrations of IMAP Quota Resource Types 677 Name of the quota resource type: STORAGE 679 Author: Alexey Melnikov 681 Change Controller: IESG 683 Description: The physical space estimate, in units of 1024 octets, 684 of the mailboxes governed by the quota root. 686 Reference: Section 5.1 of RFCXXXX 688 Name of the quota resource type: MESSAGE 690 Author: Alexey Melnikov 692 Change Controller: IESG 694 Description: The number of messages stored within the mailboxes 695 governed by the quota root. 697 Reference: Section 5.2 of RFCXXXX 699 Name of the quota resource type: MAILBOX 701 Author: Alexey Melnikov 703 Change Controller: IESG 705 Description: The number of mailboxes governed by the quota root. 707 Reference: Section 5.3 of RFCXXXX 709 Name of the quota resource type: 711 Author: Alexey Melnikov 713 Change Controller: IESG 714 Description: The maximum size of all annotations [RFC5257], in units 715 of 1024 octets, associated with all messages in the mailboxes 716 governed by the quota root. [[CREF3: Recheck against the final 717 description of "ANNOTATION-STORAGE".]] 719 Reference: Section 5.4 of RFCXXXX 721 10. Open Issues 723 '"OVERQUOTA" SP tag' form has syntactic issues, as "tag" allows for 724 "]", which is not allowed in response codes. Should we drop this 725 variant or change IMAP4rev2 to disallow "]" in tags? 727 Should "DELETED" status item be required to be implemented for 728 anything other than QUOTA-RES=MESSAGE? Similarly, should "DELETED- 729 STORAGE" status item be required to be implemented for anything other 730 than QUOTA-RES=STORAGE? 732 11. Contributors 734 Dave Cridland wrote lots of text in an earlier draft that became the 735 basis for this document. 737 12. Acknowledgments 739 Editors of this document would like to thank the following people who 740 provided useful comments or participated in discussions that lead to 741 this update to RFC 2087: 742 John Myers, 743 Cyrus Daboo, 744 Lyndon Nerenberg 746 This document is a revision of RFC 2087. It borrows a lot of text 747 from RFC 2087. Thus work of the RFC 2087 author John Myers is 748 appreciated. 750 13. Changes since RFC 2087 752 This document is a revision of RFC 2087. It tries to clarify meaning 753 of different terms used by RFC 2087. It also provides more examples, 754 gives guidance on allowed server behaviour, defines IANA registry for 755 quota resource types and provides initial registrations for 3 of 756 them. 758 When compared with RFC 2087, this document defines two more commonly 759 used resource type, adds optional OVERQUOTA response code and defines 760 two extra STATUS data items ("DELETED" and "DELETED-STORAGE") that 761 must be implemented. For extensibility quota usage and quota limits 762 are now 63 bit unsigned integers. 764 14. References 766 14.1. Normative References 768 [ABNF] Crocker, D., Ed. and P. Overell, Ed., "Augmented BNF for 769 Syntax Specifications: ABNF", RFC 5234, January 2008. 771 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 772 Requirement Levels", BCP 14, RFC 2119, 773 DOI 10.17487/RFC2119, March 1997, 774 . 776 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 777 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 778 . 780 [RFC4314] Melnikov, A., "IMAP4 Access Control List (ACL) Extension", 781 RFC 4314, DOI 10.17487/RFC4314, December 2005, 782 . 784 [RFC5257] Daboo, C. and R. Gellens, "Internet Message Access 785 Protocol - ANNOTATE Extension", RFC 5257, 786 DOI 10.17487/RFC5257, June 2008, 787 . 789 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 790 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 791 May 2017, . 793 14.2. Informative References 795 [RFC2087] Myers, J., "IMAP4 QUOTA extension", RFC 2087, 796 DOI 10.17487/RFC2087, January 1997, 797 . 799 Author's Address 801 Alexey Melnikov 802 Isode Limited 804 Email: alexey.melnikov@isode.com 805 URI: https://www.isode.com