RFC 5819
IMAP4 Extension for Returning STATUS Information in Extended LIST
RFC 5819: IMAP4 Extension for Returning STATUS Information in Extended LIST β¨
Okay bestie, this one is a Standards Track spec π by A. Melnikov (Isode Limited) and T. Sirainen (Unaffiliated), published March 2010. It doesn't obsolete anything, and it doesn't update anything either. It's an extension to IMAP4 that lets clients get mailbox STATUS info right inside a LIST command π¦ Its ISSN is 2070-1721.
Abstract πΈ
Okay so, a lot of IMAP clients want to show you how many messages a mailbox has and how many are unseen π¬ To get that, they have to LIST or LSUB all the mailboxes, then send a STATUS command for every single one. Way too many trips π This doc adds a return option to LIST so the client can ask for STATUS info for mailboxes in the same request, alongside the stuff LIST normally gives back. Main character energy π
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 Section 2 of RFC 5741.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc5819.
Copyright Notice π
Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) 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.
Table of Contents π§
1. Introduction ....................................................2
1.1. Conventions Used in This Document ..........................2
2. STATUS Return Option to LIST Command ............................2
3. Examples ........................................................3
4. Formal Syntax ...................................................4
5. Security Considerations .........................................4
6. IANA Considerations .............................................4
7. Acknowledgements ................................................5
8. Normative References ............................................5
1. Introduction π
Many IMAP clients show the total number of messages and the total number of unseen messages in each mailbox. To do that, they have to issue a LIST or LSUB command, list every available mailbox, and then send a STATUS command for each mailbox found. This document adds an extension to the LIST command so the client can ask for STATUS info for mailboxes alongside the other info LIST usually returns. β¨
1.1. Conventions Used in This Document π
In examples, "C:" marks lines sent by a client connected to a server. "S:" marks lines sent by the server to the client.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [Kwds].
2. STATUS Return Option to LIST Command π¦
Okay so [RFC3501] straight up bans mailbox patterns in the STATUS command π ββοΈ The reason was to discourage clients from spamming STATUS, since it can be pretty expensive for a server to run. But that ban backfired, lowkey. A whole new generation of IMAP clients showed up and sends a STATUS command for every mailbox LIST returns. That's suboptimal, to say the least π It wastes bandwidth, and clients that don't do IMAP pipelining also end up making way too many round trips. This document fixes that with one single command that gets all the info the client needs. So this doc extends the LIST command with a new return option, STATUS π It takes STATUS data items as parameters. For each selectable mailbox that matches the list pattern and selection options, the server MUST return an untagged LIST response followed by an untagged STATUS response containing the information requested in the STATUS return option.
If a STATUS lookup for a listed mailbox fails because the mailbox can't be selected (for example, if the "l" ACL right [ACL] is granted on the mailbox but the "r" right isn't, or because of a race condition where the mailbox becomes \NoSelect between LIST and STATUS), the STATUS response MUST NOT be returned, and the LIST response MUST include the \NoSelect attribute. Which means the server may have to buffer the LIST reply until it has successfully looked up the STATUS info π§
If the server runs into unexpected problems while looking up the STATUS info, it MAY drop the corresponding STATUS reply. In that case, the LIST command still returns a tagged OK reply π«Ά
3. Examples π
C: A01 LIST "" % RETURN (STATUS (MESSAGES UNSEEN))
S: * LIST () "." "INBOX"
S: * STATUS "INBOX" (MESSAGES 17 UNSEEN 16)
S: * LIST () "." "foo"
S: * STATUS "foo" (MESSAGES 30 UNSEEN 29)
S: * LIST (\NoSelect) "." "bar"
S: A01 OK List completed.
The "bar" mailbox isn't selectable, so it has no STATUS reply. π
C: A02 LIST (SUBSCRIBED RECURSIVEMATCH)"" % RETURN (STATUS
(MESSAGES))
S: * LIST (\Subscribed) "." "INBOX"
S: * STATUS "INBOX" (MESSAGES 17)
S: * LIST () "." "foo" (CHILDINFO ("SUBSCRIBED"))
S: A02 OK List completed.
The LIST reply for "foo" comes back because it has matching children, but there's no STATUS reply because "foo" itself doesn't match the selection criteria π
4. Formal Syntax π
The following syntax spec uses the augmented Backus-Naur Form (BNF) as described in [ABNF]. Terms that aren't defined here are taken from [RFC3501] and [LISTEXT].
return-option =/ status-option
status-option = "STATUS" SP "(" status-att *(SP status-att) ")"
;; This ABNF production complies with
;; <option-extension> syntax.
5. Security Considerations π₯
This extension makes it a bit easier for clients to overload the server by requesting STATUS info for a large number of mailboxes. BUT, as already mentioned in the introduction, existing clients already do this by sending a big pile of STATUS commands for every mailbox they care about π While a server is doing STATUS retrieval for big lists of mailboxes, it needs to make sure it can still serve other IMAP connections and yield execution to them when necessary. Serious stuff, bestie π¨
6. IANA Considerations πΈ
IMAP4 capabilities get registered by publishing a Standards Track or IESG-approved Experimental RFC. The "IMAP 4 Capabilities" registry is available from the IANA webiste:
http://www.iana.org
This document defines the LIST-STATUS IMAP capability. IANA has added it to the registry.
IANA has also added the following new LIST-EXTENDED option to the IANA registry established by [LISTEXT]:
To: iana@iana.org
Subject: Registration of LIST-EXTENDED option STATUS
LIST-EXTENDED option name: STATUS
LIST-EXTENDED option type: RETURN
LIST-EXTENDED option description: Causes the LIST command to return
STATUS responses in addition to LIST responses.
Published specification: RFC 5819
Security considerations: RFC 5819
Intended usage: COMMON
Person and email address to contact for further information:
Alexey Melnikov <Alexey.Melnikov@isode.com>
Owner/Change controller: iesg@ietf.org
7. Acknowledgements π§ββοΈ
Thanks to Philip Van Hoof, who pointed out that STATUS and LIST should be combined to optimize traffic and the number of round trips. Iconic π
8. Normative References π
[ABNF] Crocker, D., Ed., and P. Overell, "Augmented BNF for
Syntax Specifications: ABNF", STD 68, RFC 5234, January
2008.
[ACL] Melnikov, A., "IMAP4 Access Control List (ACL) Extension",
RFC 4314, December 2005.
[Kwds] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[LISTEXT] Leiba, B. and A. Melnikov, "Internet Message Access
Protocol version 4 - LIST Command Extensions", RFC 5258,
June 2008.
[RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
4rev1", RFC 3501, March 2003.
Authors' Addresses π
Alexey Melnikov Isode Limited 5 Castle Business Village 36 Station Road Hampton, Middlesex TW12 2BX UK
EMail: Alexey.Melnikov@isode.com URI: http://www.melnikov.ca/
Timo Sirainen
EMail: tss@iki.fi
π¦ where this page comes from
- ietf: rfc5819 2010-03
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms