1
Here's a way to integrate mailman with Exim4 that will automatically
2
play nice with mailman's virtual domains support and VERP. It does not
3
require dedicating domain(s) to mailman.
5
Configure your Mailman (in /etc/mailman/mm_cfg.py) with:
8
POSTFIX_ALIAS_CMD = '/bin/true'
9
POSTFIX_MAP_CMD = 'chgrp Debian-exim'
11
and list all your Mailman domains in "POSTFIX_STYLE_VIRTUAL_DOMAINS".
13
Put this in your exim4 main configuration (if you use a split config,
14
for example /etc/exim4/conf.d/main/04_local_mailman_macros)
16
---------------------- BEGIN EXIM4 MAIN ----------------------------
17
# Home dir for your Mailman installation -- aka Mailman's prefix
19
MAILMAN_HOME=/var/lib/mailman
20
MAILMAN_WRAP=MAILMAN_HOME/mail/mailman
22
# User and group for Mailman, should match your --with-mail-gid
23
# switch to Mailman's configure script.
26
---------------------- END EXIM4 MAIN ----------------------------
29
Put this in your exim4 router configuration (if you use a split
30
config, then for example /etc/exim4/conf.d/router/970_local_mailman)
32
---------------------- BEGIN EXIM4 ROUTER ----------------------------
33
# Messages get sent out with
34
# envelope from "mailman-bounces@virtual_domain"
35
# But mailman doesn't put such addresses
36
# in the aliases. Recognise these here.
38
domains = +local_domains
39
require_files = MAILMAN_HOME/lists/$local_part/config.pck
42
local_part_suffix_optional
43
local_part_suffix = -bounces : -bounces+* : \
44
-confirm+* : -join : -leave : \
45
-owner : -request : -admin
46
transport = mailman_transport
51
domains = +local_domains
52
condition = ${lookup{$local_part@$domain}lsearch{MAILMAN_HOME/data/virtual-mailman}{1}{0}}
53
require_files = MAILMAN_HOME/lists/$local_part/config.pck
55
local_part_suffix_optional
56
local_part_suffix = -bounces : -bounces+* : \
57
-confirm+* : -join : -leave : \
58
-owner : -request : -admin
59
transport = mailman_transport
61
---------------------- END EXIM4 ROUTER ----------------------------
63
Put this in your exim4 transport configuration (if you use a split
64
config, then for example /etc/exim4/conf.d/transport/40_local_mailman)
66
---------------------- BEGIN EXIM4 TRANSPORT -------------------------
69
command = MAILMAN_WRAP \
70
'${if def:local_part_suffix \
71
{${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} \
74
current_directory = MAILMAN_HOME
75
home_directory = MAILMAN_HOME
78
freeze_exec_fail = true
79
---------------------- END EXIM4 TRANSPORT -------------------------