A shell script for creating web archives for mlmmj mailing lists. Mlmmj-archivist generates the web archives for the public mailing lists.
we need few packages to run this script
also basic UNIX utilities: awk, cat, date, grep, install, sed and, of course, sh.
$git clone https://github.com/eellak/mlmmj-archivist.git
$sed -i -e "s:date --date:gdate --date:g" mlmmj-archivist.sh
what it does:
to run mlmmj-archivist on OpenBSD, GNU date needed. We will replace date in the script with gdate.
After completing the installation you should copy the configuration files mlmmj-archivist.conf.sample to mlmmj-archivist.conf, and mhonarc.mrc.sample to mhonarc.mrc, and tweak to your preference, prior to running the script. Both of the files can be found in /etc/mlmmj-archivist. ( well after installation ).
In mlmmj-archivist.conf change the following lines as your configuration. Dont forget to change the example.org domain to your actual domain.
# the configuration for mlmmj-archivist # # the spool directory for mlmmj _mlmmj_spool="/var/spool/mlmmj" # the web output directory _public_html="/var/www/htdocs/list" # the web url root _public_url="https://list.example.org" # the template name # check /usr/local/share/mlmmj-archivist/templates for available templates _template="default" # the output language in ISO 639-1 (language) and ISO 3166 (country) # format. utf-8 is used by default _language="en_US" # add list metadata (subscribers & messages count) # boolean (true/false) _metadata=true
we need to create archivist directory in each active mailing list directory.
mlmmj-archivist is designed to run from cron in predefined intervals. Since it creates archives incrementally it can be used with frequent intervals in busy hosts with many mailing list messages.
An example crontab entry for running mlmmj-archivist hourly:
5 * * * * /usr/local/bin/mlmmj-archivist