You can integrate Postfix and Mailman such that when new lists are created, or lists are removed, Postfix's alias database will be automatically updated. The following are the steps you need to take to make this work.
In the description below, we assume that you've installed Mailman in the default location, i.e. /usr/local/mailman. If that's not the case, adjust the instructions according to your use of configure's --prefix and --with-var-prefix options.
MTA = 'Postfix'
The MTA variable names a module in the Mailman/MTA directory which contains the mail server-specific functions to be executed when a list is created or removed.
% cd /usr/local/mailman % bin/genaliases
Make sure that the owner of the data/aliases and
data/aliases.db file is
mailman, that the group owner
for those files is
mailman, or whatever user and group you used
in the configure command, and that both files are group writable:
% su % chown mailman:mailman data/aliases* % chmod g+w data/aliases*
Note that there should be no trailing
.db. Do not include this
in your alias_database variable. This is because you do not want
Postfix's newaliases command to modify Mailman's
aliases.db file, but you do want Postfix to consult
aliases.db when looking for local addresses.
You probably want to use a
hash: style database for this entry.
Here's an example:
alias_maps = hash:/etc/postfix/aliases, hash:/usr/local/mailman/data/aliases
mailmanowner. Because the owner of the aliases.db file is
mailman, Postfix will execute Mailman's wrapper program as uid and gid
That's it! One caveat: when you add or remove a list, the aliases.db file will updated, 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 about a minute for Postfix to notice the change to the aliases.db file and update its tables.