Contents:
Each HTML file that is generated for a message contains (where applicable):
In addition, Hypermail will convert references in each message to email addresses and URLs to hyperlinks so they can be selected. Email addresses can be converted to mailto: URLs or links to a CGI mail program.
To complement each set of HTML messages, four index files are created which sort the articles by date received, thread, subject, and author. Each entry in these index files are links to the individual articles and provide a bird's-eye view of every archived message.
Hypermail was originally developed and designed by Tom Gruber for Enterprise Integration Technologies (EIT) in Common Lisp. It was later rewritten in C by Kevin Hughes while at EIT. Hypermail is now being maintained by Kent Landfield <kent@landfield.com>.
To see what Hypermail can do, take a look at these Hypermail-produced archives:
Usage: hypermail -ipvVux [-m "mbox"] [-l "label"] [-d "dir"] [-a "URL"] [-b "URL"] [-c "file"] Options: -a URL : URL to other archives -b URL : URL to archive information -c file : Configuration file to read in -d dir : The directory to save HTML files in -i : Read messages from standard input -l label: What to name the output archive -m mbox : Mail archive to read in -p : Show progress -v : Show configuration variables and exit -V : Show version information and exit -u : Update archive by one article -x : Overwrite previous messages
Using the flags -z, -h, or -? with Hypermail will display this usage summary.
-i,
-m "mailbox",
-d "directory",
-c "file"
To tell Hypermail what mailbox to read in, use the -m option. If articles will be sent to Hypermail through standard input, use the -i option. Note that the -m and -i options can't be used together! By default, Hypermail will look for a file called mbox to read its articles in from.
The -d option specifies the directory to put the HTML files and index files that are created into. If the directory doesn't exist, a new one will be created with the name that is specified. If the -d option isn't used, Hypermail will look for a directory with the same name as the mailbox or will create one if needed.
example 1: hypermail -m "wu-ftpd" -d "/wu-ftpd" example 2: cat "/var/spool/mail/wu-ftpd" | hypermail -i
Note that Hypermail can only read messages in the UNIX mailbox format! Such archives are typically RFC 822 mail messages appended to each other that look similar to this:
From john@foo.com Mon Jan 1 00:01:30 1994 Date: Mon, 1 Jan 1994 00:01:15 PDT From: john@foo.com To: everyone@foo.com Subject: Hello, world! Hi, everyone, just saying hello! From someone.else@foo.com Mon Jan 1 00:02:00 1994 Date: Mon, 1 Jan 1994 00:01:45 PDT ...
The messages are typically separated by lines in this format:
From wu-ftpd@wugate.wustl.edu Fri Jul 1 00:18:20 1994
The -c option tells Hypermail to read in settings from a configuration file. By default, the program will attempt to read settings from a file called .hmrc in the user's home directory if it exists.
In the configuration file, variables are set in the following manner:
hm_variable = number
The complete set of variables that Hypermail recognizes is described in the Configuration Options section.
hm_variable = "string"
-l "label",
-b "About URL",
-a "Other Archives URL"
The -l option tells Hypermail what to call the archive - the name that is specified will be in the title of the index pages so users know what sort of messages are being archived.
The -a option includes a link labelled "Other mail archives" in the index pages to any specified URL. This way users who are looking at the archive have the opportunity to go to pointers to other mail archives. By default, this will be a pointer to the parent directory in which the archive files reside.
The -b option includes a link labelled "About this archive" in the index pages to any specified URL. This way users who are looking at the archive have the opportunity to go to information about the archive.
example: hypermail -l "WU-FTPD Development Archives" -a "http://www.landfield.com/wu-ftpd/" -b "http://www.landfield.com/wu-ftpd/mail-archive/"
In the index files for the archive, the above setting will produce something like this:
(top of page)WU-FTPD Archives
(list of indexed articles below)
-x,
-u
The -x option tells Hypermail to explicitly overwrite any previous HTML files that may exist. Use this option only when it is desirable to completely rewrite the entire archive.
The -u option tells Hypermail to update the archives by one message only. With this option, only one email message will be read in from a file or standard input. This message will be added to the end of the existing HTML file archive and will be integrated into it by links and cross-references. All archive index files will be regenerated to include the new message.
Important! - If the -u option is used and Hypermail is reading from a mailbox file, Hypermail will assume that the file contains only one article, no matter how many files the mailbox may actually contain. Make sure that Hypermail is given only one article when using this option.
If the mailbox that is being read from is an archive that new messages are always being added to, don't use either of these options. Hypermail will then read in all the messages given it but will only write new messages that have been appended to the mailbox.
example 1: cat "one.letter" | hypermail -i -u -d "/wu-ftpd/mail-archives" example 2: hypermail -i -u -m "one.letter" -d "/wu-ftpd/mail-archives" example 3: hypermail -m "mailbox" -d "/wu-ftpd/mail-archives" -x example 4: hypermail -m "mailbox" -d "/wu-ftpd/mail-archives"
Note that no matter what options are specified, the index files are always rewritten. The date when Hypermail was last run is included in index pages, so it's easy to tell when the archive was last updated.
-p
-v
-V
The -p option shows a progress report as Hypermail reads in and writes out messages - the number of files that Hypermail is reading and writing and the file names of the directory and files created are shown. This information is written to standard output.
The -v option shows the configuration variables and their values that Hypermail would use if it was run with the same configuration file and command line options. This is useful when starting up a new list or modifying a list configuration file. Once the information is displayed, Hypermail terminates and not actual processing occurs.
The -V option prints the Hypermail version information. Once the information is displayed, Hypermail terminates and not actual processing occurs.
setenv HM_MBOX /home/john/my_mailbox setenv HM_FILEMODE 0600
In the configuration file, variables must be in lowercase and separated by their values with an equals (=) sign. Blank lines and lines beginning with the # character are skipped:
hm_mbox = "/home/john/my_mailbox" hm_filemode = 0600While the example uses quotes ("), they is not required when used in the configuration file.
Below is a list of configuration variables that can be defined. Boolean numbers can have the value of 0 or 1.
If defined as "NONE", email addresses will not be converted to links in articles. A possible command one could use is "mailto:$TO", but this could easily be changed to specify a CGI program such as "/cgi-bin/mail?to=$TO". A CGI mail program is included with the source which can be used for this purpose.
hm_show_headers = From,Subject,Date,Message-IDor they can be listed individually or any combination of.
hm_show_headers = From
hm_show_headers = Subject
hm_show_headers = Date
hm_show_headers = Message-ID
hm_inline_types = image/gif image/jpegor
hm_inline_types = image/gif
hm_inline_types = image/jpeg
hm_ignore_types = text/x-vcard application/x-msdownloador
hm_ignore_types = text/x-vcard
hm_ignore_types = application/x-msdownload
Settings are processed in this order:
It is important to note that this is different from many programs. In Hypermail's case what you put on the command line DOES NOT override what is specified in the configuration file. This may change in the future.
Sorting: In the date and thread index files, note that these lists are sorted by the date the articles were received by the system's mail daemon, not by the date they were written on. The order of articles in the date index may not necessarily match the order in which the article files are written and linked together. Because of this, it is a good idea to make sure the mailbox is sorted by date with the most recent messages towards the bottom.
Running Hypermail automatically: All that's needed to start archiving email messages is to set up Hypermail to do incremental updates in your /etc/aliases file. Here's what an entry might look like (the last line is one unbroken line):
#
After adding the entry, make sure newaliases is run to update the
mail aliases. This entry will run Hypermail and update/create the archive whenever
a new message is received. Hypermail also works well as a cron job.
Because sendmail may run Hypermail as different users, you will
want to make sure that archive directories and files are made readable and writeable
by a trusted sendmail user (or read/writable by everyone if you can't do that)
when they are created. This will ensure that there will be no problems incrementally
updating the archive.
# WU-FTPD Mailing List Archives
#
wulist: "|/usr/local/bin/hypermail -i -u -d /wu-ftpd/mail-archive -l \"WU-FTPD Mailing List Archive\""
Including HTML in messages: One can include formatted HTML in message bodies by enclosing the HTML with the <HTML> tag (in either uppercase or lowercase). This tag must be on a line by itself:
This text will not be parsed... <html> this text will be parsed as HTML. </html> This text will not be parsed...
There is no limit to how often the <HTML> tag can be used in an article.
If you are are looking for more information on Hypermail and its features and developmental status, checkout The Hypermail Development Center. Additional documentation and the hypermail development list archives are available there.
Hypermail is available free of charge under GNU Public License. More details about the GPL are available at http://www.fsf.org/copyleft/gpl.html.
The source is available via FTP from ftp.landfield.com/hypermail/hypermail.tar.gz. This is a link to the tar file of the most current version.
The Hypermail Development Center also has beta development versions of hypermail available from time to time.
I'd also like to thank Kevin Hughes for developing the initial C version of Hypermail. Kevin also provided a great deal of assistance with restarting the current hypermail development.
There are a great deal of people that also contributed to Hypermail's development. The Hypermail Development Center Credits page is an attempt to let you know just who they are.
Hypermail development is currently being fostered by <Kent Landfield>.
hypermail(1), hmrc(4), Hypermail List Configuration File. and Customizing Hypermail Pages
Please send any feature requests, bug fixes, and comments on Hypermail to <hypermail-bugs@landfield.com>.
Last updated August 15, 1998