RFC 9590

IMAP Extension for Returning Mailbox METADATA in Extended LIS

๐Ÿ“… published May 2024, from ietf

RFC 9590: IMAP Extension for Returning Mailbox METADATA in Extended LIST ๐Ÿ’–

okay bestie, this one is from May 2024 and it's on the Standards Track ๐ŸŽ€ It's authored by Kenneth Murchison and Bron Gondwana, both at Fastmail ๐Ÿฆ‹ The ISSN is 2070-1721. The title block has no Obsoletes or Updates line, so it doesn't list anything it replaces or changes.

Here's the whole table of contents, verbatim so you can find your way around:

   1.  Introduction
   2.  Conventions Used in This Document
   3.  METADATA Return Option to LIST Command
   4.  Examples
   5.  Formal Syntax
   6.  Security Considerations
   7.  Privacy Considerations
   8.  IANA Considerations
     8.1.  Registration of IMAP Capability LIST-METADATA
     8.2.  Registration of LIST-EXTENDED Option METADATA
   9.  References
     9.1.  Normative References
     9.2.  Informative References
   Authors' Addresses

Abstract โœจ

okay so this document adds an extension to the IMAP LIST command ๐ŸŒธ It lets the client ask for mailbox annotations (metadata) in the same request, alongside the other stuff LIST already gives you. It's giving efficiency, no cap ๐Ÿ’…

Status of This Memo ๐Ÿ“‹

This is an Internet Standards Track document ๐ŸŽ€

It's a product of the Internet Engineering Task Force (IETF) ๐ŸŒˆ It represents the consensus of the IETF community, has been through public review, and got approved for publication by the Internet Engineering Steering Group (IESG). If you want more on Internet Standards, check Section 2 of RFC 7841.

For the current status, any errata, and how to give feedback, go to https://www.rfc-editor.org/info/rfc9590 ๐Ÿฆ‹

Copyright (c) 2024 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 (https://trustee.ietf.org/license-info) in effect on the date of publication. Please review those documents carefully, because they describe your rights and restrictions for this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions, and they're provided without warranty as described in the Revised BSD License ๐Ÿ˜ญ

1. Introduction โœจ

bestie, IMAP clients sometimes fetch mailbox metadata (for example, color) so they can make the mailbox list look nicer for the logged-in user ๐ŸŒธ The annoying part is that the client has to send a LIST or LSUB command to get every mailbox, and then send a GETMETADATA command for each mailbox it found. So many round trips ๐Ÿ™ˆ

This document defines an extension to the IMAP LIST command, advertised with the capability string LIST-METADATA ๐Ÿงš With it, the client can ask for annotations on the available mailboxes, along with the other info LIST normally returns. Main character energy for the LIST command ๐Ÿ‘‘

2. Conventions Used in This Document ๐Ÿ“š

In the examples, C: marks lines sent by a client connected to a server, and S: marks 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 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. ๐Ÿซถ

Long lines in examples are wrapped using "The Single Backslash Strategy" described in [RFC8792] โœจ

3. METADATA Return Option to LIST Command ๐ŸŽ€

[RFC5464] defines the GETMETADATA command, which an IMAP client uses to retrieve mailbox annotations ๐Ÿฆ‹ Sometimes a client has to look up metadata for some or all of the mailboxes that LIST returned. Doing that with multiple GETMETADATA commands wastes bandwidth, and it can hurt performance if the client doesn't pipeline the requests ๐Ÿ˜ญ

So this document extends LIST with a new return option, "METADATA", which lets the client grab everything it wants in one command ๐Ÿ”ฅ For each listable mailbox that matches the list pattern and selection options, the server MUST return an untagged LIST response, followed by one or more untagged METADATA responses containing the mailbox annotations the client asked for. The untagged METADATA responses to an extended LIST command have the same syntax and semantics as the ones GETMETADATA would return for the same set of listable mailboxes (see Section 4.4.1 of [RFC5464]). As per Section 4.4 of [RFC5464], the server may return all the requested annotations in a single METADATA response per mailbox, or it may split them across multiple METADATA responses for each mailbox ๐ŸŒˆ

If the server can't look up the annotations for a given mailbox, it MAY drop the corresponding METADATA response ๐Ÿ™ˆ In that case, the LIST command still gets a tagged OK reply. Not the vibe we wanted, but it's still a success ๐Ÿ’–

4. Examples ๐Ÿ“

These examples fetch metadata from only the top-level hierarchy of the mailbox, using different selection criteria (see Section 6.3.9 of [RFC9051]) โœจ

In this example:

  • The "color" annotation for the "foo" mailbox hasn't been set, so the METADATA response has a value of "NIL" (i.e., it has no value) ๐ŸŒธ
  • "bar" has children but isn't an actual mailbox itself, so it gets no METADATA response ๐Ÿ™ˆ
NOTE: '' line wrapping per RFC 8792
  C: A00 CAPABILITY
  S: * CAPABILITY IMAP4rev1 IMAP4rev2 \
                  LIST-EXTENDED LIST-METADATA METADATA
  S: A00 OK Completed.
  C: A01 LIST "" % \
              RETURN (METADATA ("/shared/vendor/cmu/cyrus-imapd/color"))
  S: * LIST () "." "INBOX"
  S: * METADATA INBOX ("/shared/vendor/cmu/cyrus-imapd/color" "#b71c1c")
  S: * LIST () "." "foo"
  S: * METADATA "foo" ("/shared/vendor/cmu/cyrus-imapd/color" NIL)
  S: * LIST (\NonExistent) "." "bar"
  S: A01 OK List completed.

In this one, the LIST response for "foo" comes back because it has matching children ๐Ÿงš But there's no METADATA response for "foo" itself, since "foo" doesn't match the selection criteria ๐Ÿ’…

NOTE: '' line wrapping per RFC 8792
  C: A02 LIST (SUBSCRIBED RECURSIVEMATCH) "" % \
              RETURN (METADATA ("/shared/vendor/cmu/cyrus-imapd/color"))
  S: * LIST (\Subscribed) "." "INBOX"
  S: * METADATA INBOX ("/shared/vendor/cmu/cyrus-imapd/color" "#b71c1c")
  S: * LIST () "." "foo" (CHILDINFO ("SUBSCRIBED"))
  S: A02 OK List completed.

5. Formal Syntax ๐Ÿ“

The grammar below uses the Augmented Backus-Naur Form (ABNF) described in [RFC5234]. "return-option" is defined in [RFC5258], and "entry" is defined in [RFC5464] ๐ŸŽ€

   return-option =/ "METADATA" SP "(" entry *(SP entry) ")"

6. Security Considerations ๐Ÿ”

This specification doesn't introduce any security concerns beyond the ones described in [RFC5258] and [RFC5464] ๐Ÿ˜ญ๐Ÿ”

7. Privacy Considerations ๐Ÿซฃ

This specification doesn't introduce any privacy concerns beyond the ones described in [RFC5464] ๐Ÿซถ

8. IANA Considerations ๐Ÿ—‚๏ธ

8.1. Registration of IMAP Capability LIST-METADATA

IANA has added the "LIST-METADATA" IMAP capability to the "IMAP Capabilities" registry, located at <https://www.iana.org/assignments/imap4-capabilities/> ๐ŸŒธ

8.2. Registration of LIST-EXTENDED Option METADATA

IANA has registered the "METADATA" LIST-EXTENDED option in the "LIST-EXTENDED options" registry, located at <https://www.iana.org/assignments/imap-list-extended/> ๐Ÿ’œ The registration looks like this:

   LIST-EXTENDED option name:
      METADATA

   LIST-EXTENDED option type:
      RETURN

   LIST-EXTENDED option description:
      Causes the LIST command to return METADATA responses in addition
      to LIST responses.

   Published specification:
      RFC 9590, Section 3

   Security considerations:
      RFC 9590, Section 6

   Intended usage:
      COMMON

   Person and email address to contact for further information:
      Kenneth Murchison <murch@fastmailteam.com> and
      Bron Gondwana <brong@fastmailteam.com>

   Owner/Change controller:
      IESG <iesg@ietf.org>

9. References ๐Ÿ“š

9.1. Normative References

9.2. Informative References

Authors' Addresses ๐Ÿ“ฎ

   Kenneth Murchison
   Fastmail US LLC
   1429 Walnut Street
   Suite 1201
   Philadelphia, PA 19102
   United States of America
   Email: murch@fastmailteam.com


   Bron Gondwana
   Fastmail Pty Ltd
   Level 2, 114 William Street
   Melbourne VIC 3000
   Australia
   Email: brong@fastmailteam.com
๐Ÿ“ฆ where this page comes from