HCoop mailman config
authorClinton Ebadi <clinton@unknownlamer.org>
Sun, 4 Oct 2009 21:26:44 +0000 (17:26 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Sun, 4 Oct 2009 21:26:44 +0000 (17:26 -0400)
conf.d/main/20_mailman-macros [new file with mode: 0644]
conf.d/router/470_exim4-config_mailman [new file with mode: 0644]
conf.d/transport/10_exim4-config_mailman [new file with mode: 0644]

diff --git a/conf.d/main/20_mailman-macros b/conf.d/main/20_mailman-macros
new file mode 100644 (file)
index 0000000..38bd7c1
--- /dev/null
@@ -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 (file)
index 0000000..2187fbc
--- /dev/null
@@ -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 (file)
index 0000000..db67db6
--- /dev/null
@@ -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