Mailman with Postfix and Dovecot

This article complements a Mail server using Postfix and Dovecot setup by adding mailman for handling mailing lists.

The key issue is dealing with the alias and virtual alias files that mailman needs for delivering local mail to different lists. There are different ways of integrating mailman with the configuration suggested in this howto. In the internet there are many posts using the postfix-to-mailman.py script by Dax Kelson, and you will find a default entry in referring to this script (although it will not be installed by default). There is also another solution based on virtual maps and regular expressions. Gentoo favours the option suggested in the official documentation and, once implemented, it is quite easy to maintain. It is really advisable to read the documentation in, particularly the.

Emerging mailman creates the file that defines your DEFAULT_EMAIL_HOST, DEFAULT_URL_HOST and virtualhost. For example, you will have:

Additional virtual hosts can be defined in. For example:

If you follow the documentation in, you will issue commands similar to these:


 * Add -D MAILMAN to /etc/conf.d/apache2 and restart apache.
 * or depending on your cron daemon.
 * (Create site password)
 * (Add main list)
 * (this will create an entry in as it is the default host)
 * (this will create an entry in as it is the virtual host).
 * (Add main list)
 * (this will create an entry in as it is the default host)
 * (this will create an entry in as it is the virtual host).

Important: you should not modify when following this configuration.

Now, postfix has to know about the aliases files. These lines have to be added to the default postfix configuration:

Mailman installs, so yo can go to your URL_HOST of each virtual hostname and administer the lists:


 * http://lists.host.org/mailman/listinfo
 * http://lists.vhost1.org/mailman/listinfo

Please, check that the aliases files have been created. You should try to add users to your lists and send messages to the list.