Installing mlmmj
mlmmj (Mailing List Management Made Joyful) is a simple and lightweight mailing list manager. It is MIT-licensed and written in C. It works with OpenSMTPd and requires no daemons so it can run on very small servers. Also see mlmmj-WebArchiver for a simple script that generates and updates a web archive site for mailing lists you want to publish to the web.
Requirements
You will need to configure and test OpenSMTPd.
Install
$ doas pkg_add mlmmj
You can also compile from source.
Documentation
Consult /usr/local/share/doc/mlmmj/README
OpenSMTPd and mlmmj, by default, use the delimiter +. For instance, mlmmj-test+subscribe@example.com accepts request to subscribe to the mlmmj-test email list. No special configuration is required.
To create an initial mailing list, we first create a directory for mlmmj, then run mlmmj-make-ml:
$ doas mkdir /var/spool/mlmmj $ doas chown _smtpd:_smtpd /var/spool/mlmmj/ $ doas -u _smtpd mlmmj-make-ml Creating Directorys below /var/spool/mlmmj. Use '-s spooldir' to change What should the name of the Mailinglist be? [mlmmj-test] : The Domain for the List? [] : example.com The emailaddress of the list owner? [postmaster] : postmaster
Replace mlmmj-test and example.com with your real list name and domain.
For each mailing list, add an entry into /etc/mail/virtuals (see aliases(5) and smtpd.conf(5)):
mlmmj-test: "|/usr/local/bin/mlmmj-receive -L /var/spool/mlmmj/mlmmj-test/"
Replace mlmmj-test with your real list name.
Create a log file:
$ doas touch /var/log/mlmmj.log
Then run this command once:
/usr/local/bin/mlmmj-maintd -F -d /var/spool/mlmmj/ >>/var/log/mlmmj.log 2>&1
Then add the task to your crontab:
0 */2 * * * /usr/local/bin/mlmmj-maintd -F -d /var/spool/mlmmj/ >>/var/log/mlmmj.log 2>&1
NOTE: mlmmj sends email from 127.0.0.1, which should be added to /etc/mail/hosts; localhost is not enough.
To sign up to the mailing list, simply email mlmmj-test+subscribe@example.com
Replace mlmmj-test
with your list name, and example.com
with your domain name.
List files are located at /var/spool/mlmmj/<mailing-list-name>
.
Options
Options are controlled by the existence and content of files in each mailing lists spool directory; specifically the in the control sub-directory. So for a list named support, you'll find its config in /var/spool/mlmmj/support/control/
1. Allow anyone to post
By default, lists require posters to be on the list to post. If you want a public list that allows anyone to post you need to create an access rule that allows this. Full details on access rules can be found in the system documents in /usr/local/share/doc/mlmmj/README.access.
Given the example of a list named support@ you want anyone to be able to post to, you'll create the file /var/spool/mlmmj/support/control/access to look like this:
send
That's it - it overrides the default subonlypost option. README.access covers more advanced use of the access file.
2. Web Archive
There are a couple of options for creating a web archives as covered in the /user/local/share/doc/mlmmj/README.archives file. Instructions for deploying the mlmmj-webarchiver solution can be found here