1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
Mailman - The GNU Mailing List Management System
Copyright (C) 2001 by the Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
INTEGRATING POSTFIX AND MAILMAN
You can integrate Postfix and Mailman such that when new lists are
created, or lists are removed, Postfix's alias database will
automatically be updated. This is done by Mailman writing alias
entries to a DB hash file that Postfix has been configured to consult
when looking for local delivery addresses. The following are the
steps you need to take to make this work.
In the description below, $mailman is the directory into which you've
installed Mailman. I.e. it is /home/mailman if you did not use the
--prefix switch when you configured Mailman, otherwise it is the
directory you specified with --prefix. Note that if you used
--with-var-prefix then $mailman is this directory.
- touch the file $mailman/data/aliases.db and make sure that both
the owner and group-owner of the file is `mailman'. Make sure
that both owner and group have read and write permission.
- Hack your Postfix's main.cf file to include $mailman/data/aliases
(no trailing .db) in the alias_map variable but not alias_database.
This is because you do not want Postfix's newalias command to modify
Mailman's aliases.db file, but you do want Postfix to consult
aliases.db when looking for local addresses.
You want to be sure that that you're using the hash: style database
for this entry. Here's an example:
alias_maps = hash:/etc/postfix/aliases, hash:/home/mailman/data/aliases
- When you configure Mailman, use the --with-mail-gid=mailman
switch. Because the owner of the aliases.db file is `mailman',
Postfix will execute Mailman's wrapper program as uid and gid
mailman. If you don't use the --with-mail-gid switch, the
wrapper will bounce messages, complaining of a gid mismatch.
- Add this to Mailman's mm_cfg.py file:
MTA = 'Postfix'
The MTA variable names a module in Mailman/MTA which contains the
MTA-specific functions to be executed when a list is created or
removed.
That's it! One caveat: when you add or remove a list, the aliases.db
file will be modified by Mailman, but it will not automatically run
"postfix reload". This is because you need to be root to run this and
suid-root scripts are not secure. The only effect of this is that it
will take one minute for Postfix to notice the change to the
aliases.db file and update its tables. I consider this a minor
inconvenience.
Local Variables:
mode: text
indent-tabs-mode: nil
End:
|