nmh (new message handler), is a powerful electronic mail handling system. Following the Unix Philosophy, nmh is made up by a collection of simple programs each of which has a single purpose. This architecture allows the user to intersperse nmh with other commands at the shell prompt and to write scripts tailored to their needs.
Install AUR.AUR or AUR from the
Optionally install a utility to handle IMAP or POP, for example, or .
Also optionally installor another utility for sending mail.
nmh is extensively configurable in a variety of ways. The primary of these is the
The syntax for .mh_profile is unusual. For example, nmh will refuse to run if there are blank lines in the file. Read the mh_profile (5) man page for more.
By default, nmh uses
- Path can be either full (if prefixed with
/) or relative to $HOME.
- Nmh uses the mh mail format, which is different from the maildir and mbox. Setting your Path to a preexisting maildir folder, for example, will not work.
Set inbox (relative to Path):
Also by default, nmh populates the mail folder with the
inc command, which incorporates mail from the user's mail drop (
If you have a non-standard mail drop path, you can set an environment variable
$MAILDROP, or set MailDrop in
or set inc:
inc: -file /path/to/mail-drop
command: -flagformat in mh_profile. These work much like bash aliases.
Nmh is also capable of retrieving mail via POP. A basic POP setup (see inc (1) man page for more):
inc: -host example.com -user username -sasl
To become familiar with basic nmh usage, learn and practice the following commands:
|inc||Incorporate new mail.|
|scan||Scan the contents of the current folder.|
|folder/folders||Change the current folder or list folders and their contents.|
|comp||Compose a new message.|
|repl||Reply to a message.|
|refile||Move a message to another folder.|
While nmh is fully usable from the command-line, several console-based and graphical user interfaces exist. Also, some common mail tools interact smoothly with the mh format.
- MH-V, a console interface to mh/nmh with vi- keybindings.
- MH-E, a console interface to mh/nmh with Emacs keybindings.
- exmh, a TK-based mh GUI.
- Popular MUA mutt understands mh format. (Use
set mbox_type = mhin your muttrc.)
- Full-text mail indexer and search utility mairix can read and write in mh format. (Use