1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <title>HOWTO - Using exim and Mailman together</title>
7 <body bgcolor="#FFFFFF" text="#00005A" link="#FF6600" alink="#FF9933" vlink="#990000">
8 <h1>HOWTO - Using exim and Mailman together</h1>
10 <p>Mailman is a list manager with web front end and built in
11 archiving functions. Details can be found at <a href="http://www.list.org/">http://www.list.org/</a></p>
13 <h2>Mailman configuration</h2>
15 <p>There is no Mailman configuration needed other than the
16 standard options detailed in the Mailman install documentation.
17 The exim configuration is transparent to Mailman. The uid/gid
18 settings for Mailman must match those in the config fragments
21 <h2>Exim configuration</h2>
23 <p>The exim configuration is built so that a list created within
24 Mailman automagically appears to exim without the need for
25 additional alias files etc to be changed.</p>
27 <p>The drawback of this configuration is that it will work poorly
28 on systems supporting lists in several different mail domains -
29 for that matter Mailman itself has poor support for this right
30 now. This may change in the future</p>
32 <p>The configuration file segments included are to be built on top
33 of an already functional exim configuration, which accepts mail
34 for the domain which the list resides in (ie that domain is
35 already in <tt>local_domains</tt> - should this domain be separate
36 from the others handled by this exim, then add the list domain to
37 <tt>local_domains</tt>, add a <tt>domains=my.list.domain</tt>
38 option to each of the directors and you may wish to exclude that
39 domain from the other directors.</p>
41 <p>Your exim configuration also needs a working alias
42 configuration, with entries (within the list domain) for
43 <tt>mailman</tt>, <tt>mailman-request</tt> and
44 <tt>mailman-admin</tt> (plus any other global contact addresses
45 for the list master). These addresses point to a (or some - not
46 necessarily the same for all of these aliases) human rather than
47 being piped into Mailman. You do <b>not</b> need to put per-list
48 entries into the system alias file, and doing so will most likely
49 break things since the user id used for delivery is likely to be
50 incorrect or not set (which causes an exim delivery time config
53 <p>There are 3 config file sections below which need pasting into
54 the appropriate parts of the main exim config file. The first one
55 may also need tailoring to your Mailman configuration</p>
57 <h4>Main config file section</h4>
59 ## Top section of config file - macro definitions
60 ## Tailor these to fit your installation
61 ## pretty much everything else should just fit...
63 # home dir for Mailman
64 MAILMAN_HOME=/home/mailman
65 # wrapper script for mailman
66 MAILMAN_WRAP=MAILMAN_HOME/mail/wrapper
67 # user and group for Mailman
71 <h4>Transports config file section</h4>
75 ## Three transports for list mail, request mail and admin mail
77 ## Mailman is installed in MAILMAN_HOME
78 ## Mailman is configured to be invoked as user exim
81 command = MAILMAN_WRAP post ${lc:$local_part}
82 current_directory = MAILMAN_HOME
83 home_directory = MAILMAN_HOME
87 list_request_transport:
89 command = MAILMAN_WRAP mailcmd ${lc:$local_part}
90 current_directory = MAILMAN_HOME
91 home_directory = MAILMAN_HOME
97 command = MAILMAN_WRAP mailowner ${lc:$local_part}
98 current_directory = MAILMAN_HOME
99 home_directory = MAILMAN_HOME
103 ### end of transports section fragment
105 <h4>Directors config file section</h4>
107 ## Directors section [this deals with local addresses]
109 ## First 2 directors rewrite list-owner or owner-list to list-admin
110 ## This is only done if the list exists.
111 ## List existence checks are done by seeing if the file
112 ## MAILMAN_HOME/lists/<list>/config.db
117 require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
119 new_address = "${lc:$local_part}-admin@${domain}"
123 require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
125 new_address = "${lc:$local_part}-admin@${domain}"
128 ## Next 3 directors direct admin, request and list mail to the appropriate
129 ## transport. List existence is checked as above.
134 require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
135 transport = list_admin_transport
137 list_request_director:
140 require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
141 transport = list_request_transport
145 require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
146 transport = list_transport
148 ## End of directors fragment
149 ## End of config files bits
152 <p>Exim should be configured to allow reasonable volume - ie no
153 setting <tt>max_recipients</tt> down to a silly value, and with normal
154 degrees of security - ie allowing relaying from <tt>127.0.0.1</tt>
155 (thats vital), but pretty much nothing else. Parallel deliveries and
156 other tweaks can also be used. Delay warning messages should be
157 switched off or configured to only happen for non-list mail - unless
158 you like receiving tons of mail when a host is down.</p>
163 <li>Mailman's detection of exim bounces needs improving - it really
164 should make use of the extra header information that exim provides.
165 It also should recognise and deal with or ignore delay warning
166 messages. <i>Mailman 2.0beta does handle exim bounces correctly,
167 but still passes delay warnings to the list administrator</i></li>
169 <li>List existence is checked on whether there is a config.db file
170 for a list. If you delete lists by foul means, be aware of
173 <li>If you are getting exim or Mailman complaining about user ids
174 when you send mail to a list, check that the MAILMAN_UID and
175 MAILMAN_GID match those of Mailman itself. Also make sure you do
176 <b>not</b> have aliases in the main alias file for the list.</li>
179 <h2>Other Tweaks</h2>
181 <p>One solution passed to me for handling virtual domains was -
182 <i>Since I use Mailman in a virtual domain configuration with a
183 separate installation for each virtual domain, I did a slight
184 modification like this:</i></p>
187 ## transport configurations
189 command = "/virtual/${domain}/mailman/mail/wrapper post ${lc:$local_part}"
190 current_directory = /virtual/${domain}/mailman
191 home_directory = /virtual/${domain}/mailman
193 ## and in the director part:
195 require_files = /virtual/${domain}/mailman/lists/${lc:$local_part}/config.db
199 <h2>Exim List Efficiency Tweaks</h2>
201 <p>This is a set of configuration directives I used on the list
202 boxes I admin. Some of these are necessary, others are cosmetic,
203 a few are probably superfluous - they work for me!</p>
205 # definition of injecting IP addresses
206 LOCAL_NETS=127.0.0.1/32
208 # Extra logging data - not necessary but makes the logs more
210 # lookup all hostnames - puts hostnames into log as well as ips
211 host_lookup = 0.0.0.0/0
214 log_file_path = /var/log/exim/%s.log
215 log_received_recipients
216 log_refused_recipients
218 log_smtp_confirmation
220 # RBL settings - these are more severe than I use
221 rbl_domains = rbl.maps.vix.com/reject:relays.mail-abuse.org/reject:dul.maps.vix.com/reject:relays.orbs.org=127.0.0.2,127.0.0.3/reject
222 rbl_hosts = !LOCAL_NETS:0.0.0.0/0
224 recipients_reject_except=postmaster@*:*-admin@*
226 # relay control - from our local network only
227 host_accept_relay = LOCAL_NETS
229 # delay warnings - second line is now default, but earlier versions of
230 # exim need it setting
232 ##delay_warning_condition = "${if match{$h_precedence:}{(?i)bulk|list|junk}{no}{yes}}"
234 # Verify receipient addresses on everything except local injects
235 # DO NOT verify addresses from Mailman - this would slow down
236 # the acceptance of messages dramatically
237 receiver_verify_hosts = !127.0.0.1/8:0.0.0.0/0
240 # performance tweaks - 1st is good for linux, maybe less so for others
241 split_spool_directory
242 remote_max_parallel = 15
245 <h2>List verification</h2>
247 <p>This is how a set of address tests for the exim lists look on a
248 working system. (command lines start with ">")</p>
250 > /usr/sbin/exim -v -bt exim-users
251 exim-users@www.exim.org
252 deliver to exim-users in domain www.exim.org
253 director = list_director, transport = list_transport
255 > /usr/sbin/exim -bt exim-users-request
256 exim-users-request@www.exim.org
257 deliver to exim-users in domain www.exim.org
258 director = list_request_director, transport = list_request_transport
260 > /usr/sbin/exim -bt exim-users-admin
261 exim-users-admin@www.exim.org
262 deliver to exim-users in domain www.exim.org
263 director = list_admin_director, transport = list_admin_transport
266 <address><a href="mailto:Postmaster@exim.org">Nigel Metheringham</a></address>
267 <!-- Created: Mon Aug 25 15:46:41 BST 1997 -->
268 <h4>$Id: mailman.html,v 1.3 2002/06/14 10:42:18 nigel Exp $</h4>