GNU Mailman/Postfix the Easy Way 

Tom Eastep

Copyright � 2001-2003 Thomas M. Eastep

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover, and with no Back-Cover Texts. A copy of the license is included in the section entitled �GNU Free Documentation License�.

2003-12-31


The following was posted on the Postfix mailing list on 5/4/2002 by Michael Tokarev as a suggested addition to the Postfix FAQ.

Q: Mailman does not work with Postfix, complaining about GID mismatch

A: Mailman uses a setgid wrapper that is designed to be used in system-wide aliases file so that rest of mailman's mail handling processes will run with proper uid/gid. Postfix has an ability to run a command specified in an alias as owner of that alias, thus mailman's wrapper is not needed here. The best method to invoke mailman's mail handling via aliases is to use separate alias file especially for mailman, and made it owned by mailman and group mailman. Like:

alias_maps = hash:/etc/postfix/aliases, hash:/var/mailman/aliases

Make sure that /var/mailman/aliases.db is owned by mailman user (this may be done by executing postalias as mailman userid).

Next, instead of using mailman-suggested aliases entries with wrapper, use the following:

instead of
mailinglist: /var/mailman/mail/wrapper post mailinglist
mailinglist-admin: /var/mailman/mail/wrapper mailowner mailinglist
mailinglist-request: /var/mailman/mail/wrapper mailcmd mailinglist
...

use
mailinglist: /var/mailman/scripts/post mailinglist
mailinglist-admin: /var/mailman/scripts/mailowner mailinglist
mailinglist-request: /var/mailman/scripts/mailcmd mailinglist
...

The above tip works with Mailman 2.0; Mailman 2.1 has adopted something very similar so that no workaround is necessary. See the README.POSTFIX file included with Mailman-2.1.