home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pine / imap_archive / text0050.txt < prev    next >
Encoding:
Text File  |  1993-07-02  |  39.7 KB  |  1,038 lines

  1. I think I'm ready to throw this to the wolves.  Comments welcome.
  2.  
  3.  
  4. *DRAFT*DRAFT*DRAFT*DRAFT*DRAFT*DRAFT*DRAFT*DRAFT*DRAFT*DRAFT*DRAFT*DRAFT*
  5.  
  6. Network Working Group                                        J. G. Myers
  7. Request for Comments: ????                               Carnegie Mellon
  8.                                                               March 1993
  9.  
  10.           IMSP -- Interactive Mail Support Protocol
  11.  
  12. Status of this memo
  13.  
  14.    This document suggests a proposed protocol for the Internet
  15.    community, and requests discussion and suggestions for
  16.    improvements.  Distribution of this memo is unlimited.
  17.  
  18.    The protocol discussed in this document is experimental and subject
  19.    to change.  Persons planning on either implementing or using this
  20.    protocol are STRONGLY URGED to get in touch with the author before
  21.    embarking on such a project.
  22.  
  23. Introduction
  24.  
  25.    The intent of the Interactive Mail Support Protocol (IMSP) is to
  26.    support the provision of mail in a medium to large scale operation.
  27.    It is intended to be used as a companion to the IMAP2bis protocol
  28.    [RFC-1176] [IMAP2bis], providing services which are either outside
  29.    the scope of mail access or which pertain to environments which
  30.    must run more than one IMAP2 server in the same mail domain.
  31.  
  32. The protocol
  33.  
  34.    The IMSP protocol consists of a sequence of client commands and
  35.    server responses, with server data interspersed between the
  36.    responses. To simplify the implementation of clients, the IMSP
  37.    protocol has a command structure similar to the IMAP protocol.
  38.    Many of the IMSP commands and responses have the same or similar
  39.    syntax and semantics of their IMAP2 counterparts.
  40.    Like the IMAP2 protocol, commands and responses
  41.    are tagged.  That is, a command begins with a unique identifier
  42.    (typically a short alphanumeric sequence such as a Lisp "gensym"
  43.    function would generate e.g., A0001, A0002, etc.), called a tag.  The
  44.    response to this command is given the same tag from the server.
  45.    Additionally, the server may send an arbitrary amount of "unsolicited
  46.    data", which is identified by the special reserved tag of "*".  There
  47.    is another special reserved tag, "+", discussed below.
  48.  
  49.    The server must be listening for a connection on TCP port XXX.
  50.    When a connection is opened the server sends an unsolicited OK or
  51.    PREAUTH response as a greeting message and then waits for commands.
  52.  
  53.    The client opens a connection and waits for the greeting.  The
  54.    client must not send any commands until it has received the
  55.    greeting from the server.
  56.  
  57.    Once the greeting has been received, the client may begin sending
  58.    commands and is not under any obligation to wait for a server
  59.    response to this command before sending another command, within the
  60.    constraints of TCP flow control.  When commands are received the
  61.    server acts on them and responds with command responses, often
  62.    interspersed with data.  The effect of a command can not be
  63.    considered complete until a command response with a tag matching the
  64.    command is received from the server.
  65.  
  66.    Although all known IMSP servers at the time of this writing process
  67.    commands to completion before processing the next command, it is not
  68.    required that a server do so.  However, many commands can affect the
  69.    results of other commands, creating processing-order dependencies
  70.    (or, for FIND and GETACL, ambiguities about which data is associated
  71.    with which command).  All implementations that operate in a non-
  72.    lockstep fashion must recognize such dependencies and defer or
  73.    synchronize execution as necessary.
  74.  
  75.    Generally, the first command from the client is a LOGIN command
  76.    with user name and password arguments to establish identity and
  77.    access authorization, unless this has already been accomplished
  78.    through other means, e.g. connecting via the BSD "RSH" protocol.
  79.    Until identity and access authorization have been established, no
  80.    operations other than LOGIN or LOGOUT are permitted.
  81.  
  82.    The client terminates the session with the LOGOUT command.  The
  83.    server returns a "BYE" followed by an "OK".
  84.  
  85.    A Typical Scenario
  86.  
  87.            Client                          Server
  88.            ------                          ------
  89.                                        {Wait for Connection}
  90.        {Open Connection}        -->
  91.                                    <-- * OK IMSP Server Ready
  92.                                        {Wait for command}
  93.        A001 LOGIN Fred Secret   -->
  94.                                    <-- A001 OK User Fred logged in
  95.                                        {Wait for command}
  96.        A002 FIND ALL.MAILBOXES INBOX        -->
  97.                                    <-- * MAILBOX INBOX (imap3.do.main)
  98.                                    <-- A0002 OK Find complete
  99.                                        {Wait for command}
  100.        A003 SUBSCRIBE BBOARD comp.mail.mime      -->
  101.                                    <-- A003 OK Subscribe complete
  102.                                        {Wait for command}
  103.        A004 LOGOUT              -->
  104.                                    <-- * BYE IMSP server quitting
  105.                                    <-- A004 OK Logout complete
  106.        {Close Connection}       --><-- {Close connection}
  107.                                        {Go back to start}
  108.  
  109. Base functionality
  110.  
  111.    Commands
  112.  
  113.    tag NOOP
  114.  
  115.       The NOOP command returns an OK to the client.  By itself, it does
  116.       nothing, but certain things may happen as side effects.
  117.  
  118.    Responses
  119.  
  120.    tag OK text
  121.  
  122.       This response identifies successful completion of the command with
  123.       that tag.  The text is a line of human-readable text that may be
  124.       useful in a protocol telemetry log for debugging purposes.
  125.  
  126.    tag NO text
  127.  
  128.       This response identifies unsuccessful completion of the command
  129.       with that tag.  The text is a line of human-readable text that
  130.       probably should be displayed to the user in an error report by the
  131.       client.
  132.  
  133.    tag BAD text
  134.  
  135.       This response identifies faulty protocol received from the client;
  136.       The text is a line of human-readable text that should be recorded
  137.       in any telemetry as part of a bug report to the maintainer of the
  138.       client.
  139.  
  140.    * BYE text
  141.  
  142.       This response identifies that the server is about to close the
  143.       connection.  The text is a line of human-readable text that should
  144.       be displayed to the user in a status report by the client.  This
  145.       may be sent as part of a normal logout sequence, or as a panic
  146.       shutdown announcement by the server.  It is also used by some
  147.       servers as an announcement of an inactivity autologout.
  148.  
  149.    * OK text
  150.  
  151.       This response identifies normal operation on the server.  No
  152.       special action by the client is called for, however, the text
  153.       should be displayed to the user in some fashion.  This is
  154.       currently only used by servers at startup as a greeting message to
  155.       show they are ready to accept the first command.
  156.  
  157.    * NO text
  158.  
  159.       This response identifies a warning from the server that does not
  160.       affect the overall results of any particular request.  The text is
  161.       a line of human-readable text that should be presented to the user
  162.       as a warning of improper operation.
  163.  
  164.    * BAD text
  165.  
  166.       This response identifies a serious error at the server; it may
  167.       also indicate faulty protocol from the client in which a tag could
  168.       not be parsed.  The text is a line of human-readable text that
  169.       should be presented to the user as a serious or possibly fatal
  170.       error.  It should also be recorded in any telemetry as part of a
  171.       bug report to the maintainer of the client and server.
  172.  
  173.    + text
  174.  
  175.       This response identifies that the server is ready to accept the
  176.       text of a literal from the client.  Normally, a command from the
  177.       client is a single text line.  If the server detects an error in
  178.       the command, it can simply discard the remainder of the line.  It
  179.       cannot do this for commands that contain literals, since a literal
  180.       can be an arbitrarily long amount of text, and the server may not
  181.       even be expecting a literal.  This mechanism is provided so the
  182.       client knows not to send a literal until the server expects it,
  183.       preserving client/server synchronization.
  184.  
  185.       In practice, this condition is rarely encountered.  In the current
  186.       protocol, the only client command likely to contain a literal is
  187.       the LOGIN command.  Consider a server that validates the user
  188.       before checking the password.  If the password contains "funny"
  189.       characters and hence is sent as a literal, then if the user is
  190.       invalid an error would occur before the password is parsed.
  191.  
  192.       No such synchronization protection is provided for literals sent
  193.       from the server to the client, for performance reasons.  Any
  194.       synchronization problems in this direction would be caused by a
  195.       bug in the client or server.
  196.  
  197. Identification and Authorization
  198.  
  199.    Commands
  200.  
  201.    tag LOGIN user password
  202.  
  203.       The LOGIN command identifies the user to the server and carries
  204.       the password authenticating this user.  This information is used
  205.       by the server to control access to commands.
  206.  
  207.       EXAMPLE:  A001 LOGIN SMITH SESAME
  208.       logs in as user SMITH with password SESAME.
  209.  
  210.    tag LOGOUT
  211.  
  212.       The LOGOUT command informs the server that the client is done with
  213.       the session.  The server should send an unsolicited BYE response
  214.       before the (tagged) OK response, and then close the network
  215.       connection.
  216.  
  217.    Responses
  218.  
  219.    * PREAUTH
  220.  
  221.       A pre-authenticated IMSP server should recognize that
  222.       authentication has already happened, and enter the post-login
  223.       state.  In its greeting message, it should use the unsolicited
  224.       reply "PREAUTH" instead of "OK" to indicate that external
  225.       authentication has taken place.
  226.  
  227. Server location and new message information
  228.  
  229.    Commands
  230.  
  231.    tag FIND MAILBOXES pattern
  232.  
  233.       The FIND MAILBOXES command accepts as an argument a pattern
  234.       (including wildcards) that specifies some set of mailbox names
  235.       that are usable by connecting to an IMAP2 server and using the SELECT
  236.       command.  The format of mailboxes is implementation dependent.
  237.       Only those mailboxes that the user has declared as being
  238.       "subscribed" are returned.
  239.  
  240.       Two wildcard characters are defined; "*" specifies any number
  241.       (including zero) characters may match at this position and "%"
  242.       specifies a single character may match at this position.  For
  243.       example, FOO*BAR will match FOOBAR, FOOD.ON.THE.BAR and FOO.BAR,
  244.       whereas FOO%BAR will match only FOO.BAR.  "*" will match all
  245.       mailboxes.
  246.  
  247.       The FIND MAILBOXES command will return some set of unsolicited
  248.       MAILBOX replies that have as their value a single mailbox name
  249.       and a list of hosts on which the mailbox resides.
  250.  
  251.       EXAMPLE:  A002 FIND MAILBOXES *
  252.                 * MAILBOX INBOX (imap3.do.main)
  253.                 * MAILBOX FOOBAR (imap3.do.main)
  254.                 * MAILBOX GENERAL (imap12.do.main)
  255.                 A002 OK Find completed
  256.  
  257.       Although the use of explicit file or path names for mailboxes is
  258.       discouraged by this standard, it may be unavoidable.  It is
  259.       important that the value returned in the MAILBOX unsolicited
  260.       reply be usable in a SELECT command given to an IMAP server
  261.       running on each of the returned hosts without remembering any
  262.       path specification that may have been used in the FIND MAILBOXES
  263.       pattern.
  264.  
  265.       The SUBSCRIBE MAILBOX and UNSUBSCRIBE MAILBOX commands
  266.       manipulate the list returned by this command.
  267.  
  268.    tag FIND ALL.MAILBOXES pattern
  269.  
  270.       The FIND ALL.MAILBOXES command is similar to FIND MAILBOXES;
  271.       however, it should return a complete list of all mailboxes
  272.       available to the user.  Data is returned as in FIND MAILBOXES.
  273.  
  274.       The exact meaning of this is implementation-dependent, since
  275.       the concept of a bounded or deterministic set of `mailboxes
  276.       available to the user' may not be meaningful for a particular
  277.       server or server implementation.  The command must at least 
  278.       return the set of mailboxes that FIND MAILBOXES does.
  279.  
  280.    tag FIND UNSEEN.MAILBOXES pattern
  281.  
  282.       The FIND UNSEEN.MAILBOXES command is similar to FIND MAILBOXES;
  283.       however, only those "subscribed" mailboxes in which there are
  284.       messages without the \SEEN flag are returned.  Data is returned
  285.       as in FIND MAILBOXES.
  286.  
  287.       Should an implementation be unable to determine which 
  288.       mailboxes have unread messages, it should return the same
  289.       information returned by FIND MAILBOXES.
  290.  
  291.    tag FIND BBOARDS pattern
  292.  
  293.       The FIND BBOARDS command accepts as an argument a pattern that
  294.       specifies some set of bulletin board names that are usable by
  295.       connecting to an IMAP2 server and using the
  296.       BBOARD command.  Wildcards are permitted as in FIND MAILBOXES.
  297.       Only those bboards that the user has declared as being
  298.       "subscribed" are returned.
  299.  
  300.       The FIND BBOARDS command will return some set of unsolicited
  301.       BBOARD replies that have as their value a single bulletin board
  302.       name and a list of hosts on which the bboard resides.
  303.  
  304.       EXAMPLE:  A002 FIND BBOARDS *
  305.                 * BBOARD comp.mail.mime (imap7.do.main imap8.do.main)
  306.                 * BBOARD GENERAL (imap2.do.main)
  307.                 A002 OK Find completed
  308.  
  309.    tag FIND ALL.BBOARDS pattern
  310.  
  311.       The FIND ALL.BBOARDS command is similar to FIND BBOARDS;
  312.       however, it should return a complete list of all bulletin
  313.       boards available to the user.  Data is returned as in
  314.       FIND BBOARDS.
  315.  
  316.       The exact meaning of this is implementation-dependent, since
  317.       the concept of a bounded or deterministic set of `bboards
  318.       available to the user' may not be meaningful for a particular
  319.       server or server implementation.  The command must at least
  320.       return the set of bboards that FIND BBOARDS does.
  321.  
  322.    tag FIND UNSEEN.BBOARDS pattern
  323.  
  324.       The FIND UNSEEN.BBOARDS command is similar to FIND BBOARDS;
  325.       however, only those "subscribed" bboards for which there are
  326.       messages without the \SEEN flag are returned.  Data is returned as
  327.       in FIND BBOARDS.
  328.  
  329.       Should an implementation be unable to determine which 
  330.       bboards have unread messages, it should return the same
  331.       information returned by FIND BBOARDS.
  332.  
  333.    Responses
  334.  
  335.    * MAILBOX string server_list
  336.  
  337.       This response occurs as a result of a FIND MAILBOXES, FIND
  338.       ALL.MAILBOXES, or FIND UNSEEN.MAILBOXES command.  The
  339.       string is a mailbox name that matches the pattern in the command.
  340.       server_list is an S-expression list of the fully qualified
  341.       domain names of the hosts on which the mailbox resides.
  342.  
  343.       Should the server_list contain more than one host name, the
  344.       client should access the mailbox by attempting to connect to
  345.       each server until one connection succeeds.  The client should
  346.       attempt each possible host in the sequence listed unless it has
  347.       good reason to do otherwise (such as an already-open connection
  348.       or geographic information).
  349.  
  350.    * BBOARD string server_list
  351.  
  352.       This response occurs as a result of a FIND BBOARDS, FIND
  353.       ALL.BBOARDS, or FIND UNSEEN.BBOARDS command.  The
  354.       string is a bboard name that matches the pattern in the command.
  355.       server_list is an S-expression list of the fully qualified
  356.       domain names of the hosts on which the bboard resides.
  357.  
  358.       Should the server_list contain more than one host name, the
  359.       client should access the bboard by attempting to connect to each
  360.       server until one connection succeeds.  The client should attempt
  361.       each possible host in the sequence listed unless it has good
  362.       reason to do otherwise (such as an already-open connection or
  363.       geographic information).
  364.  
  365.    Discussion
  366.  
  367.       When a user asks a client to read a bboard by name, the client
  368.       should issue a "FIND ALL.BBOARDS" command to the IMSP server in
  369.       order to determine which server it is on.
  370.  
  371.       An alternate way of returning the server location would be to
  372.       use the {server.do.main} notation used by a popular IMAP client
  373.       library.  This would have simplified the implementation of IMSP
  374.       by those client.  This was not done for the following reasons:
  375.  
  376.       * The {server.do.main} notation provides no mechanism for
  377.         specifying multiple hosts.
  378.  
  379.       * This would assign a protocol interpretation to what is
  380.         explicitly specified in RFC-1176 as being implementation
  381.         specific.
  382.  
  383.       There is a minor design flaw in IMAP2bis: the MAILBOX/BBOARD
  384.       unsolicited response has an ambiguous meaning--one can only tell
  385.       if the folder is subscribed or not by figuring out whether it is
  386.       a response to a FIND foo or a FIND ALL.foo command.
  387.  
  388.       The following is a possible implementation of the FIND
  389.       UNSEEN.MAILBOXES and FIND UNSEEN.BBOARDS commands:
  390.  
  391.       When a message is appended to a folder, the IMAP server notifies
  392.       the IMSP server of some unique (within the folder) attribute of
  393.       the message.  Possibile attributes include the message-id and the
  394.       internaldate.  This could be done using an IMSP extension:
  395.  
  396.       tag LAST MAILBOX mailbox attribute user
  397.       tag LAST BBOARD mailbox attribute
  398.  
  399.       When a user switches folders or closes a connection and has read
  400.       all messages in that folder, the IMAP server notifies the IMSP
  401.       server that the user has read all of the messages, including the
  402.       attribute of the last message.  This too could be done using an
  403.       IMSP extension:
  404.  
  405.       tag SEEN MAILBOX mailbox attribute user
  406.       tag SEEN BBOARD mailbox attribute user
  407.  
  408.       When asked for folders with unread by the user, the IMSP server
  409.       can check the attribute of the message last reported for the
  410.       user against the attribute of the message last appended to the
  411.       folder.
  412.  
  413.       In the interest of having the IMAP server/IMSP server
  414.       communications be the same across implementation, it might be
  415.       worthwhile to propose this method of implementing FIND
  416.       UNSEEN.MAILBOXES and FIND UNSEEN.BBOARDS as a standard.
  417.  
  418. Subscription management
  419.  
  420.    tag SUBSCRIBE MAILBOX mailbox
  421.  
  422.       The SUBSCRIBE MAILBOX command adds the specified mailbox name to
  423.       the list of "active" or "subscribed" mailboxes as returned by
  424.       the FIND MAILBOXES command.  This command returns an OK response
  425.       only if the subscription is successful.
  426.  
  427.       Subscriptions should be preserved between sessions.
  428.  
  429.    tag UNSUBSCRIBE MAILBOX mailbox
  430.  
  431.       The UNSUBSCRIBE MAILBOX command removes the specified mailbox name
  432.       from the list of "active" or "subscribed" mailboxes as returned by
  433.       the FIND MAILBOXES command.  This command returns an OK response
  434.       only if the unsubscription is successful.
  435.  
  436.       Unsubscriptions should be preserved between sessions.
  437.  
  438.    tag SUBSCRIBE BBOARD bboard
  439.  
  440.       The SUBSCRIBE BBOARD command adds the specified mailbox name to
  441.       the list of "active" or "subscribed" bulletin boards as returned
  442.       by the FIND BBOARDS command.  This command returns an OK response
  443.       only if the subscription is successful.
  444.  
  445.       Subscriptions should be preserved between sessions.
  446.  
  447.    tag UNSUBSCRIBE BBOARD bboard
  448.  
  449.       The UNSUBSCRIBE BBOARD command removes the specified mailbox name
  450.       from the list of "active" or "subscribed" bulletin boards as
  451.       returned by the FIND BBOARDS command.  This command returns an OK
  452.       response only if the unsubscription is successful.
  453.  
  454.       Unsubscriptions should be preserved between sessions.
  455.  
  456. Mailbox and BBoard management
  457.  
  458.    tag CREATE mailbox
  459.    tag CREATE mailbox server_partition_list
  460.  
  461.       The CREATE command creates a mailbox with the given name.  This
  462.       command returns an OK response only if a new mailbox with that
  463.       name has been created.  It is an error to attempt to create a
  464.       mailbox with a name that refers to an extant mailbox.  Any error
  465.       in creation will return a NO response.
  466.  
  467.       Creating INBOX is not permitted.  If there is a primary or
  468.       default mailbox for this user, it MUST exist and be called
  469.       INBOX; hence it may not be created.  Otherwise, the name INBOX
  470.       can not be used; see section VI, "INBOX Requirement Loosened",
  471.       of IMAP2bis [IMAP2bis] for more details.
  472.  
  473.       If server_partition_list is specified, it indicates the server
  474.       or set of servers on which the mailbox is to be created.  Each 
  475.       hostname in the list may be followed by a slash character and
  476.       an atom.  The atom specifies in an implementation-dependent
  477.       manner where to store the mailbox on the server.
  478.  
  479.       EXAMPLE:  A002 CREATE FOOBAR (imap2.do.main/a imap4.do.main)
  480.             A002 OK Create completed
  481.  
  482.       If server_partition_list is not specified, the placement of the
  483.       mailbox is up to the implementation.
  484.  
  485.    tag DELETE mailbox
  486.    tag DELETE mailbox hostname
  487.  
  488.       The DELETE command deletes a mailbox with the given name.  This
  489.       command returns an OK response only if a mailbox with that name
  490.       has been deleted.  It is an error to attempt to delete a mailbox
  491.       name that does not exist.  Any error in deletion will return a
  492.       NO response.
  493.  
  494.       A server SHOULD NOT attempt to test that a mailbox is empty prior
  495.       to permitting deletion; this would prevent the deletion of a mailbox
  496.       which for some reason can not be opened or expunged, leaving to
  497.       possible denial of service problems.  Any such checking should be
  498.       left to the discretion of the client.
  499.  
  500.       Deleting INBOX is not permitted.
  501.  
  502.       If hostname is specified, the mailbox is deleted on that host.
  503.       If it is not specified, the mailbox is deleted on all hosts
  504.       on which the mailbox resides.
  505.  
  506.    tag RENAME oldmailbox newmailbox
  507.  
  508.       The RENAME command changes the name of a mailbox.  This command
  509.       returns an OK response only if a mailbox with the old name exists
  510.       and has been successfully renamed to the new name.  It is an error
  511.       to attempt to rename with an old mailbox name that does not exist
  512.       or a new mailbox name which already exists.  Any error in renaming
  513.       will return a NO response.
  514.  
  515.       Should any users be subscribed to the mailbox, their
  516.       subscriptions should be updated appropriately.
  517.  
  518.       Renaming INBOX is permitted.  A new, empty INBOX is created in its
  519.       place.  Should users be subscribed to the INBOX, they should
  520.       remain subscribed to the new, empty INBOX.
  521.  
  522.    tag MOVE mailbox hostname server_partition_list
  523.  
  524.       The MOVE command moves a mailbox between servers and/or
  525.       replicates a mailbox.  Hostname specifies where the move is to
  526.       be made from and server_partition_list specifies where the move
  527.       is to be made to.  The interpretation of server_partition_list is
  528.       the same as for the CREATE command.
  529.  
  530.    tag CREATE.BBOARD bboard
  531.    tag CREATE.BBOARD bboard server_partition_list
  532.  
  533.       The CREATE.BBOARD command creates a bboard with the given name.
  534.       This command returns an OK response only if a new bboard with
  535.       that name has been created.  It is an error to attempt to create
  536.       a bboard with a name that refers to an extant bboard.  Any error
  537.       in creation will return a NO response.
  538.  
  539.       If server_partition_list is specified, it indicates the server
  540.       or set of servers on which the bboard is to be created.  Each 
  541.       hostname in the list may be followed by a slash character and
  542.       an atom.  The atom specifies in an implementation-dependent
  543.       manner where to store the bboard on the server.
  544.  
  545.       EXAMPLE:  A002 CREATE.BBOARD FOOBAR (imap2.do.main/a map4.do.main)
  546.             A002 OK Create completed
  547.  
  548.       If server_partition_list is specified, the placement of the
  549.       bboard is up to the implementation.
  550.  
  551.    tag DELETE.BBOARD bboard
  552.    tag DELETE.BBOARD bboard hostname
  553.  
  554.       The DELETE.BBOARD command deletes a bboard with the given name.
  555.       This command returns an OK response only if a bboard with that
  556.       name has been deleted.  It is an error to attempt to delete a
  557.       mailbox name that does not exist.  Any error in deletion will
  558.       return a NO response.
  559.  
  560.       If hostname is specified, the bboard is deleted on that host.
  561.       If it is not specified, the bboard is deleted on all hosts
  562.       on which the bboard resides.
  563.  
  564.    tag RENAME.BBOARD oldbboard newbboard
  565.  
  566.       The RENAME.BBOARD command changes the name of a bboard.  This command
  567.       returns an OK response only if a bboard with the old name exists
  568.       and has been successfully renamed to the new name.  It is an error
  569.       to attempt to rename with an old bboard name that does not exist
  570.       or a new bboard name which already exists.  Any error in renaming
  571.       will return a NO response.
  572.  
  573.       Should any users be subscribed to the bboard, their
  574.       subscriptions should be updated appropriately.
  575.  
  576.    tag MOVE.BBOARD bboard hostname server_partition_list
  577.  
  578.       The MOVE.BBOARD command moves a bboard between servers and/or
  579.       replicates a bboard.  Hostname specifies where the move is to be
  580.       made from and server_partition_list specifies where the move is
  581.       to be made to.  The interpretation of server_partition_list is the
  582.       same as for the CREATE command.
  583.  
  584.    tag ALIAS.BBOARD oldbboard newbboard
  585.  
  586.       After "oldbboard" gets subsequently deleted, all users that are
  587.       subscribed to "oldbboard" will be subscribed to newbboard.
  588.  
  589.       [Call this RESUBSCRIBE?  Put in Subscription management?
  590.       Actually perform the deletion?  Provide ALIAS command for mailboxes?]
  591.  
  592.    Discussion
  593.  
  594.       Of course, local administrative policy may restrict use of these
  595.       commands.  Implementations may use this as justification for
  596.       not implementing partitions, multiple locations for
  597.       mailboxes/bboards, or the MOVE and MOVE.BBOARD commands.
  598.  
  599.       MOVE and MOVE.BBOARD cannot be implemented without some
  600.       non-IMAP2 communication with the IMAP servers.  Replication
  601.       requires some communication between IMAP servers.
  602.       CREATE.BBOARD, DELETE.BBOARD, and RENAME.BBOARD, and partitions
  603.       require IMAP protocol extensions.  Everything else can be
  604.       implemented through the use of IMAP2bis commands.
  605.  
  606. User configuration information
  607.  
  608.    Commands
  609.  
  610.    tag GET pattern
  611.  
  612.       The GET command accepts as an argument a pattern 
  613.       that specifies some set of configuration options.  Wildcards are
  614.       permitted as in FIND MAILBOXES.
  615.  
  616.       The GET command will return some set of unsolicited OPTION
  617.       replies, giving the names and values of matching options.
  618.  
  619.       Example:  A002 GET BCC*
  620.                 * OPTION BCC.MAILBOX SENT-MAIL [READ-WRITE]
  621.         A002 OK Get completed
  622.  
  623.    tag SET option value
  624.  
  625.       The SET command accepts as arguments the name of an option and
  626.       a string value.  The value of the option is set to the specified
  627.       string.  If the option with that name does not already exist, it
  628.       is created.
  629.  
  630.       Option names must conform to the grammar of atoms.
  631.  
  632.       SET is not allowed if the named option is read-only.
  633.  
  634.    tag UNSET option
  635.  
  636.       The UNSET command accepts as an argument the name of an option.
  637.       Depending on the implementation, the option is either removed or
  638.       its value reverts to the implementation-defined default.
  639.  
  640.       UNSET is not allowed if the named option is read-only.
  641.  
  642.    Responses
  643.  
  644.    * OPTION atom string string
  645.    
  646.       This response occurs as a result of a GET command.  The first
  647.       string is an option name that matches the pattern in the
  648.       command.  The second string is the value of the option.  The
  649.       third string is either [READ-WRITE] if the user may change the
  650.       option or [READ-ONLY] if the user may not.
  651.  
  652.    Discussion
  653.  
  654.       Options can be site wide or per-user.  Possible uses include:
  655.  
  656.       User preferences (e.g. mailbox to store copies of outgoing mail)
  657.       Site configuration information (e.g. names of SMTP servers)
  658.       Per-user configuration information (e.g. contents of From: header)
  659.  
  660.       The option namespace could be split into a section for standard
  661.       options and sections for client-specific options.
  662.  
  663.       Possible standard options include:
  664.  
  665.       DATE        (current time, in rfc822 format)
  666.       DOMAIN        (local mail domain)
  667.       FROM        (string to use for From: header)
  668.       DELIVERY.HOSTS    (list of smtp hosts for mail submission)
  669.       BCC.MAILBOX    (mailbox to store copies of outgoing mail)
  670.  
  671. Access control lists
  672.  
  673.    Commands
  674.  
  675.    tag SETACL MAILBOX mailbox identifier rights
  676.  
  677.       Changes the access control list on the specified mailbox so that
  678.       the specified identifier is granted the permissions enumerated
  679.       in rights.
  680.  
  681.       Identifier has implementation-defined semantics.  Possible
  682.       variations of identifier interpretation include:
  683.  
  684.       * User names, as specified in the LOGIN command.
  685.  
  686.       * Named groups of users, presumably managed by some
  687.         authorization service.
  688.  
  689.       * Only allowing identifiers supported by the operating system
  690.     (e.g. ``user'', ``group'', and ``other'' for the Unix filesystem)
  691.  
  692.       * Whether rights granted to other mailboxes in an
  693.         implementation-defined hierarchy are inherited
  694.  
  695.       * A portion of the identifier specifying an "authentication
  696.         type".
  697.  
  698.     As an example, an implementation may control posting to a group
  699.         based on the contents of the From: header:
  700.  
  701.         from$user        p
  702.  
  703.       * Whether the union of rights for matching identifiers are granted
  704.         to a user or whether the rights for the most specific matching
  705.         identifier is granted.
  706.  
  707.     As an example, for a mailbox with the following ACL:
  708.  
  709.     user            lrsa
  710.         group-user-is-in    lrsw
  711.  
  712.     One implementation may grant the user 'lrswa' rights, another
  713.         may only grant the user 'lrsa'.
  714.  
  715.       * A prefix to an identifier name specifying the listed rights
  716.     are to be removed from users who match the prefixed identifier.
  717.  
  718.     As an example, for a mailbox with the following ACL:
  719.  
  720.     group-user-is-in    lrsw
  721.     -user            w
  722.  
  723.     An implementation may grant the user 'lrs' rights.
  724.  
  725.  
  726.       Rights is a string listing a (possibly empty) set of alphanumeric
  727.       characters, each character listing a set of operations which is
  728.       being controlled.  Letters [lowercase?] are reserved for
  729.       ``standard'' rights, listed below.  Digits are reserved for
  730.       implementation or site defined rights.  The standard rights are:
  731.  
  732.       l - lookup (folder is visible to FIND commands)
  733.       r - read (SELECT the mailbox, perform CHECK, FETCH, PARTIAL,
  734.           SEARCH, COPY from mailbox)
  735.       s - keep seen/unseen information across sessions (STORE \SEEN flag)
  736.       w - write (STORE flags other than \SEEN and \DELETED)
  737.       i - insert (perform APPEND, COPY into mailbox)
  738.       p - post (send mail to submission address for mailbox, not
  739.           enforced by IMAP2/IMSP itself)
  740.       c - create (CREATE new sub-folders in any implementation-defined
  741.           hierarchy)
  742.       d - delete (STORE \DELETED flag, perform EXPUNGE)
  743.       a - administer (perform SETACL)
  744.  
  745.       An implementation may tie rights together or may force rights to
  746.       always or never be granted.  For example, in an implementation
  747.       that uses unix mode bits, the rights "wisd" are tied.  The "a"
  748.       right is always granted to the owner and is never granted to
  749.       another user.  If rights are tied in an implementation, it
  750.       should be conservative in granting rights in response to SETACL
  751.       commands--unless all rights in a tied set are specified, none
  752.       should be used.  Numeric rights may not be tied.
  753.  
  754.    tag SETACL BBOARD bboard identifier rights
  755.  
  756.       Changes the access control list on the specified mailbox so that
  757.       the specified identifier is granted the permissions enumerated
  758.       in rights.
  759.  
  760.       Identifier and rights are as specified for SETACL MAILBOX.      
  761.  
  762.    tag DELETEACL MAILBOX mailbox identifier
  763.  
  764.       Removes any portion of the access control list for mailbox for
  765.       the specified identifier.
  766.  
  767.    tag DELETEACL BBOARD bboard identifier
  768.  
  769.       Removes any portion of the access control list for bboard for
  770.       the specified identifier.
  771.  
  772.    tag GETACL MAILBOX mailbox
  773.  
  774.       Returns the access control list for mailbox in some set of
  775.       unsolicited ACL replies.  There may not be more than one ACL
  776.       reply specifying any given identifier.
  777.  
  778.       EXAMPLE:  A002 GETACL MAILBOX INBOX
  779.                 * ACL MAILBOX INBOX Fred rwipslda
  780.         A002 Ok Getacl complete
  781.  
  782.    tag GETACL BBOARD bboard
  783.  
  784.       Returns the access control list for bboard in some set of
  785.       unsolicited ACL replies.
  786.  
  787.       EXAMPLE:  A002 GETACL BBOARD comp.mail.mime
  788.                 * ACL BBOARD comp.mail.mime anybody-else rpsl
  789.         * ACL BBOARD comp.mail.mime news rwipcsld
  790.         A002 Ok Getacl complete
  791.  
  792.    tag MYACL MAILBOX mailbox
  793.  
  794.       Returns the set of rights that the user has to mailbox in an
  795.       unsolicited ACL reply.
  796.  
  797.  
  798.    tag MYACL BBOARD mailbox
  799.  
  800.       Returns the set of rights that the user has to bboard in an
  801.       unsolicited ACL reply.
  802.  
  803.    Responses
  804.  
  805.    * ACL MAILBOX string string string
  806.  
  807.       This response occurs as a result of a GETACL MAILBOX or MYACL
  808.       MAILBOX command.  The first string is the mailbox name for which
  809.       this ACL entry applies.  The second string is the identifier for
  810.       which this entry applies.  The third string is the set of rights
  811.       that the identifier has.
  812.  
  813.    * ACL BBOARD string string string
  814.  
  815.       This response occurs as a result of a GETACL BBOARD or MYACL
  816.       BBOARD command.  The first string is the bboard name for which
  817.       this ACL entry applies.  The second string is the identifier for
  818.       which this entry applies.  The third string is the set of rights
  819.       that the identifier has.
  820.  
  821.    Discussion
  822.  
  823.       The assignment of letters to rights is AFS-centric.
  824.       Alternatively we could change i->a, l->v, a->what?.  The set of
  825.       rights should make some sense in other messaging domains,
  826.       particularly NNTP.
  827.  
  828.       The IMSP and NNTP ACL specifications should be similar.  The
  829.       IMSP author will work with the author of the NNTP ACL extension
  830.       in order to resolve this.
  831.  
  832. Unresolved issues
  833.  
  834.    The following mail support issues have been raised, but not
  835.    resolved in IMSP.
  836.  
  837.    * User forwarding address
  838.    * User address book
  839.    * Distribution lists
  840.  
  841.       Deferred.  These probably belong in a separate user directory
  842.       service.
  843.  
  844.    * Mail filing control (e.g. ``vacation'', delivery of mail to
  845.      folders other than INBOX based on subject, sender)
  846.  
  847.       Deferred.  This probably belongs in a separate service, quite
  848.       possibly a user directory service.
  849.  
  850.    * Administrative issues:
  851.      Purge rates for bboards (not necessarily age related)
  852.      Quotas for users or bboards (not necessarily megabyte related)
  853.  
  854.    * Notification issues
  855.      Current use of quota
  856.      Exhaustion of quota
  857.      Renamed/deleted folders/bboards
  858.  
  859.       [ Use unsolicited OK/NO messages? ]
  860.  
  861.       For renamed/deleted folders/bboards, server should notify, then
  862.       change or delete subscription as necessary.
  863.  
  864. Minimal conformance
  865.  
  866.    Implementation of the following commands is mandatory:
  867.  
  868.    NOOP
  869.    LOGIN
  870.    LOGOUT
  871.    FIND MAILBOXES
  872.    FIND ALL.MAILBOXES
  873.    FIND UNSEEN.MAILBOXES   
  874.    FIND BBOARDS
  875.    FIND ALL.BBOARDS
  876.    FIND UNSEEN.BBOARDS
  877.    SUBSCRIBE MAILBOX
  878.    SUBSCRIBE BBOARD
  879.    UNSUBSCRIBE MAILBOX
  880.    UNSUBSCRIBE BBOARD
  881.    GET
  882.    SET
  883.  
  884.    [CREATE DELETE RENAME CREATE.BBOARD, DELETE.BBOARD RENAME.BBOARD
  885.     ALIAS.BBOARD with partitions and multiple residency optional?]
  886.  
  887. Backwards compatibility
  888.  
  889.    When a client is directed by a user or an initial configuration to
  890.    contact a server, it should first attempt to reach the IMSP
  891.    service.  If that fails with connection refused, it should fall
  892.    back to the IMAP2 protocol.
  893.  
  894. Conventions
  895.  
  896.    The following terms are used in a meta-sense in the syntax
  897.    specification below:
  898.  
  899.       An ASCII-STRING is a sequence of arbitrary ASCII characters.
  900.  
  901.       An ATOM is a sequence of ASCII characters delimited by SP or CRLF.
  902.  
  903.       A CHARACTER is any ASCII character except """", "{", CR, or LF.
  904.  
  905.       A CRLF is an ASCII carriage-return character followed immediately
  906.       by an ASCII linefeed character.
  907.  
  908.       A NUMBER is a sequence of the ASCII characters that represent
  909.       decimal numerals ("0" through "9"), delimited by SP, CRLF, ",", or
  910.       ":".
  911.  
  912.       A SP is the ASCII space character.
  913.  
  914.       A TEXT_LINE is a human-readable sequence of ASCII characters up to
  915.       but not including a terminating CRLF.
  916.  
  917.    A common field in the IMSP protocol is a STRING, which may be an
  918.    ATOM, QUOTED-STRING (a sequence of CHARACTERs inside double-quotes),
  919.    or a LITERAL.  A literal consists of an open brace ("{"), a number, a
  920.    close brace ("}"), a CRLF, and then an ASCII-STRING of n characters,
  921.    where n is the value of the number inside the brace.  In general, a
  922.    string should be represented as an ATOM or QUOTED-STRING if at all
  923.    possible.  The semantics for QUOTED-STRING or LITERAL are checked
  924.    before those for ATOM; therefore an ATOM used in a STRING may only
  925.    contain CHARACTERs.  Literals are most often sent from the server to
  926.    the client; in the rare case of a client to server literal there is a
  927.    special consideration (see the "+ text" response below).
  928.  
  929.    Note the set of allowable CHARACTERs is larger than specified for IMAP2.
  930.  
  931. Formal syntax
  932.  
  933.    The following syntax specification uses the augmented Backus-Naur
  934.    Form (BNF) notation as specified in RFC 822 with one exception; the
  935.    delimiter used with the "#" construct is a single space (SP) and not
  936.    a comma.
  937.  
  938.    acl           ::= "ACL" acl_option SP string SP string SP string
  939.  
  940.    acl_option        ::= "MAILBOX" / "BBOARD"
  941.  
  942.    alias_bboard       ::= "ALIAS.BBOARD" SP string SP string
  943.  
  944.    bboard_reply       ::= "BBOARD" SP string SP "(" 1#hostname ")"
  945.  
  946.    create       ::= "CREATE" SP mailbox [ server_partition_list ]
  947.  
  948.    create_bboard   ::= "CREATE.BBOARD" SP string [ server_partition_list ]
  949.  
  950.    delete       ::= "DELETE" SP mailbox [ hostname ]
  951.  
  952.    delete_bboard   ::= "DELETE.BBOARD" SP string [ hostname ]
  953.  
  954.    find            ::= "FIND" SP find_option SP string
  955.  
  956.    find_option     ::= "MAILBOXES" / "ALL.MAILBOXES" / "UNSEEN.MAILBOXES /
  957.                "BBOARDS" / "ALL.BBOARDS" / "UNSEEN.BBOARDS"
  958.  
  959.    get           ::= "GET" SP string
  960.  
  961.    getacl       ::= "GETACL" SP acl_option SP string
  962.  
  963.    hostname       ::= atom    ; Fully qualified domain name
  964.  
  965.    literal         ::= "{" NUMBER "}" CRLF ASCII-STRING
  966.  
  967.    login           ::= "LOGIN" SP userid SP password
  968.  
  969.    logout          ::= "LOGOUT"
  970.  
  971.    mailbox         ::= "INBOX" / string
  972.  
  973.    mailbox_reply   ::= "BBOARD" SP string SP "(" 1#hostname ")"
  974.  
  975.    move           ::= "MOVE" SP mailbox SP hostname SP server_partition_list
  976.  
  977.    move_bboard       ::= "MOVE.BBOARD" SP string SP hostname SP server_partition_list
  978.  
  979.    myacl       ::= "MYACL" SP acl_option SP string
  980.  
  981.    noop            ::= "NOOP"
  982.  
  983.    option       ::= "OPTION" SP atom SP string SP string
  984.  
  985.    rename       ::= "RENAME" SP mailbox SP string
  986.  
  987.    rename_bboard   ::= "RENAME.BBOARD" SP string SP string
  988.  
  989.    request       ::= tag SP (noop / login / logout / find /
  990.                    subscribe / unsubscribe / create /
  991.                    delete / rename / move / create_bboard /
  992.                    delete_bboard / rename_bboard /
  993.                    move_bboard / alias_bboard /
  994.                    get / set / getacl / setacl / myacl) CRLF
  995.  
  996.    response        ::= tag SP ("OK" / "NO" / "BAD") SP text_line CRLF
  997.  
  998.    server_partition ::= hostname [ "/" atom ]
  999.  
  1000.    server_partition_list ::= "(" 1#server_partition ")"
  1001.  
  1002.    set           ::= "SET" SP atom SP string
  1003.  
  1004.    setacl       ::= "SETACL" SP acl_option SP string SP string
  1005.  
  1006.    string          ::= atom / """" 1*character """" / literal
  1007.  
  1008.    subscribe       ::= "SUBSCRIBE" SP subscribe_opt SP string
  1009.  
  1010.    subscribe_opt   ::= "MAILBOX" / "BBOARD"
  1011.  
  1012.    unsolicited     ::= "*" SP (mailbox_reply / bboard_reply / option / acl)
  1013.                    CRLF
  1014.  
  1015.    unsubscribe     ::= "UNSUBSCRIBE" SP subscribe_opt SP string
  1016.  
  1017.  
  1018. References
  1019.  
  1020.    [RFC-1176] Crispin, Mark R.  Interactive Mail Access Protocol -
  1021.    Version 2.  August 1990.  RFC-1176.
  1022.  
  1023.    [IMAP2bis] Crispin, Mark R.  IMAP2bis - Extensions to the IMAP2
  1024.    Protocol, December 1992
  1025.  
  1026. Author's Address
  1027.  
  1028.    John G. Myers
  1029.    Carnegie-Mellon University
  1030.    4910 Forbes Ave.
  1031.    Pittsburgh PA, 15213-3890
  1032.  
  1033.    Email: jgm+@cmu.edu
  1034.  
  1035.  
  1036.  
  1037.  
  1038.