Blame


1 d2d0d371 2023-05-05 jrmu version=pmwiki-2.3.20 ordered=1 urlencoded=1
2 d2d0d371 2023-05-05 jrmu agent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0
3 d2d0d371 2023-05-05 jrmu author=izzyb
4 d2d0d371 2023-05-05 jrmu charset=UTF-8
5 d2d0d371 2023-05-05 jrmu csum=
6 d2d0d371 2023-05-05 jrmu ctime=1683152047
7 d2d0d371 2023-05-05 jrmu host=75.158.138.249
8 d2d0d371 2023-05-05 jrmu name=Openbsd.MlmmjWebArchiver-Draft
9 d2d0d371 2023-05-05 jrmu rev=2
10 d2d0d371 2023-05-05 jrmu targets=Openbsd.Mlmmj
11 d2d0d371 2023-05-05 jrmu text=!Summary%0amlmmj-WebArchiver is a script for publishing the archives of mailing lists using [[openbsd.mlmmj]]. It generates the pages using php to display the mailing list archives of each of the configured mailing lists.%0a%0a!Download%0aThe script can be found here [[https://git.cryptomilk.org/projects/mlmmj-webarchiver.git/]]. %0a%0aThe script itself generates the website pages, so '''DO NOT''' download and install this in /var/www/htdocs. Download it into a directory you will install it from. ~/src, ~/local ~/projects, or similar locations would work.%0a%0aYou'll want to clone it like this:%0a%0a%25commands%25[@%0agit clone https://git.cryptomilk.org/projects/mlmmj-webarchiver.git%0acd mlmmj-webarchiver/%0als -la%0a@]%0a%0aThe output will look something like this:%0a%0a%25output%25[@%0aplanetofnix$ git clone https://git.cryptomilk.org/projects/mlmmj-webarchiver.git %0aCloning into 'mlmmj-webarchiver'...%0aremote: Enumerating objects: 93, done.%0aremote: Counting objects: 100%25 (93/93), done.%0aremote: Compressing objects: 100%25 (92/92), done.%0aremote: Total 93 (delta 47), reused 0 (delta 0), pack-reused 0%0aReceiving objects: 100%25 (93/93), 32.66 KiB | 388.00 KiB/s, done.%0aResolving deltas: 100%25 (47/47), done.%0aplanetofnix$ cd mlmmj-webarchiver/%0aplanetofnix$ ls -la%0atotal 144%0adrwxr-xr-x 4 izzyb izzyb 512 May 3 17:29 .%0adrwxr-xr-x 8 izzyb izzyb 512 May 3 17:28 ..%0adrwxr-xr-x 8 izzyb izzyb 512 May 3 17:29 .git%0a-rw-r--r-- 1 izzyb izzyb 364 May 3 17:29 ChangeLog%0a-rw-r--r-- 1 izzyb izzyb 35147 May 3 17:29 LICENSE%0a-rw-r--r-- 1 izzyb izzyb 1656 May 3 17:29 README%0adrwxr-xr-x 4 izzyb izzyb 512 May 3 17:29 mlmmj-webarchiver%0a-rwxr-xr-x 1 izzyb izzyb 8815 May 3 17:29 mlmmj-webarchiver.sh%0a@]%0a%0aThe README has some basic instructions I found not very useful at first. I'll explain the process clearer here. First thing you want to do is copy the mlmmj-webarchiver folder to /etc/. The mlmmj-webarchiver.sh is a shell script that you setup to run via cron (see below). It should probably go in /usr/local/bin, but I prefer to keep everything together so recommend putting it in /etc/mlmmj-webarchiver.%0a%0a%25commands%25[@%0adoas cp -av mlmmj-webarchiver /etc/%0adoas cp mlmmj-webarchiver.sh /etc/mlmmj-webarchiver/%0adoas chown -R root.daemon /etc/mlmmj-webarchiver%0a@]%0a%0a!!Bug Fix%0aThere is a bug in the script that needs to be fixed. Not sure if its a bug, or just a configuration problem with httpd, but this fixes it. Edit /etc/mlmmj-webarchiver/index.php.newlist and change line 19 as follows:%0a%0a%25config%25[@%0a $archived_months .= "%3ca href=\"$file\">$file%3c/a>%3cbr />\n";%0a%0a change to%0a%0a $archived_months .= "%3ca href=\"$file/index.html\">$file%3c/a>%3cbr />\n";%0a@]%0a%0aYou can make other customization to these files as needed.%0a%0a!!Configuring%0a%0a!!!/etc/mlmmj-webachriver/mlmmj-webarchiver.conf%0aYou should edit /etc/mlmmj-webarchiver/mlmmj-webarchiver.conf and make any changes needed. As a minimum you'll want to change '''WEBARCHIVE_OUT''' to be inside your web servers chroot environment. %0a%0a%25config%25[@%0aWEBARCHIVE_OUT="/var/www/htdocs/mlmmj-webarchiver/"%0a@]%0a%0a!!!/etc/httpd.conf%0aYou'll need to configure /etc/httpd.conf with a section something like this:%0a%0a%25config%25[@%0a# mlmmj-webarchiver Mailing list web archive configuration.%0aserver "archive.ircnow.org" {%0a listen on * tls port 443%0a tls {%0a certificate "/etc/ssl/mail.ircnow.org.fullchain.pem"%0a key "/etc/ssl/private/mail.ircnow.org.key"%0a }%0a location "/.well-known/acme-challenge/*" {%0a root "/acme"%0a request strip 2%0a }%0a location "*.php" {%0a fastcgi socket "/run/php-fpm.sock"%0a }%0a root "/htdocs/mlmmj-webarchiver/"%0a connection max request body 104857600%0a hsts%0a directory {%0a index "index.php"%0a }%0a}%0aserver "archive.ircnow.org" {%0a listen on * port 80%0a%0a location "/.well-known/acme-challenge/*" {%0a root "/acme"%0a request strip 2%0a }%0a location "*.php" {%0a fastcgi socket "/run/php-fpm.sock"%0a }%0a%0a root "/htdocs/mlmmj-webarchiver/"%0a connection max request body 104857600%0a hsts%0a directory {%0a index "index.php"%0a }%0a}%0a# End mlmmj-webarchiver Configuration%0a@]%0a%0a!!!Crontab%0a%0aYou should add the following line to roots crontab%0a%0a%25config%25[@%0a*/10 * * * * /etc/mlmmj-webarchiver/mlmmj-webarchiver.sh 2>&1 >>/var/log/mlmmj-webarchiver.log%0a@]%0a%0aThis will check for new mail or configuration every 10 minutes and update the site accordingly. Output will be logged in /var/log/mlmmj-webarchiver.log%0a%0a!!Adding Lists to the WebArchive.%0a%0aThe README file mentions control files, but doesn't specify that it means in the /var/spool/mlmmj/ directory. You'll find a folder for each mailing list in there, with a folder called control in it. To have the mailing list published, you need to add a file to the control/ directory named ''webarchive''. The file can be empty, which means it will use the default directory configured with '''WEBARCHIVE_OUT''' above. A simple touch would work:%0a%0a%25commands%25[@%0adoas touch /var/spool/mlmmj/codeforce/control/webarchive %0a@]%0a%0aIts probably better to specify a path for clarity even if its redundant like this:%0a%0a%25commands%25[@%0aecho /var/www/htdocs/mlmmj-webachiver/ > /var/spool/mlmmj/codeforce/control/webarchive%0a@]%0a%0aThen you'll know when looking at the file that its related to the mlmmj-webachriver script. You should probably also create an webarchiveprotected file as described in the '''README'''
12 d2d0d371 2023-05-05 jrmu time=1683155267
13 d2d0d371 2023-05-05 jrmu author:1683155267=izzyb
14 d2d0d371 2023-05-05 jrmu diff:1683155267:1683152047:=62,141c62%0a%3c !!Configuring%0a%3c %0a%3c !!!/etc/mlmmj-webachriver/mlmmj-webarchiver.conf%0a%3c You should edit /etc/mlmmj-webarchiver/mlmmj-webarchiver.conf and make any changes needed. As a minimum you'll want to change '''WEBARCHIVE_OUT''' to be inside your web servers chroot environment. %0a%3c %0a%3c %25config%25[@%0a%3c WEBARCHIVE_OUT="/var/www/htdocs/mlmmj-webarchiver/"%0a%3c @]%0a%3c %0a%3c !!!/etc/httpd.conf%0a%3c You'll need to configure /etc/httpd.conf with a section something like this:%0a%3c %0a%3c %25config%25[@%0a%3c # mlmmj-webarchiver Mailing list web archive configuration.%0a%3c server "archive.ircnow.org" {%0a%3c listen on * tls port 443%0a%3c tls {%0a%3c certificate "/etc/ssl/mail.ircnow.org.fullchain.pem"%0a%3c key "/etc/ssl/private/mail.ircnow.org.key"%0a%3c }%0a%3c location "/.well-known/acme-challenge/*" {%0a%3c root "/acme"%0a%3c request strip 2%0a%3c }%0a%3c location "*.php" {%0a%3c fastcgi socket "/run/php-fpm.sock"%0a%3c }%0a%3c root "/htdocs/mlmmj-webarchiver/"%0a%3c connection max request body 104857600%0a%3c hsts%0a%3c directory {%0a%3c index "index.php"%0a%3c }%0a%3c }%0a%3c server "archive.ircnow.org" {%0a%3c listen on * port 80%0a%3c %0a%3c location "/.well-known/acme-challenge/*" {%0a%3c root "/acme"%0a%3c request strip 2%0a%3c }%0a%3c location "*.php" {%0a%3c fastcgi socket "/run/php-fpm.sock"%0a%3c }%0a%3c %0a%3c root "/htdocs/mlmmj-webarchiver/"%0a%3c connection max request body 104857600%0a%3c hsts%0a%3c directory {%0a%3c index "index.php"%0a%3c }%0a%3c }%0a%3c # End mlmmj-webarchiver Configuration%0a%3c @]%0a%3c %0a%3c !!!Crontab%0a%3c %0a%3c You should add the following line to roots crontab%0a%3c %0a%3c %25config%25[@%0a%3c */10 * * * * /etc/mlmmj-webarchiver/mlmmj-webarchiver.sh 2>&1 >>/var/log/mlmmj-webarchiver.log%0a%3c @]%0a%3c %0a%3c This will check for new mail or configuration every 10 minutes and update the site accordingly. Output will be logged in /var/log/mlmmj-webarchiver.log%0a%3c %0a%3c !!Adding Lists to the WebArchive.%0a%3c %0a%3c The README file mentions control files, but doesn't specify that it means in the /var/spool/mlmmj/ directory. You'll find a folder for each mailing list in there, with a folder called control in it. To have the mailing list published, you need to add a file to the control/ directory named ''webarchive''. The file can be empty, which means it will use the default directory configured with '''WEBARCHIVE_OUT''' above. A simple touch would work:%0a%3c %0a%3c %25commands%25[@%0a%3c doas touch /var/spool/mlmmj/codeforce/control/webarchive %0a%3c @]%0a%3c %0a%3c Its probably better to specify a path for clarity even if its redundant like this:%0a%3c %0a%3c %25commands%25[@%0a%3c echo /var/www/htdocs/mlmmj-webachiver/ > /var/spool/mlmmj/codeforce/control/webarchive%0a%3c @]%0a%3c %0a%3c Then you'll know when looking at the file that its related to the mlmmj-webachriver script. You should probably also create an webarchiveprotected file as described in the '''README'''%0a\ No newline at end of file%0a---%0a> !!Configuring%0a\ No newline at end of file%0a
15 d2d0d371 2023-05-05 jrmu host:1683155267=75.158.138.249
16 d2d0d371 2023-05-05 jrmu author:1683152047=izzyb
17 d2d0d371 2023-05-05 jrmu diff:1683152047:1683152047:=1,62d0%0a%3c !Summary%0a%3c mlmmj-WebArchiver is a script for publishing the archives of mailing lists using [[openbsd.mlmmj]]. It generates the pages using php to display the mailing list archives of each of the configured mailing lists.%0a%3c %0a%3c !Download%0a%3c The script can be found here [[https://git.cryptomilk.org/projects/mlmmj-webarchiver.git/]]. %0a%3c %0a%3c The script itself generates the website pages, so '''DO NOT''' download and install this in /var/www/htdocs. Download it into a directory you will install it from. ~/src, ~/local ~/projects, or similar locations would work.%0a%3c %0a%3c You'll want to clone it like this:%0a%3c %0a%3c %25commands%25[@%0a%3c git clone https://git.cryptomilk.org/projects/mlmmj-webarchiver.git%0a%3c cd mlmmj-webarchiver/%0a%3c ls -la%0a%3c @]%0a%3c %0a%3c The output will look something like this:%0a%3c %0a%3c %25output%25[@%0a%3c planetofnix$ git clone https://git.cryptomilk.org/projects/mlmmj-webarchiver.git %0a%3c Cloning into 'mlmmj-webarchiver'...%0a%3c remote: Enumerating objects: 93, done.%0a%3c remote: Counting objects: 100%25 (93/93), done.%0a%3c remote: Compressing objects: 100%25 (92/92), done.%0a%3c remote: Total 93 (delta 47), reused 0 (delta 0), pack-reused 0%0a%3c Receiving objects: 100%25 (93/93), 32.66 KiB | 388.00 KiB/s, done.%0a%3c Resolving deltas: 100%25 (47/47), done.%0a%3c planetofnix$ cd mlmmj-webarchiver/%0a%3c planetofnix$ ls -la%0a%3c total 144%0a%3c drwxr-xr-x 4 izzyb izzyb 512 May 3 17:29 .%0a%3c drwxr-xr-x 8 izzyb izzyb 512 May 3 17:28 ..%0a%3c drwxr-xr-x 8 izzyb izzyb 512 May 3 17:29 .git%0a%3c -rw-r--r-- 1 izzyb izzyb 364 May 3 17:29 ChangeLog%0a%3c -rw-r--r-- 1 izzyb izzyb 35147 May 3 17:29 LICENSE%0a%3c -rw-r--r-- 1 izzyb izzyb 1656 May 3 17:29 README%0a%3c drwxr-xr-x 4 izzyb izzyb 512 May 3 17:29 mlmmj-webarchiver%0a%3c -rwxr-xr-x 1 izzyb izzyb 8815 May 3 17:29 mlmmj-webarchiver.sh%0a%3c @]%0a%3c %0a%3c The README has some basic instructions I found not very useful at first. I'll explain the process clearer here. First thing you want to do is copy the mlmmj-webarchiver folder to /etc/. The mlmmj-webarchiver.sh is a shell script that you setup to run via cron (see below). It should probably go in /usr/local/bin, but I prefer to keep everything together so recommend putting it in /etc/mlmmj-webarchiver.%0a%3c %0a%3c %25commands%25[@%0a%3c doas cp -av mlmmj-webarchiver /etc/%0a%3c doas cp mlmmj-webarchiver.sh /etc/mlmmj-webarchiver/%0a%3c doas chown -R root.daemon /etc/mlmmj-webarchiver%0a%3c @]%0a%3c %0a%3c !!Bug Fix%0a%3c There is a bug in the script that needs to be fixed. Not sure if its a bug, or just a configuration problem with httpd, but this fixes it. Edit /etc/mlmmj-webarchiver/index.php.newlist and change line 19 as follows:%0a%3c %0a%3c %25config%25[@%0a%3c $archived_months .= "%3ca href=\"$file\">$file%3c/a>%3cbr />\n";%0a%3c %0a%3c change to%0a%3c %0a%3c $archived_months .= "%3ca href=\"$file/index.html\">$file%3c/a>%3cbr />\n";%0a%3c @]%0a%3c %0a%3c You can make other customization to these files as needed.%0a%3c %0a%3c !!Configuring %0a\ No newline at end of file%0a
18 d2d0d371 2023-05-05 jrmu host:1683152047=75.158.138.249