upasfs – mail file server
is a user level file system that caches mailboxes and presents them as a file
A user normally starts
in his/her profile after starting
and before starting
a window system, such as
The file system is used by
mail reader, and
to parse messages.
also generates plumbing messages used by
to provide mail announcements.
The mailbox itself becomes a directory under
Each message in the mailbox becomes a numbered directory in the
mailbox directory, and each attachment becomes a numbered directory
in the message directory. Since an attachment may itself be a mail message,
this structure can recurse ad nauseam.
Each message and attachment directory contains the files:
the message minus the RFC2822 style headers
the address(es) from the CC: header
the date in the message, or if none, the time of delivery
an SHA1 digest of the message contents
a name to use to file an attachment
persistant message flags as per IMAP
the parsed name of the sender
the from address in the From: header, or if none,
the address on the envelope.
the RFC822 headers
described below, essentially a summary of the header info
contents of the
the number of lines in the message body
the parsed RFC2822 MessageID
the mime headers
the undecoded MIME message
the undecoded message body
the undecoded message header
the parsed MessageIDs of each referenced message,
one per line
the address to send any replies to.
the contents of the subject line
the address(es) from the To: line.
the MIME content type
the envelope header from the mailbox
the date portion of the Unix From line.
the mdir filename for mdir messages. The portion
before the dot is always the date from the Unix From
line in seconds since epoch.
file contains the following information, one item per line. Lists
of addresses are single space separated.
MIME content type
number of lines in body
size of message
name from From: header
Deleting message directories causes the message to be removed from
The mailbox is scanned and the structure updated
whenever the mailbox changes. Message directories are
not renumbered. The results of the scan are
is used to direct
to open, close, rename, create or remove new mailboxes,
and also to
delete or flag groups of messages atomically.
The messages that can be written to this file are:
open path mboxname
opens a new mailbox.
is the file to open, and
is the name that appears under
The close takes affect only after all files open under
have been closed.
create a new maibox,
The mailbox type must support creation.
rename [-t] old new
rename the mailbox
flag truncates rather than removes the old
The renaming takes effect immedately. While mailboxes
of any type may be renamed, it is not possible to use
to convert folder types.
remove [-rt] mboxname
flag removes any subfolders while
flag truncates, rather than removes.
delete mboxname number ...
Delete the messages with the given numbers from
flag mboxname flags number ...
flag the given messages.
file records persistant message flags. These
flags are a superset of the standard IMAP message
flags. Flags are stored in order. Unset flags
are represented by a
‘-’ while set flags are represented by the following
Messages of the form
may be written to the
Fs maintains the
flag. Mail readers are expected
to maintain other flags.
The options are:
Trace 9P protocol messages.
Log to console in addition to the standard places.
stands for biffing. Each time new mail
is received, a message is printed to standard
output containing the sender address, subject,
and number of bytes. It is intended for
people telnetting in who want mail announcements.
attempt to keep the cache below
as the mailbox instead of the default,
chatty index debugging.
logging. Turn on logging via syslog
(and to the console with -S) to
rather than the default
Don’t open a mailbox initially. Overridden by -f.
turn off plumbing. Unless this is specified,
sends a message to the plumb port,
for each message received or deleted.
The message contains the attributes
sender=<contents of from file> ,
mailtype=deleted or new ,
length=<message length in bytes> .
The contents of the message is the full path
name of the directory representing the message.
to put itself in
with a name of the form
specifies a mount point other than
will exit once all references to its directory
interprets mailbox file names of the form
to mean access an account on
using the given protocol.
Authentication is delegated to
may be omitted, in which case
the user name is gleaned from the key held by
The following protocols are supported:
cleartext POP with password authentication
cleartext POP with challenge-response (APOP) authentication
TLS-encrypted POP with password authentication
TLS-encrypted POP with challenge-response (APOP) authentication
cleartext IMAP with CRAM-MD5 or password authentication
TLS-encrypted IMAP CRAM-MD5 or password authentication
The two IMAP protocols allow an optional fourth field
specifying a mailbox name, for example
connect to port 110 in plaintext and start TLS using the POP
connects to port 993 and starts TLS before initiating the IMAP conversation.
There should probably be
protocols as well.
would connect to port 995 and start TLS before initiating the POP conversation,
would connect to port 143 in plaintext and start TLS using the IMAP
(That’s the nice thing about standardsthere’s so many to choose from.))
mutual exclusion lock for altering mbox (mbox format only)
Procedings of IWP9,