[Next] [Previous] [Up] [Top] [Contents] [Index]
Chapter 12: UNIX Mail Systems
In order to take advantage of the variety of features provided by the MH package, several configuration files can be used for both exmh and mh. In this section we list all the files discussed in this chapter and in Appendix F, and provide brief descriptions for reference.
You're already familiar with two of them, .mh_profile and .forward.[65] See sections F.2.1 and F.1, respectively, for more information on these two files.
.mh_profile defines your basic configuration (where mail is stored, the editor to use, various MH options, etc.). Running setup mh or setup exmh the first time automatically creates a default .mh_profile for you in your $HOME directory.
.forward stores your forwarding address. It is used in mail forwarding (routing), notification, and unattended autoincorporation. You must create it in your $HOME directory.[66]
The following three files allow you to customize your mail headers. See sections F.2.2, F.2.3, and F.2.4, respectively, for more information on them:
components defines message header format for sending mail. If you don't create your own copy in your Mail directory, the system default file in the MH library section will be used.
replcomps defines message header format for replies. If you don't create your own copy in your Mail directory, the system default file in the MH library section will be used.
forwcomps defines message header format for forwarded messages. If you don't create your own copy in your Mail directory or elect to use the components file header format, the system default file in the MH library section will be used.
In sections 12.3.4 and 12.4.5 we show you how to create:
.mh_filter allows you to include the original message in a reply. It goes in your $HOME directory.
{alias file} stores distribution lists and local aliases for long mail addresses (you define its name in your .mh_profile). It is assumed by default to be in your Mail subdirectory, but you can define it otherwise.
In Appendix F we provide information on yet a few more configuration files!
scan-form provides the format of display when you scan mail. The system default files in the MH library section will be used if you don't have your own in $HOME/Mail.
inc-form provides the format of display when you incorporate mail. The system default files in the MH library section will be used if you don't have your own in $HOME/Mail.
.maildelivery controls how local delivery is performed with manual or background incorporation in exmh when the presort option is selected. It also controls how delivery is performed when unattended automatic mail incorporation is defined in .forward using slocal. No default is provided; if you need this, you must create it in your $HOME directory.
MH uses the concept of mail folders to store messages. Folders are simply subdirectories of your Mail directory which contain mail messages, one message to a file. To distinguish folders from files in MH commands, folders are prefixed with a plus sign (+) in a command.
For example:
% refile +admin
is an MH command that moves (refiles) the current message in the current folder to the folder admin.
Folders can be multi-level, for example outbox/feb96. Within a folder, the message filenames are incremented numbers starting at one (1). Running ls -l on a folder, you will see a numbered file for each message (in "alphabetical" order), for example:
total 296 -rw-r--r-- 1 username g020 339 Nov 9 11:36 1 -rw-r--r-- 1 username g020 864 Nov 9 11:36 10 -rw-r--r-- 1 username g020 3297 Nov 9 11:36 11 ... -rw-r--r-- 1 username g020 753 Nov 9 11:36 2 -rw-r--r-- 1 username g020 2628 Nov 9 11:36 20
The command ls -lt is convenient for listing them in reverse chronological order.
After a lot of refiling and deleting of messages, the messages in your folders may not be in order by date anymore, and you will undoubtedly have numerical gaps in the file names. To reorder and renumber the message files:
use the Sort folder and Pack folder options under the More... button in the middle window
Due to the wide variety of mail readers on UNIX and the configurability provided by many of them, incoming mail is not by default delivered to any particular file or area in your home directory. Instead it is collected in a system mailbox, a directory defined as the mail holding area, on each node. In FUE, the environment variable MAIL is defined to reflect the system-specific location of your mailbox file, set to /usr/spool/mail/{username} or /usr/mail/{username}, depending on the UNIX flavor.[67] For example, user fred has his unread, unincorporated incoming mail stored in chronological order in the file /usr/mail/fred.
Your mail resides in this file until you incorporate it into a different file (mail folder). How and where it gets incorporated depends on the mail reader you decide to use. Here we discuss incorporation into the MH mail folder structure.
When new mail arrives, by default it resides the system mailbox until you incorporate it into your mail folder. There are a few ways to incorporate mail during an exmh session (i.e. "attended" incorporation), as we mentioned in section 12.3.3. You can incorporate messages manually, or set options to incorporate mail either immediately upon invoking exmh, and/or periodically during your mail session.
If you want to configure exmh so that it incorporates your mail at regular intervals and/or at particular times during your exmh session, first go to the Preferences menu in the top window.
Would you like exmh to sort your mail for you, automatically putting some messages in a particular folder? If so, you need to do two things:
.maildelivery file describing how you want your mail sorted (see section F.2.6).
2) Tell exmh to use this file. Go to the Preferences/Incorporate Mail menu, and under Ways to Inc, check the Presort box.
We discuss unattended automatic mail incorporation in section F.4. This is different from attended automatic incorporation in that mail is automatically incorporated whether or not you're running exmh, and whether or not you're even logged in. We do not recommend this method, although we include it here for completeness.
To include a boilerplate signature to messages that you compose and send in exmh or mh, you need to create your own $HOME/Mail/components file, and simply add the signature to the bottom of this file, underneath the dashed line. For information on the components file, see section F.2.2. This file does not govern replying and may not govern forwarding (see section 12.3.5).
To add a boilerplate signature when replying to messages, you can add a signature to the end of your filter file, called .mh_filter in your $HOME directory (see section 12.3.4). This file gets used only when you're using the option to include the original text in the reply.
If you're using your own $HOME/Mail/forwcomps file for forwarding messages, include the signature lines at the end of this file. Note that your signature will appear above the text of the forwarded message.
You can send mail to many people at a time by defining an alias for the addresses of the recipients. You may also want to define aliases for long single addresses. Create a file (we call it mh_alias for example purposes; you can call it what you like) in your $HOME/Mail directory, and include an Aliasfile line like the following in your .mh_profile:
Aliasfile: mh_alias
This example alias file shows the required format:
|
There cannot be any blanks after the backslash (\) in the aliases. To see your aliases you can use the command ali. For example if you type:
% ali d0spokes
you will get the response:
mont@fnal.gov, pgrannis@fnal.gov
Some further options available for exmh (but not for mh) to include in the .mh_profile file are:
|
Folder-Order sets up the order of display of folders on your exmh window. Wildcards as used in filename expansion are allowed, so you only need to specify folders that you want displayed in particular places. In our example, we specify what folder to show first, second, third, and last. All the others will be sorted alphabetically between the third and the last.
Header-Suppress and Header-Display control which headers you see when you read a message. The example above indicates that everything is suppressed except the Date:, To:, From:, Cc:, and Subject: lines.
.forward file is not specific to the MH system; it may be used with any mail handler.
.forward file.
fermi.login (for C shell family) or fermi.profile (Bourne shell family) in Appendix C. On a SunOS 5 (Solaris) system, you may have to set the variable MAIL manually due to a bug.