MH

The MH Mail Handling System is a powerful open source package for handling electronic mail on Unix systems. It provides command-line utilities for all aspects of mail, including POP, IMAP, and MIME support. Several user graphical interface packages are available for MH. A recently rewritten version, nmh, is supposedly cleaner and easier.

The MH mailbox format is used by MH and nmh. Instead of appending multiple messages to a single file like mbox, MH mailboxes consist of a directory where each message is contained within its own file.

The filename of each message corresponds to its message number. When a message is deleted, [12] its name is prepended with a literal comma. For example, a message named “45” would be renamed to “,45” when marked for deletion.

If we look at a directory listing for a bunch of MH mailboxes, we might see something like this:

[lovelace]$ pwd
/mnt/home/dwood/mh_mail/Inbox
[lovelace]$ ls -l
total 288
-rw-r-----   1 dwood    dev         84317 Dec 16 17:21 ,4
-rw-r-----   1 dwood    dev        144308 Dec 16 17:10 1
-rw-r-----   1 dwood    dev         37651 Dec 16 17:10 2
-rw-r-----   1 dwood    dev          9764 Dec 16 17:21 3
-rw-r-----   1 dwood    dev         12345 Dec 16 17:38 5

This shows a directory listing for a mailbox called Inbox in MH format. The directory name is the mailbox name, and each message is held in a separate file. Message number 4 has been marked for deletion but has not yet been expunged (permanently deleted).

This type of mailbox solves many problems when compared to the mbox format. Messages may contain ...

Get Programming Internet Email now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.