version=pmwiki-2.2.130 ordered=1 urlencoded=1 agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0 author=Hawk charset=UTF-8 csum= ctime=1641490831 host=2001:8a0:6813:4501:2192:2334:8768:6e2b name=Mlmmj.Archive rev=2 targets= text=(:Title Mlmmj Web Archive:)%0a%0a'''WARNING''': This setup is kind of buggy, so it's recommended to make a backup of the mailing list messages before beginning.%0a%0a!! Hypermail%0a%0aTo implement a Web Archive of the mailing list we'll use Hypermail.%0a%0aHypermail is a free (GPL) program to convert email from Unix mbox format to HTML.%0a%0a!!! Install Hypermail%0a%0aTo install Hypermail, type:%0a[@ %0a$ doas pkg_add hypermail-2.3.0 %0a@]%0a%0a!!! Documentation%0a%0aRead the [[http://hypermail-project.org/hypermail.html | documentation]] and the [[http://hypermail-project.org/hypermail-faq.html | FAQ]].%0a%0a!! Web Archive%0a%0aWe'll use the [[http://www.leopold.dk/~martin/stuff/update-archive.sh | 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. %0a%0aAttach:update-archive.txt%0a%0aWe'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".%0a%0aWe'll need to install GNU coreutils to be able to use the seq command (gseq, in this case):%0a%0a[@%0a$ doas pkg_add coreutils%0a@]%0a%0aWe'll need to modify the script by replacing seq with gseq.%0a%0aThen we'll create the Web directory for the mailing list archive:%0a[@ %0a$ doas mkdir -p /var/www/htdocs/example.com/mailing-list-name%0a@]%0a%0aReplace example.com and mailing-list-name.%0a%0aThen we'll need to create two auxiliary files used by the update-archive script:%0a%0a[@%0a$ doas touch /var/www/htdocs/example.com/mailing-list-name/last%0a$ doas touch /var/spool/mlmmj/mailing-list-name/index%0a@]%0a%0aReplace example.com and mailing-list-name.%0a%0aAfterwards we'll add the execution of the update-archive.sh script to crontab using:%0a%0a[@%0a$ doas crontab -e%0a@]%0a%0aand we'll add the following line:%0a%0a[@%0a*/30 * * * * /path/to/update-archive.sh %3cname_of_the_list> %3cHTML_files_output_directory> %3cmailing_list_directory> 2>&1%0a@]%0a%0aFor example:%0a%0a[@%0a*/30 * * * * /usr/local/bin/update-archive.sh mailing-list-name /var/www/htdocs/example.com/mailing-list-name /var/spool/mlmmj/mailing-list-name%0a@]%0a%0aReplace mailing-list-name with your real list name.%0a%0aWith this line the script responsible for updating the archive will run every 30 minutes.%0a%0a%0aKnown bugs:%0a%0a- The last message may get indexed twice.[[%3c%3c]]%0a- The last message page shows the link "Next message" many times at the top and bottom of the page. time=1641509571 title=Mlmmj Web Archive author:1641509571=Hawk diff:1641509571:1641490831:=1,2d0%0a%3c (:Title Mlmmj Web Archive:)%0a%3c %0a21,22d18%0a%3c %0a%3c !! Web Archive%0a host:1641509571=2001:8a0:6813:4501:2192:2334:8768:6e2b author:1641490831=Hawk diff:1641490831:1641490831:=1,76d0%0a%3c '''WARNING''': This setup is kind of buggy, so it's recommended to make a backup of the mailing list messages before beginning.%0a%3c %0a%3c !! Hypermail%0a%3c %0a%3c To implement a Web Archive of the mailing list we'll use Hypermail.%0a%3c %0a%3c Hypermail is a free (GPL) program to convert email from Unix mbox format to HTML.%0a%3c %0a%3c !!! Install Hypermail%0a%3c %0a%3c To install Hypermail, type:%0a%3c [@ %0a%3c $ doas pkg_add hypermail-2.3.0 %0a%3c @]%0a%3c %0a%3c !!! Documentation%0a%3c %0a%3c Read the [[http://hypermail-project.org/hypermail.html | documentation]] and the [[http://hypermail-project.org/hypermail-faq.html | FAQ]].%0a%3c %0a%3c We'll use the [[http://www.leopold.dk/~martin/stuff/update-archive.sh | 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. %0a%3c %0a%3c Attach:update-archive.txt%0a%3c %0a%3c 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".%0a%3c %0a%3c We'll need to install GNU coreutils to be able to use the seq command (gseq, in this case):%0a%3c %0a%3c [@%0a%3c $ doas pkg_add coreutils%0a%3c @]%0a%3c %0a%3c We'll need to modify the script by replacing seq with gseq.%0a%3c %0a%3c Then we'll create the Web directory for the mailing list archive:%0a%3c [@ %0a%3c $ doas mkdir -p /var/www/htdocs/example.com/mailing-list-name%0a%3c @]%0a%3c %0a%3c Replace example.com and mailing-list-name.%0a%3c %0a%3c Then we'll need to create two auxiliary files used by the update-archive script:%0a%3c %0a%3c [@%0a%3c $ doas touch /var/www/htdocs/example.com/mailing-list-name/last%0a%3c $ doas touch /var/spool/mlmmj/mailing-list-name/index%0a%3c @]%0a%3c %0a%3c Replace example.com and mailing-list-name.%0a%3c %0a%3c Afterwards we'll add the execution of the update-archive.sh script to crontab using:%0a%3c %0a%3c [@%0a%3c $ doas crontab -e%0a%3c @]%0a%3c %0a%3c and we'll add the following line:%0a%3c %0a%3c [@%0a%3c */30 * * * * /path/to/update-archive.sh %3cname_of_the_list> %3cHTML_files_output_directory> %3cmailing_list_directory> 2>&1%0a%3c @]%0a%3c %0a%3c For example:%0a%3c %0a%3c [@%0a%3c */30 * * * * /usr/local/bin/update-archive.sh mailing-list-name /var/www/htdocs/example.com/mailing-list-name /var/spool/mlmmj/mailing-list-name%0a%3c @]%0a%3c %0a%3c Replace mailing-list-name with your real list name.%0a%3c %0a%3c With this line the script responsible for updating the archive will run every 30 minutes.%0a%3c %0a%3c %0a%3c Known bugs:%0a%3c %0a%3c - The last message may get indexed twice.[[%3c%3c]]%0a%3c - The last message page shows the link "Next message" many times at the top and bottom of the page.%0a\ No newline at end of file%0a host:1641490831=2001:8a0:6813:4501:2192:2334:8768:6e2b