You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by pg...@apache.org on 2002/12/02 09:27:19 UTC

cvs commit: jakarta-james/proposals/imap/xdocs commandsIMAP.xml

pgoldstein    2002/12/02 00:27:19

  Added:       proposals/imap/xdocs commandsIMAP.xml
  Removed:     src/xdocs commandsIMAP.xml
               www      commandsIMAP.html
  Log:
  Moving the commandsIMAP.xml to the proposals IMAP directory, as it applies directly to this proposal.
  Removing it from the website.  Part of neatening up the docs.
  
  Revision  Changes    Path
  1.1                  jakarta-james/proposals/imap/xdocs/commandsIMAP.xml
  
  Index: commandsIMAP.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <document>
  
   <properties>
    <title>IMAP</title>
    <author email="charles@benett1.demon.co.uk">Charles Benett</author>
   </properties>
  
  <body>
  
  <section name="Summary">
  
    <h3>An overview of IMAP command implementation proposed for JAMES</h3>
    <blockquote>
      Objective:  A set of interfaces and basic implementations that provide:
      <ul>
        <li>The core functionality of RFC 2060, IMAP4Rev1.</li>
        <li>Mailbox referrals - RFC 2193</li>
        <li>Login referrals - RFC 2221</li>
        <li>Access Control Lists - RFC 2086</li>
        <li>Quotas - RFC 2087</li>
      </ul>
    </blockquote>
  
  </section>
  
  <section name="Background - IMAP commands">
  
  <p>The IMAP protocol is based on single socket connections. Each connection may be in one of four official states: Non-Authenticated, Authenticated, Selected and Logout.  In addition, there is an on-connection 'state'. Connections may be pre-authenticated, in which case they transition directly to the Authenticated state. Connections may also be rejected arbitrarily, in which case a response is sent and the connection tranistions directly to Logout. Once a connection enters the Logout state it must terminate and will terminate without further client input.
  </p>
  
  <p>A connection can only 'select' one mailbox at a time, although the STATE command allows a limited view of another mailbox. A client may open more than one connection to a single server at once. The client is responsible for any coordination needed. Multiple connections may 'select' a mailbox at the same time. The server must coordinate access.
  </p>
  
  </section>
  
  <section name="Commands by State, Effect and Sensitivity">
    <p>Clients are, in general, permitted to issue multiple commands in a single connection.  That is they can issue a second command without waiting for a response to the first command. Servers may process multiple commands in parallel or in series. However, some combinations of commands cannot be processed in parallel, because they are ambiguous. According to RFC2060,
      <blockquote> "Clients MUST NOT send multiple commands without waiting if an ambiguity would result. If the server detects a possible ambiguity, it MUST execute commands to completion in the order given by the client."
      </blockquote>
  The following table aims to highlight which commands can or cannot be processed in parallel with other commands. In particular, commands that are sensitive to mailbox context or message sequence number cannot be processed in parallel with commands that change those respective facts.
    </p>
    <p>
  IMAP servers can support multiple namespaces with mailboxes that, for clients, would otherwise have identical names. For example, a user could have a private mailbox called James and also have access to a workgroup mailbox called James. These are disambiguated by namespace tokens, which a client can discover by the Namespace command.
    </p>
    <p>
  Mailboxes can, in general, be accessed on behalf of more than one user. Access Control Lists are used to on a per mailbox basis. Any command which explicitly or implicitly refers to a mailbox, which is every command apart from Capability, Noop, Logout,  can be impacted by a change of ACL. I intend to tie administer rights for an ACL to full read-write rights for the mailbox and  not to allow someone with administer rights to remove their own administer rights. Implementations not following this practice may need to disambiguate ACL sensitive commands.
   </p>
    <p>The state of a mailbox (name, existence, ACL, number of messages, identity of messages and message attributes) may be changed outside a given connection which has the mailbox selected. Some of these changes should be notified to a client whether or noe a command is in progress and some should be notified only if a command is in progress.
   </p>
    <p>
  The effects of a command noted here are ones which may affect processing multiple commands from one connection or impact multiply accessed mailboxes.
      <ul>
        <li>Connection state change: will or may change the state of the connection</li>
        <li>Mailbox change: will or may change the state of an existing mailbox. Includes: changing name, altering size of mailbox (by adding or removing message) changing the access control list.</li>
        <li>Mailbox context change: changes the selection of a mailbox, which is the context for Selected state commands.</li>
        <li>Message Sequence Number Change: will or may change the message sequence number of a message known to this client, for example by provoking an untagged Expunge response. Note that any command in the selected state may send an untagged Expunge, except for Fetch, Store and Search. The entry 'likely' in this column indicates a proposed implementation.</li>
      </ul>
  The sensitivities noted are ones which may affect processing multiple commands from one connection or impact multiply accessed mailboxes.
      <ul>
         <li>Current Mailbox: this command implicity refers to the currently selected mailbox so is sensitive to either a mailbox change or a mailbox context change</li>
        <li>Message sequence number change: this command may take an MSN as an argument</li>
      </ul>
  All commands which explicitly or implicitly refers to a mailbox, which is every command apart from Capability, Noop, Logout,  can be impacted by a Mailbox change.
    </p>
  
  <table border="1">
    <tr>
      <th colspan="1"></th>
      <th colspan="3">State in which valid</th>
      <th colspan="4">Effects</th>
      <th colspan="2">Sensitivity</th>
    </tr>
    <tr>
      <th colspan="1">Command</th>
      <th>Non-Authenticated</th>
      <th>Authenticated</th>
      <th>Selected</th>
      <th>Connection State change</th>
      <th>Mailbox change</th>
      <th>Mailbox context change</th>
      <th>Message Sequence Number Change</th>
      <th>Mailbox context</th>
      <th>Message Sequence Number</th>
    </tr>
   <tr>
      <td colspan="10" align="left" ><i>Core IMAP4 rev1 commands (RFC2060)</i></td>
   </tr>
    <tr>
      <td colspan="1">Capability</td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Noop</td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td>likely</td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Logout</td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Authenticate</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Login</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Select</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Examine</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Create</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Delete</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Rename</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Subscribe</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Unsubscribe</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>List</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>LSUB</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Status</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Append</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Check</td>
      <td></td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td>likely</td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Close</td>
      <td></td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td>Must not</td>
      <td>Yes</td>
      <td></td>
    </tr>
   <tr>
      <td>Expunge</td>
      <td></td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td>Must</td>
      <td>Yes</td>
      <td></td>
    </tr>
   <tr>
      <td>Search</td>
      <td></td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td>Must not</td>
      <td>Yes</td>
      <td>Yes</td>
    </tr>
    <tr>
      <td>Fetch</td>
      <td></td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td>Must not</td>
      <td>Yes</td>
      <td>Yes</td>
    </tr>
    <tr>
      <td>Store</td>
      <td></td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td>Must not</td>
      <td>Yes</td>
      <td>Yes</td>
    </tr>
    <tr>
      <td>Copy</td>
      <td></td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td>likely</td>
      <td>Yes</td>
      <td>Yes</td>
    </tr>
    <tr>
      <td>UID</td>
      <td></td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td>likely</td>
      <td>Yes</td>
      <td></td>
    </tr>
    <tr>
      <td colspan="10" align="left" ><i>Access Control List commands (RFC2086)</i></td>
    </tr>
    <tr>
      <td colspan="1">SetACL</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>DeleteACL</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>GetACL</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>ListRights</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>MyRights</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td colspan="10" align="left" ><i>Namespace commands (RFC2342)</i></td>
    </tr>
    <tr>
      <td colspan="1">Namespace</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td colspan="10" align="left" ><i>Mailbox Referral commands (RFC2193)</i></td>
    </tr>
    <tr>
      <td colspan="1">RList</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>RLSUB</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td colspan="10" align="left" ><i>Quota commands (RFC2087)</i></td>
    </tr>
    <tr>
      <td colspan="1">SetQuota</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>GetQuota</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>GetQuotaRoot</td>
      <td></td>
      <td>Yes</td>
      <td>Yes</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
  
  </table>
  
  </section>
  
  
  </body>
  </document>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>