RFC 2087

IMAP4 QUOTA extension

πŸ“… published January 1997, from ietf

RFC 2087: IMAP4 QUOTA extension πŸŽ€

  • Number: RFC 2087
  • Title: IMAP4 QUOTA extension
  • Author: J. Myers, Carnegie Mellon πŸ§‘β€πŸ’»
  • Category: Standards Track πŸš€
  • Date: January 1997 πŸ“…
  • Obsoletes / Updates: this document doesn't list either one πŸ™…β€β™€οΈ

Status of this Memo πŸ“œ

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

1. Abstract ✨

Okay so the QUOTA extension of the Internet Message Access Protocol [IMAP4] lets you manage administrative limits on resource usage (quotas) right through IMAP. It's giving admin superpowers πŸ’…

Table of Contents πŸ“š

1.   Abstract........................................... 1
2.   Conventions Used in this Document.................. 1
3.   Introduction and Overview.......................... 2
4.   Commands........................................... 2
4.1. SETQUOTA Command................................... 2
4.2. GETQUOTA Command................................... 2
4.3. GETQUOTAROOT Command............................... 3
5.   Responses.......................................... 3
5.1. QUOTA Response..................................... 3
5.2. QUOTAROOT Response................................. 4
6.   Formal syntax...................................... 4
7.   References......................................... 5
8.   Security Considerations............................ 5
9.   Author's Address................................... 5

2. Conventions Used in this Document πŸŽ€

In examples, C: and S: mean the lines the client sent and the lines the server sent, respectively. Simple, iconic 🫢

3. Introduction and Overview πŸ¦‹

Bestie, the QUOTA extension is there in any IMAP4 implementation that returns QUOTA as one of its supported capabilities to the CAPABILITY command. Main character energy πŸ‘‘

An IMAP4 server that supports the QUOTA capability can have limits on any number of resources. Each resource has an atom name and an implementation-defined interpretation that works out to an integer. Some examples:

   Name       Interpretation

   STORAGE    Sum of messages' RFC822.SIZE, in units of 1024 octets
   MESSAGE    Number of messages

Each mailbox has zero or more implementation-defined named "quota roots". Each quota root has zero or more resource limits, and every mailbox that shares the same named quota root shares that root's resource limits 🧚

Quota root names don't have to match the names of existing mailboxes. Lowkey a fun plot twist πŸ™ˆ

4. Commands πŸ’–

4.1. SETQUOTA Command πŸ› οΈ

  • Arguments: quota root, list of resource limits
  • Data: untagged responses: QUOTA
  • Result:
    • OK - setquota completed
    • NO - setquota error: can't set that data
    • BAD - command unknown or arguments invalid

The SETQUOTA command takes the name of a mailbox quota root and a list of resource limits. The resource limits for that named quota root get changed to the ones you specified. Any older resource limits for the named quota root are discarded, so they're gone, periodt πŸ’€

If the named quota root didn't exist before, an implementation may optionally create it and change the quota roots for any number of existing mailboxes in an implementation-defined way 🌈

Example:

C: A001 SETQUOTA "" (STORAGE 512)
S: * QUOTA "" (STORAGE 10 512)
S: A001 OK Setquota completed

4.2. GETQUOTA Command πŸ”

  • Arguments: quota root
  • Data: untagged responses: QUOTA
  • Result:
    • OK - getquota completed
    • NO - getquota error: no such quota root, permission denied
    • BAD - command unknown or arguments invalid

The GETQUOTA command takes the name of a quota root and gives you back that quota root's resource usage and limits in an untagged QUOTA response. Easy πŸ“

Example:

C: A003 GETQUOTA ""
S: * QUOTA "" (STORAGE 10 512)
S: A003 OK Getquota completed

4.3. GETQUOTAROOT Command 🧾

  • Arguments: mailbox name
  • Data: untagged responses: QUOTAROOT, QUOTA
  • Result:
    • OK - getquota completed
    • NO - getquota error: no such mailbox, permission denied
    • BAD - command unknown or arguments invalid

The GETQUOTAROOT command takes the name of a mailbox and returns the list of quota roots for that mailbox in an untagged QUOTAROOT response. For each quota root on that list, it also returns that root's resource usage and limits in an untagged QUOTA response. It's like a two-for-one deal 🫢

Example:

C: A003 GETQUOTAROOT INBOX
S: * QUOTAROOT INBOX ""
S: * QUOTA "" (STORAGE 10 512)
S: A003 OK Getquota completed

5. Responses 🎁

5.1. QUOTA Response πŸ“Š

  • Data: quota root name, list of resource names, usages, and limits

This response shows up as a result of a GETQUOTA or GETQUOTAROOT command. The first string is the name of the quota root this quota applies to.

After the name comes an S-expression format list of the quota root's resource usage and limits. The list holds zero or more triplets. Each triplet has a resource name, the current usage of that resource, and the resource limit.

Resources that aren't named in the list have no limit on the quota root. So an empty list means the quota root has no administrative resource limits at all 🌸

Example:

S: * QUOTA "" (STORAGE 10 512)

5.2. QUOTAROOT Response πŸ—‚οΈ

  • Data: mailbox name, zero or more quota root names

This response shows up as a result of a GETQUOTAROOT command. The first string is the mailbox, and the rest are the names of the quota roots for that mailbox πŸ’œ

Example:

S: * QUOTAROOT INBOX ""
S: * QUOTAROOT comp.mail.mime

6. Formal syntax 🧬

Heads up, this part is the grammar, so it's kinda serious 😭

The syntax below uses the augmented Backus-Naur Form (BNF) notation from RFC 822, with one exception: the delimiter used with the "#" construct is a single space (SP) and not one or more commas.

Unless noted otherwise, all alphabetic characters are case-insensitive. Using upper or lower case to define token strings is just for editorial clarity. Implementations MUST accept these strings in a case-insensitive fashion. That's the rule, no cap 🧒

getquota        ::= "GETQUOTA" SP astring

getquotaroot    ::= "GETQUOTAROOT" SP astring

quota_list      ::= "(" #quota_resource ")"

quota_resource  ::= atom SP number SP number

quota_response  ::= "QUOTA" SP astring SP quota_list

quotaroot_response
                ::= "QUOTAROOT" SP astring *(SP astring)

setquota        ::= "SETQUOTA" SP astring SP setquota_list

setquota_list   ::= "(" 0#setquota_resource ")"

setquota_resource ::= atom SP number

7. References πŸ“š

  • [IMAP4] Crispin, M., "Internet Message Access Protocol - Version 4", RFC 1730, University of Washington, December 1994.
  • [RFC-822] Crocker, D., "Standard for the Format of ARPA Internet Text Messages", STD 11, RFC 822.

8. Security Considerations πŸ”

Okay, this part is seriously important, so listen up πŸ’€ Implementors should be careful to make sure the implementation of these commands does not violate the site's security policy. Resource usage of other users is likely to be considered confidential information, and it should not be divulged to unauthorized persons. Protect that data like it's your diary πŸ™ˆπŸ”₯

9. Author's Address 🏑

John G. Myers
Carnegie-Mellon University
5000 Forbes Ave.
Pittsburgh PA, 15213-3890

EMail: jgm+@cmu.edu
πŸ“¦ where this page comes from