<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.23 (Ruby 3.2.3) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-gougeon-imap-webpush-01" category="info" submissionType="independent" version="3">
  <!-- xml2rfc v2v3 conversion 3.27.0 -->
  <front>
    <title>The IMAP WEBPUSH extension</title>
    <seriesInfo name="Internet-Draft" value="draft-gougeon-imap-webpush-01"/>
    <author fullname="Simon Gougeon">
      <organization/>
      <address>
        <email>ietf@sgougeon.fr</email>
      </address>
    </author>
    <date year="2025" month="February" day="10"/>
    <abstract>
      <?line 51?>

<t>This document defines a WEBPUSH extension of the Internet Message Access Protocol (IMAP) that permits IMAP servers to send WebPush notifications.</t>
    </abstract>
  </front>
  <middle>
    <?line 55?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>WebPush (defined by <xref target="RFC8030"/>, <xref target="RFC8291"/> and <xref target="RFC8292"/>) defines a way for applications to deliver real-time events in a timely fashion, with push notifications. Push notifications allows consolidating all real-time events into a single session which ensures more efficient use of network and radio resources. They are particularly used in mobile environments.</t>
      <t>Many use cases have led to a need for real-time events with email. IMAP support for real-time events has been added with the IDLE command (<xref target="RFC2177"/>, <xref target="RFC9051"/>) and the NOTIFY extension (<xref target="RFC5465"/>). These commands require using a persistent connection per account and contribute to unnecessary use of the device radio.</t>
      <t>JMAP (<xref target="RFC8620"/>) has responded to this need by supporting WebPush from the beginning.</t>
      <t>Therefore, this extension permits IMAP servers to send WebPush notifications.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>In examples, "C:" and "S:" indicate lines sent by the client and server, respectively. Lines ending in "\" are interrupted for presentation reasons, they would actually be joined to the next line. Note that each other line includes the terminating CRLF.</t>
      <t>User agent, is defined in <xref target="RFC8030"/> as a device and software that is the recipient of push messages. It describes here the mail client.</t>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="overview">
      <name>Overview</name>
      <t>This extension adds 3 commands: GETVAPID, WEBPUSH and LWEBPUSH. GETVAPID allows to get the server VAPID public key, WEBPUSH to subscribe a new push registration and LWEBPUSH to list current registrations. Every time a message is added to one of the subscribed mailbox (with the SUBSCRIBE command), the IMAP server sends a push message to the registered push endpoints.</t>
    </section>
    <section anchor="client-commands">
      <name>Client Commands</name>
      <section anchor="getvapid-command">
        <name>GETVAPID Command</name>
        <dl>
          <dt>Arguments:</dt>
          <dd>
            <t>none</t>
          </dd>
          <dt>Responses:</dt>
          <dd>
            <dl>
              <dt><bcp14>REQUIRED</bcp14> untagged response:</dt>
              <dd>
                <t>VAPID</t>
              </dd>
            </dl>
          </dd>
          <dt>Result:</dt>
          <dd>
            <dl>
              <dt>OK -</dt>
              <dd>
                <t>capability completed</t>
              </dd>
            </dl>
          </dd>
          <dt/>
          <dd>
            <dl>
              <dt>BAD -</dt>
              <dd>
                <t>arguments invalid</t>
              </dd>
            </dl>
          </dd>
        </dl>
        <t>The GETVAPID command requests the VAPID public key (<xref target="RFC8292"/>) of the server. the server <bcp14>MUST</bcp14> send a single untagged VAPID response before the tagged OK response. This is used by clients to request a push endpoint on their push server restricted to this mail server.</t>
        <t>Example:</t>
        <artwork><![CDATA[
C: a1 GETVAPID
S: * VAPID \
    "BOniQ9xHBPNY9gnQW4o-16vHqOb40pEIMifyUdFsxAgy\
    zVkFMguxw0QrdbZcq8hRjN2zpeInRvKVPlkzABvuTnI"
S: a1 OK GETVAPID completed
]]></artwork>
      </section>
      <section anchor="webpush-command">
        <name>WEBPUSH Command</name>
        <dl>
          <dt>Arguments (create/update):</dt>
          <dd>
            <t>registration ID</t>
          </dd>
          <dt/>
          <dd>
            <t>push endpoint</t>
          </dd>
          <dt/>
          <dd>
            <t>ECDH public key</t>
          </dd>
          <dt/>
          <dd>
            <t>authentication secret</t>
          </dd>
          <dt>Arguments (delete):</dt>
          <dd>
            <t>registration ID</t>
          </dd>
          <dt/>
          <dd>
            <t>NIL</t>
          </dd>
          <dt>Responses:</dt>
          <dd>
            <dl>
              <dt><bcp14>OPTIONAL</bcp14> untagged response:</dt>
              <dd>
                <t>WEBPUSH</t>
              </dd>
            </dl>
          </dd>
          <dt>Result:</dt>
          <dd>
            <dl>
              <dt>OK -</dt>
              <dd>
                <t>create completed</t>
              </dd>
            </dl>
          </dd>
          <dt/>
          <dd>
            <dl>
              <dt>NO -</dt>
              <dd>
                <t>create failure: can't create webpush registration with these arguments</t>
              </dd>
            </dl>
          </dd>
          <dt/>
          <dd>
            <dl>
              <dt>BAD -</dt>
              <dd>
                <t>command unknown or arguments invalid</t>
              </dd>
            </dl>
          </dd>
        </dl>
        <t>The WEBPUSH command creates, updates or delete a push registration for the account. The server <bcp14>MAY</bcp14> return a single untagged WEBPUSH response before the tagged OK response.</t>
        <t>The registration ID is uniq per account and identify the push registration. Sending a WEBPUSH command with an existing registration ID updates the current registration. Sending a WEBPUSH command with an existing registration ID following by NIL deletes the registration.</t>
        <t>The push endpoint <bcp14>MUST</bcp14> be the URI that the mail server sends push messages to. This is defined as the URI for push resource in <xref target="RFC8030"/>. This URI <bcp14>MUST</bcp14> use the "https" scheme.</t>
        <t>The ECDH public key is the user agent public key on the P-256 curve. It <bcp14>MUST</bcp14> be encoded in the uncompressed form <xref target="SEC_1"/> (section 2.3.3, replicated from X9.62), and base64url encoded as described in <xref target="RFC7515"/>. This is used to encrypt push notifications following <xref target="RFC8291"/>.</t>
        <t>The authentication secret is 16 random bytes. It <bcp14>MUST</bcp14> be base64url encoded as described in <xref target="RFC7515"/>. This is used to encrypt push notifications following <xref target="RFC8291"/>.</t>
        <t>The client <bcp14>SHOULD</bcp14> register their push subscription from time to time, like when the client starts in order to restore registrations, in case the endpoint was removed.</t>
        <t>Example:</t>
        <artwork><![CDATA[
C: a1 LWEBPUSH "*"
S: a1 OK LWEBPUSH completed
C: a2 WEBPUSH a8282bf9-6102-4e1b-bb61-d26d0e532e65 \
    https://push.example.net/push/random1 \
    BCVxsr7N_eNgVRqvHtD0zTZsEc6-VV-JvLexhqUzORcxaOzi6-AYWXvTBHm4bj\
    yPjs7Vd8pZGH6SRpkNtoIAiw4 \
    BTBZMqHH6r4Tts7J_aSIgg
S: * WEBPUSH "a8282bf9-6102-4e1b-bb61-d26d0e532e65" \
    "https://push.example.net/push/random1" 0
S: a2 OK WEBPUSH completed
C: a3 WEBPUSH a8282bf9-6102-4e1b-bb61-d26d0e532e65 \
    https://push.example.net/push/JzLQ3raZJfFBR0aqvOMsLrt54w4rJUsV \
    BCVxsr7N_eNgVRqvHtD0zTZsEc6-VV-JvLexhqUzORcxaOzi6-AYWXvTBHm4bj\
    yPjs7Vd8pZGH6SRpkNtoIAiw4 \
    BTBZMqHH6r4Tts7J_aSIgg
S: * WEBPUSH "a8282bf9-6102-4e1b-bb61-d26d0e532e65" \
    "https://push.example.net/push/JzLQ3raZJfFBR0aqvOMsLrt54w4rJUsV" 0
S: a3 OK WEBPUSH completed
C: a4 LWEBPUSH "*"
S: * WEBPUSH "a8282bf9-6102-4e1b-bb61-d26d0e532e65" \
    "https://push.example.net/push/JzLQ3raZJfFBR0aqvOMsLrt54w4rJUsV" 0
S: a4 OK LWEBPUSH completed
C: a5 WEBPUSH a8282bf9-6102-4e1b-bb61-d26d0e532e65 NIL
S: a5 OK WEBPUSH completed
C: a6 LWEBPUSH "*"
S: a6 OK LWEBPUSH completed
]]></artwork>
      </section>
      <section anchor="lwebpush-command">
        <name>LWEBPUSH Command</name>
        <dl>
          <dt>Arguments:</dt>
          <dd>
            <t>registration ID with possible wildcards</t>
          </dd>
          <dt>Responses:</dt>
          <dd>
            <dl>
              <dt>untagged response:</dt>
              <dd>
                <t>WEBPUSH</t>
              </dd>
            </dl>
          </dd>
          <dt>Result:</dt>
          <dd>
            <dl>
              <dt>OK -</dt>
              <dd>
                <t>list completed</t>
              </dd>
            </dl>
          </dd>
          <dt/>
          <dd>
            <dl>
              <dt>NO -</dt>
              <dd>
                <t>list failure: can't list webpush records</t>
              </dd>
            </dl>
          </dd>
          <dt/>
          <dd>
            <dl>
              <dt>BAD -</dt>
              <dd>
                <t>arguments invalid</t>
              </dd>
            </dl>
          </dd>
        </dl>
        <t>The LWEBPUSH command returns a subset of webpush registrations from the complete set of all registrations available to the client. Zero or more untagged WEBPUSH responses are returned, containing information to identified the registrations. The server <bcp14>MUST</bcp14> return the WEBPUSH response for the exact registration ID if the account has a registration with this ID. It <bcp14>MUST</bcp14> return all the account's registrations if the argument is a wildcard "*".</t>
        <t>Example:</t>
        <artwork><![CDATA[
C: a1 LWEBPUSH "*"
S: * WEBPUSH "a8282bf9-6102-4e1b-bb61-d26d0e532e65" \
    "https://push.endpoint.tld/random1" 0
S: * WEBPUSH "80a3b492-bc9c-46a9-91ab-5866b27073bb" \
    "https://push.endpoint.tld/random2" 0
S: * WEBPUSH "28626e4e-37d1-456c-a667-5258b5528508" \
    "https://push.endpoint.tld/random3" 1112
S: a1 OK LWEBPUSH completed
C: a2 LWEBPUSH "a8282bf9-6102-4e1b-bb61-d26d0e532e65"
S: * WEBPUSH "a8282bf9-6102-4e1b-bb61-d26d0e532e65" \
    "https://push.endpoint.tld/random1" 0
S: a2 OK LWEBPUSH completed
]]></artwork>
      </section>
      <section anchor="webpushsilent-command">
        <name>WEBPUSH_SILENT Command</name>
        <dl>
          <dt>Arguments:</dt>
          <dd>
            <t>registration ID</t>
          </dd>
          <dt/>
          <dd>
            <t>duration to silent, in seconds. <bcp14>MUST</bcp14> be equal or higher than 0</t>
          </dd>
          <dt>Responses:</dt>
          <dd>
            <dl>
              <dt><bcp14>OPTIONAL</bcp14> untagged response:</dt>
              <dd>
                <t>WEBPUSH</t>
              </dd>
            </dl>
          </dd>
          <dt>Result:</dt>
          <dd>
            <dl>
              <dt>OK -</dt>
              <dd>
                <t>create completed</t>
              </dd>
            </dl>
          </dd>
          <dt/>
          <dd>
            <dl>
              <dt>NO -</dt>
              <dd>
                <t>create failure: can't create webpush registration with these arguments</t>
              </dd>
            </dl>
          </dd>
          <dt/>
          <dd>
            <dl>
              <dt>BAD -</dt>
              <dd>
                <t>command unknown or arguments invalid</t>
              </dd>
            </dl>
          </dd>
        </dl>
        <t>The WEBPUSH_SILENT command allows the client to silent a push registration for a duration. It may be useful for clients synchronizing with the server when they receive a push notification, without parsing it. It may also be useful for clients that support a "do not disturb" period. When the duration is 0, the push registration is active again and the server will send events for this registration.</t>
        <t>For example, when a client receives a push notification, it may silent the registration for the duration (or a little less) that it stays connected to the server:</t>
        <t>Example:</t>
        <artwork><![CDATA[
C: a1 WEBPUSH_SILENT a8282bf9-6102-4e1b-bb61-d26d0e532e65 10
S: * WEBPUSH "a8282bf9-6102-4e1b-bb61-d26d0e532e65" \
    "https://push.endpoint.tld/random1" 10
S: a1 OK WEBPUSH_SILENT completed
]]></artwork>
      </section>
    </section>
    <section anchor="server-responses">
      <name>Server Responses</name>
      <section anchor="vapid-response">
        <name>VAPID Response</name>
        <t>The VAPID response occurs as a result of a GETVAPID command. It returns the server VAPID public key (<xref target="RFC8292"/>). This is a public key on the P-256 curve. It <bcp14>MUST</bcp14> be encoded in the uncompressed form <xref target="SEC_1"/> (section 2.3.3, replicated from X9.62), and base64url encoded as described in <xref target="RFC7515"/>. The server <bcp14>MAY</bcp14> use a different key pair for each account.</t>
        <t>Example:</t>
        <artwork><![CDATA[
S: * VAPID "BOniQ9xHBPNY9gnQW4o-16vHqOb40pEIMifyUdFsxAgy\
    zVkFMguxw0QrdbZcq8hRjN2zpeInRvKVPlkzABvuTnI"
]]></artwork>
      </section>
      <section anchor="webpush-response">
        <name>WEBPUSH Response</name>
        <t>The WEBPUSH response occurs as a result of a LWEBPUSH command. It <bcp14>MAY</bcp14> be returned as a result of a WEBPUSH, or a WEBPUSH_SILENT command too. It contains the registration ID, the push endpoint of the registration, and the silenced duration in seconds.</t>
        <t>Example:</t>
        <artwork><![CDATA[
S: * WEBPUSH "a8282bf9-6102-4e1b-bb61-d26d0e532e65" \
    "https://push.endpoint.tld/random1" 0
]]></artwork>
      </section>
      <section anchor="sync-response">
        <name>SYNC Response</name>
        <t>The SYNC response is sent with a push notification by the server when a response that should be pushed exceed the 3993 bytes limit. It is used to inform the client that it <bcp14>SHOULD</bcp14> send a command to retrieve the response. It contains the response name in question.</t>
        <t>For example, if a server has a lot of flags, and the list exceed the limit, the server sends a SYNC for FLAGS.</t>
        <t>Example, instead of sending:</t>
        <artwork><![CDATA[
S: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen [Very long \
    list of flags ...])
]]></artwork>
        <t>The server sends:</t>
        <artwork><![CDATA[
S: * SYNC FLAGS
]]></artwork>
        <t><em>Note: The response for the example is anotated like a usual response, but the <tt>*</tt> should be replaced by the general prefix <tt>^</tt> in the push message, as defined in the Push notifications content section.</em></t>
      </section>
    </section>
    <section anchor="push-notifications">
      <name>Push notifications</name>
      <t>Once an account has one or more push registration (registered with WEBPUSH command), the server sends a push message for each registration every time a change is recorded. This can be a change for the account (for example when a new permanent FLAG is added) or for the subscribed mailboxes (new mail, deletions, flag changes).</t>
      <t>The notification is encrypted following <xref target="RFC8291"/> specifications, send following <xref target="RFC8030"/> and authorized with <xref target="RFC8292"/>.</t>
      <section anchor="content">
        <name>Content</name>
        <t>The server can send EXISTS, EXPUNGE, FETCH, and other responses at any time. Every response relative to a mailbox <bcp14>MUST</bcp14> be preceded by the mailbox name. Every other response, for example relative to the server, must be preceded by <tt>^</tt>. The server <bcp14>MAY</bcp14> send multiple responses in a single push notification.</t>
        <t>As stated in RFC8291, the cleartext content of push notifications <bcp14>MUST NOT</bcp14> be longer than 3993 bytes. If the server wants to inform the client about a response longer than that, it <bcp14>MAY</bcp14> send a SYNC message.</t>
        <t>If the server sends a FETCH response, it <bcp14>MUST</bcp14> include a UID FETCH item. Every EXISTS response <bcp14>MUST</bcp14> be followed by a FETCH response. The FETCH response <bcp14>SHOULD</bcp14> contain the UID, the ENVELOPE, and the BINARY if it fits in the message length limits, or <bcp14>SHOULD</bcp14> contain the UID and the ENVELOPE, if it fits in the limits.</t>
        <t>So, when a new mail comes in, the server sends:</t>
        <ul spacing="normal">
          <li>
            <t>EXISTS</t>
          </li>
          <li>
            <t>and FETCH (UID ENVELOPE BINARY)</t>
          </li>
          <li>
            <t>or FETCH (UID ENVELOPE)</t>
          </li>
          <li>
            <t>or FETCH (UID)</t>
          </li>
        </ul>
        <t>Example of a push notification containing multiple responses for the "INBOX" mailbox::</t>
        <artwork><![CDATA[
INBOX 2 FETCH (UID 2 FLAGS (\Deleted \Seen))
INBOX 2 EXPUNGE
]]></artwork>
        <t>Example of a push notification when a new mail arrives in the "New messages" mailbox:</t>
        <artwork><![CDATA[
"New Messages" 2 EXISTS
"New Messages" 2 FETCH (UID 3 ENVELOPE \
    ("Mon, 7 Feb 1994 21:52:25 -0800 (PST)" \
    "afternoon meeting" \
    (("Fred Foobar" NIL "foobar" "Blurdybloop.example")) \
    (("Fred Foobar" NIL "foobar" "Blurdybloop.example")) \
    (("Fred Foobar" NIL "foobar" "Blurdybloop.example")) \
    ((NIL NIL "mooch" "owatagu.siam.edu.example")) \
    NIL NIL NIL "<B27397-0100000@Blurdybloop.example>"))
]]></artwork>
        <t>Example of a push notification related to the server configuration, using the general prefix <tt>^</tt>, to inform about a <tt>FLAGS</tt> response that is longer than 3993 bytes:</t>
        <artwork><![CDATA[
^ SYNC FLAGS
]]></artwork>
      </section>
      <section anchor="push-message-processing">
        <name>Push message processing</name>
        <t>Because every responses sent by push notifications start with a prefix (the mailbox name or the general prefix <tt>^</tt>) the client <bcp14>MAY</bcp14> parse the prefix only and choose to synchronize with the server. For example, when the client receives <tt>INBOX ANYRESPONSE</tt>, it requests the server for new events.</t>
        <t>The client <bcp14>MAY</bcp14> also parse the prefix and some events. For example, a client may parse FETCH responses, so it can directly show important informations on the user interface. And synchronize with the server if it receives another response.</t>
        <t>The client <bcp14>MAY</bcp14> parse the name only of some events too. So when it gets <tt>INBOX KNOWN_NOT_IMPORTANT</tt>, the client can ignore it, or choose to synchronize this mailbox with the server during the next periodic synchronization.</t>
        <t>The server <bcp14>MAY</bcp14> not send events that it consider not important.</t>
      </section>
      <section anchor="push-server-response">
        <name>Push server response</name>
        <t>When the push server returns a <tt>429 Too many requests</tt>, it should have send a <tt>Retry-After</tt> headers <xref target="RFC9110"/> to indicate how long the server has to wait before sending another request. If this header is present, the server <bcp14>MUST</bcp14> follow the period requested. If this header is not present, the mail server <bcp14>SHOULD</bcp14> wait 5 minutes before sending another request to this endpoint.</t>
        <t>When the push server returns another 4XX status code, the mail server <bcp14>MUST</bcp14> removes the registration.</t>
        <t>When the push server returns a 5XX status code, the mail server <bcp14>SHOULD</bcp14> wait 5 minutes before sending another request to the endpoint.</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The privacy and security considerations of <xref target="RFC8030"/> <xref target="RFC8291"/> and <xref target="RFC8292"/> all apply to the use of this extension.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC8030" target="https://www.rfc-editor.org/info/rfc8030" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8030.xml">
          <front>
            <title>Generic Event Delivery Using HTTP Push</title>
            <author fullname="M. Thomson" initials="M." surname="Thomson"/>
            <author fullname="E. Damaggio" initials="E." surname="Damaggio"/>
            <author fullname="B. Raymor" initials="B." role="editor" surname="Raymor"/>
            <date month="December" year="2016"/>
            <abstract>
              <t>This document describes a simple protocol for the delivery of real- time events to user agents. This scheme uses HTTP/2 server push.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8030"/>
          <seriesInfo name="DOI" value="10.17487/RFC8030"/>
        </reference>
        <reference anchor="RFC8292" target="https://www.rfc-editor.org/info/rfc8292" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8292.xml">
          <front>
            <title>Voluntary Application Server Identification (VAPID) for Web Push</title>
            <author fullname="M. Thomson" initials="M." surname="Thomson"/>
            <author fullname="P. Beverloo" initials="P." surname="Beverloo"/>
            <date month="November" year="2017"/>
            <abstract>
              <t>An application server can use the Voluntary Application Server Identification (VAPID) method described in this document to voluntarily identify itself to a push service. The "vapid" authentication scheme allows a client to include its identity in a signed token with requests that it makes. The signature can be used by the push service to attribute requests that are made by the same application server to a single entity. The identification information can allow the operator of a push service to contact the operator of the application server. The signature can be used to restrict the use of a push message subscription to a single application server.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8292"/>
          <seriesInfo name="DOI" value="10.17487/RFC8292"/>
        </reference>
        <reference anchor="RFC8291" target="https://www.rfc-editor.org/info/rfc8291" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8291.xml">
          <front>
            <title>Message Encryption for Web Push</title>
            <author fullname="M. Thomson" initials="M." surname="Thomson"/>
            <date month="November" year="2017"/>
            <abstract>
              <t>This document describes a message encryption scheme for the Web Push protocol. This scheme provides confidentiality and integrity for messages sent from an application server to a user agent.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8291"/>
          <seriesInfo name="DOI" value="10.17487/RFC8291"/>
        </reference>
        <reference anchor="RFC9051" target="https://www.rfc-editor.org/info/rfc9051" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9051.xml">
          <front>
            <title>Internet Message Access Protocol (IMAP) - Version 4rev2</title>
            <author fullname="A. Melnikov" initials="A." role="editor" surname="Melnikov"/>
            <author fullname="B. Leiba" initials="B." role="editor" surname="Leiba"/>
            <date month="August" year="2021"/>
            <abstract>
              <t>The Internet Message Access Protocol Version 4rev2 (IMAP4rev2) allows a client to access and manipulate electronic mail messages on a server. IMAP4rev2 permits manipulation of mailboxes (remote message folders) in a way that is functionally equivalent to local folders. IMAP4rev2 also provides the capability for an offline client to resynchronize with the server.</t>
              <t>IMAP4rev2 includes operations for creating, deleting, and renaming mailboxes; checking for new messages; removing messages permanently; setting and clearing flags; parsing per RFCs 5322, 2045, and 2231; searching; and selective fetching of message attributes, texts, and portions thereof. Messages in IMAP4rev2 are accessed by the use of numbers. These numbers are either message sequence numbers or unique identifiers.</t>
              <t>IMAP4rev2 does not specify a means of posting mail; this function is handled by a mail submission protocol such as the one specified in RFC 6409.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9051"/>
          <seriesInfo name="DOI" value="10.17487/RFC9051"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC9110" target="https://www.rfc-editor.org/info/rfc9110" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9110.xml">
          <front>
            <title>HTTP Semantics</title>
            <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding"/>
            <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham"/>
            <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke"/>
            <date month="June" year="2022"/>
            <abstract>
              <t>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document describes the overall architecture of HTTP, establishes common terminology, and defines aspects of the protocol that are shared by all versions. In this definition are core protocol elements, extensibility mechanisms, and the "http" and "https" Uniform Resource Identifier (URI) schemes.</t>
              <t>This document updates RFC 3864 and obsoletes RFCs 2818, 7231, 7232, 7233, 7235, 7538, 7615, 7694, and portions of 7230.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="97"/>
          <seriesInfo name="RFC" value="9110"/>
          <seriesInfo name="DOI" value="10.17487/RFC9110"/>
        </reference>
        <reference anchor="SEC_1" target="https://www.secg.org/sec1-v2.pdf">
          <front>
            <title>SEC 1: Elliptic Curve Cryptography</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="RFC7515" target="https://www.rfc-editor.org/info/rfc7515" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7515.xml">
          <front>
            <title>JSON Web Signature (JWS)</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="N. Sakimura" initials="N." surname="Sakimura"/>
            <date month="May" year="2015"/>
            <abstract>
              <t>JSON Web Signature (JWS) represents content secured with digital signatures or Message Authentication Codes (MACs) using JSON-based data structures. Cryptographic algorithms and identifiers for use with this specification are described in the separate JSON Web Algorithms (JWA) specification and an IANA registry defined by that specification. Related encryption capabilities are described in the separate JSON Web Encryption (JWE) specification.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7515"/>
          <seriesInfo name="DOI" value="10.17487/RFC7515"/>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC2177" target="https://www.rfc-editor.org/info/rfc2177" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2177.xml">
          <front>
            <title>IMAP4 IDLE command</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="June" year="1997"/>
            <abstract>
              <t>This document specifies the syntax of an IDLE command, which will allow a client to tell the server that it's ready to accept such real-time updates. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2177"/>
          <seriesInfo name="DOI" value="10.17487/RFC2177"/>
        </reference>
        <reference anchor="RFC8620" target="https://www.rfc-editor.org/info/rfc8620" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8620.xml">
          <front>
            <title>The JSON Meta Application Protocol (JMAP)</title>
            <author fullname="N. Jenkins" initials="N." surname="Jenkins"/>
            <author fullname="C. Newman" initials="C." surname="Newman"/>
            <date month="July" year="2019"/>
            <abstract>
              <t>This document specifies a protocol for clients to efficiently query, fetch, and modify JSON-based data objects, with support for push notification of changes and fast resynchronisation and for out-of- band binary data upload/download.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8620"/>
          <seriesInfo name="DOI" value="10.17487/RFC8620"/>
        </reference>
        <reference anchor="RFC5465" target="https://www.rfc-editor.org/info/rfc5465" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5465.xml">
          <front>
            <title>The IMAP NOTIFY Extension</title>
            <author fullname="A. Gulbrandsen" initials="A." surname="Gulbrandsen"/>
            <author fullname="C. King" initials="C." surname="King"/>
            <author fullname="A. Melnikov" initials="A." surname="Melnikov"/>
            <date month="February" year="2009"/>
            <abstract>
              <t>This document defines an IMAP extension that allows a client to request specific kinds of unsolicited notifications for specified mailboxes, such as messages being added to or deleted from such mailboxes. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5465"/>
          <seriesInfo name="DOI" value="10.17487/RFC5465"/>
        </reference>
      </references>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+Vb63IiybH+z1PUYX5Y2gAGECAJb6yNJLRiFiGtkDQXjz2q
7i6gVk0X0xcQ45h3Oc9ynsyZWVV9AbQzs2GvfcITGyvorkve88usolqtll68
eFF6wQZBLMJAxNWzkE9idsnDR0+tAnYr5gufx6KEg25EwOeCxTMZsYn0BZuE
as48nFGNlaeqa5WEOKS6CFWsXOXX5h6LFZuKmEUxD2Ph1WAdvQetNVHhnMcM
Fizrdb63a/xQ/X6lwsdpqJIFfKZHsFy5RqScq5DJQMaS+ywScbKoMJjIVOCv
WSAE7So8GQOxsIkMo5g5vnIfmZrAV+F7ERJyhcPLsYx9UaZpEc5zBHNnPJgK
74/ME76IBStzxwnFsszkBPcJGc1BsqOZCmNcqxesmYLdQuYqEGYQM5cHuBaS
IbwKc5KYluahmCQ+C1SMm8kgDpWXuDAuDFVIZI0VSoaoZCvp+zgNmGQ8iRVI
S7rcB7q9JJTBVHOPdMHeawaLsyQw5GtRnangDyDhwPUTDzip1utlBtIrV1Gv
UQw8BUZKPukXKRhyR/hR+gaUxL5CPWZFTUQESnDWsBauECvlk2yBd5AQfMCn
bhKGKKilCCOpgj8CL0Cgp1xcrYzbMvHEwQCF5uQWDS82Fok7ROwx5HM01Go4
cbtsFseLq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