MH & nmh: Email for Users & Programmers

May, 2006

Running Your .maildelivery File

NOTE: for users of the online version of this book: This section has a lot of examples followed by long explanations. To avoid jumping between the example and its explanation, it's a good idea to open a new browser window to show an example. (Check your browser's menu for a command like New Web Browser or Open in New Window). Then, use the original browser to read the explanation while you view the example in the second browser window.

In most cases, your computer's MTA (see the Section How UNIX Email Works) has to be told to read your .maildelivery file. The list below explains what to do for common transfer agents. If you aren't sure what MTA is running on your system, ask your postmaster -- or read your system's online mhook(1) manual page; it should have been customized automatically for your configuration when MH was installed. (nmh doesn't have an mhook(1) manual page; it's been split into manual pages for rcvtty(1), rcvdist(1), and rcvpack(1).)

Your .maildelivery file, and the .forward file or link explained above, have to be in your home directory on the computer where your system mailbox file is written. If your own computer gets its mail from another host with POP or by a networked filesystem, check to be sure your setup is on the right computer. If you don't have access to that machine, you can still automate your mail processing with scripts. See the Sections Explanation of autoinc and Processing with at or cron or by Hand.

Here's one more note. At least some MH systems won't run your .maildelivery file unless the mode is 644 -- other users can't edit the file. Even if that isn't required, it's a good idea.