Skip to content

Archive

(:Title Mlmmj Web Archive:)

WARNING: This setup is kind of buggy, so it's recommended to make a backup of the mailing list messages before beginning.

Hypermail

To implement a Web Archive of the mailing list we'll use Hypermail.

Hypermail is a free (GPL) program to convert email from Unix mbox format to HTML.

Install Hypermail

To install Hypermail, type:

$ doas pkg_add hypermail-2.3.0

Documentation

Read the documentation and the [ FAQ. Read the documentation and the [ FAQ.

Web Archive

We'll use the update-archive.sh script that will be responsible for passing the mailing list messages to Hypermail, that will generate the HTML files from the mailing list messages.

Attach:update-archive.txt

We'll need to modify the script to change owner and group of the mailing list archive web directory by changing the line "chown apache:apache -R $WWWDIR" to "chown -R root:daemon $WWWDIR".

We'll need to install GNU coreutils to be able to use the seq command (gseq, in this case):

$ doas pkg_add coreutils

We'll need to modify the script by replacing seq with gseq.

Then we'll create the Web directory for the mailing list archive:

$ doas mkdir -p /var/www/htdocs/example.com/mailing-list-name

Replace example.com and mailing-list-name.

Then we'll need to create two auxiliary files used by the update-archive script:

$ doas touch /var/www/htdocs/example.com/mailing-list-name/last
$ doas touch /var/spool/mlmmj/mailing-list-name/index

Replace example.com and mailing-list-name.

Afterwards we'll add the execution of the update-archive.sh script to crontab using:

$ doas crontab -e

and we'll add the following line:

*/30 * * * * /path/to/update-archive.sh <name_of_the_list> <HTML_files_output_directory> <mailing_list_directory> 2>&1

For example:

*/30 * * * * /usr/local/bin/update-archive.sh mailing-list-name /var/www/htdocs/example.com/mailing-list-name /var/spool/mlmmj/mailing-list-name

Replace mailing-list-name with your real list name.

With this line the script responsible for updating the archive will run every 30 minutes.

Known bugs:

  • The last message may get indexed twice.[[<<]]

  • The last message page shows the link "Next message" many times at the top and bottom of the page.