[Next] [Previous] [Up] [Top] [Contents] [Index]

Appendix F. mh and exmh Customization

F.1 Forwarding and Notification

The .forward file is a general mail forwarding file, and is used no matter which mail package you choose to use. It tells the system what to do with your mail; whether to leave it in the system spool area, forward it to the spool area on a different node, forward it to a different system entirely, or (in some cases) deliver it to your preferred local mailbox automatically. It may also be used as a means of notifying you that mail has arrived.

[Missing image]Note that comment lines are generally not permitted in the .forward file. Some OS versions and versions of sendmail (an underlying, transparent internet mail forwarding tool) do allow comment lines in .forward. The comment lines must be preceded by a pound sign (#).

F.1.1 Forwarding Address

The first line of your .forward file tells the system where to put your mail. On your chosen mail node, it should look like:

\{username}@{node}.fnal.gov

where {username} is your username, and {node} is the name of the node where you plan on reading mail (e.g., \joe@fsui02.fnal.gov). The backslash prevents infinite loops in a "clustered" environment where more than one node sees the same .forward file in your login area.[98]

On all other systems, we recommend that you forward your mail to FNAL, the lab's central mail server. For these systems, the first line of each .forward file will look like:

{username}@fnal.gov

e.g., joe@fnal.gov. Note that this doesn't have the backslash or the node name. The backslash is not necessary if you are forwarding to a node that does not share the same login area. See sections 2.6 and 2.7 for a discussion of shared login areas, or what we call UNIX clusters.

F.1.2 Mail Notification

Another use of the .forward file is to allow you to customize the type of notification you receive when new mail arrives. Usually, the second line of your .forward file will control if and how you receive notification.

FUE provides minimal notification of incoming mail by default, however most people like to receive notification of individual messages as they come in. If you want to scan your new mail when you log in, include the commands inc and scan +inbox unseen to your .login or .profile file.

The use of the MH program rcvtty provides notification of new mail whether or not you have a mail reader active. To set this up, you need to edit your .forward file.

Basic Configuration

Even if you don't know what biff/comsat is, you will need to determine if it is running on your system. How do you tell? Follow these instructions and you should get one concise notification message per incoming mail message if it is not running. If you get two notifications, one of which is quite verbose, then biff/comsat is running, and you'll need to change your configuration as described below.

If you're on a cluster where some nodes run biff/comsat and some don't, set up notification according to your chosen mail node. This procedure assumes that MH is installed and configured on all nodes within the cluster.

First, you need to make sure you have set up the proper file access permission. Activate tty user execute permission by using the command:

% chmod u+x `tty`

where the quotes around tty are both single back quotes.

You can include this in your .login or .profile file to run it automatically on all sessions. Be sure to include it after the call to fermi.login or fermi.profile since these files set it differently. Or, if you prefer to have notification only in one window, just run this command in that window.

The second line of your .forward file should look like:

"| /usr/local/products/mh/current/lib/rcvtty -biff"

When mail arrives, rcvtty should send a notice containing the time, sender, subject, and message sample to all user tty sessions with proper file access permission in the default format:

time:  SENDERNAME   subject << first line of text (truncated)

If this type of notification is what you get, skip to "Customizing rcvtty Output", below. If instead you get a multiline notice, biff/comsat is running, and you'll have to make a couple of changes.

[Missing image]Some systems run biff with comsat for notification purposes. biff/comsat and rcvtty (without the biff option) can work together, however this yields double notification (both comsat's verbose notice and rcvtty's single line notice) because the r-w-x permissions (see section 6.6.1) need to be different for biff/comsat and rcvtty.

To get rcvtty to work properly on systems running biff/comsat follow these steps:

  1. Enter biff n to deactivate comsat (best to include in .login or .profile file).

2) In .forward, replace:

"| /usr/local/products/mh/current/lib/rcvtty -biff"

with:

"| /usr/local/products/mh/current/lib/rcvtty"

3) Enter ls -lL `tty` to see your default tty setting. If o+w (that is, if write permission for other; see section 6.6.1) is not set, use the command chmod o+w `tty` to set it (again, best to include in .login or .profile file).

Customizing rcvtty Output

You can reformat the output of rcvtty if you like. To do this you need to create a form file describing the syntax of the output you want to see, and you need to modify the rcvtty command. For example, if you wish to use the same format as scan-form (see section F.2.5) the form file used for incorporating or scanning mail, the line in .forward would look like this (shown in the format used when biff/comsat is not running):

"| /usr/local/products/mh/current/lib/rcvtty -biff -form scan-form"

[98] If you choose to use unattended autoincorporation, which delivers your mail directly into your login area rather than leaving it in the system spool area, the first line of your .forward file will look significantly different from this example. Unattended autoincorporation is covered in section F.4.

UNIX at Fermilab - 10 Apr 1998

[Next] [Previous] [Up] [Top] [Contents] [Index]