Base version of exim docs at 22 May 2000
[exim-website.git] / howto / mailman.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3   <head>
4     <title>HOWTO - Using exim and mailman together</title>
5   </head>
6
7   <body bgcolor="#FFFFFF" text="#00005A" link="#FF6600" alink="#FF9933" vlink="#990000">
8     <h1>HOWTO - Using exim and mailman together</h1>
9
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>
12
13     <h2>Mailman configuration</h2>
14
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
19     given below.</p>
20
21     <h2>Exim configuration</h2>
22
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>
26
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>
31
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>
40
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.</p>
46
47     <p>There are 3 config file sections below which need pasting into
48     the appropriate parts of the main exim config file.  The first one
49     may also need tailoring to your mailman configuration</p>
50
51     <h4>Main config file section</h4>
52 <pre>
53 ## Top section of config file - macro definitions
54 ## Tailor these to fit your installation
55 ## pretty much everything else should just fit...
56 ##
57 # home dir for mailman
58 MAILMAN_HOME=/home/mailman
59 # wrapper script for mailman
60 MAILMAN_WRAP=MAILMAN_HOME/mail/wrapper
61 # user and group for mailman
62 MAILMAN_UID=exim
63 MAILMAN_GID=exim
64 </pre>
65     <h4>Transports config file section</h4>
66 <pre>
67 ## Transports section
68 ##
69 ## Three transports for list mail, request mail and admin mail
70 ## respectively
71 ## Mailman is installed in MAILMAN_HOME
72 ## Mailman is configured to be invoked as user exim
73 list_transport:
74            driver = pipe
75            command = MAILMAN_WRAP post ${lc:$local_part}
76            current_directory = MAILMAN_HOME
77            home_directory = MAILMAN_HOME
78            user = MAILMAN_UID
79            group = MAILMAN_GID
80
81 list_request_transport:
82            driver = pipe
83            command = MAILMAN_WRAP mailcmd ${lc:$local_part}
84            current_directory = MAILMAN_HOME
85            home_directory = MAILMAN_HOME
86            user = MAILMAN_UID
87            group = MAILMAN_GID
88
89 list_admin_transport:
90            driver = pipe
91            command = MAILMAN_WRAP mailowner ${lc:$local_part}
92            current_directory = MAILMAN_HOME
93            home_directory = MAILMAN_HOME
94            user = MAILMAN_UID
95            group = MAILMAN_GID
96
97 ### end of transports section fragment
98 </pre>
99     <h4>Directors config file section</h4>
100 <pre>
101 ## Directors section [this deals with local addresses]
102 ## 
103 ## First 2 directors rewrite list-owner or owner-list to list-admin
104 ## This is only done if the list exists.
105 ## List existence checks are done by seeing if the file
106 ## MAILMAN_HOME/lists/<list>/config.db
107 ## exists.  
108
109 list_owner_director:
110    driver = smartuser
111    require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
112    suffix = "-owner"
113    new_address = "${lc:$local_part}-admin@${domain}"
114
115 owner_list_director:
116    driver = smartuser
117    require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
118    prefix = "owner-"
119    new_address = "${lc:$local_part}-admin@${domain}"
120
121 ##
122 ## Next 3 directors direct admin, request and list mail to the appropriate
123 ## transport.  List existence is checked as above.
124
125 list_admin_director:
126    driver = smartuser
127    suffix = -admin
128    require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
129    transport = list_admin_transport
130
131 list_request_director:
132    driver = smartuser
133    suffix = -request
134    require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
135    transport = list_request_transport
136
137 list_director:
138    driver = smartuser
139    require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db
140    transport = list_transport
141
142 ## End of directors fragment
143 ## End of config files bits
144 </pre>
145
146 <p>Exim should be configured to allow reasonable volume - ie no
147 setting <tt>max_recipients</tt> down to a silly value, and with normal
148 degrees of security - ie allowing relaying from <tt>127.0.0.1</tt>
149 (thats vital), but pretty much nothing else.  Parallel deliveries and
150 other tweaks can also be used.  Delay warning messages should be
151 switched off or configured to only happen for non-list mail - unless
152 you like receiving tons of mail when a host is down.</p>
153
154 <h3>Problems</h3>
155 <ul>
156
157    <li>Mailman's detection of exim bounces needs improving - it really
158    should make use of the extra header information that exim provides.
159    It also should recognise and deal with or ignore delay warning
160    messages.</li>
161
162    <li>List existence is checked on whether there is a config.db file
163    for a list.  If you delete lists by foul means, be aware of
164    this.</li>
165 </ul>
166
167     <h2>Other Tweaks</h2> 
168
169     <p>One solution passed to me for handling virtual domains was -
170     <i>Since I use mailman in a virtual domain configuration with a
171     separate installation for each virtual domain, I did a slight
172     modification like this:</i></p>
173
174 <pre>
175 ## transport configurations
176
177 command = "/virtual/${domain}/mailman/mail/wrapper post ${lc:$local_part}"
178 current_directory = /virtual/${domain}/mailman
179 home_directory = /virtual/${domain}/mailman
180
181 ## and in the director part:
182
183 require_files = /virtual/${domain}/mailman/lists/${lc:$local_part}/config.db
184
185 </pre>
186
187     <hr>
188     <address><a href="mailto:Postmaster@exim.org">Nigel Metheringham</a></address>
189 <!-- Created: Mon Aug 25 15:46:41 BST 1997 -->
190     <h4>$Id: mailman.html,v 1.6 2000/04/09 22:02:34 nigel Exp $</h4>
191   </body>
192 </html>