From: W. Trevor King Date: Tue, 13 Nov 2012 16:17:55 +0000 (-0500) Subject: posts:mlmmj: use virtual aliases to match mailing list addresses X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1663c53b4667000c0002cc79300d0cb7e04b36b3;p=mw2txt.git posts:mlmmj: use virtual aliases to match mailing list addresses Also convert tab indents to spaces. --- diff --git a/posts/mlmmj.mdwn b/posts/mlmmj.mdwn index 74fa626..c18c998 100644 --- a/posts/mlmmj.mdwn +++ b/posts/mlmmj.mdwn @@ -25,14 +25,20 @@ Create a mailing list (e.g. `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 + virtual_alias_maps = hash:/etc/postfix/virtual + transport_maps = hash:/etc/postfix/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`): +In `/etc/postfix/virtual`, add a line for each mailing list. - /^(mlmmj-test).*$/ mlmmj:mlmmj-test + mlmmj-test@example.com example.com--mlmmj-text@localhost.mlmmj + +In `/etc/postfix/transport`, add a line for each mailing list. The +following line maps the virtual address +(`example.com--mlmmj-test@localhost.mlmmj`) to a transport (`mlmmj`) +with a given nexthop address (`mlmmj-test`): + + example.com--mlmmj-test@localhost.mlmmj mlmmj:mlmmj-test Add the referenced transport to `/etc/postfix/master.cf`: @@ -61,9 +67,9 @@ Configuring the list Set custom headers: - # cat /var/spool/mlmmj/mlmmj-test/control/customheaders - X-Mailinglist: mlmmj-test - Reply-To: mlmmj-test@example.com + # cat /var/spool/mlmmj/mlmmj-test/control/customheaders + X-Mailinglist: mlmmj-test + Reply-To: mlmmj-test@example.com Set custom footers: