HTTP/1.1 200 OK Date: Tue, 09 Apr 2002 00:01:15 GMT Server: Apache/1.3.20 (Unix) Last-Modified: Tue, 10 Jun 1997 13:54:00 GMT ETag: "2e99ce-383c-339d5c78" Accept-Ranges: bytes Content-Length: 14396 Connection: close Content-Type: text/plain Network Working Group M. Gahrns, Microsoft C. Newman, Innosoft Internet Draft Document: draft-gahrns-imap-namespace-01.txt June 1997 IMAP4 Namespace Status of this Memo This document is an Internet Draft. Internet Drafts are working documents of the Internet Engineering Task Force (IETF), its Areas, and its Working Groups. Note that other groups may also distribute working documents as Internet Drafts. Internet Drafts are draft documents valid for a maximum of six months. Internet Drafts may be updated, replaced, or obsoleted by other documents at any time. It is not appropriate to use Internet Drafts as reference material or to cite them other than as a "working draft" or "work in progress". To learn the current status of any Internet-Draft, please check the 1id-abstracts.txt listing contained in the Internet-Drafts Shadow Directories on ds.internic.net, nic.nordu.net, ftp.isi.edu, or munnari.oz.au. A revised version of this draft document will be submitted to the RFC editor as a Proposed Standard for the Internet Community. Discussion and suggestions for improvement are requested. This document will expire before November 1997. Distribution of this draft is unlimited. 1. Abstract IMAP4[RFC-2060] does not define a default server namespace. As a result, two common namespace models have evolved: The "Personal Mailbox" model, in which the default namespace that is presented consists of only the user's personal mailboxes. To access shared mailboxes, the user must use an escape mechanism to reach another namespace. The "Complete Hierarchy" model, in which the default namespace that is presented includes the user's personal mailboxes along with any other mailboxes they have access to. These two models, create difficulties for certain client operations. This document defines a NAMESPACE command that allows a client to discover the prefixes of namespaces used by a server for personal mailboxes, other user's mailboxes, and shared mailboxes. This allows a client to avoid much of the manual user configuration that is now necessary when mixing and matching IMAP4 clients and servers. Gahrns and Newman 1 IMAP4 Namespace June 1997 2. Conventions used in this document In examples, "C:" and "S:" indicate lines sent by the client and server respectively. Personal Namespace: A namespace that the server considers within the personal scope of the authenticated user on a particular connection. Typically, only the authenticated user has access to mailboxes in their Personal Namespace. The specially defined IMAP4 mailbox INBOX resides in a user's personal namespace. Other Users' Namespace: A namespace that consists of mailboxes from the Personal Namespaces of other users. To access mailboxes in the Other Users' Namespace, the currently authenticated user MUST be explicitly granted access rights. For example, it is common for a manager to grant to their secretary access rights to their mailbox. Shared Namespace: A namespace that consists of mailboxes that are intended to be shared amongst users and do not exist within a user's Personal Namespace. 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]. 3. Introduction and Overview Clients often attempt to create mailboxes for such purposes as maintaining a record of sent messages (e.g. "Sent Mail") or temporarily saving messages being composed (e.g. "Drafts"). For these clients to inter-operate correctly with the variety of IMAP4 servers available, the user must enter the prefix of the Personal Namespace used by the server. Using the NAMESPACE command, a client is able to automatically discover this prefix without manual user configuration. In addition, users are often required to manually enter the prefixes of various namespaces in order to view the mailboxes located there. For example, they might be required to enter the prefix of #shared to view the shared mailboxes namespace. The NAMESPACE command allows a client to automatically discover the namespaces that are available on a server. This allows a client to present the available namespaces to the user in which ever manner it deems appropriate. For example, a client could choose to initially display only personal mailboxes, or it may choose to display the complete list of mailboxes available, and initially position the user at the root of their Personal Namespace. A server MAY choose to make available to the NAMESPACE command only a subset of the complete set of namespaces the server supports. Gahrns and Newman 2 IMAP4 Namespace June 1997 4. Requirements IMAP4 servers that support this extension MUST list the keyword NAMESPACE in their CAPABILITY response. 5. NAMESPACE Command Arguments: none Response: an untagged NAMESPACE response that contains the prefix to the server's default Personal Namespace, the Other Users' Namespace, and the Shared Namespace that the server wishes to expose. The Personal Namespace and Other User's Namespace prefix are each to a single namespace, and as such, MUST end with the hierarchy character used in that namespace. The Shared Namespace prefix MAY be to multiple namespaces. If the Shared Namespace prefix is to multiple namespaces, the hierarchy character is not included in the prefix. Result: OK - Command completed NO - Error: Can't complete command BAD - argument invalid If a particular namespace is not available, the prefix to that namespace is NIL. Example: < A server that supports only the personal namespace. No leading prefix is used on personal mailboxes. > C: A001 NAMESPACE S: * NAMESPACE "" NIL NIL S: A001 OK NAMESPACE command completed Example: < A user logged on anonymously to a server. No personal mailboxes are associated with the anonymous user. No prefix is required to access shared mailboxes. > C: A001 NAMESPACE S: * NAMESPACE NIL NIL "" S: A001 OK NAMESPACE command completed The Personal Namespace prefix returned MUST be to a single Personal Namespace and MUST end with the hierarchy character used in that Gahrns and Newman 3 IMAP4 Namespace June 1997 namespace. This allows a client to use the Personal Namespace prefix to automatically create personal mailboxes. Example: < A server that supports only the Personal Namespace, with a leading prefix of INBOX to personal mailboxes. > C: A001 NAMESPACE S: * NAMESPACE "INBOX." NIL NIL S: A001 OK NAMESPACE command completed C: A002 CREATE "INBOX.Sent Mail" S: A002 OK CREATE command completed The Other Users' Namespace prefix MUST be to a single Other Users' Namespace and MUST end with the hierarchy character used in that namespace. The next level of hierarchy following the Other Users' Namespace prefix SHOULD consist of , where is a user name as per the IMAP4 LOGIN or AUTHENTICATE command. A client can construct a LIST command by appending a "%" to the Other Users' Namespace prefix to discover the Personal Namespaces of other users that are available to the currently authenticate user. In response to such a LIST command, a server SHOULD NOT return user names that have not granted access to their personal mailboxes to the user in question. A server MAY return a LIST response containing only the names of users that have explicitly granted access to the user in question. Alternatively, a server MAY return NO to such a LIST command, requiring that a user name be included with the Other Users' Namespace prefix before listing any other user's mailboxes. Example: < A server that supports providing a list of other user's mailboxes that are accessible to the currently logged on user. > C: A001 NAMESPACE S: * NAMESPACE "" "Other Users/" NIL S: A001 OK NAMESPACE command completed C: A002 LIST "" "Other Users/%" S: * LIST () "/" "Other Users/Mike" S: * LIST () "/" "Other Users/Karen" S: A002 OK LIST command completed Gahrns and Newman 4 IMAP4 Namespace June 1997 Example: < A server that does not support providing a list of other user's mailboxes that are accessible to the currently logged on user. The mailboxes are listable if the client includes the name of the other user with the Other Users' Namespace prefix. > C: A001 NAMESPACE S: * NAMESPACE "" "#Users/" NIL S: A001 OK NAMESPACE command completed < In this example, the currently logged on user has access to the Personal Namespace of user Mike, but the server chose to suppress this information in the LIST response. However, by appending the user name Mike (received through user input) to the Other Users' Namespace prefix, the client is able to get a listing of the personal mailboxes of user Mike. > C: A002 LIST "" "#Users/%" S: A002 NO The requested item could not be found. C: A003 LIST "" "#Users/Mike/%" S: * LIST () "/" "#Users/Mike/INBOX" S: * LIST () "/" "#Users/Mike/Foo" S: A003 OK LIST command completed. The shared mailboxes prefix MAY be to multiple Shared Namespaces. A client can construct a LIST command by appending a "%" to the Shared Namespace prefix to discover available Shared Namespaces. Example: < A server that contains a single Shared Namespace. > C: A001 NAMESPACE S: * NAMESPACE "" NIL "Public Folders/" S: A001 OK NAMESPACE command completed C: A002 LIST "" "Public Folders/%" S: * LIST () "/" "Public Folders/Foo" S: * LIST () "/" "Public Folders/Bar" S: A002 OK LIST command completed. Example: < A server that contains multiple Shared Namespaces. Note that the hierarchy delimiter used within each namespace can be different. > C: A001 NAMESPACE S: * NAMESPACE "~/mail/" NIL "#" S: A001 OK NAMESPACE command completed Gahrns and Newman 5 IMAP4 Namespace June 1997 C: A002 LIST "" "#%" S: * LIST () "." "#News" S: * LIST () "/" "#Shared" S: A002 OK LIST command completed. Historical convention has been to start all namespaces with the "#" character. Namespaces that include the "#" character are not IMAP URL [IMAP-URL] friendly requiring the "#" character to be represented as %23 when within URLs. As such, server implementers MAY instead consider using namespace prefixes that do not contain the "#" character. 6. Formal Syntax The following syntax specification uses the augmented Backus-Naur Form (BNF) as described in [ABNF]. Namespace_Command = "NAMESPACE" Namespace_Response = "*" SPACE "NAMESPACE" SPACE Prefix SPACE Prefix SPACE Prefix ; The first prefix is a prefix to the Personal Namespace ; The second prefix is a prefix to the Other Users' Namespace ; The third prefix is a prefix to the Shared Namespace mailbox = ;