From bd9e51a775293c53922f13eb643e27ce83209277 Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Sun, 4 Oct 2009 17:26:44 -0400 Subject: [PATCH] HCoop mailman config --- conf.d/main/20_mailman-macros | 22 ++++++++++++++++++++++ conf.d/router/470_exim4-config_mailman | 14 ++++++++++++++ conf.d/transport/10_exim4-config_mailman | 15 +++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 conf.d/main/20_mailman-macros create mode 100644 conf.d/router/470_exim4-config_mailman create mode 100644 conf.d/transport/10_exim4-config_mailman diff --git a/conf.d/main/20_mailman-macros b/conf.d/main/20_mailman-macros new file mode 100644 index 0000000..38bd7c1 --- /dev/null +++ b/conf.d/main/20_mailman-macros @@ -0,0 +1,22 @@ +# Home dir for your Mailman installation -- aka Mailman's prefix +# directory. +# By default this is set to "/usr/local/mailman" +# On a Red Hat/Fedora system using the RPM use "/var/mailman" +# On Debian using the deb package use "/var/lib/mailman" +# This is normally the same as ~mailman +MAILMAN_HOME=/var/lib/mailman + +# The path of the Mailman mail wrapper script +MAILMAN_WRAP=MAILMAN_HOME/mail/mailman + +# User and group for Mailman, should match your --with-mail-gid +# switch to Mailman's configure script. +# Value is normally "mailman" +MAILMAN_USER=list +MAILMAN_GROUP=list + +# These values are derived from the ones above and should not need +# editing unless you have munged your mailman installation + +# hcoop-change: Used for looking up a user and domain Mailman mapping. +MAILMAN_DB=/etc/exim4/mailmandb diff --git a/conf.d/router/470_exim4-config_mailman b/conf.d/router/470_exim4-config_mailman new file mode 100644 index 0000000..2187fbc --- /dev/null +++ b/conf.d/router/470_exim4-config_mailman @@ -0,0 +1,14 @@ +# hcoop-change: Route mail for mailing lists. + +mailman_router: + driver = accept + domains = +mm_domains + condition = ${lookup{$local_part@$domain}lsearch{MAILMAN_DB}} + local_part_suffix_optional + local_part_suffix = -admin : \ + -bounces : -bounces+* : \ + -confirm : -confirm+* : \ + -join : -leave : \ + -owner : -request : \ + -subscribe : -unsubscribe + transport = mailman_transport diff --git a/conf.d/transport/10_exim4-config_mailman b/conf.d/transport/10_exim4-config_mailman new file mode 100644 index 0000000..db67db6 --- /dev/null +++ b/conf.d/transport/10_exim4-config_mailman @@ -0,0 +1,15 @@ +# hcoop-change: Transport for mailman lists + +mailman_transport: + debug_print = "T: mailman for $local_part@$domain" + driver = pipe + command = MAILMAN_WRAP \ + '${if def:local_part_suffix \ + {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} \ + {post}}' \ + $local_part + current_directory = MAILMAN_HOME + home_directory = MAILMAN_HOME + user = MAILMAN_USER + group = MAILMAN_GROUP + freeze_exec_fail = true -- 2.20.1