From: W. Trevor King Date: Tue, 21 Feb 2012 13:12:56 +0000 (-0500) Subject: Add mlmmj post. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1b4f39a8a00ce1d4b8eeb9632ac1f95128c2d15c;p=blog.git Add mlmmj post. --- diff --git a/posts/mlmmj.mdwn b/posts/mlmmj.mdwn new file mode 100644 index 0000000..74fa626 --- /dev/null +++ b/posts/mlmmj.mdwn @@ -0,0 +1,115 @@ +[mlmmj][] is a nice, clean mailing list manager. [[Postfix]] setup on +[[Gentoo]] is pretty easy, following the [Postfix README][postfix]. +The following assumes you've already got Postfix working. + +Setup +===== + +Install mlmmj: + + # emerge -av mlmmj + +Add a `mlmmj` user, so the list doesn't have to run with `root` permissions: + + # useradd -rmd /dev/null -s /sbin/nologin mlmmj + +Make a spool directory: + + # mkdir /var/spool/mlmmj + # chown mlmmj.mlmmj /var/spool/mlmmj + +Create a mailing list (e.g. `mlmmj-test`): + + # sudo mlmmj-make-ml.sh -c mlmmj:mlmmj -L mlmmj-test + +Use a transport map so Postfix can invoke the mlmmj executables as the +`mlmmj` user. In `/etc/postfix/main.cf`: + + transport_maps = regexp:/var/spool/mlmmj/transport + mlmmj_destination_recipient_limit = 1 + +And in `/var/spool/mlmmj/transport`, add a line for each mailing list. +The following line maps an email regexp (`/^(mlmmj-test).*$/`) to a +transport (`mlmmj`) with a given nexthop address (`mlmmj-test`): + + /^(mlmmj-test).*$/ mlmmj:mlmmj-test + +Add the referenced transport to `/etc/postfix/master.cf`: + + mlmmj unix - n n - - pipe + flags=DORhu user=mlmmj argv=/usr/bin/mlmmj-recieve -F -L /var/spool/mlmmj/$nexthop/ + +The flags are: + +* `D` - Prepend a 'Delivered-To: recipient' header +* `O` - Prepend an 'X-Original-To: recipient' header +* `R` - Prepend a 'Return-Path:'. header +* `h` - fold $nexthop to lowercase +* `u` - fold $recipient to lowercase + +Restart Postfix: + + # /etc/init.d/postfix restart + +Add the maintenance daemon (which will drop permissions automatically) +to the root crontab: + + 0 */2 * * * /usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj + +Configuring the list +==================== + +Set custom headers: + + # cat /var/spool/mlmmj/mlmmj-test/control/customheaders + X-Mailinglist: mlmmj-test + Reply-To: mlmmj-test@example.com + +Set custom footers: + + # cat /var/spool/mlmmj/mlmmj-test/control/customfooters + -- + To unsubscribe send a mail to mlmmj-test+unsubscribe@example.com + +Set a subject prefix (e.g. `Subject: [mlmmj-test] how are we doing?`) + + # echo '[mlmmj-test]' > /var/spool/mlmmj/mlmmj-test/control/prefix + +Make a moderated list: + + # touch /var/spool/mlmmj/mlmmj-test/control/moderated + # echo 'jack@example.com > /var/spool/mlmmj/mlmmj-test/control/moderators + # echo 'jill@example.com >> /var/spool/mlmmj/mlmmj-test/control/moderators + +Command line maintenance +======================== + +Subscribe users: + + # mlmmj-sub -L /var/spool/mlmmj/mlmmj-test/ -a jdoe@example.com + +Unsubscribe users: + + # mlmmj-unsub -L /var/spool/mlmmj/mlmmj-test/ -a jdoe@example.com + +See the other `mlmmj-*` utilities for more goodies. + +Email interface +=============== + +In the following, `listname` should be replaced by the name of the +list. For example, `mlmmj-test` from the examples above. + +* Send mail to the list at `listname@example.com` +* Send off-list mail to the list owner at `listname+owner@example.com` +* Send off-list mail to the list moderators at + `listname+moderators@example.com` +* Subscribe with an empty email to `listname+subscribe@example.com` +* Unsubscribe with an empty email to `listname+unsubscribe@example.com` +* Get help on other features of mlmmj by sending an empty email to + `listname+help@example.com`. + +[mlmmj]: http://mlmmj.org/ +[postfix]: http://mlmmj.org/docs/readme-postfix/ + +[[!tag tags/tools]]