1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333
|
<pre>Internet Engineering Task Force (IETF) S. Bosch
Request for Comments: 8438 Dovecot Oy
Category: Standards Track August 2018
ISSN: 2070-1721
<span class="h1">IMAP Extension for STATUS=SIZE</span>
Abstract
This document adds a new capability called "STATUS=SIZE" to the
Internet Message Access Protocol (IMAP). It allows retrieving the
total storage size of a mailbox with a single STATUS command rather
than retrieving and summing the sizes of all individual messages in
that mailbox.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc7841#section-2">Section 2 of RFC 7841</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="https://www.rfc-editor.org/info/rfc8438">https://www.rfc-editor.org/info/rfc8438</a>.
Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
<span class="grey">Bosch Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc8438">RFC 8438</a> IMAP STATUS=SIZE Extension August 2018</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. Conventions Used in This Document . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-3">3</a>. STATUS Command and Response Extensions . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-4">4</a>. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-5">5</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-6">6</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-7">7</a>. Normative References . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
This document extends the Internet Message Access Protocol (IMAP)
[<a href="#ref-IMAP4rev1">IMAP4rev1</a>] with a new capability called "STATUS=SIZE". To determine
the total storage size of a mailbox, an IMAP client currently needs
to retrieve all message sizes individually using the FETCH command
with the <a href="./rfc822">RFC822</a>.SIZE data item. The STATUS=SIZE capability provides
a more efficient means of achieving this. It extends the STATUS
command with a new "SIZE" data item, which indicates the total size
of all messages in the target mailbox. This way, this information
can be queried with just one STATUS command. When the LIST-STATUS
IMAP capability [<a href="#ref-LIST-STATUS">LIST-STATUS</a>] is also available, the SIZE data item
can be queried for many mailboxes at once using just one LIST
command.
This capability is particularly useful for IMAP clients that do not
cache the state of the message store, such as most webmail clients.
Without the "STATUS=SIZE" capability, such clients need to fetch all
message sizes from the server when the size of an individual mailbox
needs to be determined. For example, a user may request detailed
quota usage information for each mailbox to find out which specific
mailboxes consume most of the available storage resources. Using
this information, the user can get an overview of which mailboxes
need to be cleaned up to reduce quota usage. The QUOTA capability
[<a href="#ref-QUOTA" title=""IMAP4 QUOTA extension"">QUOTA</a>] is no help in that scenario, since the provided QUOTAROOT
command can only yield the STORAGE resource usage of a whole quota
root, not each individual mailbox within that root.
<span class="grey">Bosch Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc8438">RFC 8438</a> IMAP STATUS=SIZE Extension August 2018</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Conventions Used in This Document</span>
In examples, "C:" indicates lines sent by a client that is connected
to a server. "S:" indicates lines sent by the server to the client.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
<a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a> [<a href="#ref-KEYWORDS" title=""Key words for use in RFCs to Indicate Requirement Levels"">KEYWORDS</a>] [<a href="#ref-KEYWORDS2">KEYWORDS2</a>] when, and only when, they appear in all
capitals, as shown here.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. STATUS Command and Response Extensions</span>
This extension defines one new status data item for the STATUS
command and response:
SIZE
The total size of the mailbox in octets. This is not strictly
required to be an exact value, but it MUST be equal to or greater
than the sum of the values of the <a href="./rfc822">RFC822</a>.SIZE FETCH message data
item [<a href="#ref-IMAP4rev1">IMAP4rev1</a>] of all messages in the mailbox. When the QUOTA
capability [<a href="#ref-QUOTA" title=""IMAP4 QUOTA extension"">QUOTA</a>] is also supported, this value SHOULD be equal
to the storage usage value used to enforce the STORAGE resource
limit for this mailbox. This way, the client can directly infer
the quota usage.
Since the total storage size of a mailbox can easily exceed 4 GB,
clients MUST be capable of receiving 63-bit SIZE data item values.
The message size is chosen to be at most 63 bits wide rather than 64
bits to make implementations on various platforms (such as Java)
easier.
Example:
C: A01 STATUS frop (MESSAGES SIZE UIDNEXT)
S: * STATUS frop (MESSAGES 8 SIZE 44421 UIDNEXT 242344)
S: A01 OK STATUS completed
<span class="grey">Bosch Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc8438">RFC 8438</a> IMAP STATUS=SIZE Extension August 2018</span>
The same information can be obtained by using the following commands,
albeit less efficiently:
C: A02 SELECT "frop"
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
S: * 8 EXISTS
S: * 1 RECENT
S: * OK [UNSEEN 7] First unseen.
S: * OK [UIDVALIDITY 1364851417] UIDs valid
S: * OK [UIDNEXT 242344] Predicted next UID
S: * OK [HIGHESTMODSEQ 3914] Highest
S: A02 OK [READ-WRITE] Select completed.
C: A03 FETCH 1:* (<a href="./rfc822">RFC822</a>.SIZE)
S: * 1 FETCH (<a href="./rfc822">RFC822</a>.SIZE 3224)
S: * 2 FETCH (<a href="./rfc822">RFC822</a>.SIZE 1222)
S: * 3 FETCH (<a href="./rfc822">RFC822</a>.SIZE 444)
S: * 4 FETCH (<a href="./rfc822">RFC822</a>.SIZE 4516)
S: * 5 FETCH (<a href="./rfc822">RFC822</a>.SIZE 544)
S: * 6 FETCH (<a href="./rfc822">RFC822</a>.SIZE 922)
S: * 7 FETCH (<a href="./rfc822">RFC822</a>.SIZE 31126)
S: * 8 FETCH (<a href="./rfc822">RFC822</a>.SIZE 2423)
S: A03 OK Fetch completed.
When the LIST-STATUS IMAP capability [<a href="#ref-LIST-STATUS">LIST-STATUS</a>] is also available,
the STATUS command can be combined with the LIST command to further
improve efficiency. This way, the sizes of many mailboxes can be
queried with just one LIST command.
Example:
C: A04 LIST "" % RETURN (STATUS (MESSAGES SIZE))
S: * LIST () "." "INBOX"
S: * STATUS "INBOX" (MESSAGES 17 SIZE 16234)
S: * LIST () "." "frop"
S: * STATUS "frop" (MESSAGES 8 SIZE 44421)
S: A04 OK List completed.
<span class="grey">Bosch Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc8438">RFC 8438</a> IMAP STATUS=SIZE Extension August 2018</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Formal Syntax</span>
The following syntax specification augments the grammar specified in
[<a href="#ref-IMAP4rev1">IMAP4rev1</a>] and [<a href="#ref-IMAP4-ABNF">IMAP4-ABNF</a>]. It uses the Augmented Backus-Naur Form
(ABNF) notation as specified in [<a href="#ref-ABNF" title=""Augmented BNF for Syntax Specifications: ABNF"">ABNF</a>]. Elements not defined here
are taken from [<a href="#ref-IMAP4rev1">IMAP4rev1</a>] and [<a href="#ref-IMAP4-ABNF">IMAP4-ABNF</a>].
capability =/ "STATUS=SIZE"
status-att =/ "SIZE"
status-att-val =/ "SIZE" SP number64
number64 = 1*DIGIT
; Unsigned 63-bit integer
; (0 <= n <= 9,223,372,036,854,775,807)
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Security Considerations</span>
There are no known additional security issues with this extension
beyond those described for the base protocol [<a href="#ref-IMAP4rev1">IMAP4rev1</a>] and the
LIST-STATUS extension [<a href="#ref-LIST-STATUS">LIST-STATUS</a>].
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. IANA Considerations</span>
IANA has added "STATUS=SIZE" to the "IMAP Capabilities" registry
located at <<a href="http://www.iana.org/assignments/imap-capabilities">http://www.iana.org/assignments/imap-capabilities</a>>.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Normative References</span>
[<a id="ref-ABNF">ABNF</a>] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, <a href="./rfc5234">RFC 5234</a>,
DOI 10.17487/RFC5234, January 2008,
<<a href="https://www.rfc-editor.org/info/rfc5234">https://www.rfc-editor.org/info/rfc5234</a>>.
[<a id="ref-IMAP4-ABNF">IMAP4-ABNF</a>]
Melnikov, A. and C. Daboo, "Collected Extensions to IMAP4
ABNF", <a href="./rfc4466">RFC 4466</a>, DOI 10.17487/RFC4466, April 2006,
<<a href="https://www.rfc-editor.org/info/rfc4466">https://www.rfc-editor.org/info/rfc4466</a>>.
[<a id="ref-IMAP4rev1">IMAP4rev1</a>]
Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
4rev1", <a href="./rfc3501">RFC 3501</a>, DOI 10.17487/RFC3501, March 2003,
<<a href="https://www.rfc-editor.org/info/rfc3501">https://www.rfc-editor.org/info/rfc3501</a>>.
<span class="grey">Bosch Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc8438">RFC 8438</a> IMAP STATUS=SIZE Extension August 2018</span>
[<a id="ref-KEYWORDS">KEYWORDS</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
DOI 10.17487/RFC2119, March 1997,
<<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>>.
[<a id="ref-KEYWORDS2">KEYWORDS2</a>]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in <a href="./rfc2119">RFC</a>
<a href="./rfc2119">2119</a> Key Words", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc8174">RFC 8174</a>, DOI 10.17487/RFC8174,
May 2017, <<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>>.
[<a id="ref-LIST-STATUS">LIST-STATUS</a>]
Melnikov, A. and T. Sirainen, "IMAP4 Extension for
Returning STATUS Information in Extended LIST", <a href="./rfc5819">RFC 5819</a>,
DOI 10.17487/RFC5819, March 2010,
<<a href="https://www.rfc-editor.org/info/rfc5819">https://www.rfc-editor.org/info/rfc5819</a>>.
[<a id="ref-QUOTA">QUOTA</a>] Myers, J., "IMAP4 QUOTA extension", <a href="./rfc2087">RFC 2087</a>,
DOI 10.17487/RFC2087, January 1997,
<<a href="https://www.rfc-editor.org/info/rfc2087">https://www.rfc-editor.org/info/rfc2087</a>>.
Acknowledgements
Thanks to Bron Gondwana, Alexey Melnikov, Stan Kalisch, and Michael
Slusarz for reviews and suggestions.
Author's Address
Stephan Bosch
Dovecot Oy
Lars Sonckin Kaari 12
Espoo 02600
Finland
Email: stephan.bosch@dovecot.fi
Bosch Standards Track [Page 6]
</pre>
|