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 any type of characters without being escaped. A limited amount of information may be contained within each filename without rewriting the message itself. However, it is not without problems.

An MUA must be told exactly where to find MH-style mailboxes. It cannot guess because the directory structure is not readily identifiable as a mailbox. Some might also say that the format encourages users to hand-edit mailboxes. The worse problem is simply that it provides no solution to the problem of file locking.

It is interesting to note that most network news transfer protocol (NNTP) servers, such as innd under Unix, use a format very similar to MH. Newsgroup folders are held as a directory structure, equivalent to the type of directory structure used for MH mailbox hierarchies. Each news article is held in its own file, named with an article number.

For example, suppose that a instance of innd holds its news store in the directory /var/news/spool/articles/. Now, if we wish to replicate the newsgroup comp.mail.imap, a directory structure for that group will be created under /var/news/spool/articles/. All articles for comp.mail.imap will be written to separate files under /var/news/spool/articles/comp/mail/imap/.



[12] By “deleted”, I really mean “marked for deletion.” Messages are kept until they are “expunged.” This parlance is more fully explained in Chapter 10, The Post Office Protocol, and Chapter 11.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.143.4