At 3:57 PM -0700 2004-07-02, Foo, Randy wrote:
I'm running postfix 2.0.16 with mailman 2.1.2., on Red Hat 9. When I try to create a new list via the web interface, the aliases file does not get updated.
The README.POSTFIX file explains this process. You can find a copy of this file at <http://cvs.sourceforge.net/viewcvs.py/mailman/mailman/README.POSTFIX?view=markup> (assuming the CVS web interface on SourceForge is working correctly).
In this file, you will find the following section:
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 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.
- If you are using virtual domains and you want Mailman to honor your virtual domains, read the section below first!
- Add this to the bottom of the $prefix/Mailman/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.
- Look at the Defaults.py file for the variables POSTFIX_ALIAS_CMD and POSTFIX_MAP_CMD command. Make sure these point to your postalias and postmap programs respectively. Remember that if you need to make changes, do it in mm_cfg.py.
- Run the genaliases script to initialize your aliases file.
% cd /usr/local/mailman % bin/genaliases
Make sure that the owner of the data/aliases and data/aliases.db file is `mailman' and that the group owner for those files is `mailman'. E.g.:
% su % chown mailman:mailman data/aliases*
- Hack your Postfix's main.cf file to include the following path in your alias_maps variable:
/usr/local/mailman/data/aliases
(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
- When you configure Mailman, use the --with-mail-gid=mailman switch (actually, this will be the default if you configured Mailman after adding the `mailman' owner). Because the owner of the aliases.db file is `mailman', Postfix will execute Mailman's wrapper program as uid and gid mailman.
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. I consider this a minor inconvenience.
Unfortunately, since you're using Redhat, I have to assume that you used a binary RPM to install Mailman. See <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.020.htp> for more information.
-- Brad Knowles, <[EMAIL PROTECTED]>
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, Historical Review of Pennsylvania.
SAGE member since 1995. See <http://www.sage.org/> for more info.
------------------------------------------------------ Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/