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.
Before we begin
$ doas pkg_add mlmmj
You can also compile from source.
OpenSMTPd and mlmmj, by default, use the delimiter +. For instance, email@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.
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 firstname.lastname@example.org 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>.