Overview

This section gives an overview of MHonArc's command-line options and environment variables. The MHonArc resource file is covered in the section: Resource File. The resource file allows you to specify most of the resources set by environment variables and command-line options, and other resources.


Synopsis

Invoke MHonArc from your Unix shell with the following syntax:

% mhonarc [options] mhfolder...
% mhonarc -mbox [options] mailbox ...
% mhonarc -add [options] < message
% mhonarc -add [options] < mhfolder ...
% mhonarc -add -mbox [options] < mailbox
% mhonarc -single [options] < message > message.html
% mhonarc -single [options] message > message.html
% mhonarc -rmm [options] msg# ...


Options

Any arguments that are not part of the command-line options are treated as mail folders, or mailboxes, containing e-mail messages.

The following options are available:

-add

Add new messages to an existing archive. If no mailbox/folder arguments are given, MHonArc assumes that a SINGLE message is being added to the archive via standard input. Otherwise, MHonArc adds the messages contained in the mailboxes/folders specified.

-dbfile name

Use name for the name of MHonArc database file. The default is ".mhonarc.db". NOTE: You should not override the default name unless absolutely necessary, and you are confident about what you are doing.

-docurl url

Use url as the URL to MHonArc documentation. The default is "http://www.oac.uci.edu/indiv/ehood/mhonarc.html".

-editidx

This option tells MHonArc to rewrite the index page and re-edit all mail messages in the archive. This option is useful if you need to change the layout of the index page and/or messages.

-editidx takes precedence over -add and -single.

-footer filename

Insert contents of filename at the bottom of the index page. See Include Files in Index Page Customization for more information about the footer file.

-header filename

Insert contents of filename at the beginning of the index page. See Include Files in Index Page Customization for more information about the header file.

-help

Print out a help message about MHonArc.

-idxfname name

Sets the name of the main index file to name. The default is "maillist.html".

-mailtourl url

Use url for e-mail address hyperlinks in mail message headers. The url can contain the following variables that get expanded during run-time:

$FROM$
Who the message is from.
$MSGID$
Message ID of the message.
$SUBJECT$
The subject of the message.
$TO$
Destination e-mail address of link.
The default URL is "mailto:$TO$"

The -mailtourl option has no effect if the -nomailto option is specified.

-maxsize #

Set the maxinum number of messages allowed in the archive to #. If messages are added to the archive which would cause the total number of messages to exceed #, older messages (based on sort method) are removed automatically.

-mbox

Treat file arguments as mail(1) mailboxes instead of MH mail folders. This option overrides the -mh option.

-msgsep expression

Use the expression as the Perl regular expression that signifies the message separator in mailbox files. The default expression is "^From " (minus the quotes).

NOTE
There is a space character after the From.

-mh

Treat file arguments as mh(1) mail folders. This option is the default unless the program name is mbox2html.

-nodoc

Do not print link to documentation at end of index page.

-nomailto

Do not convert e-mail addresses in mail headers to mailto hyperlinks.

-nonews

Do not convert newsgroups in the Newsgroups: mail header field to news hyperlinks.

-noreverse

Do not perform a reverse listing of the mail messages in the index page.

-nosort

Do not sort messages by date. Messages will be in the order they appear in the mailboxes/folders. By default, MHonArc sorts messages by date sent/received.

-nosort takes precedence over the -sort option.

-nothread

Do not create a thread index page.

-notreverse

List threads in the thread index with oldest thread first.

-outdir path

Set destination/location of the HTML mail archive to path. By default, the current working directory is used.

-quiet

Suppress processing messages when MHonArc is running.

-rcfile file

Use file as the resource file for MHonArc. See Resource File for more information. There is no default resource file.

-reverse

List messages in reverse order of the sorting option specified. For example, if date sorting is specified, -reverse will cause messages to be listed in reverse chronological order.

-rmm

All non-option command-line arguments are treated as messages to remove from the archive. Messages to remove are denoted by their message numbers.

-single

Convert a single mail message to HTML. The message can be specified by a filename on the command-line, or read from standard input if no file is given. The filtered message is sent to standard output.

The -single option is useful tp convert individual messages to HTML not related to a specific mail archive. Any option related to how message formatting can be used with the -single option.

The -single takes precedence over the -add option.

-scan

List contents of archive to standard output.

-sort

Perform chronological date sorting. This is the default.

-subsort

Sort messages by subject. Subject sorting is case-insensitive, and begining "Re:", "A", "An", and "The" words are ignored.

-tidxfname name

Sets the name of the thread index file to name. The default is "threads.html".

-title string

Set the title of the main index page to string. The default is "Mail Index".

-thread

Create a thread index page. This is the default.

-tlevels

Set the maximum number of nested lists for the thread index page. The default is 3.

-treverse

List threads in the thread index with newest thread first.

-ttitle string

Set the title of the thread index page to string. The default is "Mail Thread Index".

-umask umask

Set the umask of the MHonArc process to umask. The value is treated as an octal number.

NOTE

The -no* options always take precedence over their counterparts. For example, if -noreverse and -reverse are both specified on the command-line, the -noreverse will be applied.


Environment

MHonArc supports the use of environment variables. The environment variables allow you to set default options everytime you invoke MHonArc. The following environment variables may be used:

M2H_DBFILE

Sets the name of MHonArc database file. The default is ".mhonarc.db". You should not override the default name unless absolutely necessary, and you are confident about what you are doing.

M2H_DOCURL

Set the URL used to point to MHonArc documentation. The default is, "http://www.oac.uci.edu/indiv/ehood/mhonarc.html".

M2H_FOOTER

Set the HTML footer file to insert at the bottom of the index page. No default footer file is defined. See Include Files in Index Page Customization for more information about the footer file.

M2H_HEADER

Set the HTML header file to insert at the top of the index page. No default header file is defined. See Include Files in Index Page Customization for more information about the header file.

M2H_IDXFNAME

Set the name of the index file. The default is, "maillist.html".

M2H_LOCKFILE

Set the name of the lock file. The default name use is ".mhonarc.lck". You should not change the default unless absolutely necessary.

See Archive Integrity for more information about the lock file.

M2H_LOCKTRIES

Set the number of time MHonArc tries to lock a mail archive before processing new messages. The default value is 10. MHonArc waits approximately 3 seconds before each try.

See Archive Integrity for more information on the M2H_LOCKTRIES environment variable.

M2H_MAILTOURL

Sets the URL for e-mail address hyperlinks in mail message headers. The URL can contain the following variables that get expanded during run-time:

$FROM$
Who the message is from.
$MSGID$
Message ID of the message.
$SUBJECT$
The subject of the message.
$TO$
Destination e-mail address of link.
The default URL is "mailto:$TO$"

M2H_MAXSIZE

Sets the maximum number of messages that an archive will contain. If messages are added to the archive which would cause the total number of messages to exceed M2H_MAXSIZE, older messages (based on sort method) are removed automatically.

M2H_OUTDIR

Sets the destination/location of the HTML mail archive. The default is the current working directory.

M2H_RCFILE

Specifies the Resource File for MHonArc. No default resource file is defined.

M2H_THREAD

Flag to determine if MHonArc generates a thread index. If set to zero, the thread index will not be created. The default behavior is to create a thread index.

M2H_TIDXFNAME

Sets the name of the thread index file. The default is "threads.html".

M2H_TITLE

Sets the default title of the index page. The default is "Main Index".

M2H_TLEVELS

Sets the maximum number of nested lists for the thread index page. The default is 3.

M2H_TTITLE

Sets the title of the thread index page. The default is "Mail Thread Index".

NOTE

Environment variables may be overriden by the Resource File or command-line Options.


[Prev:Quick Start]
[Next:Resource File]
[ToC]


MHonArc 1.1.0 -- Overview