Adding a new Hypermail Archive

The most common maintenance procedure with Hypermail is adding new lists to be archived. This page covers the steps required. All files and directories should be owned by hmail, group datacomm. Using 'su' to become the hmail user while performing the steps below is an easy way to ensure this.

Create a new hypermail configuration file

The individual hypermail configuration files are located in ~hmail/configs and are named hmrc.[listname]. It's easiest to just copy one of the existing config files and modify it. There are three main things which need to be modified in the config file.

Create the new HTML header file

These are located in ~hmail/headers_and_footers. Once again, it's easiest to simply copy an existing one and modify it. Usually, just changing the description of the mailing list is all that's needed.

Created the archive directory and index

Create the directory path which was specified in the hm_dir option of the configuration file. Also create an index file for the mailing list. This is usually in the parent directory which holds the mailing list archives. Most often, this will be a file named [listname].html in /usr/web/nets/archives/internal/mailing-lists but there are exceptions. Once again, copying an existing file and modifying it is easiest.

Configure procmail to begin archiving

Procmail is used to actually run hypermail with the proper configuration file based upon the header contents of the message. This is configured via the file ~hmail/.procmailrc. Once again, it's easiest to crib off of other rules. Most lists have two rules. Once which is invoked if the email is To: the list, the other if the email is Cc:'d to the list. Here is an example for the "csac" mailing list:

:0 c
* ^To.*\< csac[ @\n]
|/usr/local/bin/hypermail -i -c $HOME/configs/hmrc.csac

:0 c
* ^Cc.*\< csac[ @\n]
|/usr/local/bin/hypermail -i -c $HOME/configs/hmrc.csac

    
Creating a new rule is just a matter of changing the regexp in the second line, and changing the configuration file in the third line. Some rules are more involved and include some negative expressions. This is an example for the net-changes list. Since we archive those in their own archive, we don't want them getting stuck in the nets archive. Hence a rule like this:
:0 c
* ^To.*\< net-changes
* !^To.*\< nets[ @\n]
* !^Cc.*\< nets[ @\n]
|/usr/local/bin/hypermail -i -c $HOME/configs/hmrc.nets
    
Depending on the list, this may be appropriate. Anything which has not been archived by the time it gets through all the rules will not get archived. In addition, an email will get put in the archive of every rule it matches. So if an email is sent to 'nets', and cc'd to 'bpop', it will be placed in both archives.

Ensure that hmail receives a copy of the mail

In order for the email to get archived, a copy of it needs to be sent to 'hmail@netserver'. Some of the NETS email lists already include this address explicitly, such as 'ne'. Others, such as 'bpop' include it implicitly by including another email list, 'ne' in the case of 'bpop'.

Update the monthly cron job

Once a month, the hmail user executes the perl script ~hmail/hypermailmonthly.pl This script updates the various configuration and HTML files to handle the grouping of the archives on a monthly basis. There are two things to check in this script.
  1. Ensure the list name is added to the @lists array at the start of the file. This will cause the rotation script to process it.
  2. Check the logic later in the script to see if it applies to the new mailing list. In short, the script automatically handles any mailing list which is archived in /usr/web/nets/archives/internal/mailing-lists/. If the list is being archived in a different directory, it's name will need to either be added to an existing elsif clause, or have a new elsif clause created.

Test the list.

Send an email to the list, and see if it gets archived.

Add the list to the mailing-list index page.

Once you are sure the archive is working, and has a message in it, add it to the global mailing list index page so that other users can find it. For most lists, this is /usr/web/nets/mailing-lists/index.html. However, it may be someplace else in special cases.