[Pkg-mailman-hackers] Suggested modifications to README.Exim4.Debian to cater for loop address

Andrew Hodgson andrew at hodgsonfamily.org
Tue May 29 23:02:05 UTC 2012


Thijs Kinkhorst wrote:

>Hi Andrew,

>On Sun, May 27, 2012 15:30, Andrew Hodgson wrote:
>> In the current form, the suggested configuration in the above file 
>> doesn't handle the mailman-loop address, as the wrapper script 
>> doesn't handle the loop address.  I have been using a 
>> router/transport pair for a few months now to cater for this.  For 
>> the record I don't use the Debian provided Mailman package, and still 
>> use the older instructions for integrating Mailman with Postfix found at http://www.exim.org/howto/mailman21.html.
>> However, I have a suggested router/transport pair that could go into 
>> the README file if required.  If you think that this isn't worth 
>> bothering with, or an alternative way is better, I would be interested to see this.

>Thanks for the suggestion. I'm not an Exim user so I cannot really judge the pros and cons of this, but I guess from reading the code that it won't >hurt. I've committed it to the readme. If other readers of this list that know more about Exim object or want to improve it, by all means, go >ahead!

OK, wasn't expecting that so quick!  I have made some more changes to the suggested config, namely removing the -loop suffixes from the Mailman router, and also making the Mailman loop router a bit more robust by checking the list config file in the same way the workaround router does.

Patch below:

andrew at samwise:~$ cat *.patch
--- README.Exim4.Debian 2012-05-29 23:47:44.000000000 +0100
+++ README.Exim4.Debian.new     2012-05-29 23:47:04.000000000 +0100
@@ -44,8 +44,10 @@
 # switch to Mailman's configure script.
 MAILMAN_USER=list
 MAILMAN_GROUP=daemon
-----------------------  END EXIM4 MAIN    ----------------------------

+# Where to store messages sent to mailman-loop - used if the mailman-owner address bounces.
+MAILMAN_LOOP=MAILMAN_HOME/data/owner-bounces.mbox
+----------------------  END EXIM4 MAIN    ----------------------------

 Put this in your exim4 router configuration (if you use a split  config, then for example /etc/exim4/conf.d/router/970_local_mailman)
@@ -65,10 +67,22 @@
   local_part_suffix = -bounces : -bounces+* : \
            -confirm+* : -join : -leave : \
            -subscribe : -unsubscribe : \
-           -owner : -request : -admin : -loop
+           -owner : -request : -admin
   transport = mailman_transport
   group = MAILMAN_GROUP

+# We need to handle the mailman-loop separately from the other 
+addresses # since the loop action is not handled by the wrapper.
+mailman_loop_router:
+  debug_print = "R: mailman_loop for $local_part@$domain"
+  domains = +local_domains
+  require_files = MAILMAN_HOME/lists/$local_part/config.pck
+  driver = accept
+  local_parts = mailman
+  transport = mailman_loop_transport
+  local_part_suffix = -loop
+  group = MAILMAN_GROUP
+
 # Mailman lists
 mailman_router:
   debug_print = "R: mailman_router for $local_part@$domain"
@@ -80,7 +94,7 @@
   local_part_suffix = -bounces : -bounces+* : \
                       -confirm+* : -join : -leave : \
                       -subscribe : -unsubscribe : \
-                      -owner : -request : -admin : -loop
+                      -owner : -request : -admin
   transport = mailman_transport
   group = MAILMAN_GROUP
 ----------------------  END EXIM4 ROUTER  ---------------------------- @@ -102,6 +116,15 @@
   user = MAILMAN_USER
   group = MAILMAN_GROUP
   freeze_exec_fail = true
+
+mailman_loop_transport:
+  driver = appendfile
+  file = MAILMAN_LOOP
+  delivery_date_add
+  envelope_to_add
+  return_path_add
+  user = MAILMAN_USER
+  group = MAILMAN_GROUP
 ----------------------  END EXIM4 TRANSPORT  -------------------------

 You are done!

---
Thanks.
Andrew.



More information about the Pkg-mailman-hackers mailing list