MH & nmh: Email for Users & Programmers

May, 2006

Reading Your Mail

As you've seen, it's easy to read mail with xmh. Here are some fine points that might be helpful to you, though.

Incorporate New Mail

If your viewed folder is able to receive new mail (like inbox can, by default), then the Incorporate New Mail command will be sensitive (the words will be made with a solid line); you can select it to get your new mail. If you're viewing some other folder, then the Incorporate New Mail command will be grayed.

The Section Other Features of inc covers MH options for incorporating mail.

A handy xmh feature that wasn't documented until Release 5 is the .xmhcheck file. It works with the MH mhook automatic mail-handling features (explained in the Chapter Processing New Mail Automatically) to let you automatically incorporate mail into several folders. In fact, this works with any system where you have more than one incoming mailbox (and write permission to modify the mailbox when you incorporate new mail from it). The Figure below shows the changes in the folder buttons when another folder besides inbox can incorporate new mail.

Figure: Two folders that can incorporate mail

tftcinma.gif

The inbox button has an empty square; there's no mail waiting for your inbox. The project button has a filled black square; there's mail waiting for it. If you view a folder with a filled black square (as I've done for project here), use Incorporate New Mail (on the Table of Contents menu) to bring in the mail waiting. Only the viewed folder will get new messages; the other folders wait.

To set this up, make a file named .xmhcheck in your home directory. Each line in the file has two parts: the name of a folder and the mailbox that should be checked (and read) for that folder. See the next Example.

Example: A simple .xmhcheck file

    inbox     /usr/spool/mail/jerry
    project   /home/jerry/.project_mail
    
From the filled black square in the previous Figure, you can see that there's mail waiting in /home/jerry/.project_mail. My system mailbox, /usr/spool/mail/jerry, is empty.

View Window

Here is another mail-reading feature that wasn't covered in the Chapter Tour Through xmh. If you've selected a message, the View In New command on the Message menu will open a new full-size message viewing window. The Figure below shows one.

Figure: A view window

aviewwin.jpg

In Release 5, xmh added a new Delete button to mark the viewed message for deletion.

Line Folding

When you read a message, lines that are too wide for the window will have a black blob at the right-hand side. The black blob means "there's more here." If you have a narrow window or a large font, the lines in your messages may be cut off. To fix that, resize your window -- use the window manager's resizing command or change the window geometry. See the Sections TocGeometry and Line Wrapping.

Message Number Limit

xmh can't handle folders with more than 9,999 messages. More exactly, the maximum message number is 9999. That's because xmh expects that the message number is in the first four columns of the table of contents. If a folder has a message number over 9999, you'll need to renumber the messages, move some messages to another folder (or a subfolder), or use standard MH commands to access that folder.