rfc-5819

IMAP4 Extension for Returning STATUS Information in Extended LIST

A. Melnikov, T. Sirainen
date2010-03 streamIETF areaapp wgmorg statusPROPOSED STANDARD pages6 canonicalhttps://www.rfc-editor.org/rfc/rfc5819 doi10.17487/RFC5819 errataview
Many IMAP clients display information about total number of messages / total number of unseen messages in IMAP mailboxes. In order to do that, they are forced to issue a LIST or LSUB command and to list all available mailboxes, followed by a STATUS command for each mailbox found. This document provides an extension to LIST command that allows the client to request STATUS information for mailboxes together with other information typically returned by the LIST command. [STANDARDS-TRACK]

Extracted elements (12)

design-rationale §2

RFC 3501 explicitly disallows mailbox patterns in the STATUS command to discourage frequent use, but this prohibition had the opposite effect: clients began issuing a STATUS command for each mailbox returned by LIST, wasting bandwidth and incurring extra round trips especially without pipelining. This extension remedies the situation by combining both into a single LIST command with a STATUS return option.

email

interoperability-note §3

A mailbox that appears in a LIST response solely because it has matching children (e.g., via RECURSIVEMATCH) but does not itself match the selection criteria does not receive a STATUS reply, as illustrated in the second example where "foo" gets a LIST response with CHILDINFO but no STATUS response.

email

interoperability-note §2

RFC 3501 explicitly disallows mailbox patterns in the STATUS command. Clients that do not advertise or recognize the LIST-STATUS capability must continue using the legacy LIST-then-STATUS-per-mailbox pattern; this extension is opt-in via capability advertisement.

email

normative-requirement §2 MUST

For each selectable mailbox matching 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.

email

normative-requirement §2 MUST NOT

If an attempted STATUS for a listed mailbox fails because the mailbox cannot be selected (e.g., due to ACL rights or a race condition), the STATUS response MUST NOT be returned and the LIST response MUST include the \NoSelect attribute.

email

normative-requirement §2 MAY

If the server runs into unexpected problems while trying to look up the STATUS information, it MAY drop the corresponding STATUS reply; in such a situation, the LIST command would still return a tagged OK reply.

email

normative-requirement §2 MUST

The server may have to buffer the LIST reply until it has successfully looked up the necessary STATUS information, to ensure the \NoSelect attribute can be included when STATUS retrieval fails.

email

protocol-element §2

The STATUS return option extends the IMAP LIST command (as defined by the LIST-EXTENDED framework in RFC 5258) to request STATUS data items alongside normal LIST responses. The option takes one or more status-att items as parameters.

email

registry §6

This document registers the LIST-EXTENDED return option named STATUS in the IANA LIST-EXTENDED options registry (established by RFC 5258). The option type is RETURN, intended usage is COMMON, and it causes LIST to return STATUS responses alongside LIST responses.

email, registry

registry §6

This document registers the LIST-STATUS capability in the IANA 'IMAP 4 Capabilities' registry, indicating server support for the STATUS return option on the LIST command.

email, registry

security-consideration §5

The extension makes it easier for clients to overload the server by requesting STATUS information for a large number of mailboxes in a single command. Server implementations must ensure they can still serve other IMAP connections and yield execution to other connections when necessary during large STATUS retrievals.

email, security

wire-format §4

The ABNF production 'status-option' is defined as: "STATUS" SP "(" status-att *(SP status-att) ")", and is added to 'return-option' via the extension production 'return-option =/ status-option'. This complies with the option-extension syntax from RFC 5258.

email