<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>
<?xml-stylesheet type='text/xsl' href='http://xml2rfc.ietf.org/authoring/rfc2629.xslt' ?>

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc tocindent="no"?>

<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc rfcedstyle="yes"?>

<rfc number="7377"
     category="std"
     submissionType="IETF"
     consensus="yes"
     updates="4466"
     obsoletes="6237"
     ipr="trust200902">


  <front>
    <title>IMAP4 Multimailbox SEARCH Extension</title>
    
    <author initials='B.' surname="Leiba" fullname='Barry Leiba'>
      <organization>Huawei Technologies</organization>

      <address>
        <phone>+1 646 827 0648</phone>
        <email>barryleiba@computer.org</email>
        <uri>http://internetmessagingtechnology.org/</uri>
      </address>
    </author>

    <author initials='A.' surname="Melnikov" fullname='Alexey Melnikov'>

      <organization>Isode Limited</organization>
      <address>
        <postal>
          <street>14 Castle Mews</street>
          <city>Hampton</city>
          <region>Middlesex</region>

          <code>TW12 2NP</code>
          <country>United Kingdom</country>
        </postal>
        <email>Alexey.Melnikov@isode.com</email>
        <uri>http://www.melnikov.ca/</uri>
      </address>
    </author>
      
    <date month="October" year="2014"/>

    <area>Applications</area>
    <workgroup>Applications Area Working Group</workgroup>
    <keyword>IMAP</keyword>
    <keyword>email</keyword>
    <keyword>search</keyword>
    <keyword>multiple mailboxes</keyword>
    <keyword>imapext</keyword>

<!--[rfced] Please note that the "Appendix A" heading will be removed
from the Acknowledgments section post-xml2rfc processing.

-->

    <abstract>
      <t>
        The IMAP4 specification allows the searching of only the selected
        mailbox.  A user often wants to search multiple mailboxes, and a
        client that wishes to support this must issue a series of SELECT and
        SEARCH commands, waiting for each to complete before moving on to the
        next.
        This extension allows a client to search multiple mailboxes
        with one command, limiting the delays caused by many round
        trips and not requiring disruption of the currently selected
        mailbox.
        This extension also uses MAILBOX, UIDVALIDITY, and TAG fields in
        ESEARCH responses, allowing a client to pipeline the searches if it
        chooses.  This document updates RFC 4466 and obsoletes RFC 6237.
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>
        The IMAP4 specification allows the searching of only the selected
        mailbox.  A user often wants to search multiple mailboxes, and a
        client that wishes to support this must issue a series of SELECT and
        SEARCH commands, waiting for each to complete before moving on to the
        next.  The commands can't be pipelined, because the server might run
        them in parallel and the untagged SEARCH responses could not then
        be distinguished from each other.
      </t>

      <t>
        This extension allows a client to search multiple mailboxes
        with one command and includes MAILBOX and TAG fields in the ESEARCH response,
        yielding the following advantages:
        <list style="symbols">
          <t>
            A single command limits the number of round trips needed to search
            a set of mailboxes.
          </t>
          <t>
            A single command eliminates the need to wait for one search to complete
            before starting the next.
          </t>
          <t>
            A single command allows the server to optimize the search if it can.
          </t>
          <t>
            A command that is not dependent upon the selected mailbox eliminates the
            need to disrupt the selection state or to open another IMAP connection.
          </t>
          <t>
            The MAILBOX, UIDVALIDITY, and TAG fields in the responses
            allow a client to distinguish which responses go with which search
            (and which mailbox).  A client can safely pipeline these search
            commands without danger of confusion.  The addition of the 
            MAILBOX and UIDVALIDITY fields updates the search-correlator
            item defined in <xref target="RFC4466"/>.
          </t>
        </list>
      </t>

      <t>
        This extension was previously published in an Experimental RFC.
        There is now implementation experience, giving confidence in the protocol, so
        this document puts the extension on the Standards Track, with some minor updates
        that were informed by the implementation experience.
        A brief summary of changes is in <xref target="changes"/>.
      </t>

      <section title="Conventions Used in This Document">
        <t>
          In examples, "C:" indicates lines sent by a client that is connected
          to a server, and "S:" indicates lines sent by the server to the client.
        </t>

        <t>
          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 <xref target="RFC2119"/>.
        </t>
      </section>
        
    </section>

    <section title="New ESEARCH Command">
      <t>
        <list style="hanging" hangIndent="12">

        <t hangText="Arguments:">OPTIONAL source options<vspace/>
          OPTIONAL result options<vspace/>
          OPTIONAL charset specification (see <xref target="RFC2978"/>)<vspace/>
          searching criteria (one or more)
        </t>
        <t hangText="Responses:">REQUIRED untagged response: ESEARCH<vspace/>
        </t>

        <t hangText="Result:">OK -- search completed<vspace/>
          NO -- error: cannot search that charset or criteria<vspace/>
          BAD -- command unknown or arguments invalid
        </t>
        </list>
      </t>

      <t>
        This section defines a new ESEARCH command, which works similarly to
        the UID SEARCH command described in
        Section 2.6.1 of <xref target="RFC4466"/>
        (initially described in Section 6.4.4 of <xref target="RFC3501"/>
        and extended by <xref target="RFC4731"/>).
      </t>

      <t>
        The ESEARCH command further extends searching by allowing for
        optional source and result options.
        This document does not define any new result options
        (see Section 3.1 of <xref target="RFC4731"/>).
        A server that supports this extension includes "MULTISEARCH"
        in its IMAP capability string.
      </t>

      <t>
        Because there has been confusion about this, it is worth pointing out
        that with ESEARCH, as with any SEARCH or UID SEARCH command, it MUST NOT
        be considered an error if the search terms include a range of message
        numbers that extends (or, in fact, starts) beyond the end of the mailbox.
        For example, a client might want to establish a rolling window through
        the search results this way:
      </t>

      <t>
        C: tag1 UID ESEARCH FROM "frobozz" 1:100
      </t>

      <t>
        ... followed later by this:
      </t>

      <t>
        C: tag1 UID ESEARCH FROM "frobozz" 101:200
      </t>

      <t>
        ... and so on.  
      </t>
<t>
This tells the server to match only the first hundred messages
        in the mailbox the first time, the second hundred the second time, etc.
        In fact, it might likely allow the server to optimize the search significantly.
        In the above example, whether the mailbox contains 50, 150, or 250 messages,
        neither of the search commands shown will result in an error.  It is up to
        the client to know when to stop moving its search window.
      </t>

      <t>
      </t>

      <section title="The ESEARCH Response">

        <t>
          In response to an ESEARCH command,
          the server MUST return ESEARCH responses <xref target="RFC4731"/>
          (that is, not SEARCH responses).
          Because message numbers are not useful for mailboxes that are not selected,          
          the responses MUST contain information about UIDs, not message numbers.
          This is true even if the source options specify that only the selected mailbox
          be searched.
        </t>

        <t>
          Presence of a source option in the absence of a result option implies the "ALL" result
          option (see Section 3.1 of <xref target="RFC4731"/>).  Note that this is not the same
          as the result from the SEARCH command described in the IMAP base
          protocol <xref target="RFC3501" />.
        </t>

        <t>
          Source options describe which mailboxes must be searched for messages.
          An ESEARCH command with source options does not affect which
          mailbox, if any, is currently selected, regardless of which mailboxes are searched.
        </t>

        <t>
          For each mailbox satisfying the source options, a single
          ESEARCH response MUST be returned
          if any messages in that mailbox match the search criteria.
          An ESEARCH response MUST NOT
          be returned for mailboxes that contain no matching messages.
          This is true even when result options such as MIN, MAX, and COUNT are specified
          (see Section 3.1 of <xref target="RFC4731"/>), and the values returned
          (lowest UID matched, highest UID matched, and number of messages matched,
          respectively) apply to the mailbox reported in that ESEARCH response.
        </t>

        <t>
          Note that it is possible for an ESEARCH command to return no untagged responses
          (no ESEARCH responses at all) in the case that there are no matches to the search
          in any of the mailboxes that satisfy the source options.
          Clients can detect this situation by finding the tagged OK response without having
          received any matching untagged ESEARCH responses.
        </t>

        <t>
          Each ESEARCH response MUST contain the MAILBOX, TAG, and UIDVALIDITY correlators.
          Correlators allow clients to issue several ESEARCH commands at once (pipelined).
          If the SEARCHRES <xref target="RFC5182"/> extension is used in an ESEARCH
          command, that ESEARCH command MUST be executed by the server after all previous
          SEARCH/ESEARCH commands have completed and before any subsequent SEARCH/ESEARCH
          commands are executed.
          The server MAY perform consecutive ESEARCH commands in parallel
          as long as none of them use the SEARCHRES extension.
        </t>
      </section>

      <section anchor="source-options" title="Source Options: Specifying Mailboxes to Search">
        <t>
          The source options, if present, MUST contain a mailbox specifier
          as defined in the IMAP NOTIFY extension <xref target="RFC5465"/>, Section 6
          (using the "filter-mailboxes" ABNF item), with the
          following differences:
          <list style="numbers">
            <t>
              The "selected-delayed" specifier is not valid here.
            </t>
            <t>
              A "subtree-one" specifier is added.  The "subtree" specifier
              results in a search of the specified mailbox and all selectable
              mailboxes that are subordinate to it, through an indefinitely
              deep hierarchy.
              The "subtree-one" specifier results in a search of
              the specified mailbox and all selectable child mailboxes,
              one hierarchy level down.
            </t>
          </list>
        </t>

        <t>
          If "subtree" is specified, the server MUST defend against loops
          in the hierarchy (for example, those caused by recursive file-system
          links within the message store).
          The server SHOULD do this by keeping track of the mailboxes that have
          been searched and by terminating the hierarchy traversal when a repeat
          is found.
          If it cannot do that, it MAY do it by limiting the hierarchy depth.
        </t>

        <t>
          If the source options are not present, the value "selected" is
          assumed -- that is, only the currently selected mailbox is searched.
        </t>

        <t>
          The "personal" source option is a particularly convenient way to search all of
          the current user's mailboxes.
          Note that there is no way to use wildcard characters to search all mailboxes;
          the "mailboxes" source option does not do wildcard expansion.
        </t>

        <t>
          If the source options include (or default to) "selected",
          the IMAP session MUST be in "selected" state.
          If the source options specify other mailboxes and NOT "selected",
          then the IMAP session MUST be in either "selected" or "authenticated" state.
          If the session is not in a correct state,
          the ESEARCH command MUST return a "BAD" result.
        </t>

        <t>
          The client SHOULD NOT provide source options that resolve to including the same
          mailbox more than once.  A server can, of course, remove the duplicates before
          processing, but the server MAY return "BAD" to an ESEARCH command with duplicate
          source mailboxes.
        </t>

        <t>
          If the server supports the SEARCHRES <xref target="RFC5182"/> extension, then
          the "SAVE" result option is valid only if "selected" is specified
          or defaulted to as the sole mailbox to be searched.
          If any source option other than "selected" is specified,
          the ESEARCH command MUST return a "BAD" result.
        </t>

        <t>
          If the server supports the CONTEXT=SEARCH and/or CONTEXT=SORT extension
          <xref target="RFC5267"/>, then the following additional rules apply:
          <list style="symbols">

            <t>
              The CONTEXT return option (Section 4.2 of <xref target="RFC5267"/>) can be used
              with an ESEARCH command.
            </t>

            <t>
              If the UPDATE return option is used (Section 4.3 of <xref target="RFC5267"/>),
              it MUST apply only to the currently selected mailbox.
              If UPDATE is used and there is no mailbox currently selected,
              the ESEARCH command MUST return a "BAD" result.
            </t>

            <t>
              The PARTIAL search return option (Section 4.4 of <xref target="RFC5267"/>)
              can be used and applies to each mailbox searched by the ESEARCH command.
            </t>

          </list>
        </t>

        <t>
          If the server supports the Access Control List (ACL) <xref target="RFC4314"/> extension, then
          the logged-in user is required to have the "r" right for each mailbox
          she wants to search.
          In addition, any mailboxes that are not explicitly named
          (accessed through "personal" or "subtree", for example) are required
          to have the "l" right.
          Mailboxes matching the source options for which
          the logged-in user lacks sufficient rights MUST be ignored
          by the ESEARCH command processing.
          In particular, ESEARCH responses MUST NOT be returned for those mailboxes.
        </t>
      </section>

      <section anchor="strictness" title="Strictness in Search Matches">
        <t>
          The base IMAP SEARCH command (Section 6.4.4. of <xref target="RFC3501"/>)
          requires strict substring matching in text searches.  Many servers, however,
          use search engines that match strings in different ways, for
	  example, matching
          "swim" to both "swam" and "swum" or only doing full word matching (where
          "swim" will not match "swimming").
          This is covered by the "Fuzzy Search" extension
          to IMAP <xref target="RFC6203"/>, and that extension is compatible with this one
          and can be combined with it.
        </t>
        <t>
          Whether or not Fuzzy Search is implemented or used, this extension explicitly allows
          flexible searching with respect to TEXT and BODY searches.  Servers MAY use fuzzy text
          matching in multimailbox searches.
        </t>
      </section>

      <section anchor="volume" title="Server-Side Limitations on Search Volume">
        <t>
          To avoid having a search use more than a reasonable share of server resources,
          servers MAY apply limits that go beyond loop protection, such as limits on the
          number of mailboxes that may be searched at once and/or limits on the number
          or total size of messages searched.
          A server can apply those limits up front, responding with "NO [LIMIT]"
          if a limit is exceeded
          (see <xref target="RFC5530"/> for information about response codes).
          Alternatively, a server can process the search and terminate it when a limit
          is exceeded, responding with "OK [LIMIT]" and returning partial results.
          Note that searches that return partial results can cause
          complexity for client implementations and confusion to users.
        </t>
      </section>
    </section>

    <section anchor="examples" title="Examples">
      <t>
        In the following example, note that two ESEARCH commands are pipelined
        and that the server is running them in parallel, interleaving a response
        to the second search amid the responses to the first (watch the tags).
      </t>
      <t>
        C: tag1 ESEARCH IN (mailboxes "folder1" subtree "folder2") unseen<vspace/>
        C: tag2 ESEARCH IN (mailboxes "folder1" subtree-one "folder2") subject "chad"<vspace/>
        S: * ESEARCH (TAG "tag1" MAILBOX "folder1" UIDVALIDITY 1) UID ALL 4001,4003,4005,4007,4009<vspace/>
        S: * ESEARCH (TAG "tag2" MAILBOX "folder1" UIDVALIDITY 1) UID ALL 3001:3004,3788<vspace/>
        S: * ESEARCH (TAG "tag1" MAILBOX "folder2/banana" UIDVALIDITY 503) UID ALL 3002,4004<vspace/>
        S: * ESEARCH (TAG "tag1" MAILBOX "folder2/peach" UIDVALIDITY 3) UID ALL 921691<vspace/>
        S: tag1 OK done<vspace/>
        S: * ESEARCH (TAG "tag2" MAILBOX "folder2/salmon" UIDVALIDITY 1111111) UID ALL 50003,50006,50009,50012<vspace/>
        S: tag2 OK done
      </t>

    </section>

    <section anchor="syntax" title="Formal Syntax">
      <t>
        The following syntax specification uses the Augmented Backus-Naur Form (ABNF)
        as described in <xref target="RFC5234"/>.
        Terms not defined here are taken from <xref target="RFC3501"/>, <xref target="RFC5465"/>,
        or <xref target="RFC4466"/>.
      </t>
      <t>
       <list style="hanging" hangIndent="8">

        <t hangText="command-auth =/">esearch<vspace/>
            ; Update definition from IMAP base <xref target="RFC3501"/>.<vspace/>
            ; Add new "esearch" command.
        </t>

        <t hangText="command-select =/">esearch<vspace/>
            ; Update definition from IMAP base <xref target="RFC3501"/>.<vspace/>
            ; Add new "esearch" command.
        </t>

        <t hangText="filter-mailboxes-other =/">("subtree-one" SP one-or-more-mailbox)<vspace/>
            ; Update definition from IMAP Notify <xref target="RFC5465"/>.<vspace/>
            ; Add new "subtree-one" selector.
        </t>

        <t hangText="filter-mailboxes-selected =">"selected"<vspace/>
            ; Update definition from IMAP Notify <xref target="RFC5465"/>.<vspace/>
            ; We forbid the use of "selected-delayed".
        </t>

        <t hangText="one-correlator =">("TAG" SP tag-string) /
            ("MAILBOX" SP astring) / ("UIDVALIDITY" SP nz-number)<vspace/>
            ; Each correlator MUST appear exactly once.
        </t>

        <t hangText="scope-option =">scope-option-name [SP scope-option-value]<vspace/>
            ; No options defined here.  Syntax for future extensions.
        </t>

        <t hangText="scope-option-name =">tagged-ext-label<vspace/>
            ; No options defined here.  Syntax for future extensions.
        </t>

        <t hangText="scope-option-value =">tagged-ext-val<vspace/>
            ; No options defined here.  Syntax for future extensions.
        </t>

        <t hangText="scope-options =">scope-option *(SP scope-option)<vspace/>
            ; A given option may only appear once.<vspace/>
            ; No options defined here.  Syntax for future extensions.
        </t>

        <t hangText="esearch =">"ESEARCH" [SP esearch-source-opts]<vspace />
            [SP search-return-opts] SP search-program<vspace />
        </t>

        <t hangText="search-correlator =">SP "(" one-correlator *(SP one-correlator) ")"<vspace/>
            ; Updates definition in IMAP4 ABNF <xref target="RFC4466"/>.
        </t>

        <t hangText="esearch-source-opts =">"IN" SP "(" source-mbox [SP<vspace/>
            "(" scope-options ")"] ")"
        </t>

        <t hangText="source-mbox =">filter-mailboxes *(SP filter-mailboxes)<vspace/>
            ; "filter-mailboxes" is defined in IMAP Notify <xref target="RFC5465"/>.<vspace/>
            ; See updated definition of filter-mailboxes-other, above.<vspace/>
            ; See updated definition of filter-mailboxes-selected, above.
        </t>

       </list>
      </t>
    </section>
    



    <section anchor="security" title="Security Considerations">
      <t>
        This new IMAP ESEARCH command allows a single command to search many
        mailboxes at once.
        On the one hand, a client could do that by sending many IMAP SEARCH commands.
        On the other hand, this makes it easier for a client to overwork a
        server by sending a single command that results in an expensive search
        of tens of thousands of mailboxes.
        Server implementations need to be aware of that and provide mechanisms
        that prevent a client from adversely affecting other users.
        Limitations on the number of mailboxes that may be searched in one command and/or
        on the server resources that will be devoted to responding to a single client,
        are reasonable limitations for an implementation to impose
        (see also <xref target="volume"/>).
      </t>            
      <t>
        Implementations MUST, of course, apply access controls appropriately,
        limiting a user's access to ESEARCH in the same way its access is
        limited for any other IMAP commands.
        This extension has no data-access risks beyond what may exist in the unextended
        IMAP implementation.
      </t>            
      <t>
        Mailboxes matching the source options for which
        the logged-in user lacks sufficient rights MUST be ignored
        by the ESEARCH command processing
        (see the paragraph about this in <xref target="source-options"/>).
        In particular,
        any attempt to distinguish insufficient access from non-existent mailboxes
        may expose information about the mailbox hierarchy that isn't otherwise
        available to the client.
      </t>
      <t>
        If "subtree" is specified, the server MUST defend against loops in the hierarchy
        (see the paragraph about this in <xref target="source-options"/>).
      </t>
    </section>

    <section anchor="iana" title="IANA Considerations">
        <t>
          The "Internet Message Access Protocol (IMAP) Capabilities Registry" is currently located at
          &lt;http://www.iana.org/assignments/imap-capabilities&gt;.
        </t>
        <t>
          IANA has changed the reference for the IMAP capability "MULTISEARCH"
          to point to this document.
        </t>
    </section>


    <section anchor="changes" title="Changes since RFC 6237">
      <t>
      </t>
      <t><list style="symbols">
	<t>
	  Change to Standards Track.
	</t>
	<t>
	  Added paragraph about duplicate mailboxes.
	</t>
	<t>
	  Added <xref target="strictness"/> about Fuzzy Search.
	</t>
      </list>
      </t>
    </section>
 
  </middle>

  <back>
    <references title="Normative References">




<reference anchor='RFC2119' target='http://www.rfc-editor.org/info/rfc2119'>

<front>
<title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='Scott Bradner'>
<organization>Harvard University</organization>
<address>
<postal>
<street>1350 Mass. Ave.</street>
<street>Cambridge</street>
<street>MA 02138</street></postal>
<phone>- +1 617 495 3864</phone>
<email>sob@harvard.edu</email></address></author>
<date year='1997' month='March' />
<area>General</area>
<keyword>keyword</keyword>
<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.  Authors who follow these guidelines
   should incorporate this phrase near the beginning of their document:

<list>
<t>
      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.
</t></list></t>
<t>
   Note that the force of these words is modified by the requirement
   level of the document in which they are used.
</t></abstract></front>

<seriesInfo name='BCP' value='14' />
<seriesInfo name='RFC' value='2119' />
<format type='TXT' octets='4723' target='http://www.rfc-editor.org/rfc/rfc2119.txt' />
<format type='HTML' octets='17970' target='http://xml.resource.org/public/rfc/html/rfc2119.html' />
<format type='XML' octets='5777' target='http://xml.resource.org/public/rfc/xml/rfc2119.xml' />
</reference>

<reference anchor='RFC2978' target='http://www.rfc-editor.org/info/rfc2978'>

<front>
<title>IANA Charset Registration Procedures</title>
<author initials='N.' surname='Freed' fullname='N. Freed'>
<organization /></author>
<author initials='J.' surname='Postel' fullname='J. Postel'>
<organization /></author>
<date year='2000' month='October' />
<abstract>
<t>Multipurpose Internet Mail Extensions (MIME) and various other Internet protocols are capable of using many different charsets.  This in turn means that the ability to label different charsets is essential.  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='19' />
<seriesInfo name='RFC' value='2978' />
<format type='TXT' octets='21615' target='http://www.rfc-editor.org/rfc/rfc2978.txt' />
</reference>



<reference anchor='RFC3501' target='http://www.rfc-editor.org/info/rfc3501'>

<front>
<title>INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1</title>
<author initials='M.' surname='Crispin' fullname='M. Crispin'>
<organization /></author>
<date year='2003' month='March' />
<abstract>
<t>The Internet Message Access Protocol, Version 4rev1 (IMAP4rev1) allows a client to access and manipulate electronic mail messages on a server.  IMAP4rev1 permits manipulation of mailboxes (remote message folders) in a way that is functionally equivalent to local folders.  IMAP4rev1 also provides the capability for an offline client to resynchronize with the server.  IMAP4rev1 includes operations for creating, deleting, and renaming mailboxes, checking for new messages, permanently removing messages, setting and clearing flags, RFC 2822 and RFC 2045 parsing, searching, and selective fetching of message attributes, texts, and portions thereof.  Messages in IMAP4rev1 are accessed by the use of numbers.  These numbers are either message sequence numbers or unique identifiers.  IMAP4rev1 supports a single server.  A mechanism for accessing configuration information to support multiple IMAP4rev1 servers is discussed in RFC 2244.  IMAP4rev1 does not specify a means of posting mail; this function is handled by a mail transfer protocol such as RFC 2821. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='RFC' value='3501' />
<format type='TXT' octets='227640' target='http://www.rfc-editor.org/rfc/rfc3501.txt' />
</reference>






<reference anchor='RFC4314' target='http://www.rfc-editor.org/info/rfc4314'>

<front>
<title>IMAP4 Access Control List (ACL) Extension</title>
<author initials='A.' surname='Melnikov' fullname='A. Melnikov'>
<organization /></author>
<date year='2005' month='December' />
<abstract>
<t>The Access Control List (ACL) extension (RFC 2086) of the Internet Message Access Protocol (IMAP) permits mailbox access control lists to be retrieved and manipulated through the IMAP protocol.&lt;/t>&lt;t> This document is a revision of RFC 2086. It defines several new access control rights and clarifies which rights are required for different IMAP commands. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='RFC' value='4314' />
<format type='TXT' octets='56599' target='http://www.rfc-editor.org/rfc/rfc4314.txt' />
</reference>


<reference anchor='RFC4466' target='http://www.rfc-editor.org/info/rfc4466'>

<front>
<title>Collected Extensions to IMAP4 ABNF</title>
<author initials='A.' surname='Melnikov' fullname='A. Melnikov'>
<organization /></author>
<author initials='C.' surname='Daboo' fullname='C. Daboo'>
<organization /></author>
<date year='2006' month='April' />
<abstract>
<t>Over the years, many documents from IMAPEXT and LEMONADE working groups, as well as many individual documents, have added syntactic extensions to many base IMAP commands described in RFC 3501. For ease of reference, this document collects most of such ABNF changes in one place.&lt;/t>&lt;t> This document also suggests a set of standard patterns for adding options and extensions to several existing IMAP commands defined in RFC 3501. The patterns provide for compatibility between existing and future extensions.&lt;/t>&lt;t> This document updates ABNF in RFCs 2088, 2342, 3501, 3502, and 3516. It also includes part of the errata to RFC 3501. This document doesn't specify any semantic changes to the listed RFCs. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='RFC' value='4466' />
<format type='TXT' octets='33752' target='http://www.rfc-editor.org/rfc/rfc4466.txt' />
</reference>





<reference anchor='RFC4731' target='http://www.rfc-editor.org/info/rfc4731'>

<front>
<title>IMAP4 Extension to SEARCH Command for Controlling What Kind of Information Is Returned</title>
<author initials='A.' surname='Melnikov' fullname='A. Melnikov'>
<organization /></author>
<author initials='D.' surname='Cridland' fullname='D. Cridland'>
<organization /></author>
<date year='2006' month='November' />
<abstract>
<t>This document extends IMAP (RFC 3501) SEARCH and UID SEARCH commands with several result options, which can control what kind of information is returned.  The following result options are defined: minimal value, maximal value, all found messages, and number of found messages. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='RFC' value='4731' />
<format type='TXT' octets='15431' target='http://www.rfc-editor.org/rfc/rfc4731.txt' />
</reference>


    

<reference anchor='RFC5182' target='http://www.rfc-editor.org/info/rfc5182'>

<front>
<title>IMAP Extension for Referencing the Last SEARCH Result</title>
<author initials='A.' surname='Melnikov' fullname='A. Melnikov'>
<organization /></author>
<date year='2008' month='March' />
<abstract>
<t>Many IMAP clients use the result of a SEARCH command as the input to perform another operation, for example, fetching the found messages, deleting them, or copying them to another mailbox.&lt;/t>&lt;t> This can be achieved using standard IMAP operations described in RFC 3501; however, this would be suboptimal. The server will send the list of found messages to the client; after that, the client will have to parse the list, reformat it, and send it back to the server. The client can't pipeline the SEARCH command with the subsequent command, and, as a result, the server might not be able to perform some optimizations.&lt;/t>&lt;t> This document proposes an IMAP extension that allows a client to tell a server to use the result of a SEARCH (or Unique Identifier (UID) SEARCH) command as an input to any subsequent command. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='RFC' value='5182' />
<format type='TXT' octets='24520' target='http://www.rfc-editor.org/rfc/rfc5182.txt' />
</reference>


<reference anchor='RFC5234' target='http://www.rfc-editor.org/info/rfc5234'>

<front>
<title>Augmented BNF for Syntax Specifications: ABNF</title>
<author initials='D.' surname='Crocker' fullname='D. Crocker'>
<organization /></author>
<author initials='P.' surname='Overell' fullname='P. Overell'>
<organization /></author>
<date year='2008' month='January' />
<abstract>
<t>Internet technical specifications often need to define a formal syntax.  Over the years, a modified version of Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been popular among many Internet specifications.  The current specification documents ABNF.  It balances compactness and simplicity with reasonable representational power.  The differences between standard BNF and ABNF involve naming rules, repetition, alternatives, order-independence, and value ranges.  This specification also supplies additional rule definitions and encoding for a core lexical analyzer of the type common to several Internet specifications. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='STD' value='68' />
<seriesInfo name='RFC' value='5234' />
<format type='TXT' octets='26359' target='http://www.rfc-editor.org/rfc/rfc5234.txt' />
</reference>



<reference anchor='RFC5267' target='http://www.rfc-editor.org/info/rfc5267'>

<front>
<title>Contexts for IMAP4</title>
<author initials='D.' surname='Cridland' fullname='D. Cridland'>
<organization /></author>
<author initials='C.' surname='King' fullname='C. King'>
<organization /></author>
<date year='2008' month='July' />
<abstract>
<t>The IMAP4rev1 protocol has powerful search facilities as part of the core protocol, but lacks the ability to create live, updated results that can be easily handled.  This memo provides such an extension, and shows how it can be used to provide a facility similar to virtual mailboxes. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='RFC' value='5267' />
<format type='TXT' octets='36709' target='http://www.rfc-editor.org/rfc/rfc5267.txt' />
</reference>





<reference anchor='RFC5465' target='http://www.rfc-editor.org/info/rfc5465'>

<front>
<title>The IMAP NOTIFY Extension</title>
<author initials='A.' surname='Gulbrandsen' fullname='A. Gulbrandsen'>
<organization /></author>
<author initials='C.' surname='King' fullname='C. King'>
<organization /></author>
<author initials='A.' surname='Melnikov' fullname='A. Melnikov'>
<organization /></author>
<date year='2009' month='February' />
<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' />
<format type='TXT' octets='46208' target='http://www.rfc-editor.org/rfc/rfc5465.txt' />
</reference>





<reference anchor='RFC5530' target='http://www.rfc-editor.org/info/rfc5530'>

<front>
<title>IMAP Response Codes</title>
<author initials='A.' surname='Gulbrandsen' fullname='A. Gulbrandsen'>
<organization /></author>
<date year='2009' month='May' />
<abstract>
<t>IMAP responses consist of a response type (OK, NO, BAD), an optional machine-readable response code, and a human-readable text.&lt;/t>&lt;t> This document collects and documents a variety of machine-readable response codes, for better interoperation and error reporting. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='RFC' value='5530' />
<format type='TXT' octets='17169' target='http://www.rfc-editor.org/rfc/rfc5530.txt' />
</reference>


    </references>
    <references title="Informative References">
 
<reference anchor='RFC6203'  target='http://www.rfc-editor.org/info/rfc6203'>

<front>
<title>IMAP4 Extension for Fuzzy Search</title>
<author initials='T.' surname='Sirainen' fullname='T. Sirainen'>
<organization /></author>
<date year='2011' month='March' />
<abstract>
<t>This document describes an IMAP protocol extension enabling a server to perform searches with inexact matching and assigning relevancy scores for matched messages. [STANDARDS-TRACK]</t></abstract></front>

<seriesInfo name='RFC' value='6203' />
<format type='TXT' octets='13606' target='http://www.rfc-editor.org/rfc/rfc6203.txt' />
</reference>

    </references>

    <section title="Acknowledgments">
      <t>
        The authors gratefully acknowledge feedback provided by Timo Sirainen, Peter Coates,
        Arnt Gulbrandsen, and Chris Newman.
      </t>
    </section>   
  </back>
</rfc>

