home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1000s / rfc1056.txt < prev    next >
Text File  |  1988-06-15  |  83KB  |  2,131 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         M. Lambert
  8. Request for Comments: 1056                                           MIT
  9. Obsoletes: RFC-993                                             June 1988
  10.  
  11.         PCMAIL: A Distributed Mail System for Personal Computers
  12.  
  13.  
  14.                            Table of Contents
  15.  
  16.    1. Status of this Document                                      1
  17.    2. Introduction                                                 2
  18.    3. Repository architecture                                      4
  19.         3.1. Management of user mail state                         5
  20.         3.2. Repository-to-RFC-822 name translation                7
  21.    4. Communication between repository and client: DMSP            8
  22.         4.1. DMSP commands                                         8
  23.         4.2. DMSP responses                                        8
  24.         4.3. DMSP sessions                                        11
  25.         4.4. General operations                                   11
  26.         4.5. User operations                                      12
  27.         4.6. Client operations                                    13
  28.         4.7. Mailbox operations                                   14
  29.         4.8. Address operations                                   15
  30.         4.9. Subscription operations                              15
  31.         4.10. Message operations                                  16
  32.    5. Client Architecture                                         18
  33.         5.1. Multiple clients                                     18
  34.         5.2. Synchronization                                      18
  35.         5.3. Batch operation versus interactive operation         20
  36.         5.4. Message summaries                                    20
  37.    6. Typical interactive-style client-repository interaction     21
  38.    7. A current Pcmail implementation                             25
  39.         7.1. IBM PC client code                                   25
  40.         7.2. UNIX client code                                     26
  41.         7.3. Repository code                                      26
  42.    8. Conclusions                                                 26
  43.    I. DMSP Protocol Specification                                 28
  44.    II. Operations by name                                         37
  45.    III. Responses by number                                       38
  46.  
  47. 1. Status of this Memo
  48.  
  49.    This RFC is a discussion of the Pcmail workstation based distributed
  50.    mail system.  It is identical to the discussion in RFC-993, save that
  51.    a new, much simpler mail transport protocol is described.  The new
  52.    transport protocol is the result of continued research into ease of
  53.    protocol implementation and use issues.  Distribution of this memo is
  54.    unlimited.
  55.  
  56.  
  57.  
  58. Lambert                                                         [Page 1]
  59.  
  60. RFC 1056                         PCMAIL                        June 1988
  61.  
  62.  
  63. 2. Introduction
  64.  
  65.    Pcmail is a distributed mail system providing mail service to an
  66.    arbitrary number of users, each of whom owns one or more
  67.    workstations.  Pcmail's motivation is to provide very flexible mail
  68.    service to a wide variety of different workstations, ranging in power
  69.    from small, resource-limited machines like IBM PCs to resource-rich
  70.    (where "resources" are primarily processor speed and disk space)
  71.    machines like Suns or Microvaxes.  It attempts to provide limited
  72.    service to resource-limited workstations while still providing full
  73.    service to resource-rich machines.  It is intended to work well with
  74.    machines only infrequently connected to a network as well as machines
  75.    permanently connected to a network.  It is also designed to offer
  76.    diskless workstations full mail service.
  77.  
  78.    The system is divided into two halves.  The first consists of a
  79.    single entity called the "repository".  The repository is a storage
  80.    center for incoming mail.  Mail for a Pcmail user can arrive
  81.    externally from the Internet or internally from other repository
  82.    users.  The repository also maintains a stable copy of each user's
  83.    mail state (this will hereafter be referred to as the user's "global
  84.    mail state").  The repository is therefore typically a computer with
  85.    a large amount of disk storage.
  86.  
  87.    The second half of Pcmail consists of one or more "clients".  Each
  88.    Pcmail user may have an arbitrary number of clients, typically
  89.    single-user workstations.  The clients provide a user with a friendly
  90.    means of accessing the user's global mail state over a network.  In
  91.    order to make the interaction between the repository and a user's
  92.    clients more efficient, each client maintains a local copy of its
  93.    user's global mail state, called the "local mail state".  It is
  94.    assumed that clients, possibly being small personal computers, may
  95.    not always have access to a network (and therefore to the global mail
  96.    state in the repository).  This means that the local and global mail
  97.    states may not be identical all the time, making synchronization
  98.    between local and global mail states necessary.
  99.  
  100.    Clients communicate with the repository via the Distributed Mail
  101.    System Protocol (DMSP); the specification for this protocol appears
  102.    in appendix A. The repository is therefore a DMSP server in addition
  103.    to a mail end-site and storage facility.  DMSP provides a complete
  104.    set of mail manipulation operations ("send a message", "delete a
  105.    message", "print a message", etc.).  DMSP also provides special
  106.    operations to allow easy synchronization between a user's global mail
  107.    state and his clients' local mail states.  Particular attention has
  108.    been paid to the way in which DMSP operations act on a user's mail
  109.    state.  All DMSP operations are failure-atomic (that is, they are
  110.    guaranteed either to succeed completely, or leave the user's mail
  111.  
  112.  
  113.  
  114. Lambert                                                         [Page 2]
  115.  
  116. RFC 1056                         PCMAIL                        June 1988
  117.  
  118.  
  119.    state unchanged ).  A client can be abruptly disconnected from the
  120.    repository without leaving inconsistent or damaged mail states.
  121.  
  122.    Pcmail's design has been directed by the characteristics of currently
  123.    available workstations.  Some workstations are fairly portable, and
  124.    can be packed up and moved in the back seat of an automobile.  A few
  125.    are truly portable--about the size of a briefcase--and battery-
  126.    powered.  Some workstations have constant access to a high-speed
  127.    local-area network; pcmail should allow for "on-line" mail delivery
  128.    for these machines while at the same time providing "batch" mail
  129.    delivery for other workstations that are not always connected to a
  130.    network.  Portable and semi-portable workstations tend to be
  131.    resource-poor.  A typical IBM PC has a small amount (typically less
  132.    than one megabyte) of main memory and little in the way of mass
  133.    storage (floppy-disk drives that can access perhaps 360 kilobytes of
  134.    data).  Pcmail must be able to provide machines like this with
  135.    adequate mail service without hampering its performance on more
  136.    resource-rich workstations. Finally, all workstations have some
  137.    common characteristics that Pcmail should take advantage of.  For
  138.    instance, workstations are fairly inexpensive compared to the various
  139.    time-shared systems that most people use for mail service.  This
  140.    means that people may own more than one workstation, perhaps putting
  141.    a Microvax in an office and an IBM PC at home.
  142.  
  143.    Pcmail's design reflects the differing characteristics of the various
  144.    workstations.  Since one person can own several workstations, Pcmail
  145.    allows users multiple access points to their mail state.  Each Pcmail
  146.    user can have several client workstations, each of which can access
  147.    the user's mail by communicating with the repository over a network.
  148.    The clients all maintain local copies of the user's global mail
  149.    state, and synchronize the local and global states using DMSP.
  150.  
  151.    It is also possible that some workstations will only infrequently be
  152.    connected to a network (and thus be able to communicate with the
  153.    repository).  The Pcmail design therefore allows two modes of
  154.    communication between repository and client.  "Interactive mode" is
  155.    used when the client is always connected to the network.  Any changes
  156.    to the client's local mail state are immediately also made to the
  157.    repository's global mail state, and any incoming mail is immediately
  158.    transmitted from repository to client.  "Batch mode" is used by
  159.    clients that have infrequent access to the repository.  Users
  160.    manipulate the client's local mail state, queueing the changes
  161.    locally.  When the client is next connected to the repository, the
  162.    changes are executed, and the client's local mail state is
  163.    synchronized with the repository's global mail state.
  164.  
  165.    Finally, the Pcmail design minimizes the effect of using a resource-
  166.    poor workstation as a client.  Mail messages are split into two
  167.  
  168.  
  169.  
  170. Lambert                                                         [Page 3]
  171.  
  172. RFC 1056                         PCMAIL                        June 1988
  173.  
  174.  
  175.    parts: a "descriptor" and a "body".  The descriptor is a capsule
  176.    message summary whose length (typically about 100 bytes) is
  177.    independent of the actual message length.  The body is the actual
  178.    message text, including an RFC-822 standard message header.  While
  179.    the client may not have enough storage to hold a complete set of
  180.    messages, it can usually hold a complete set of descriptors, thus
  181.    providing the user with at least a summary of his mail state.  For
  182.    clients with extremely limited resources, Pcmail allows the storage
  183.    of partial sets of descriptors.  Although this means the user does
  184.    not have a complete local mail state, he can at least look at
  185.    summaries of some messages.  In the cases where the client cannot
  186.    immediately store message bodies, it can always pull them over from
  187.    the repository as storage becomes available.
  188.  
  189.    The remainder of this document is broken up into sections discussing
  190.    the following:
  191.  
  192.       - The repository architecture
  193.  
  194.       - DMSP, its operations, and motivation for its design
  195.  
  196.       - The client architecture
  197.  
  198.       - A typical DMSP session between the repository and a
  199.         client
  200.  
  201.       - The current Pcmail implementation
  202.  
  203.       - Appendices describing the DMSP protocol in detail
  204.  
  205. 3. Repository architecture
  206.  
  207.    A typical machine running repository code has a relatively powerful
  208.    processor and a large amount of disk storage.  It must also be a
  209.    permanent network site, for two reasons.  First, clients communicate
  210.    with the repository over a network, and rely on the repository's
  211.    being available at any time.  Second, people sending mail to
  212.    repository users rely on the repository's being available to receive
  213.    mail at any time.
  214.  
  215.    The repository must perform several tasks.  First, and most
  216.    importantly, the repository must efficiently manage a potentially
  217.    large number of users and their mail states.  Mail must be reliably
  218.    stored in a manner that makes it easy for multiple clients to access
  219.    the global mail state and synchronize their local mail states with
  220.    the global state.  Since a large category of electronic mail is
  221.    represented by bulletin boards (bboards), the repository should
  222.    efficiently manage bboard mail, using a minimum of storage to store
  223.  
  224.  
  225.  
  226. Lambert                                                         [Page 4]
  227.  
  228. RFC 1056                         PCMAIL                        June 1988
  229.  
  230.  
  231.    bboard messages in a manner that still allows any user subscribing to
  232.    the bboard to read the mail.  Second, the repository must be able to
  233.    communicate efficiently with its clients.  The protocol used to
  234.    communicate between repository and client must be reliable and must
  235.    provide operations that (1) allow typical mail manipulation, and (2)
  236.    support Pcmail's distributed nature by allowing efficient
  237.    synchronization between local and global mail states.  Third, the
  238.    repository must be able to process mail from sources outside the
  239.    repository's own user community (a primary outside source is the
  240.    Internet).  Internet mail will arrive with a NIC RFC-822 standard
  241.    message header; the recipient names in the message must be properly
  242.    translated from the RFC-822 namespace into the repository's
  243.    namespace.
  244.  
  245. 3.1. Management of user mail state
  246.  
  247.    Pcmail divides the world into a community of users.  Each user is
  248.    associated with a user object.  A user object consists of a unique
  249.    name, a password (which the user's clients use to authenticate
  250.    themselves to the repository before manipulating a global mail
  251.    state), a list of "client objects" describing those clients belonging
  252.    to the user, a list of "subscription objects", and a list of "mailbox
  253.    objects".
  254.  
  255.    A client object consists of a unique name and a status.  A user has
  256.    one client object for every client he owns; a client cannot
  257.    communicate with the repository unless it has a corresponding client
  258.    object in a user's client list.  Client objects therefore serve as a
  259.    means of identifying valid clients to the repository.  Client objects
  260.    also allow the repository to manage local and global mail state
  261.    synchronization; the repository associates with every client an
  262.    "update list" of message state changes which have occurred since the
  263.    client's last synchronization.
  264.  
  265.    A client's status is either "active" or "inactive".  The repository
  266.    defines inactive clients as those clients which have not connected to
  267.    the repository within a set time period (one week in the current
  268.    repository implementation).  When a previously-inactive client does
  269.    connect to the repository, the repository notifies the client that it
  270.    has been inactive for some time and should "reset" itself.  Resetting
  271.    a client has the effect of placing every message in every mailbox
  272.    onto the client's update list.  This allows the client to get a fresh
  273.    global mail state from the repository when it next synchronizes (see
  274.    synchronization discussion following).  The reset is performed on the
  275.    assumption that enough global state changes occur in a week that the
  276.    client would spend too much time performing an ordinary local state-
  277.    global state synchronization.
  278.  
  279.  
  280.  
  281.  
  282. Lambert                                                         [Page 5]
  283.  
  284. RFC 1056                         PCMAIL                        June 1988
  285.  
  286.  
  287.    Messages are stored in mailboxes.  Users can have any number of
  288.    mailboxes, which serve both to store and to categorize messages.  A
  289.    mailbox object both names a mailbox and describes its contents.
  290.    Mailboxes are identified by a unique name; their contents are
  291.    described by three numeric values.  The first is the total number of
  292.    messages in the mailbox, the second is the total number of unseen
  293.    messages (messages that have never been seen by the user via any
  294.    client) in the mailbox, and the third is the mailbox's next available
  295.    message unique identifier (UID).  The above information is stored in
  296.    the mailbox object to allow clients to get a summary of a mailbox's
  297.    contents without having to read all the messages within the mailbox.
  298.  
  299.    Some mailboxes are special, in that other users may read the messages
  300.    stored in them.  These mailboxes are called "bulletin board
  301.    mailboxes" or "bboard mailboxes".  The repository uses bboard
  302.    mailboxes to store bboard mail.  Bboard mailboxes differ from
  303.    ordinary mailboxes in the following ways:
  304.  
  305.       - Their names are unique across the entire repository;
  306.         for instance, only one bboard mailbox named "sf-lovers"
  307.         may exist in the entire repository community.  This
  308.         does not preclude other users from having an ordinary
  309.         mailbox named "sf-lovers".
  310.  
  311.       - Subscribers to the bboard are granted read-only access
  312.         to the messages in the bboard mailbox.  The bboard
  313.         mailbox's owner (typically the system manager) has
  314.         read/update/delete access to the mailbox.
  315.  
  316.    A bboard subscriber keeps track of the messages he has looked at via
  317.    a subscription object.  The subscription object contains the name of
  318.    the bboard, its owner (the user who owns the bboard mailbox where all
  319.    the messages are stored), and the UID of the first message not yet
  320.    seen by the subscriber.
  321.  
  322.    Users gain read-only access to a bboard by creating a subscription to
  323.    it; they lose that access when they delete that subscription.  A list
  324.    of all bboard mailboxes available for subscription can be transmitted
  325.    to the user on demand.
  326.  
  327.    Associated with each mailbox are any number of message objects.  Each
  328.    message is broken into two parts--a "descriptor", which contains a
  329.    summary of useful information about the message, and a "body", which
  330.    is the message text itself, including its NIC RFC-822 message header.
  331.    Each message is assigned a monotonically increasing UID based on the
  332.    owning mailbox's next available UID.  Each mailbox has its own set of
  333.    UIDs which, together with the mailbox name and user name, uniquely
  334.    identify the message within the repository.  A descriptor holds the
  335.  
  336.  
  337.  
  338. Lambert                                                         [Page 6]
  339.  
  340. RFC 1056                         PCMAIL                        June 1988
  341.  
  342.  
  343.    following information:  the message UID, the message size in bytes
  344.    and lines, four "useful" message header fields (the "date:", "to:",
  345.    "from:", and "subject:" fields), and sixteen flags.  These flags are
  346.    given identifying numbers 0 through 15.  Eight of these flags have
  347.    well-known definitions and are reserved for the repository's use.
  348.    The eight repository-defined flags mark:
  349.  
  350.       - (#0) whether the message has been deleted
  351.  
  352.       - (#1) whether it has been seen
  353.  
  354.       - (#2) whether it has been forwarded to the user
  355.  
  356.       - (#3) whether it has been forwarded by the user
  357.  
  358.       - (#4) whether it has been filed (written to a text file
  359.         outside the repository)
  360.  
  361.       - (#5) whether it has been printed (locally or remotely)
  362.  
  363.       - (#6) whether it has been replied to
  364.  
  365.       - (#7) whether it has been copied to another mailbox
  366.  
  367.  
  368.  
  369.    The remaining eight flags are availble for user use.  Descriptors
  370.    serve as an efficient means for clients to get message information
  371.    without having to waste time retrieving the entire message from the
  372.    repository.
  373.  
  374. 3.2. Repository-to-RFC-822 name translation
  375.  
  376.    "Address objects" provide the repository with a means for translating
  377.    the RFC-822-style mail addresses in Internet messages into repository
  378.    names.  The repository provides its own namespace for message
  379.    identification.  Any message is uniquely identified by the triple
  380.    (user-name, mailbox-name, message-UID).  Any mailbox is uniquely
  381.    identified by the pair (user-name, mailbox-name).  In order to
  382.    translate between RFC-822-style mail addresses and repository names,
  383.    the repository maintains a list of address objects.  Each address
  384.    object is an association between an RFC-822-style address and a
  385.    (user-name, mailbox-name) pair.  When mail arrives from the Internet,
  386.    the repository can use the address object list to translate the
  387.    recipients into (user-name, mailbox-name) pairs and route the message
  388.    correctly.
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Lambert                                                         [Page 7]
  395.  
  396. RFC 1056                         PCMAIL                        June 1988
  397.  
  398.  
  399. 4. Communication between repository and client: DMSP
  400.  
  401.    The Distributed Mail System Protocol (DMSP) defines and manipulates
  402.    the objects mentioned in the previous section.  It has been designed
  403.    to work with Pcmail's singlerepository/multiple-client model of the
  404.    world.  In addition to providing typical mail manipulation functions,
  405.    DMSP provides functions that allow easy synchronization of global and
  406.    local mail states.
  407.  
  408.    DMSP has been completely re-specified in this version of Pcmail.
  409.    Formerly, DMSP was implemented on top of the USP remote-procedure-
  410.    call protocol.  Since this protocol is not fully unofficially
  411.    specified (let alone officially specified) anywhere, implementation
  412.    of USP is difficult for sites wishing to implement Pcmail on
  413.    different systems.  We therefore have decided to completely redesign
  414.    DMSP.  It is now a very simple request/response protocol similar to
  415.    SMTP or NNTP, running directly on a reliable bidirectional byte-
  416.    stream such as TCP.  The TCP contact port for DMSP has been
  417.    designated 158.  Requests and responses consist of ASCII characters;
  418.    on octet-based transmission streams, each character is transmitted
  419.    rightjustified in an octet with the high-order bit cleared to zero.
  420.  
  421. 4.1. DMSP commands
  422.  
  423.    DMSP operations consist of an operation name, followed by zero or
  424.    more tab or space characters, followed by zero or more arguments,
  425.    each of which is separated from the operation name and other
  426.    arguments by one or more space or tab characters.  All operation
  427.    requests, as well as all responses, must be terminated with a
  428.    carriage-return plus line-feed (CR-LF) pair.  All operation names and
  429.    arguments must be taken from the set of alphanumeric characters plus
  430.    the characters dash ("-"), underscore ("_"), and period (".").
  431.  
  432.    DMSP operation names are case-insensitive; they may be transmitted in
  433.    any combination of upper and lower case.  DMSP arguments are case-
  434.    insensitive but case-preserving; in other words a mailbox named
  435.    "MarkL" may be referred to by an operation argument "markl", but will
  436.    always be stored, and transmitted in a repository response, as
  437.    "MarkL"; furthermore, any attempt to create a new mailbox "MaRkL"
  438.    will not be permitted.
  439.  
  440.    Each operation argument may contain no more than 64 characters.  No
  441.    single request or response line may contain more than 512 characters,
  442.    including all white space and the terminating CR-LF.
  443.  
  444. 4.2. DMSP responses
  445.  
  446.    A DMSP operation always results in a response, which may be followed
  447.  
  448.  
  449.  
  450. Lambert                                                         [Page 8]
  451.  
  452. RFC 1056                         PCMAIL                        June 1988
  453.  
  454.  
  455.    in turn by a list, consisting of zero or more lines of CR-LF-
  456.    terminated text terminated by a single period (".") plus a CR-LF.  A
  457.    response is always prefaced by a three-digit reply code; possible
  458.    text following the response code can be in any format.  The response
  459.    code is sufficient to determine whether the operation succeeded or
  460.    failed, or whether more text is forthcoming following the response
  461.    line.  Any text following the response code is for information only,
  462.    and need not follow any particular format.
  463.  
  464.    The first digit indicates whether the operation succeeded or failed,
  465.    and if it succeeded whether or not more text should be presented to
  466.    the repository.  Definitions of the first digit are similar to those
  467.    of NNTP:
  468.  
  469.    1XX             Informative message
  470.  
  471.  
  472.    2XX             Operation completed successfully
  473.  
  474.  
  475.    3XX             Operation completed successfully, present
  476.                    remainder of text and terminate with a single
  477.                    period plus CR-LF pair.
  478.  
  479.  
  480.    4XX             Operation was performed and failed for some
  481.                    reason.
  482.  
  483.  
  484.    5XX             Operation could not be performed because of a
  485.                    protocol syntax error of some sort.
  486.  
  487.  
  488.    The second digit indicates the type of object referred to by the
  489.    response.
  490.  
  491.  
  492.    X0X             Miscellaneous
  493.  
  494.  
  495.    X1X             User operation
  496.  
  497.  
  498.    X2X             Client operation
  499.  
  500.  
  501.    X3X             Mailbox operation
  502.  
  503.  
  504.  
  505.  
  506. Lambert                                                         [Page 9]
  507.  
  508. RFC 1056                         PCMAIL                        June 1988
  509.  
  510.  
  511.    X4X             Subscription operation
  512.  
  513.  
  514.    X5X             Message operation
  515.  
  516.  
  517.    X6X             Address operation
  518.  
  519.  
  520.    In an error response, the final digit can describe the type of error
  521.    that occurred.  Otherwise, it simply gives a response a unique
  522.    number.  Numbers 0 through 3 are significant in 4XX-class (error)
  523.    responses only.  Numbers 0-9 in all other responses serve only to
  524.    differentiate responses dealing with the same type of object under
  525.    different circumstances.
  526.  
  527.    4X0             Operation failed because object exists
  528.  
  529.  
  530.    4X1             Operation failed because object does not exist
  531.  
  532.  
  533.    4X2             Operation failed because of an internal error
  534.  
  535.  
  536.    4X3             Operation failed because of an argument syntax
  537.                    error
  538.  
  539.  
  540.    Each operation generates one of a set of responses, detailed in the
  541.    protocol specification appendix.
  542.  
  543.    List termination is determined solely by a well-known character
  544.    sequence (CR-LF, period, CR-LF).  Since application data could well
  545.    accidentally contain this termination sequence, the transmitting
  546.    protocol module must modify application data so it contains no
  547.    termination sequences.  The receiving module must similarly undo the
  548.    modification before presenting the data to the application at the
  549.    receiving end.
  550.  
  551.    The transmitting module modifies application data as follows:  If a
  552.    line of application data begins with a period, that period is
  553.    duplicated.  Since the termination sequence is a single period,
  554.    accidental termination has now been prevented.
  555.  
  556.    The receiving protocol checks incoming all incoming data lines for a
  557.    leading period.  A single period is a list terminator; a period
  558.    followed by other text is removed before being presented to the
  559.  
  560.  
  561.  
  562. Lambert                                                        [Page 10]
  563.  
  564. RFC 1056                         PCMAIL                        June 1988
  565.  
  566.  
  567.    receiving application.
  568.  
  569. 4.3. DMSP sessions
  570.  
  571.    A DMSP session proceeds as follows: a client begins the session with
  572.    the repository by opening a connection to the repository's machine.
  573.    The client then authenticates both itself and its user to the
  574.    repository with a "login" operation.  If the authentication is
  575.    successful, the user performs an arbitrary number of DMSP operations
  576.    before ending the session with a "logout" operation, at which time
  577.    the connection is closed by the repository.
  578.  
  579.    Because DMSP can manipulate a pair of mail states (local and global)
  580.    at once, it is extremely important that all DMSP operations are
  581.    failure-atomic.  Failure of any DMSP operation must leave both states
  582.    in a consistent, known state.  For this reason, a DMSP operation is
  583.    defined to have failed unless an explicit acknowledgement is received
  584.    by the operation initiator.  This acknowledgement consists of a
  585.    response code possibly followed by information, as described above.
  586.  
  587.    Following is a general discussion of all the DMSP operations.  The
  588.    operations are broken down by type: general operations, user
  589.    operations, client operations, mailbox operations, address
  590.    operations, subscription operations, and message operations.
  591.    Detailed operation specifications appear at the end of this document.
  592.  
  593. 4.4. General operations
  594.  
  595.    The first group of DMSP operations perform general functions that
  596.    operate on no one particular class of object.  DMSP has three general
  597.    operations which provide the following services:
  598.  
  599.    In order to prevent protocol version skew between clients and the
  600.    repository, DMSP provides a "send-version" operation.  The client
  601.    supplies its DMSP version number as an argument; the operation
  602.    succeeds if the supplied version number matches the repository's DMSP
  603.    version number.  It fails if the two version numbers do not match.
  604.    The version number is a natural number like "100", "101", "200".  The
  605.    "send-version" operation should be the first that a client sends to
  606.    the repository, since no other operation may work correctly if the
  607.    client and repository are using different versions of DMSP.
  608.  
  609.    Users can send mail to other users via the "send-message" operation.
  610.    The message must have an Internet-style header as defined by NIC
  611.    RFC-822.  The repository takes the message and distributes it to the
  612.    mailboxes specified by the message header's destination fields.  If
  613.    one or more of the mailboxes exists outside the repository's user
  614.    community, the repository is responsible for handing the message to a
  615.  
  616.  
  617.  
  618. Lambert                                                        [Page 11]
  619.  
  620. RFC 1056                         PCMAIL                        June 1988
  621.  
  622.  
  623.    local SMTP server.  The message envelope is generated by the
  624.    repository from the message contents since it may be difficult for
  625.    some clients to perform envelope-generation functions such as address
  626.    verification and syntax checking.
  627.  
  628.    A success acknowledgement is sent from the repository only if (1) the
  629.    entire message was successfully transmitted from client to
  630.    repository, and (2) the message header was properly formatted.  Once
  631.    the repository has successfully received the message from the client,
  632.    any subsequent errors in queueing or delivery must be noted via
  633.    return mail to the user.
  634.  
  635.    The last general operation is the "help" operation.  The repository
  636.    responds to "help" by printing an acknowledgement followed by a list
  637.    of supported commands, terminated with a period plus CR-LF.  The
  638.    information is intended for display and can be in any format as long
  639.    as the individual lines of text returned by the repository are CR-
  640.    LF-terminated.
  641.  
  642. 4.5. User operations
  643.  
  644.    The next series of DMSP operations manipulates user objects.  The
  645.    most common of these operations are "login" and "logout".  A client
  646.    must perform a login operation before being able to access a user's
  647.    mail state.  A DMSP login operation takes five arguments: (1) the
  648.    user's name, (2) the user's password, (3) the name of the client
  649.    performing the login, (4) a flag set to 1 if the repository should
  650.    create a client object for the client if one does not exist (0 else),
  651.    and (5) a flag set to 1 if the client wishes to operate in "batch
  652.    mode" and 0 if the client wishes to operate in "interactive" mode.
  653.    The last flag value allows the repository to tune internal parameters
  654.    for either mode of operation.
  655.  
  656.    The repository can make one of three responses.  First, it can make a
  657.    success response, indicating successful authentication.  Second, it
  658.    can make one of several failure responses, indicating failed
  659.    authentication.  Finally, it can make a special response indicating
  660.    that authentication was successful, but that the client has not been
  661.    used in over a week.  This last response serves as a hint that the
  662.    client should consider erasing its local mail state and pulling over
  663.    a complete version of the repository's mail state.  This is done on
  664.    the assumption that so many mail state changes have been made in a
  665.    week that it would be inefficient to perform a normal
  666.    synchronization.
  667.  
  668.    When a client has completed a session with the repository, it
  669.    performs a logout operation.  This allows the repository to perform
  670.    any necessary cleanup before closing the network connection.
  671.  
  672.  
  673.  
  674. Lambert                                                        [Page 12]
  675.  
  676. RFC 1056                         PCMAIL                        June 1988
  677.  
  678.  
  679.    A user can change his password via the "set-password" operation.  The
  680.    operation works much the same as the UNIX change-password operation,
  681.    taking as arguments the user's current password and a desired new
  682.    password.  If the current password given matches the user's current
  683.    password, the user's current password is changed to the new password
  684.    given.  Because encryption can be difficult to perform on some
  685.    resource-poor clients, passwords are transmitted in clear text.
  686.    Clearly this is not an acceptable long-term solution, and
  687.    alternatives are welcomed.
  688.  
  689. 4.6. Client operations
  690.  
  691.    DMSP provides four operations to manipulate client objects.  The
  692.    first, "list-clients", tells the repository to send the user's client
  693.    list to the requesting client.  The list is a series of lines, one
  694.    per client, containing the client's name, followed by whitespace,
  695.    followed by a status string.  The status is either "inactive" or
  696.    "active".  As with all text responses, the list is terminated with a
  697.    period plus CR-LF.
  698.  
  699.    The "create-client" operation allows a user to add a client object to
  700.    his list of client objects.  Although the login operation duplicates
  701.    this functionality via the "create-this- client?" flag, the create-
  702.    client operation is a useful means of creating a number of new client
  703.    objects while logged into the repository via an existing client.  The
  704.    create-client operation requires as an argument the name of the
  705.    client to create.
  706.  
  707.    The "delete-client" operation removes an existing client object from
  708.    a user's client list.  The client being removed cannot be in use by
  709.    anyone at the time.  Delete-client also requires as an argument the
  710.    name of the client to delete.
  711.  
  712.    The last client operation, "reset-client", causes the repository to
  713.    place all of the messages in all mailboxes onto the named client's
  714.    update list.  When a client next synchronizes with the repository, it
  715.    will end up receiving a list of all descriptors when it requests a
  716.    list of changed message descriptors for a particular mailbox.  This
  717.    is useful for two reasons.  First, a client's local mail state could
  718.    easily become lost or damaged, especially if it is stored on a floppy
  719.    disk.  Second, if a client has been marked as inactive by the
  720.    repository, the reset-client operation provides a fast way of
  721.    resynchronizing with the repository, assuming that so many
  722.    differences exist between the local and global mail states that a
  723.    normal synchronization would take far too much time.
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Lambert                                                        [Page 13]
  731.  
  732. RFC 1056                         PCMAIL                        June 1988
  733.  
  734.  
  735. 4.7. Mailbox operations
  736.  
  737.    DMSP supports seven operations that manipulate mailbox objects.
  738.    First, "list-mailboxes" has the repository send to the requesting
  739.    client information on each mailbox.  The repository transmits one
  740.    line of information per mailbox, terminating the list with a period
  741.    plus CR-LF.  Each line contains, in order and separated by
  742.    whitespace, the mailbox name, "next available UID", total message
  743.    count, and unseen message count.  This operation is useful in
  744.    synchronizing local and global mail states, since it allows a client
  745.    to compare the user's global mailbox list with a client's local
  746.    mailbox list.  The list of mailboxes also provides a quick summary of
  747.    each mailbox's contents without having the contents present.
  748.  
  749.    The "create-mailbox" has the repository create a new mailbox and
  750.    attach it to the user's list of mailboxes.  It takes as an argument
  751.    the name of the mailbox to create.
  752.  
  753.    "Delete-mailbox" removes a mailbox from the user's list of mailboxes.
  754.    All messages within the mailbox are also deleted and permanently
  755.    removed from the system.  Any address objects binding the mailbox
  756.    name to RFC-822-style mailbox addresses are also removed from the
  757.    system.  Delete-mailbox takes as an argument the name of the mailbox
  758.    to delete.
  759.  
  760.    "Create-bboard-mailbox" allows a user to create a bboard mailbox.
  761.    The name given as an argument must be unique across the entire
  762.    repository user community.  Once the bboard mailbox has been created,
  763.    other users may subscribe to it, using subscription objects to keep
  764.    track of which messages they have read on which bboard mailboxes.
  765.  
  766.    "Delete-bboard-mailbox" allows a bboard's owner to delete a bboard
  767.    mailbox.  Subscribers who attempt to read from a bboard mailbox after
  768.    it has been deleted are told that the bboard no longer exists.
  769.    Again, the operation's argument is the name of the bboard mailbox to
  770.    delete.
  771.  
  772.    "Reset-mailbox" causes the repository to place all of the messages in
  773.    a named mailbox onto the current client's update list.  When the
  774.    client next requests a list of changed message descriptors for this
  775.    mailbox, it will receive a list of all message descriptors in the
  776.    mailbox.  This operation is merely a more specific version of the
  777.    reset-client operation (which allows the client to pull over a
  778.    complete copy of the user's global mail state).  Its primary use is
  779.    for mailboxes whose contents have accidentally been destroyed
  780.    locally.
  781.  
  782.    Finally, DMSP has an "expunge-mailbox" operation.  Any message can be
  783.  
  784.  
  785.  
  786. Lambert                                                        [Page 14]
  787.  
  788. RFC 1056                         PCMAIL                        June 1988
  789.  
  790.  
  791.    deleted and "undeleted" at will, since this simply changes the value
  792.    of a flag attached to the message.  Deletions are made permanent by
  793.    performing an expunge-mailbox operation.  The expunge operation
  794.    causes the repository to look through a named mailbox, removing from
  795.    the system any messages marked "deleted".  Expunge-mailbox takes as
  796.    an argument the name of the mailbox to expunge.
  797.  
  798. 4.8. Address operations
  799.  
  800.    DMSP provides three operations that allow users to manipulate address
  801.    objects.  First, the "list-address" operation returns a list of
  802.    address objects associated with a particular mailbox.  Each address
  803.    is transmitted on a separate line terminated by a CR-LF; the list is
  804.    terminated with a period plus CR-LF.
  805.  
  806.    The "create-address" operation adds a new address object that
  807.    associates a (user-name, mailbox-name) pair with a given RFC-822-
  808.    style mailbox address.  It takes as arguments the mailbox name and
  809.    the address name.
  810.  
  811.    Finally, the "delete-address" operation destroys the address object
  812.    binding the given RFC-822-style mail address and the given (user-
  813.    name, mailbox-name) pair.  Arguments are the address to delete and
  814.    the mailbox it belongs to.
  815.  
  816. 4.9. Subscription operations
  817.  
  818.    DMSP provides five subscription operations.  The first, "list-
  819.    subscriptions", gives the user a list of the bboards he is currently
  820.    subscribing to.  The list consists of one line of information per
  821.    subscription.  Each entry contains the following information, in
  822.    order:
  823.  
  824.       - The bulletin board's name
  825.  
  826.       - The UID of the first message the subscriber has not yet
  827.         seen
  828.  
  829.       - The number of messages the subscriber has not yet seen
  830.  
  831.       - The highest message UID in the bulletin board
  832.  
  833.    "List-available-subscriptions" gives the user a list of all bboards
  834.    he can subscribe to.  The list consists of bboard names, one per
  835.    line, terminated by a period plus CR-LF.  "Createsubscription" adds a
  836.    subscription to the user's list of subscriptions; it takes as an
  837.    argument the name of the bboard to subscribe to.  "Delete-
  838.    subscription" removes a subscription from the list, and takes as an
  839.  
  840.  
  841.  
  842. Lambert                                                        [Page 15]
  843.  
  844. RFC 1056                         PCMAIL                        June 1988
  845.  
  846.  
  847.    argument the name of the subscription to remove.  Note that this does
  848.    not delete the associated bboard mailbox (obviously only the bboard's
  849.    owner can do that).  It merely removes the user from the list of the
  850.    bboard's subscribers.  Finally DMSP allows the user to tell the
  851.    repository which messages in a bboard he has seen.  Every
  852.    subscription object contains the UID of the first message the user
  853.    has not yet seen; the "reset-subscription" operation updates that
  854.    number, insuring that the user sees a given bboard message only once.
  855.    Reset-subscription takes as arguments the name of the subscription
  856.    and the new UID value.
  857.  
  858. 4.10. Message operations
  859.  
  860.    The most commonly-manipulated Pcmail objects are messages; DMSP
  861.    therefore provides special message operations to allow efficient
  862.    synchronization, as well as a set of operations to perform standard
  863.    message-manipulation functions.
  864.  
  865.    A user may request a series of descriptors with the "fetch-
  866.    descriptors" operation.  The series is identified by a pair of
  867.    message UIDs, representing the lower and upper bounds of the list.
  868.    Since UIDs are defined to be monotonically increasing numbers, a pair
  869.    of UIDs is sufficient to completely identify the series of
  870.    descriptors.  If the lower bound UID does not exist, the repository
  871.    starts the series with the first message with UID greater than the
  872.    lower bound.  Similarly, if the upper bound does not exist, the
  873.    repository ends the series with the last message with UID less than
  874.    the upper bound.  If certain UIDs within the series no longer exist,
  875.    the repository obviously does not send them.  The repository returns
  876.    the descriptors in a list with the following format:
  877.  
  878.    If a descriptor has been expunged, the repository transmits two
  879.    consecutive lines of information: the word "expunged" on one line,
  880.    followed by the message UID on the next line.  "Expunged"
  881.    notifications are only transmitted in response to a "fetch-changed-
  882.    descriptors" command; they are an indication to the client that
  883.    someone else has expunged the mailbox and that the client should
  884.    remove the local copy of the expunged message.
  885.  
  886.    If a descriptor has not been expunged, it is presented as six
  887.    consecutive lines of information: the word "descriptor" on the first
  888.    line, followed by a second line containing the message UID, flag
  889.    states (see examples following), message length in bytes, and message
  890.    length in lines, followed by four lines containing in order the
  891.    message "from:" field, "to:" field, "date:" field, and "subject:"
  892.    field.  The entire list of descriptors is terminated by a period plus
  893.    CR-LF; individual descriptors are not specially terminated since the
  894.    first line ("expunged" or "descriptor") of a list entry determines
  895.  
  896.  
  897.  
  898. Lambert                                                        [Page 16]
  899.  
  900. RFC 1056                         PCMAIL                        June 1988
  901.  
  902.  
  903.    the exact length of the entry (two lines or six lines).
  904.  
  905.    The "fetch-changed-descriptors" operation is intended for use during
  906.    state synchronization.  Whenever a descriptor changes state (one of
  907.    its flags is cleared, for example), the repository notes those
  908.    clients which have not yet recorded the change locally.  Fetch-
  909.    changed-descriptors has the repository send to the client a maximum
  910.    of the first N descriptors which have changed since the client's last
  911.    synchronization, where N is a number sent by the client.  The list
  912.    sent begins with the descriptor with lowest UID.  Note that the list
  913.    of descriptors is only guaranteed to be monotonically increasing for
  914.    a given call to "fetch-changed-descriptors"; messages with lower UIDs
  915.    may be changed by other clients in between calls to "fetch-
  916.    changeddescriptors".  "Fetch-changed-descriptors" takes two
  917.    arguments:  the name of the mailbox to search, and the maximum number
  918.    of descriptors for the repository to return.
  919.  
  920.    Once the changed descriptors have been looked at, a user will want to
  921.    inform the repository that the current client has recorded the change
  922.    locally.  The "reset-descriptors" command causes the repository to
  923.    mark as "recorded by current client" a given series of descriptors.
  924.    The series is identified by a low UID and a high UID.  UIDs within
  925.    the series that no longer exist are ignored.  Arguments are: mailbox
  926.    name, low UID in range, and high UID in range.
  927.  
  928.    Whole messages are transmitted from repository to user with the
  929.    "fetch-message" operation.  The separation of "fetchdescriptors" and
  930.    "fetch-message" operations allows clients with small amounts of disk
  931.    storage to obtain a small message summary (via "fetch-descriptors" or
  932.    "fetch-changed-descriptors") without having to pull over the entire
  933.    message.  Arguments are mailbox name, followed by message UID.
  934.  
  935.    Frequently, a message may be too large for some clients to store
  936.    locally.  Users can still look at the message contents via the
  937.    "print-message" operation.  This operation has the repository send a
  938.    copy of the message to a named printer.  The printer name need only
  939.    have meaning to the particular repository implementation; DMSP
  940.    transmits the name only as a means of identification.  Arguments are:
  941.    mailbox name, followed by message UID, followed by printer
  942.    identification.
  943.  
  944.    Copying of one message into another mailbox is accomplished via the
  945.    "copy-message" operation.  A descriptor list of length one,
  946.    containing a descriptor for the copied message, is returned if the
  947.    copy operation is successful.  This descriptor is required because
  948.    the copied message acquires a UID different from the original
  949.    message.  The client cannot be expected to know which UID has been
  950.    assigned the copy, hence the repository's sending a descriptor
  951.  
  952.  
  953.  
  954. Lambert                                                        [Page 17]
  955.  
  956. RFC 1056                         PCMAIL                        June 1988
  957.  
  958.  
  959.    containing the UID.  Arguments to copy-message are:  source mailbox
  960.    name, target mailbox name, and source message UID.
  961.  
  962.    Each message has associated with it sixteen flags, as described
  963.    earlier.  These flags can be set and cleared using the "set-message-
  964.    flag" operation.  The first eight flags have special meaning to the
  965.    repository as described above; the remaining eight are for user use.
  966.    Set-message-flag takes four arguments: mailbox name, message UID,
  967.    flag number (0 through 15), and desired flag state (0 or 1).
  968.  
  969. 5. Client Architecture
  970.  
  971.    Clients can be any of a number of different workstations; Pcmail's
  972.    architecture must therefore take into account the range of
  973.    characteristics of these workstations.  First, most workstations are
  974.    much more affordable than the large computers currently used for mail
  975.    service.  It is therefore possible that a user may well have more
  976.    than one.  Second, some workstations are portable and they are not
  977.    expected to be constantly tied into a network.  Finally, many of the
  978.    smaller workstations resource-poor, so they are not expected to be
  979.    able to store a significant amount of state information locally.  The
  980.    following subsections describe the particular parts of Pcmail's
  981.    client architecture that address these different characteristics.
  982.  
  983. 5.1. Multiple clients
  984.  
  985.    The fact that Pcmail users may own more than one workstation forms
  986.    the rationale for the multiple client model that Pcmail uses.  A
  987.    Pcmail user may have one client at home, another at an office, and
  988.    maybe even a third portable client.  Each client maintains a separate
  989.    copy of the user's mail state, hence Pcmail's distributed nature.
  990.    The notion of separate clients allows Pcmail users to access mail
  991.    state from several different locations.  Pcmail places no
  992.    restrictions on a user's ability to communicate with the repository
  993.    from several clients at the same time.  Instead, the decision to
  994.    allow several clients concurrent access to a user's mail state is
  995.    made by the repository implementation.
  996.  
  997. 5.2. Synchronization
  998.  
  999.    Some workstations tend to be small and fairly portable; the
  1000.    likelihood of their always being connected to a network is relatively
  1001.    small.  This is another reason for each client's maintaining a local
  1002.    copy of a user's mail state.  The user can then manipulate the local
  1003.    mail state while not connected to the network (and the repository).
  1004.    This immediately brings up the problem of synchronization between
  1005.    local and global mail states.  The repository is continually in a
  1006.    position to receive global mail state updates, either in the form of
  1007.  
  1008.  
  1009.  
  1010. Lambert                                                        [Page 18]
  1011.  
  1012. RFC 1056                         PCMAIL                        June 1988
  1013.  
  1014.  
  1015.    incoming mail, or in the form of changes from other clients.  A
  1016.    client that is not always connected to the net cannot immediately
  1017.    receive the global changes.  In addition, the client's user can make
  1018.    his own changes on the local mail state.
  1019.  
  1020.    Pcmail's architecture allows fast synchronization between client
  1021.    local mail states and the repository's global mail state.  Each
  1022.    client is identified in the repository by a client object attached to
  1023.    the user.  This object forms the basis for synchronization between
  1024.    local and global mail states.  Some of the less common state changes
  1025.    include the adding and deleting of user mailboxes and the adding and
  1026.    deleting of address objects.  Synchronization of these changes is
  1027.    performed via DMSP list operations, which allow clients to compare
  1028.    their local versions of mailbox and address object lists with the
  1029.    repository's global version and make any appropriate changes.  The
  1030.    majority of possible changes to a user's mail state are in the form
  1031.    of changed descriptors.  Since most users will have a large number of
  1032.    messages, and message states will change relatively often, special
  1033.    attention needs to be paid to message synchronization.
  1034.  
  1035.    An existing descriptor can be changed in one of three ways:  first,
  1036.    one of its sixteen flag values can be changed (this encompasses the
  1037.    user's reading an unseen message, deleting a message, printing a
  1038.    message, etc).  Second, a descriptor can be created, either by the
  1039.    delivery of a new message or by the copying of a message from one
  1040.    mailbox to another.  Finally, a descriptor can be destroyed, via an
  1041.    "expunge-mailbox" operation.
  1042.  
  1043.    In the above cases, synchronization is required between the
  1044.    repository and every client that has not previously noted the change.
  1045.    To keep track of which clients have noticed a global mail state
  1046.    change and changed their local states accordingly, each mailbox has
  1047.    associated with it a list of active clients.  Each client has a
  1048.    (potentially empty) "update list" of messages which have changed
  1049.    since that client last synchronized.
  1050.  
  1051.    When a client connects to the repository, it executes a DMSP "fetch-
  1052.    changed-descriptors" operation.  This causes the repository to return
  1053.    a list of all descriptors on that client's update list.  When the
  1054.    client receives the changed descriptors, it may do one of two things:
  1055.    if the descriptor is marked "expunged", it can remove the
  1056.    corresponding message from the local mailbox.  If the descriptor is
  1057.    not expunged, the client can store the descriptor, thus updating the
  1058.    local mail state.  After a changed descriptor has been recorded, the
  1059.    client uses the DMSP "reset-descriptors" operation to remove
  1060.    descriptors from its update list.  Those descriptors will now not be
  1061.    sent to the client unless (1) it is explicitly requested via a
  1062.    "fetch-descriptors" operation, or (2) it changes again.
  1063.  
  1064.  
  1065.  
  1066. Lambert                                                        [Page 19]
  1067.  
  1068. RFC 1056                         PCMAIL                        June 1988
  1069.  
  1070.  
  1071.    In this manner, a client can run through its user's mailboxes,
  1072.    getting all changes, incorporating them into the local mail state,
  1073.    and marking the changes as recorded.
  1074.  
  1075. 5.3. Batch operation versus interactive operation
  1076.  
  1077.    Because of the portable nature of some workstations, they may not
  1078.    always be connected to a network (and able to communicate with the
  1079.    repository).  Since each client maintains a local mail state, Pcmail
  1080.    users can manipulate the local state while not connected to the
  1081.    repository.  This is known as "batch" operation, since all changes
  1082.    are recorded by the client and made to the repository's global state
  1083.    in a batch, when the client next connects to the repository.
  1084.    Interactive operation occurs when a client is always connected to the
  1085.    repository.  In interactive mode, changes made to the local mail
  1086.    state are also immediately made to the global state via DMSP
  1087.    operations.
  1088.  
  1089.    In batch mode, interaction between client and repository takes the
  1090.    following form: the client connects to the repository and sends over
  1091.    all the changes made by the user to the local mail state.  The
  1092.    repository changes its global mail state accordingly.  When all
  1093.    changes have been processed, the client begins synchronization; this
  1094.    incorporates newly-arrived mail, as well as mail state changes by
  1095.    other clients, into the local state.
  1096.  
  1097.    In interactive mode, since local changes are immediately propagated
  1098.    to the repository, the first part of batch-type operation is
  1099.    eliminated.  The synchronization process also changes; although one
  1100.    synchronization is required when the client first opens a connection
  1101.    to the repository, subsequent synchronizations can be performed
  1102.    either at the user's request or automatically every so often by the
  1103.    client.
  1104.  
  1105. 5.4. Message summaries
  1106.  
  1107.    Smaller workstations may have little in the way of disk storage.
  1108.    Clients running on these workstations may never have enough room for
  1109.    a complete local copy of a user's global mail state.  This means that
  1110.    Pcmail's client architecture must allow user's to obtain a clear
  1111.    picture of their mail state without having all their messages
  1112.    present.
  1113.  
  1114.    Descriptors provide message information without taking up large
  1115.    amounts of storage.  Each descriptor contains a summary of
  1116.    information on a message.  This information includes the message UID,
  1117.    its length in bytes and lines, its status (contained in the eight
  1118.    system-defined and eight user-defined flags), and portions of its
  1119.  
  1120.  
  1121.  
  1122. Lambert                                                        [Page 20]
  1123.  
  1124. RFC 1056                         PCMAIL                        June 1988
  1125.  
  1126.  
  1127.    RFC-822 header (the "from:", "to:", "date:" and "subject:"  fields).
  1128.    All of this information can be encoded in a small (around 100 bytes)
  1129.    data structure whose length is independent of the size of the message
  1130.    it describes.
  1131.  
  1132.    Most clients should be able to store a complete list of message
  1133.    descriptors with little problem.  This allows a user to get a
  1134.    complete picture of his mail state without having all his messages
  1135.    present locally.  If a client has extremely limited amounts of disk
  1136.    storage, it is also possible to get a subset of the descriptors from
  1137.    the repository.  Short messages can reside on the client, along with
  1138.    the descriptors, and long messages can either be printed via the DMSP
  1139.    print-message operation, or specially pulled over via the fetch-
  1140.    message operation.
  1141.  
  1142. 6. Typical interactive-style client-repository interaction
  1143.  
  1144.    The following example describes a typical communication session
  1145.    between the repository and a client mail reader.  The client is one
  1146.    of three belonging to user "Fred".  Its name is "office-client", and
  1147.    since Fred has used the client within the last week, it is marked as
  1148.    "active".  Fred has two mailboxes:  "fred" is where all of his
  1149.    current mail is stored; "archive" is where messages of lasting
  1150.    importance are kept.  The example will run through a simple
  1151.    synchronization operation.  Typically, the synchronization will be
  1152.    performed by a mail reader as part of a "get new mail" operation.
  1153.  
  1154.    First Fred's mail reader connects to the repository and receives the
  1155.    following banner:
  1156.  
  1157.        200 Pcmail repository version 3.0.0 ready
  1158.  
  1159.    In order to access his global mail state, the mail reader must
  1160.    authenticate Fred to the repository; this is done via the DMSP login
  1161.    operation:
  1162.  
  1163.        login fred fred-password office-client 0 0
  1164.  
  1165.    This tells the repository that Fred is logging in via "office-
  1166.    client", and that "office-client" is identified by an existing client
  1167.    object in Fred's mail state.  The first argument to the login
  1168.    operation is Fred's repository user name.  The second argument is
  1169.    Fred's password.  The third argument is the name of the client
  1170.    communicating with the repository.  The fourth argument tells the
  1171.    repository not to create "office-client" even if it cannot find its
  1172.    client object.  The final argument tells the repository that Fred's
  1173.    client is not operating in batch mode but rather in interactive mode.
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Lambert                                                        [Page 21]
  1179.  
  1180. RFC 1056                         PCMAIL                        June 1988
  1181.  
  1182.  
  1183.    Fred's authentication checks out, so the repository logs him in.
  1184.  
  1185.        200 command OK
  1186.  
  1187.    Now that Fred is logged in, the mail reader performs an initial
  1188.    synchronization.  This process starts with the mail reader's asking
  1189.    for an up-to-date list of mailboxes:
  1190.  
  1191.        list-mailboxes
  1192.  
  1193.  
  1194.    The repository replies with:
  1195.  
  1196.  
  1197.        230 mailbox list follows:
  1198.        fred 2313 10 1
  1199.        archive 101 100 0
  1200.        .
  1201.  
  1202.  
  1203.    This tells the mail reader that there are two mailboxes, "fred" and
  1204.    "archive".  "Fred" has 10 messages, one of which is unseen.  The next
  1205.    incoming message will be assigned a UID of 2313.  "Archive", on the
  1206.    other hand, has 100 messages, none of which are unseen.  The next
  1207.    message sent to "archive" will be assigned the UID 101.  There are no
  1208.    new mailboxes in the list (if there were, the mail reader would
  1209.    create them.  On the other hand, if some mailboxes in the mail
  1210.    reader's local list were not in the repository's list, the program
  1211.    would assume them deleted by another client and delete them locally
  1212.    as well).
  1213.  
  1214.    To synchronize, the mail reader need only look at each mailbox's
  1215.    contents to see if (1) any new mail has arrived, or (2) if Fred
  1216.    changed any messages on one of his other two clients subsequent to
  1217.    "office-client"'s last connection to the repository.
  1218.  
  1219.    The mail reader asks for any changed descriptors via the "fetch-
  1220.    changed-descriptors" operation.  It requests at most ten changed
  1221.    descriptors since storage is very limited on Fred's workstation.
  1222.  
  1223.        fetch-changed-descriptors fred 10
  1224.  
  1225.  
  1226.    The repository responds with:
  1227.  
  1228.  
  1229.        250 descriptor list follows:
  1230.        expunged
  1231.  
  1232.  
  1233.  
  1234. Lambert                                                        [Page 22]
  1235.  
  1236. RFC 1056                         PCMAIL                        June 1988
  1237.  
  1238.  
  1239.        2101
  1240.        expunged
  1241.        2104
  1242.        descriptor
  1243.        2107 1100011100000010 1400 30
  1244.        foo@bar.edu (Foo Jones)
  1245.        fred@PTT.LCS.MIT.EDU
  1246.        Wed, 9 Dec 87 10:43:52 EST
  1247.        A typical subject line
  1248.        descriptor
  1249.        2312 0000000000000000 12232 320
  1250.        joe@athena.mit.edu
  1251.        fred@PTT.LCS.MIT.EDU
  1252.        Thu, 17 Dec 87 18:24:09 PST
  1253.        Another typical subject line
  1254.        .
  1255.  
  1256.    If a descriptor changed because it was expunged, it is transmitted as
  1257.    two lines: the word "expunged" on one line, followed by the message
  1258.    UID on the next line.  If one of its flags changed state, or it is a
  1259.    new message, it is transmitted as six lines: the word "descriptor" on
  1260.    one line, followed by a line containing the message UID, flags, and
  1261.    length in bytes and lines, followed by the to, from, date, and
  1262.    subject fields, each on one line.  The flags are transmitted as a
  1263.    single string of ones and zeroes, a one if the flag is on and a zero
  1264.    if the flag is off.  All 16 flags are always transmitted.  Flag
  1265.    zero's state is the first character in the flag string; flag
  1266.    fifteen's is the last character in the flag string.
  1267.  
  1268.    The first two descriptors in the list have been expunged, presumably
  1269.    by Fred's expunging his mailbox on another client.  The mail reader
  1270.    removes messages 2101 and 2104 from its local copy of mailbox "fred".
  1271.    The next descriptor in the list is one which Fred marked for deletion
  1272.    on another client yesterday.  The mail reader marks the local version
  1273.    of the message as deleted.  The last descriptor in the list is a new
  1274.    one.  The mail reader adds the descriptor to its local list.  Since
  1275.    all changes to mailbox "fred" have now been recorded locally, the
  1276.    update list can be reset:
  1277.  
  1278.        reset-descriptors fred 1 2312
  1279.  
  1280.  
  1281.    The repository responds with:
  1282.  
  1283.  
  1284.        200 command OK
  1285.  
  1286.    indicating that it has removed from "office-client"'s update list all
  1287.  
  1288.  
  1289.  
  1290. Lambert                                                        [Page 23]
  1291.  
  1292. RFC 1056                         PCMAIL                        June 1988
  1293.  
  1294.  
  1295.    messages in mailbox "fred" with UIDs between 1 and 2312 inclusive (in
  1296.    this case just two messages).  "Fred" has now been synchronized.  The
  1297.    mail reader now turns to Fred's "archive" mailbox and asks for the
  1298.    first ten changed descriptors.
  1299.  
  1300.        fetch-changed-descriptors archive 10
  1301.  
  1302.  
  1303.    The repository responds with:
  1304.  
  1305.  
  1306.        250 descriptor list follows:
  1307.        .
  1308.  
  1309.    The zero-length list tells the mail reader that no descriptors have
  1310.    been changed in "archive" since its last synchronization.  No new
  1311.    synchronization needs to be performed.
  1312.  
  1313.    Fred's mail reader is now ready to pull over the new message.  The
  1314.    message is 320 lines long; there might not be sufficient storage on
  1315.    "office-client" to hold the new message.  The mail reader tries
  1316.    anyway:
  1317.  
  1318.        fetch-message fred 2312
  1319.  
  1320.  
  1321.    The repository begins transmitting the message:
  1322.  
  1323.  
  1324.        251 message follows:
  1325.        UID: 2312
  1326.        From: joe@bar.mit.edu
  1327.        To: fred@PTT.LCS.MIT.EDU
  1328.        Date: Thu, 17 Dec 87 18:24:09 PST
  1329.        Subject: Another typical subject line
  1330.  
  1331.        Fred,
  1332.  
  1333.        ...
  1334.  
  1335.    Halfway through the message transmission, Fred's workstation runs out
  1336.    of disk space.  Because all DMSP operations are defined to be
  1337.    failure-atomic, the portion of the message already transmitted is
  1338.    destroyed locally and the operation fails.  The mail reader informs
  1339.    Fred that the message cannot be pulled over because of a lack of disk
  1340.    space.  The synchronization process is now finished and Fred can
  1341.    start reading his mail.  The new message that was too big to fit on
  1342.    "office-client" will be marked "off line"; Fred can use the mail
  1343.  
  1344.  
  1345.  
  1346. Lambert                                                        [Page 24]
  1347.  
  1348. RFC 1056                         PCMAIL                        June 1988
  1349.  
  1350.  
  1351.    reader to either remote-print it or delete and expunge other messages
  1352.    until he has enough space to store the new message.
  1353.  
  1354.    Since Fred is running in interactive mode, changes he makes to any
  1355.    messages will immediately be transmitted into DMSP operations and
  1356.    sent to the repository.  Depending on the mail reader implementation,
  1357.    Fred will either have to execute a "synchronize" command periodically
  1358.    or the client will synchronize for him automatically every so often.
  1359.  
  1360. 7. A current Pcmail implementation
  1361.  
  1362.    The following section briefly describes a current Pcmail system that
  1363.    services a small community of users.  The Pcmail repository runs
  1364.    under UNIX on a DEC Microvax-II connected to the Internet.  The
  1365.    clients run on IBM PCs, XTs, and ATs, as well as Sun workstations,
  1366.    Microvaxes, and VAX-750s.
  1367.  
  1368. 7.1. IBM PC client code
  1369.  
  1370.    Client code for the IBM machines operates only in batch mode.  Users
  1371.    make local state changes in a mail reader; the changes are queued
  1372.    until the user runs a network client program.  The program connects
  1373.    to the repository, performs the queued changes, and synchronizes
  1374.    local and global mail states.  The network client program then
  1375.    disconnects from the repository.
  1376.  
  1377.    The IBM PC client code has gone through several revisions since the
  1378.    first Pcmail RFC was published.  What was once a fairly primitive and
  1379.    cumbersome system has evolved into a system that makes excellent use
  1380.    of the PC's limited resources and provides a fairly powerful, easy-
  1381.    to-use mail reader.
  1382.  
  1383.    Users access and modify their local mail state via a mail reader
  1384.    written in the Epsilon text editor's EEL extension language.  Users
  1385.    are given a variety of commands to operate on individual messages and
  1386.    mailboxes, as well as to compose outgoing mail.
  1387.  
  1388.    Synchronization and the processing of queued changes is performed by
  1389.    a separate program, which the user runs as desired.  The program
  1390.    takes any actions queued while operating the mail reader, and
  1391.    converts them into DMSP operations.  All queued changes are made
  1392.    before any synchronization is performed.  The program can be invoked
  1393.    directly from the mail reader, without having to exit and restart.
  1394.  
  1395.    The limitation of IBM PC client operation to batch mode was made
  1396.    because of development environment limitations.  The mail reader
  1397.    cannot work with the network code inside it because of the network
  1398.    program architecture.  The only solution was to provide a two-part
  1399.  
  1400.  
  1401.  
  1402. Lambert                                                        [Page 25]
  1403.  
  1404. RFC 1056                         PCMAIL                        June 1988
  1405.  
  1406.  
  1407.    client, one part of which read the mail and one part of which
  1408.    interacted with the repository.  Although slightly cumbersome, the
  1409.    two-program setup works quite well.
  1410.  
  1411. 7.2. UNIX client code
  1412.  
  1413.    Client code for the Suns, Microvaxes, and VAX-750s runs on 4.2/4.3BSD
  1414.    UNIX.  It is fully interactive, with a powerful mail reader inside
  1415.    Richard Stallman's GNU-EMACS editor.  Since UNIX-based workstations
  1416.    have a good deal of main memory and disk storage, no effort was made
  1417.    to lower local mail state size by keeping message descriptors rather
  1418.    than message text.
  1419.  
  1420.    The local mail state consists of a number of BABYL-format mailboxes.
  1421.    The interface is very similar to the RMAIL mail reader already
  1422.    present in GNU-EMACS.
  1423.  
  1424.    The mail reader communicates with the repository through network code
  1425.    implemented in EMACS-LISP.  Changes to the local mail state are
  1426.    immediately made on the repository; although the repository is fast,
  1427.    there is a small noticeable delay in performing operations over the
  1428.    network.
  1429.  
  1430.    There is no provision for automatic synchronization whenever new mail
  1431.    arrives or old mail is changed by another client.  Instead, users
  1432.    must get any new mail explicitly.  A simple "notification" program
  1433.    runs in the background and wakes up every minute to check for new
  1434.    mail; when mail arrives, the user executes a command to get the new
  1435.    mail, synchronizing the mailbox at the same time.
  1436.  
  1437. 7.3. Repository code
  1438.  
  1439.    The repository is implemented in C on 4.2/4.3BSD UNIX.  Currently it
  1440.    runs on DEC VAX-750s and Microvaxes, although other repositories will
  1441.    soon be running on IBM RT machines and Sun workstations.  The
  1442.    repository code is designed to allow several clients belonging to a
  1443.    particular user to "concurrently" modify the user's state.  A locking
  1444.    scheme prevents one client from modifying mail state while another
  1445.    client is modifying the same state.
  1446.  
  1447. 8. Conclusions
  1448.  
  1449.    Pcmail is now used by a small community of people at the MIT
  1450.    Laboratory for Computer Science.  The repository design works well,
  1451.    providing an efficient means of storing and maintaining mail state
  1452.    for several users.  Its performance is quite good when up to ten
  1453.    users are connected; it remains to be seen whether or not the
  1454.    repository will be efficient at managing the state of ten or a
  1455.  
  1456.  
  1457.  
  1458. Lambert                                                        [Page 26]
  1459.  
  1460. RFC 1056                         PCMAIL                        June 1988
  1461.  
  1462.  
  1463.    hundred times that many users.  Given sufficient disk storage, it
  1464.    should be able to, since communication between different users'
  1465.    clients and the repository is likely to be very asynchronous and
  1466.    likely to occur in short bursts with long "quiet intervals" in
  1467.    between as users are busy doing other things.
  1468.  
  1469.    Members of another research group at LCS are currently working on a
  1470.    replicated, scalable version of the repository designed to support a
  1471.    very large community of users with high availability.  This
  1472.    repository also uses DMSP and has successfully communicated with
  1473.    clients that use the current repository implementation.  DMSP
  1474.    therefore seems to be usable over several flavors of repository
  1475.    design.
  1476.  
  1477.    The IBM PC clients are very limited in the way of resources.  The
  1478.    mail reader/editor combination is quite powerful, making local mail
  1479.    state manipulation fairly easy.  Obviously a big performance
  1480.    enhancement would be to provide a fully interactive client.  As it
  1481.    is, batch-style synchronization is relatively time consuming due to
  1482.    the low performance of the PCs.  The "batch-mode" that the PCs use
  1483.    tends to be good for those PCs that spend a large percentage of their
  1484.    time unplugged and away from a network.  It is somewhat inconvenient
  1485.    for those PCs that are always connected to a network and could make
  1486.    good use of an "interactive-mode" state manipulation.
  1487.  
  1488.    The UNIX-based clients are more powerful and easier to use than their
  1489.    PC counterparts.  Synchronization is much faster, and there is far
  1490.    more functionality in the mail reader (having an interface that runs
  1491.    within GNU-EMACS helps a lot in this respect).  Most of those people
  1492.    using the Pcmail system use the UNIX-based client code.
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514. Lambert                                                        [Page 27]
  1515.  
  1516. RFC 1056                         PCMAIL                        June 1988
  1517.  
  1518.  
  1519. I. DMSP Protocol Specification
  1520.  
  1521.    Following are a list of DMSP operations by object type, together with
  1522.    syntax, and possible responses.  Some responses may be followed by
  1523.    zero or more lines of text, terminated by a single period plus CR-LF
  1524.    pair.  Only success responses and common error responses are listed;
  1525.    a complete list of possible responses follows this appendix.
  1526.    Expressions in angle brackets (i.e.  <mailbox-name>) are
  1527.    metalinguistic variables indicating a general request or response
  1528.    form.  Operations with arguments have a sample invocation following
  1529.    the operation syntax and response.
  1530.  
  1531.    General operations:
  1532.  
  1533.  
  1534.        HELP
  1535.        100 Repository version xxx.  Following are supported:
  1536.        HELP
  1537.        SEND-VERSION
  1538.        SEND-MESSAGE
  1539.        LOGIN
  1540.        LOGOUT
  1541.        ...
  1542.        FETCH-MESSAGE
  1543.        COPY-MESSAGE
  1544.        .
  1545.  
  1546.  
  1547.        SEND-VERSION <version-number>
  1548.        200 Command OK
  1549.        500 version skew!
  1550.  
  1551.        i.e. SEND-VERSION 230
  1552.  
  1553.  
  1554.        SEND-MESSAGE
  1555.        350 enter message; end with "."
  1556.        To: markl
  1557.        From: markl
  1558.        Subject: a test message
  1559.  
  1560.        this is a test message
  1561.        .
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Lambert                                                        [Page 28]
  1571.  
  1572. RFC 1056                         PCMAIL                        June 1988
  1573.  
  1574.  
  1575.    Repository responds:
  1576.  
  1577.        200 Command OK
  1578.        403 message syntax error
  1579.  
  1580.  
  1581.    User operations:
  1582.  
  1583.  
  1584.        LOGIN <user> <password> <client> <create-p> <batch-p>
  1585.        200 Command OK
  1586.        221 Client out of date by > 1 week
  1587.        404 Bad password
  1588.        405 Client <client-name> is locked
  1589.        411 No user named <user-name>
  1590.        421 Client <client-name> not found
  1591.  
  1592.        i.e. LOGIN markl foo random-client-name 1 0
  1593.  
  1594.  
  1595.        LOGOUT
  1596.        200 Command OK
  1597.  
  1598.  
  1599.        SET-PASSWORD <old-password> <new-password>
  1600.        200 Command OK
  1601.        404 Incorrect old password
  1602.  
  1603.        i.e. SET-PASSWORD foo bar
  1604.  
  1605.  
  1606.    Client operations:
  1607.  
  1608.  
  1609.        LIST-CLIENTS
  1610.        220 Client list <name> <status> follows:
  1611.        client-1 active
  1612.        client-2 inactive
  1613.        client-3 active
  1614.        ...
  1615.        client-foobar active
  1616.        .
  1617.  
  1618.     Each line of the list contains a client name, followed by
  1619.    whitespace, followed by the word "active" or the word "inactive",
  1620.    indicating whether or not the client has connected to the repository
  1621.    within the last week.
  1622.  
  1623.  
  1624.  
  1625.  
  1626. Lambert                                                        [Page 29]
  1627.  
  1628. RFC 1056                         PCMAIL                        June 1988
  1629.  
  1630.  
  1631.        CREATE-CLIENT <client-name>
  1632.        200 Command OK
  1633.        403 <client-name> is an illegal name
  1634.        420 Client <client-name> exists
  1635.  
  1636.        i.e. CREATE-CLIENT new-client
  1637.  
  1638.  
  1639.        DELETE-CLIENT <client-name>
  1640.        200 Command OK
  1641.        421 Client <client-name> not found
  1642.        405 Client <client-name> is locked
  1643.  
  1644.        i.e. DELETE-CLIENT old-client
  1645.  
  1646.  
  1647.        RESET-CLIENT <client-name>
  1648.        200 Command OK
  1649.        421 Client <client-name> not found
  1650.        405 Client <client-name> is locked
  1651.  
  1652.        i.e. RESET-CLIENT any-old-client
  1653.  
  1654.  
  1655.    Mailbox operations:
  1656.  
  1657.  
  1658.        LIST-MAILBOXES
  1659.        230 Mbox list <name> <high-UID> <#msgs> <#new> follows:
  1660.        mailbox-1 2338 8 1
  1661.        mailbox-2 59 44 0
  1662.        ...
  1663.        mailbox-foobar 19 9 0
  1664.        .
  1665.  
  1666.    Each line of the list contains a mailbox name, followed by the
  1667.    mailbox's next available unique identifier, followed by the number of
  1668.    messages in the mailbox, followed finally by the number of unseen
  1669.    messages in the mailbox.  Unseen messages are those whose descriptors
  1670.    have flag #1 ("message has been seen") set to zero.
  1671.  
  1672.  
  1673.        CREATE-MAILBOX <mailbox-name>
  1674.        200 Command OK
  1675.        403 <mailbox-name> is an illegal name
  1676.        430 <mailbox-name> already exists
  1677.        440 <mailbox-name> exists as a bboard subscription
  1678.  
  1679.  
  1680.  
  1681.  
  1682. Lambert                                                        [Page 30]
  1683.  
  1684. RFC 1056                         PCMAIL                        June 1988
  1685.  
  1686.  
  1687.        i.e. CREATE-MAILBOX current-events
  1688.  
  1689.  
  1690.        DELETE-MAILBOX <mailbox-name>
  1691.        200 Command OK
  1692.        431 mailbox <mailbox-name> not found
  1693.        440 <mailbox-name> is a bboard; use delete-bboard-mailbox
  1694.  
  1695.        i.e. DELETE-MAILBOX income-tax-information
  1696.  
  1697.  
  1698.        CREATE-BBOARD-MAILBOX <mailbox-name>
  1699.        200 Command OK
  1700.        430 a mailbox named <mailbox-name> already exists.
  1701.        430 a bboard mailbox named <mailbox-name> already exists.
  1702.        403 <mailbox-name> is an illegal name
  1703.  
  1704.        i.e. CREATE-BBOARD-MAILBOX sf-lovers
  1705.  
  1706.  
  1707.        DELETE-BBOARD-MAILBOX <mailbox-name>
  1708.        200 Command OK
  1709.        404 not owner of <mailbox-name>
  1710.        431 no bboard mailbox named <mailbox-name>
  1711.  
  1712.        i.e. DELETE-BBOARD-MAILBOX rec.autos
  1713.  
  1714.  
  1715.        RESET-MAILBOX <mailbox-name>
  1716.        200 Command OK
  1717.        431 mailbox <mailbox-name> not found
  1718.  
  1719.        i.e. RESET-MAILBOX british-cars
  1720.  
  1721.  
  1722.        EXPUNGE-MAILBOX <mailbox-name>
  1723.        200 Command OK
  1724.        431 mailbox <mailbox-name> not found
  1725.  
  1726.        EXPUNGE-MAILBOX british-cars
  1727.  
  1728.  
  1729.    Address operations:
  1730.  
  1731.  
  1732.        LIST-ADDRESSES <mailbox-name>
  1733.        260 Address list for <mailbox-name> follows:
  1734.        address-1
  1735.  
  1736.  
  1737.  
  1738. Lambert                                                        [Page 31]
  1739.  
  1740. RFC 1056                         PCMAIL                        June 1988
  1741.  
  1742.  
  1743.        address-2
  1744.        ...
  1745.        address-6
  1746.        .
  1747.  
  1748.        or
  1749.  
  1750.        431 mailbox <mailbox-name> not found
  1751.  
  1752.        i.e. LIST-ADDRESSES archive
  1753.  
  1754.  
  1755.        Each line of the list consists solely of one address.
  1756.  
  1757.  
  1758.        CREATE-ADDRESS <mailbox-name> <address-name>
  1759.        200 Command OK
  1760.        403 <mailbox-name> is an illegal name
  1761.        431 mailbox <mailbox-name> not found
  1762.        460 <address-name> already exists
  1763.  
  1764.        i.e. CREATE-ADDRESS markl markl-bug-pcmail
  1765.  
  1766.  
  1767.        DELETE-ADDRESS <mailbox-name> <address-name>
  1768.        200 Command OK
  1769.        431 mailbox <mailbox-name> not found
  1770.        461 address <address-name> not found
  1771.  
  1772.        i.e. DELETE-ADDRESS markl markl-info-cobol
  1773.  
  1774.  
  1775.    Subscription operations:
  1776.  
  1777.  
  1778.        LIST-SUBSCRIPTIONS
  1779.        240 subscription list follows:
  1780.        bboard-1 2573 33 2606
  1781.        bboard-2 541 4 545
  1782.        ...
  1783.        bboard-6 1530 43 1573
  1784.        .
  1785.  
  1786.    Each line of the list consists of a bulletin-board name, followed by
  1787.    the UID of the first message which the user has not yet looked at,
  1788.    followed by the number of messages in the bulletin-board that the
  1789.    user has not yet looked at, followed by the bulletin-board's next
  1790.    available unique message identifier.
  1791.  
  1792.  
  1793.  
  1794. Lambert                                                        [Page 32]
  1795.  
  1796. RFC 1056                         PCMAIL                        June 1988
  1797.  
  1798.  
  1799.        CREATE-SUBSCRIPTION <bboard-name>
  1800.        200 Command OK
  1801.        403 <bboard-name> is an illegal name
  1802.        430 A mailbox named <bboard-name> already exists
  1803.        431 Bboard mailbox <bboard-name> not found
  1804.        440 Already subscribing to <bboard-name>
  1805.  
  1806.        i.e. CREATE-SUBSCRIPTION sf-lovers
  1807.  
  1808.  
  1809.        DELETE-SUBSCRIPTION <bboard-name>
  1810.        200 Command OK
  1811.        441 Subscription <bboard-name> not found
  1812.  
  1813.        i.e. DELETE-SUBSCRIPTION rec.music
  1814.  
  1815.  
  1816.        RESET-SUBSCRIPTION <bboard-name> <new-UID>
  1817.        200 Command OK
  1818.        441 Subscription <bboard-name> not found
  1819.  
  1820.        i.e. RESET-SUBSCRIPTION rec.music.gdead 1210
  1821.  
  1822.  
  1823.        LIST-AVAILABLE-SUBSCRIPTIONS
  1824.        241 All available bboards follow:
  1825.        mod.politics
  1826.        sfl
  1827.        tcp-ip
  1828.        forum
  1829.        ...
  1830.        comp.emacs
  1831.        .
  1832.  
  1833.  
  1834.        Each line of the list consists solely of one bulletin-board
  1835.        name.
  1836.  
  1837.  
  1838.    Message operations:
  1839.  
  1840.  
  1841.        FETCH-CHANGED-DESCRIPTORS <mailbox-name> <max-to-send>
  1842.        250 Descriptor list follows:
  1843.        expunged
  1844.        2333
  1845.        expunged
  1846.        2334
  1847.  
  1848.  
  1849.  
  1850. Lambert                                                        [Page 33]
  1851.  
  1852. RFC 1056                         PCMAIL                        June 1988
  1853.  
  1854.  
  1855.        descriptor
  1856.        2337 0001000001110000 481 14
  1857.        croaker@ptt.lcs.mit.edu
  1858.        fred@anymachine.mit.edu
  1859.        Tue, 19 Jan 88 11:10:03 EST
  1860.        a typical subject line
  1861.        descriptor
  1862.        2339 0000000000000000 1457 40
  1863.        bob@lcs.mit.edu
  1864.        csr-people@ptt.lcs.mit.edu
  1865.        Mon, 18 Jan 88 13:08:17 +0000
  1866.        another typical subject line
  1867.        expunged
  1868.        2340
  1869.        .
  1870.  
  1871.        or
  1872.  
  1873.        431 mailbox <mailbox-name> not found
  1874.  
  1875.        i.e. FETCH-CHANGED-DESCRIPTORS markl 100
  1876.  
  1877.    Each element of the descriptor list is either two or six lines long.
  1878.    Descriptors which have been expunged are transmitted as two lines:
  1879.    the word "expunged" on one line, followed by the message unique
  1880.    identifier on the next line.  Descriptors which still exist are
  1881.    transmitted as six lines: the word "descriptor" on one line, followed
  1882.    by a line containing the message unique identifier, flag states
  1883.    (sixteen characters either one or zero depending on the associated
  1884.    flag value), followed by the message length in characters, followed
  1885.    by the message length in lines.  The next four lines contain the
  1886.    message's "from:", "to:", "date:", and "subject:" fields,
  1887.    respectively.  Flag zero's state is the first character in the flag
  1888.    string; flag fifteen's is the last character in the flag string.
  1889.  
  1890.  
  1891.        FETCH-DESCRIPTORS <mailbox-name> <low-uid> <high-uid>
  1892.        250 Descriptor list follows:
  1893.        descriptor
  1894.        2337 0001000001110000 481 14
  1895.        croaker@ptt.lcs.mit.edu
  1896.        fred@anymachine.mit.edu
  1897.        Tue, 19 Jan 88 11:10:03 EST
  1898.        a typical subject line
  1899.        descriptor
  1900.        2339 0000000000000000 1457 40
  1901.        bob@lcs.mit.edu
  1902.        csr-people@ptt.lcs.mit.edu
  1903.  
  1904.  
  1905.  
  1906. Lambert                                                        [Page 34]
  1907.  
  1908. RFC 1056                         PCMAIL                        June 1988
  1909.  
  1910.  
  1911.        Mon, 18 Jan 88 13:08:17 +0000
  1912.        another typical subject line
  1913.        .
  1914.  
  1915.        or
  1916.  
  1917.        431 mailbox <mailbox-name> not found
  1918.  
  1919.        i.e. FETCH-DESCRIPTORS british-cars 12 31
  1920.  
  1921.  
  1922.        COPY-MESSAGE <src-mailbox> <target-mailbox> <source-UID>
  1923.        250 Descriptor list follows:
  1924.        descriptor
  1925.        2339 0000000000000000 1457 40
  1926.        bob@lcs.mit.edu
  1927.        csr-people@ptt.lcs.mit.edu
  1928.        Mon, 18 Jan 88 13:08:17 +0000
  1929.        another typical subject line
  1930.        .
  1931.  
  1932.        or
  1933.  
  1934.        400 cannot copy message onto itself
  1935.        431 target mailbox <target-mailbox> not found
  1936.        431 source mailbox <source-mailbox> not found
  1937.        451 message <source-UID> not found
  1938.  
  1939.        i.e. COPY-MESSAGE markl british-cars 2338
  1940.  
  1941.  
  1942.        RESET-DESCRIPTORS <mailbox-name> <low-UID> <high-UID>
  1943.        200 Command OK
  1944.        431 mailbox <mailbox-name> not found
  1945.  
  1946.        i.e. RESET-DESCRIPTORS markl 1 10000
  1947.  
  1948.  
  1949.        PRINT-MESSAGE <mailbox-name> <UID> <printer-ID>
  1950.        200 Command OK
  1951.        401 printer <printer-name> not found
  1952.        431 mailbox <mailbox-name> not found
  1953.        451 message <UID> not found
  1954.  
  1955.        i.e. PRINT-MESSAGE markl 2433 pravda
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962. Lambert                                                        [Page 35]
  1963.  
  1964. RFC 1056                         PCMAIL                        June 1988
  1965.  
  1966.  
  1967.        SET-MESSAGE-FLAG <mailbox-name> <UID> <flagnum> <state>
  1968.        200 Command OK
  1969.        431 mailbox <mailbox-name> not found
  1970.        451 message <UID> not found
  1971.        500 flag number <flag-number> out of range
  1972.  
  1973.        i.e. SET-MESSAGE-FLAG british-cars 23 0 1
  1974.  
  1975.  
  1976.        FETCH-MESSAGE <mailbox-name> <UID>
  1977.        251 message follows:
  1978.        From: markl@ptt.lcs.mit.edu
  1979.        To: markl@ptt.lcs.mit.edu
  1980.        Date: Sun, 17 Jan 88 11:11:11 EST
  1981.        Subject: anything
  1982.  
  1983.        this is a sample of some
  1984.        message text
  1985.        .
  1986.  
  1987.        or
  1988.  
  1989.        431 Mailbox <mailbox-name> not found
  1990.        451 message <UID> not found
  1991.  
  1992.        i.e. FETCH-MESSAGE current-events 495
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018. Lambert                                                        [Page 36]
  2019.  
  2020. RFC 1056                         PCMAIL                        June 1988
  2021.  
  2022.  
  2023. II. Operations by name
  2024.  
  2025.    copy-message
  2026.    create-address
  2027.    create-bboard-mailbox
  2028.    create-client
  2029.    create-mailbox
  2030.    create-subscription
  2031.    delete-address
  2032.    delete-bboard-mailbox
  2033.    delete-client
  2034.    delete-mailbox
  2035.    delete-subscription
  2036.    expunge-mailbox
  2037.    fetch-changed-descriptors
  2038.    fetch-descriptors
  2039.    fetch-message
  2040.    help
  2041.    list-addresses
  2042.    list-available-subscriptions
  2043.    list-clients
  2044.    list-mailboxes
  2045.    list-subscriptions
  2046.    login
  2047.    logout
  2048.    print-message
  2049.    reset-client
  2050.    reset-descriptors
  2051.    reset-mailbox
  2052.    reset-subscription
  2053.    send-message
  2054.    send-version
  2055.    set-message-flag
  2056.    set-password
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074. Lambert                                                        [Page 37]
  2075.  
  2076. RFC 1056                         PCMAIL                        June 1988
  2077.  
  2078.  
  2079. III. Responses by number
  2080.  
  2081.    100 Pcmail repository version XXX; following are supported
  2082.    200 Command OK
  2083.    220 Client list <name> <status> follows:
  2084.    221 Client out of date by > 1 week
  2085.    230 Mailbox list <name> <high UID> <#msgs> <#new> follows:
  2086.    240 Subscription list follows:
  2087.    250 Descriptor list follows:
  2088.    251 Message follows:
  2089.    260 Address list follows:
  2090.    350 enter message; end with "."
  2091.    400 cannot copy message onto itself
  2092.    410 already logged in
  2093.    420 client <name> already exists
  2094.    430 mailbox <name> already exists
  2095.    430 bboard mailbox <name> already exists
  2096.    440 subscription <name> already exists
  2097.    460 address <name> already exists
  2098.    411 no user named <name>
  2099.    421 client <name> not found
  2100.    431 mailbox <name> not found
  2101.    441 subscription <name> not found
  2102.    451 message <UID> not found
  2103.    461 address <name> not found
  2104.    402 internal error message
  2105.    403 syntax error in outbound message
  2106.    404 bad password or permission denied
  2107.    405 mail state is temporarily in use by another client
  2108.    406 please log in
  2109.    500 operation syntax error or illegal argument
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130. Lambert                                                        [Page 38]
  2131.