This blurb will give you a "quick start" on using MHonArc.
MHonArc converts "raw" e-mail-list archives into an html format suitable for display on a Web page.
The "raw" archive for your mailing list, as created either by majordomo's archiving function or by storing mail messages to folders via a Unix mail-processing program, consists of some number of Unix-style mail folders. We will use the term "mail folder" to refer to any of these "raw" archive files that you want to process via MHonArc.
To use MHonArc, to have to be logged on to a Unix shell on Panix.
| NOTE | In what follows, the notation "shell>" represents your shell's prompt. |
To convert your mail folder to an HTML archive, use the following:
shell> mhonarc path/folder
Where path represents the path to the directory that contains the mail folder folder. If the folder is in the current directory, you can leave out "path/".
You may specify more than one mail folder to process:
shell> mhonarc path/folder1 path/folder2 ...
MHonArc creates the following files:
maillist.html: The main index file, containing links to all the converted mail messages. Messages are listed by subject and by sender, in chronological order.
threads.html: A listing of the messages by thread.
msg*.html: HTML versions of the actual
mail messages; * represents a unique message number
assigned by MHonArc.
.mhonarc.db A database file used internally by MHonArc in adding new mail messages to the archive.
Other: Depending on the content-types of the e-mail messages converted, other files may be created for images, videos, binaries, etc.
The actual filenames may differ depending on the settings of various resources.
By default, all the files created will be put into the current working directory. You can control the destination of the output files by using the -outdir option.
shell> mhonarc -outdir /home/ehood/htmlarchive /home/ehood/mail/folder
Here is a sample session converting a mail folder:
shell> mhonarc ~/mail/folder Converting messages to . Reading /mnt/ehood/mail/folder .......... Writing mail ... Writing ./maillist.html ... Writing ./threads.html ... Writing database ... 10 messages
By default, MHonArc prints out information about its progress. This can be disabled with the -quiet option.
If you want to add new messages to an existing archive, you can use the -add command-line option. With -add, you can do the following:
Add a mail folder to an archive, or
Add a single message to an archive.
Adding a mail folder to an archive located in the current directory can be done as follows:
shell> mhonarc -add <path>/folder
If the archive is not located in the current directory, you can specify the location of the archive with the -outdir option.
| NOTE | MHonArc will skip any messages that already exist in the archive. Thus, MHonArc can be used to rescan a previously-processed mail folder and convert only the new messages. |
If no folder arguments are specified, MHonArc will attempt to add a single message read from standard input.
Example
shell> mhonarc -add < single.msg
Or, from a pipe:
shell> cat single.msg | mhonarc -add
MHonArc has the ability to convert to HTML a single mail message without creating, or modifying, an archive -- or any other files. 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; if no filename is specified, the message will be read from standard input. The coverted message is sent to standard output.
Examples
shell> mhonarc -single < messagefile > file.html
shell> mhonarc -single messagefile > file.html