MAILS(1)                                                 MAILS(1)

          Mails, mail2fs, Arch, Save, Reply - reading and processing

          mail2fs [ -D ] [ -n ] [ -d dir ] [ mbox ]

          Mails [ -alsA ] [ mbox ]

          Save mbox


          Reply [ addr ]

          These programs cooperate to provide mail processing and
          reading facilities for Plan B users. They are an alternative
          to programs mentioned in mail(1).

          In Plan B, mails for users are parsed and decoded first, and
          then stored in a file hierarchy where these and other tools
          can be used to process them.  A mailbox is a directory, usu-
          ally under /mail/box/$user/, that contains one directory per
          month (e.g., 200603/ for mails processed on March 2006).  In
          these diretories, there is one directory per message. The
          convention is that (message directory) names starting with
          a. correspond to archived messages not to be usually shown
          to the user. Names starting with s. correspond to messages
          that seem to be spam (not usually shown either). Other mes-
          sages use a serial message number as their directory name.

          The directory for a message contains a text file (with the
          mail headers and body already processed for reading) and one
          extra file for each (file) attachment found in the original
          message (when a mail is attached, a directory is created for
          it following the same conventions mentioned here).  Because
          all these files have been already processed for reading, the
          usual file handling tools can be used to operate on them
          (e.g., editors, file search tools, etc.).

          Mails is an rc(1) script that provides the primary user
          interface. Option -l lists message paths and sender
          addresses in a format suitable for use with ofaces(1).

          In general Mails relies on mails to perform its job and
          extract from the text of the messages in mbox (by default,
          /mail/box/$user/mails ) a summary of messages including
          their relative path, their subject, and their sender. This
          text summary is plumbed to the user's editor. The mails

     MAILS(1)                                                 MAILS(1)

          program is the underlying tool. The description below
          applies to either programs.

          Flag -a shows archived  messages also. Flag -s shows spam
          messages also. Flag -A shows all of them.

          The program that actually performs the conversion from
          UNIX/Plan9 mailbox format into plan B mail folders is
          mail2fs. It reads mbox (or /mail/box/$user/mbox by default)
          and updates /mail/box/$user/mails (or dir when given) with
          messages found in the Plan 9 mailbox. Once the conversion
          finishes, the original mailbox is emptied, unless flag -n is
          supplied. The program computes the SHA1 digest of subjects
          and bodies, to silently discard duplicate mails.

          Save, and Arch are rc(1) scripts that can be used when read-
          ing mail with ox(1) to save a mail to a different folder and
          to archive the mail. They must be executed from the ox panel
          that shows the mail file.

          Reply is another script used both to compose new mails and
          to reply. It starts omail(1) to compose a new mail, using
          the optional destination mail addr when given. The snarf
          buffer is set to the context of the ox window used to exe-
          cute the command, which is useful to paste the original mes-
          sage when replying.

          /mail/box/$user/mbox  Standard Plan 9 mail box for the user.
                                Standard Plan B mail box for the user