rfc2087.txt (8542B)
1 2 3 4 5 6 7 Network Working Group J. Myers 8 Request for Comments: 2087 Carnegie Mellon 9 Category: Standards Track January 1997 10 11 12 IMAP4 QUOTA extension 13 14 Status of this Memo 15 16 This document specifies an Internet standards track protocol for the 17 Internet community, and requests discussion and suggestions for 18 improvements. Please refer to the current edition of the "Internet 19 Official Protocol Standards" (STD 1) for the standardization state 20 and status of this protocol. Distribution of this memo is unlimited. 21 22 1. Abstract 23 24 The QUOTA extension of the Internet Message Access Protocol [IMAP4] 25 permits administrative limits on resource usage (quotas) to be 26 manipulated through the IMAP protocol. 27 28 Table of Contents 29 30 1. Abstract........................................... 1 31 2. Conventions Used in this Document.................. 1 32 3. Introduction and Overview.......................... 2 33 4. Commands........................................... 2 34 4.1. SETQUOTA Command................................... 2 35 4.2. GETQUOTA Command................................... 2 36 4.3. GETQUOTAROOT Command............................... 3 37 5. Responses.......................................... 3 38 5.1. QUOTA Response..................................... 3 39 5.2. QUOTAROOT Response................................. 4 40 6. Formal syntax...................................... 4 41 7. References......................................... 5 42 8. Security Considerations............................ 5 43 9. Author's Address................................... 5 44 45 46 2. Conventions Used in this Document 47 48 In examples, "C:" and "S:" indicate lines sent by the client and 49 server respectively. 50 51 52 53 54 55 56 57 58 Myers Standards Track [Page 1] 59 60 RFC 2087 QUOTA January 1997 61 62 63 3. Introduction and Overview 64 65 The QUOTA extension is present in any IMAP4 implementation which 66 returns "QUOTA" as one of the supported capabilities to the 67 CAPABILITY command. 68 69 An IMAP4 server which supports the QUOTA capability may support 70 limits on any number of resources. Each resource has an atom name 71 and an implementation-defined interpretation which evaluates to an 72 integer. Examples of such resources are: 73 74 Name Interpretation 75 76 STORAGE Sum of messages' RFC822.SIZE, in units of 1024 octets 77 MESSAGE Number of messages 78 79 80 Each mailbox has zero or more implementation-defined named "quota 81 roots". Each quota root has zero or more resource limits. All 82 mailboxes that share the same named quota root share the resource 83 limits of the quota root. 84 85 Quota root names do not necessarily have to match the names of 86 existing mailboxes. 87 88 4. Commands 89 90 4.1. SETQUOTA Command 91 92 Arguments: quota root 93 list of resource limits 94 95 Data: untagged responses: QUOTA 96 97 Result: OK - setquota completed 98 NO - setquota error: can't set that data 99 BAD - command unknown or arguments invalid 100 101 The SETQUOTA command takes the name of a mailbox quota root and a 102 list of resource limits. The resource limits for the named quota root 103 are changed to be the specified limits. Any previous resource limits 104 for the named quota root are discarded. 105 106 If the named quota root did not previously exist, an implementation 107 may optionally create it and change the quota roots for any number of 108 existing mailboxes in an implementation-defined manner. 109 110 111 112 113 114 Myers Standards Track [Page 2] 115 116 RFC 2087 QUOTA January 1997 117 118 119 Example: C: A001 SETQUOTA "" (STORAGE 512) 120 S: * QUOTA "" (STORAGE 10 512) 121 S: A001 OK Setquota completed 122 123 4.2. GETQUOTA Command 124 125 Arguments: quota root 126 127 Data: untagged responses: QUOTA 128 129 Result: OK - getquota completed 130 NO - getquota error: no such quota root, permission 131 denied 132 BAD - command unknown or arguments invalid 133 134 The GETQUOTA command takes the name of a quota root and returns the 135 quota root's resource usage and limits in an untagged QUOTA response. 136 137 Example: C: A003 GETQUOTA "" 138 S: * QUOTA "" (STORAGE 10 512) 139 S: A003 OK Getquota completed 140 141 4.3. GETQUOTAROOT Command 142 143 Arguments: mailbox name 144 145 Data: untagged responses: QUOTAROOT, QUOTA 146 147 Result: OK - getquota completed 148 NO - getquota error: no such mailbox, permission denied 149 BAD - command unknown or arguments invalid 150 151 The GETQUOTAROOT command takes the name of a mailbox and returns the 152 list of quota roots for the mailbox in an untagged QUOTAROOT 153 response. For each listed quota root, it also returns the quota 154 root's resource usage and limits in an untagged QUOTA response. 155 156 Example: C: A003 GETQUOTAROOT INBOX 157 S: * QUOTAROOT INBOX "" 158 S: * QUOTA "" (STORAGE 10 512) 159 S: A003 OK Getquota completed 160 161 162 163 164 165 166 167 168 169 170 Myers Standards Track [Page 3] 171 172 RFC 2087 QUOTA January 1997 173 174 175 5. Responses 176 177 5.1. QUOTA Response 178 179 Data: quota root name 180 list of resource names, usages, and limits 181 182 This response occurs as a result of a GETQUOTA or GETQUOTAROOT 183 command. The first string is the name of the quota root for which 184 this quota applies. 185 186 The name is followed by a S-expression format list of the resource 187 usage and limits of the quota root. The list contains zero or 188 more triplets. Each triplet conatins a resource name, the current 189 usage of the resource, and the resource limit. 190 191 Resources not named in the list are not limited in the quota root. 192 Thus, an empty list means there are no administrative resource 193 limits in the quota root. 194 195 Example: S: * QUOTA "" (STORAGE 10 512) 196 197 5.2. QUOTAROOT Response 198 199 Data: mailbox name 200 zero or more quota root names 201 202 This response occurs as a result of a GETQUOTAROOT command. The 203 first string is the mailbox and the remaining strings are the 204 names of the quota roots for the mailbox. 205 206 Example: S: * QUOTAROOT INBOX "" 207 S: * QUOTAROOT comp.mail.mime 208 209 6. Formal syntax 210 211 The following syntax specification uses the augmented Backus-Naur 212 Form (BNF) notation as specified in RFC 822 with one exception; the 213 delimiter used with the "#" construct is a single space (SP) and not 214 one or more commas. 215 216 Except as noted otherwise, all alphabetic characters are case- 217 insensitive. The use of upper or lower case characters to define 218 token strings is for editorial clarity only. Implementations MUST 219 accept these strings in a case-insensitive fashion. 220 221 222 223 224 225 226 Myers Standards Track [Page 4] 227 228 RFC 2087 QUOTA January 1997 229 230 231 getquota ::= "GETQUOTA" SP astring 232 233 getquotaroot ::= "GETQUOTAROOT" SP astring 234 235 quota_list ::= "(" #quota_resource ")" 236 237 quota_resource ::= atom SP number SP number 238 239 quota_response ::= "QUOTA" SP astring SP quota_list 240 241 quotaroot_response 242 ::= "QUOTAROOT" SP astring *(SP astring) 243 244 setquota ::= "SETQUOTA" SP astring SP setquota_list 245 246 setquota_list ::= "(" 0#setquota_resource ")" 247 248 setquota_resource ::= atom SP number 249 250 7. References 251 252 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version 4", 253 RFC 1730, University of Washington, December 1994. 254 255 [RFC-822] Crocker, D., "Standard for the Format of ARPA Internet 256 Text Messages", STD 11, RFC 822. 257 258 8. Security Considerations 259 260 Implementors should be careful to make sure the implementation of 261 these commands does not violate the site's security policy. The 262 resource usage of other users is likely to be considered confidential 263 information and should not be divulged to unauthorized persons. 264 265 9. Author's Address 266 267 John G. Myers 268 Carnegie-Mellon University 269 5000 Forbes Ave. 270 Pittsburgh PA, 15213-3890 271 272 EMail: jgm+@cmu.edu 273 274 275 276 277 278 279 280 281 282 Myers Standards Track [Page 5] 283