Multiple domains with mailman and postfix
Check list for adding another (virtual) domain to mailman (on Debian 4.1.1-21)
Prerequsites:
- Mailman installed and configuring working with one domain
- Postfix installed and working with one domain
- Using postfix-to-mailman.py script (rather than manual aliases)
- In /etc/mailman/mm_cfg.py add your new domain:
#params DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST
e.g.
add_virtualhost(’lists.domain2.com’,'lists.domain2.com’) - Add the site to your apache conf (/etc/apache2/apache2.conf - varies depending on where you’ve decided to put your configs)
e.g.
<VirtualHost *:80>
ServerAdmin webmaster@example2.com
ServerName lists.example2.comErrorLog /var/log/apache2/error-lists.example2.com.log
CustomLog /var/log/apache2/access.lists.example2.com.log commonDocumentRoot /var/www/lists.example2.com/
<directory /var/www/lists.example2.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2’s default start page
RedirectMatch ^/$ /cgi-bin/mailman/listinfo
</directory>ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<directory “/usr/lib/cgi-bin”>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</directory></VirtualHost>
Now reload apache2
$/etc/ini.d/apache2 reload - Confgiure Postfix:
i) Add your new domain to postfix’s relay_domains option in /etc/postfix/main.cf
e.g.
relay_domains = lists.example1.com, lists.example2.comn.b Do NOT add your mailing list domain into the “mydestination” option, this will cause hours of confusion if you put it in here and not realise, as postfix will do as it says and assume postfix is the destination for the mail on that domain thus not passing it onto mailman.ii) Add your domain to the transport file /etc/postfix/transport
e.g.
lists.example1.com mailman:
lists.example2.com mailman:Now hash the transport, $postmap /etc/postfix/transport
- Reload mailman and postfix
$/etc/init.d/mailman reload && /etc/init.d/postfix reload - Go and setup your actual mailing list

e.g.http://lists.example2.com/ - Have a beer to forget that you probably should have used sympa instead of mailman in the first place. Oh well.