Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ queue(F) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

deliver(ADM)

cleanque(ADM)

submit(ADM)


 queue(F)                        19 June 1992                        queue(F)


 Name

    queue - MMDF queue files for storing mail in transit

 Description

    MMDF stores mail in /usr/spool/mmdf/lock/home, an isolated part of the
    filesystem, so that only authorized software may access the mail.  Mail
    is stored under the directory sub-tree.

    It must specify a path with at least two sub-directories.  The next-to-
    bottom one is used as a ``locking'' directory and the bottom one is the
    ``home''.  For full protection, only authorized software can move through
    the locking directory.  Hence, it is owned by MMDF and accessible only to
    it.

    Queue entries

    When mail is queued by submit, it is actually stored as two files.  One
    contains the actual message text and the other contains some control in-
    formation and the list of addressees.

    The text file is stored in the msg directory.  The other file is stored
    in the addr directory and is linked into one or more queue directories.
    The queue directories are selected based on the channels on which this
    message will be delivered.  Each output channel typically has its own
    queue directory.

    Another directory below home is a temporary area called tmp.  It holds
    temporary address-lists as they are being built.  Queuing of a message is
    completed by linking this address file into addr and the queue direc-
    tories.  The msg directory contains files with message text.  Addr and
    msg files are synchronized by giving them the same unique name, which
    MMDF occasionally calls the message ``name''.  The message name is
    derived by use of mktemp(S), using msg as the base directory.  The files
    created in addr must have open read-write access; the ones in msg must
    have open read access.

    When submit runs, it changes into home for its working directory.  It
    then does a setuid to run as the caller. This is necessary to permit sub-
    mit to access the caller's address-list files (specified as ``< file'').
    Deliver changes into the queue directory to minimize the time spent
    searching for messages to deliver.


    Queue file formats

    The msg portion of a queued message simply contains the message, which
    must conform to the Arpanet standard syntax, specified in RFC822.  It is
    expected that the format of the message contents file eventually will be
    more structured, permitting storage of multi-media mail.

    The following specifies the syntax of the addr (and queue directory)
    address-list portion of the queued message:

    Address file contents


    file ::=       creation late flags '\n' [rtrn-addr] '\n' *(adr_queue
                   '\n')

    creation ::=   {long integer decimal representation of the time the mes-
                   sage was created}

    late ::=       ADR_MAIL / ADR_DONE {from adr_queue.h}

    flags ::=      {decimal representation of 16-bits of flags}

    rtrn-addr ::=  {rfc822 return address}

    adr_queue ::=  temp_ok mode queue host local {conforms to structure
                   specified in adr_queue.h}

    temp_ok ::=    {temporary flag indicating whether this address has been
                   verified by the receiving host: ``yes'' is  ``+''; ``not
                   yet'' is ``-''}

    mode ::=       {send to mailbox(m), tty(t), both(b), either(e), or pro-
                   cessing completed(*)}

    queue ::=      {name of the queue into which this message is linked for
                   this address}

    host ::=       {official name (and domain) of recipient host}

    local ::=      {local address on receiving host}

    Address file description

    An address queue file contains a creation time-stamp, an indication if
    the sender has been notified of delayed delivery, some flags, an optional
    return-mail address, and an address list.  Several <flags> are currently
    in use.  0004 indicates whether late warnings should be sent to the
    return-mail address if the entire address list has not been processed
    within the number of hours specified by ``warntime''.  0002 indicates
    whether mail should be returned to the sender if it hasn't been com-
    pletely processed within the number of hours specified by ``failtime''.
    0001 indicates whether warning and failure messages are to contain only a
    citation of the message.  An ``*'' value, for the ``late'' flag, indi-
    cates that a warning notice has been sent.

    The creation date is coded as a long ASCII decimal string, terminated by
    the ``late'' flag.  This has to be inserted into the file because UNIX
    System V doesn't maintain it.  The date is used to sort the queue so that
    mail is delivered in the order submitted.

    The return address is a line of text and may be any address acceptable to
    submit.

    Each address entry is on a separate line, and conforms to the adr_struct
    format, defined in adr_queue.h.  It contains several fields separated by
    spaces or commas.  Fields containing spaces or commas must be enclosed in
    double quotes.

    The temp_ok flag indicates whether the address has been accepted during
    an ``address verification'' dialog with the receiving host.  When the
    message text is successfully accepted by the receiving host, then this
    flag no longer applies and the mode is set to ADR_DONE (``*'').  Before
    final acceptance of message text, the mode flag indicates whether the
    mail is for a mailbox, terminal, both, or either.  (Currently only mail-
    box delivery, ADR_MAIL, is used.)

    The queue name is the name of the sub-queue in which the message is
    queued for this address.  Each addressee's host may be on a separate
    queue or some hosts may share the same queue.  When all addressees in the
    same queue have been delivered, the address file is removed from that
    queue directory.  When all queues have been processed, the address file
    (in both addr and the queue directory) and the text file (in msg) are
    removed.

    The host and local strings are used by the channel program.  The host
    determines the type of connection the channel program makes.  The local
    string is passed to the host; it should be something meaningful to that
    host.  The local string must not contain newline or null and it must be a
    valid local address per RFC822.

 See also

    deliver(ADM), cleanque(ADM), submit(ADM)

 Credit

    MMDF was developed at the University of Delaware and is used with permis-
    sion.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026