[Previous][Next][Contents][FAQ][Bugs][Home]

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, plus it give you the capability of completely customizing the HTML output generated by MHonArc.


Synopsis

Invoke MHonArc from your shell with the following syntax:

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


Options

The following options are available:

-add

Add new messages to an existing archive. If no mail 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 mail folders specified.

-dbfile name

Use name for the name of MHonArc database file. The default is ".mhonarc.db" (or "MHONARC.DB" under MS-DOS).

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.

-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.

-force

Override a lock on an archive if attempts to lock fail. I.e. After trying unsuccessfully to lock an archive, MHonArc will still perform the actions requested.

This option is useful to help dealing with locks that are no longer valid (i.e. stale locks). A stale lock can exist if the MHonArc process that created the lock abnormally terminated and could not perform the proper cleanup procedures.

-genidx

Output an index page to standard output based upon the contents of an archive, and utilizing any extra formatting options specified.

-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".

-idxsize #

Set the maximum number of messages listed in the indexes.

-lockdelay #

The sleep time, in seconds, between attempts to lock the archive. The default value is 3.

-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 -locktries options.

-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.

-msgsep expression

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

NOTE

There is a space character after the From.

-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.

-notsubsort

Do not sort threads by subject on 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. MHonArc does the following to determine the location of file:

  1. If its an absolute pathname, use it.
  2. If it is a relative pathname, check for it relative to the current working directory.
  3. Otherwise, check for it relative to the location of the archive.

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.

-savemem

Normally, all messages are stored in memory and then written in one shot. This option causes MHonArc to write the message data as it is processesd. This option will cause a slow down in execution time as more disk I/O required, but it may allow large amounts of data to be processed in a single process if memory is limited.

NOTE

The reason more disk I/O is required is that when the message data is first written, all the archive navigational link information is non-existant. The information required to correctly generate the navigational link information will not exist until all messages are processed. Therefore, each new message file must be reopened to add in the navigational link information after all messages are processed.

-scan

List contents of archive to standard output.

-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.

-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".

-time

Print out total CPU execution time taken when processing messages. Time information is written to standard error.

-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.

-tsubsort

List threads in the thread index by subject.

-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" (or "MHONARC.DB" under MS-DOS).

NOTE

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_IDXSIZE

Sets the maximum number of messages listed in the indexes.

M2H_LOCKFILE

The sleep time, in seconds, between attempts to lock the archive. The default value is 3.

M2H_LOCKFILE

Set the name of the lock file. The default name use is ".mhonarc.lck" (or "MHONARC.LCK" under MS-DOS).

NOTE

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.


[Previous][Next][Contents][FAQ][Bugs][Home]