draft-ietf-extra-imap-status-size-02.txt | rfc8438.txt | |||
---|---|---|---|---|
EXTRA S. Bosch | Internet Engineering Task Force (IETF) S. Bosch | |||
Internet-Draft Dovecot Oy | Request for Comments: 8438 Dovecot Oy | |||
Intended status: Standards Track May 29, 2018 | Category: Standards Track August 2018 | |||
Expires: November 30, 2018 | ISSN: 2070-1721 | |||
Internet Message Access Protocol (IMAP) - STATUS=SIZE Extension | IMAP Extension for STATUS=SIZE | |||
draft-ietf-extra-imap-status-size-02 | ||||
Abstract | Abstract | |||
This document adds a new capability called "STATUS=SIZE" to the | This document adds a new capability called "STATUS=SIZE" to the | |||
Internet Message Access Protocol (IMAP). It allows retrieving the | Internet Message Access Protocol (IMAP). It allows retrieving the | |||
total storage size of a mailbox with a single STATUS command rather | total storage size of a mailbox with a single STATUS command rather | |||
than retrieving and summing the sizes of all individual messages in | than retrieving and summing the sizes of all individual messages in | |||
that mailbox. | that mailbox. | |||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This is an Internet Standards Track document. | |||
provisions of BCP 78 and BCP 79. | ||||
Internet-Drafts are working documents of the Internet Engineering | ||||
Task Force (IETF). Note that other groups may also distribute | ||||
working documents as Internet-Drafts. The list of current Internet- | ||||
Drafts is at http://datatracker.ietf.org/drafts/current/. | ||||
Internet-Drafts are draft documents valid for a maximum of six months | This document is a product of the Internet Engineering Task Force | |||
and may be updated, replaced, or obsoleted by other documents at any | (IETF). It represents the consensus of the IETF community. It has | |||
time. It is inappropriate to use Internet-Drafts as reference | received public review and has been approved for publication by the | |||
material or to cite them other than as "work in progress." | Internet Engineering Steering Group (IESG). Further information on | |||
Internet Standards is available in Section 2 of RFC 7841. | ||||
This Internet-Draft will expire on November 30, 2018. | Information about the current status of this document, any errata, | |||
and how to provide feedback on it may be obtained at | ||||
https://www.rfc-editor.org/info/rfc8438. | ||||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2018 IETF Trust and the persons identified as the | Copyright (c) 2018 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
(http://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
publication of this document. Please review these documents | publication of this document. Please review these documents | |||
carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
described in the Simplified BSD License. | described in the Simplified BSD License. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
2. Conventions Used in This Document . . . . . . . . . . . . . . 2 | 2. Conventions Used in This Document . . . . . . . . . . . . . . 3 | |||
3. STATUS Command and Response Extensions . . . . . . . . . . . 3 | 3. STATUS Command and Response Extensions . . . . . . . . . . . 3 | |||
4. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 4 | 4. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
5. Security Considerations . . . . . . . . . . . . . . . . . . . 5 | 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5 | |||
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 | 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 | |||
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 | 7. Normative References . . . . . . . . . . . . . . . . . . . . 5 | |||
8. Normative References . . . . . . . . . . . . . . . . . . . . 5 | Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6 | Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
1. Introduction | 1. Introduction | |||
This document extends Internet Message Access Protocol (IMAP) | This document extends the Internet Message Access Protocol (IMAP) | |||
[IMAP4rev1] with a new capability called "STATUS=SIZE". To determine | [IMAP4rev1] with a new capability called "STATUS=SIZE". To determine | |||
the total storage size of a mailbox, an IMAP client currently needs | the total storage size of a mailbox, an IMAP client currently needs | |||
to retrieve all message sizes individually using the FETCH command | to retrieve all message sizes individually using the FETCH command | |||
with the RFC822.SIZE data item. The "STATUS=SIZE" capability | with the RFC822.SIZE data item. The STATUS=SIZE capability provides | |||
provides a more efficient means to achieve this. It extends the | a more efficient means of achieving this. It extends the STATUS | |||
STATUS command with a new "SIZE" data item, which indicates the total | command with a new "SIZE" data item, which indicates the total size | |||
size of all messages in the target mailbox. This way, this | of all messages in the target mailbox. This way, this information | |||
information can be queried with just one STATUS command. When the | can be queried with just one STATUS command. When the LIST-STATUS | |||
"LIST-STATUS" IMAP capability [LIST-STATUS] is also available, the | IMAP capability [LIST-STATUS] is also available, the SIZE data item | |||
SIZE data item can be queried for many mailboxes at once using just | can be queried for many mailboxes at once using just one LIST | |||
one LIST command. | command. | |||
This capability is particularly useful for IMAP clients that do not | This capability is particularly useful for IMAP clients that do not | |||
cache the state of the message store, such as most webmail clients. | cache the state of the message store, such as most webmail clients. | |||
Without the "STATUS=SIZE" capability, such clients need to fetch all | Without the "STATUS=SIZE" capability, such clients need to fetch all | |||
message sizes from the server when the size of an individual mailbox | message sizes from the server when the size of an individual mailbox | |||
needs to be determined. For example, a user may request detailed | needs to be determined. For example, a user may request detailed | |||
quota usage information for each mailbox to find out which specific | quota usage information for each mailbox to find out which specific | |||
mailboxes consume most of the available storage resources. Using | mailboxes consume most of the available storage resources. Using | |||
this information, the user can get an overview of which mailboxes | this information, the user can get an overview of which mailboxes | |||
need to be cleaned up to reduce quota usage. The "QUOTA" capability | need to be cleaned up to reduce quota usage. The QUOTA capability | |||
[QUOTA] is no help in that scenario, since the provided QUOTAROOT | [QUOTA] is no help in that scenario, since the provided QUOTAROOT | |||
command can only yield the "STORAGE" resource usage of a whole quota | command can only yield the STORAGE resource usage of a whole quota | |||
root, but not for each individual mailbox within that root. | root, not each individual mailbox within that root. | |||
2. Conventions Used in This Document | 2. Conventions Used in This Document | |||
In examples, "C:" indicates lines sent by a client that is connected | 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. | to a server. "S:" indicates lines sent by the server to the client. | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |||
document are to be interpreted as described in [KEYWORDS]. | "OPTIONAL" in this document are to be interpreted as described in | |||
BCP 14 [KEYWORDS] [KEYWORDS2] when, and only when, they appear in all | ||||
capitals, as shown here. | ||||
3. STATUS Command and Response Extensions | 3. STATUS Command and Response Extensions | |||
This extension defines one new status data item for the STATUS | This extension defines one new status data item for the STATUS | |||
command and response: | command and response: | |||
SIZE | SIZE | |||
The total size of the mailbox in octets. This is not strictly | 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 | required to be an exact value, but it MUST be equal to or greater | |||
than the sum of the values of the RFC822.SIZE FETCH message data | than the sum of the values of the RFC822.SIZE FETCH message data | |||
item [IMAP4rev1] of all messages in the mailbox. When the "QUOTA" | item [IMAP4rev1] of all messages in the mailbox. When the QUOTA | |||
capability [QUOTA] is also supported, this value SHOULD be equal | capability [QUOTA] is also supported, this value SHOULD be equal | |||
to the storage usage value used to enforce the "STORAGE" resource | to the storage usage value used to enforce the STORAGE resource | |||
limit for this mailbox. This way, the client can directly infer | limit for this mailbox. This way, the client can directly infer | |||
the quota usage. | the quota usage. | |||
Since the total storage size of a mailbox can easily exceed 4 GB, | 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. | 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 | 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) | bits to make implementations on various platforms (such as Java) | |||
easier. | easier. | |||
Example: | Example: | |||
skipping to change at page 3, line 31 ¶ | skipping to change at page 4, line 4 ¶ | |||
clients MUST be capable of receiving 63-bit SIZE data item values. | 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 | 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) | bits to make implementations on various platforms (such as Java) | |||
easier. | easier. | |||
Example: | Example: | |||
C: A01 STATUS frop (MESSAGES SIZE UIDNEXT) | C: A01 STATUS frop (MESSAGES SIZE UIDNEXT) | |||
S: * STATUS frop (MESSAGES 8 SIZE 44421 UIDNEXT 242344) | S: * STATUS frop (MESSAGES 8 SIZE 44421 UIDNEXT 242344) | |||
S: A01 OK STATUS completed | S: A01 OK STATUS completed | |||
The same information can be obtained by using the following commands, | The same information can be obtained by using the following commands, | |||
albeit less efficient: | albeit less efficiently: | |||
C: A02 SELECT "frop" | C: A02 SELECT "frop" | |||
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) | S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) | |||
S: * 8 EXISTS | S: * 8 EXISTS | |||
S: * 1 RECENT | S: * 1 RECENT | |||
S: * OK [UNSEEN 7] First unseen. | S: * OK [UNSEEN 7] First unseen. | |||
S: * OK [UIDVALIDITY 1364851417] UIDs valid | S: * OK [UIDVALIDITY 1364851417] UIDs valid | |||
S: * OK [UIDNEXT 242344] Predicted next UID | S: * OK [UIDNEXT 242344] Predicted next UID | |||
S: * OK [HIGHESTMODSEQ 3914] Highest | S: * OK [HIGHESTMODSEQ 3914] Highest | |||
S: A02 OK [READ-WRITE] Select completed. | S: A02 OK [READ-WRITE] Select completed. | |||
skipping to change at page 5, line 18 ¶ | skipping to change at page 5, line 25 ¶ | |||
status-att-val =/ "SIZE" SP number64 | status-att-val =/ "SIZE" SP number64 | |||
number64 = 1*DIGIT | number64 = 1*DIGIT | |||
; Unsigned 63-bit integer | ; Unsigned 63-bit integer | |||
; (0 <= n <= 9,223,372,036,854,775,807) | ; (0 <= n <= 9,223,372,036,854,775,807) | |||
5. Security Considerations | 5. Security Considerations | |||
There are no known additional security issues with this extension | There are no known additional security issues with this extension | |||
beyond those described for the base protocol [IMAP4rev1] and for the | beyond those described for the base protocol [IMAP4rev1] and the | |||
LIST-STATUS extension [LIST-STATUS]. | LIST-STATUS extension [LIST-STATUS]. | |||
6. IANA Considerations | 6. IANA Considerations | |||
The IANA is requested to add "STATUS=SIZE" to the "IMAP Capabilities" | IANA has added "STATUS=SIZE" to the "IMAP Capabilities" registry | |||
registry located at <http://www.iana.org/assignments/imap- | located at <http://www.iana.org/assignments/imap-capabilities>. | |||
capabilities>. | ||||
7. Acknowledgements | ||||
Thanks to Bron Gondwana, Alexey Melnikov, Stan Kalisch, and Michael | ||||
Slusarz for reviews and suggestions. | ||||
8. Normative References | 7. Normative References | |||
[ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax | [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax | |||
Specifications: ABNF", STD 68, RFC 5234, January 2008. | Specifications: ABNF", STD 68, RFC 5234, | |||
DOI 10.17487/RFC5234, January 2008, | ||||
<https://www.rfc-editor.org/info/rfc5234>. | ||||
[IMAP4-ABNF] | [IMAP4-ABNF] | |||
Melnikov, A. and C. Daboo, "Collected Extensions to IMAP4 | Melnikov, A. and C. Daboo, "Collected Extensions to IMAP4 | |||
ABNF", RFC 4466, DOI 10.17487/RFC4466, April 2006, | ABNF", RFC 4466, DOI 10.17487/RFC4466, April 2006, | |||
<https://www.rfc-editor.org/info/rfc4466>. | <https://www.rfc-editor.org/info/rfc4466>. | |||
[IMAP4rev1] | [IMAP4rev1] | |||
Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION | Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION | |||
4rev1", RFC 3501, March 2003. | 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, | |||
<https://www.rfc-editor.org/info/rfc3501>. | ||||
[KEYWORDS] | [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate | |||
Bradner, S., "Key words for use in RFCs to Indicate | Requirement Levels", BCP 14, RFC 2119, | |||
Requirement Levels", BCP 14, RFC 2119, March 1997. | DOI 10.17487/RFC2119, March 1997, | |||
<https://www.rfc-editor.org/info/rfc2119>. | ||||
[KEYWORDS2] | ||||
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | ||||
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | ||||
May 2017, <https://www.rfc-editor.org/info/rfc8174>. | ||||
[LIST-STATUS] | [LIST-STATUS] | |||
Melnikov, A. and T. Sirainen, "IMAP4 Extension for | Melnikov, A. and T. Sirainen, "IMAP4 Extension for | |||
Returning STATUS Information in Extended LIST", RFC 5819, | Returning STATUS Information in Extended LIST", RFC 5819, | |||
March 2010. | DOI 10.17487/RFC5819, March 2010, | |||
<https://www.rfc-editor.org/info/rfc5819>. | ||||
[QUOTA] Myers, J., "IMAP4 QUOTA extension", RFC 2087, January | [QUOTA] Myers, J., "IMAP4 QUOTA extension", RFC 2087, | |||
1997. | DOI 10.17487/RFC2087, January 1997, | |||
<https://www.rfc-editor.org/info/rfc2087>. | ||||
Acknowledgements | ||||
Thanks to Bron Gondwana, Alexey Melnikov, Stan Kalisch, and Michael | ||||
Slusarz for reviews and suggestions. | ||||
Author's Address | Author's Address | |||
Stephan Bosch | Stephan Bosch | |||
Dovecot Oy | Dovecot Oy | |||
Lars Sonckin Kaari 12 | Lars Sonckin Kaari 12 | |||
Espoo 02600 | Espoo 02600 | |||
Finland | Finland | |||
Email: stephan.bosch@dovecot.fi | Email: stephan.bosch@dovecot.fi | |||
End of changes. 26 change blocks. | ||||
60 lines changed or deleted | 67 lines changed or added | |||
This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |