Mailman with Postfix

This is how I configured Postfix with Mailman on Gentoo

I didn't mess around with virtual hosts or virtual alias files.

My server name is different from my mail server name. This does not matter. Imagine you have one box. You may own lots of domains that point to that box (many domain names that point to the same IP address) and you have successfully set up Apache or RoR or whatever because reverse DNS is not an issue. For a mail server you really should have the reverse IP resolve to the mail server.

So let's say that you have domain1.tld domain2.tld domain3.tld

Furthermore let's say that your machine's hostname is set to foo (however that may be, generally from hostname) and the domain1.tld by either DNS ( or bind) or NIS or

So the fqdn of your server is foo.domain1.tld but like I say, that does not matter. You can set your mail server to be mail.domain2.tld if you like. Doesn't have to be mail. Can be anything at all of course. say the IP is xx.yy.ww.zz dig -x xx.yy.ww.zz will give you the reverse DNS lookup for the IP Forward Confirmed Reverse DNS Forward

in myhostname = mail.domain2.tld

You'll probably need to tweak a few other things in this file but it's straight forward and you'll realise when you need to.

After emerging mailman you need to add -D MAILMAN to or  and restart

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:

Doesn't have to be www. Can be anything at all of course. Doesn't have to be .domain2.tld but it would be less confusing to the users of the mailing list if the web software they use to subscribe and whatnot is the same as the mailing list domain, would it not?

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


 * Add -D MAILMAN to /etc/conf.d/apache2 and restart apache.
 * or depending on your cron daemon.
 * (Create site password)
 * (Add main list)
 * (Add the next list)
 * (Create site password)
 * (Add main list)
 * (Add the next list)

Important: you should not modify when following this configuration.

These will print out a bunch of aliases. Copy n paste them into run on the file to create a aliases.db file

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

the hash tells postfix to append a .db and use that file

Mailman installs, so yo can administer the lists, for example:


 * http://www.domain2.tld/mailman/listinfo/test1

I hope this is helpful to someone. If you spot any mistakes or can clarify any points please do.