Quick Start

This section will give you a "quick start" on using MHonArc. However, I recommend reading through the entire documentation to take full advantage of all the features of MHonArc.

Converting MH mail folders or Mailbox files

Since MHonArc supports MH mail folders and UUCP/Unix mailbox files, the term "mail folder" will represent the MH mail folder or mailbox file you want to process. To convert your mail folder to an HTML archive, use the following:

% mhonarc path/inbox

Where path represents the path to the directory that contains the mail folder inbox. If you are in the directory that contains inbox, then you can leave out the "path/".

NOTE The "%" represents your shell's prompt.

You may specify more than one mail folder to process on the command-line:

% mhonarc path/inbox1 path/inbox2 ...

You may also specify standard input, "-", as the source of mail folder. This is useful if want to use MHonArc in a pipe:

% mhonarc -- - path/inbox

The "--" (two hyphens) is required to terminate command-line option parsing so "-" will not be treated as the start of an option. The example also illustrates that you can still specify regular mail folders with standard input. In this example, MHonArc will process standard input and then path/inbox.

When MHonArc finishes, the following files will be created:

The actual filenames may differ depending on the settings of various resources.

All the files created will be put into the current working directory, by default. You can control the destination of the output location by using the -outdir option.

% mhonarc -outdir /home/ehood/htmlarchive /home/ehood/mail/inbox

Here is a sample session converting a mail folder:

% mhonarc ~/mail/inbox
Converting messages to .
Reading /mnt/ehood/mail/inbox ..........
Writing mail ...
Writing ./maillist.html ...
Writing ./threads.html ...
Writing database ...
10 messages

By default, MHonArc prints out information about its progress. This can be disable if you specify the -quiet option.

Adding Messages to an Archive

If you have new messages you want to add to an existing archive, you must utilizing the -add command-line option. With the -add, you can do the following:

Adding a mail folder to an archive in the current working directory can be done like the following:

% mhonarc -add <path>/mailfolder

If you are not in the same directory as the archive, then you can specify the location of the archive to add to with the -outdir option.


MHonArc will skip any messages that already exist in the archive. Therefore, MHonArc can be used to rescan the same mail folder and only convert any new messages it finds.

If no mail folder arguments are specified, then MHonArc will attempt to add a single message read in from standard input.


% mhonarc -add < single.msg 

Or, from a pipe:

% cat single.msg | mhonarc -add 

Converting a single message

MHonArc has the ability to process a single mail message independent of creating, or modifying, an archive. To convert a single message to HTML use the -single command-line option. The message to process can be specified by a filename on the command-line, or by reading the message from standard input if no file is specified. The filtered message is sent to standard output. All formatting options apply to the single message as with messages being processed for an archive, with the exception of formatting related specificly to archive processing, like index links and mail thread links.


Input from standard input:

% mhonarc -single < messagefile > file.html

Filename on command-line:

% mhonarc -single messagefile > file.html


98/09/19 18:24:48
Copyright © 1997-1998, Earl Hood, earlhood@usa.net