From 1663c53b4667000c0002cc79300d0cb7e04b36b3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 13 Nov 2012 11:17:55 -0500 Subject: [PATCH] posts:mlmmj: use virtual aliases to match mailing list addresses Also convert tab indents to spaces. --- posts/mlmmj.mdwn | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) 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: -- 2.26.2