[Mailman-Users] Mailman on multiple domains

TGPlatt, WebMaster webwitchcraft at webwitchcraft.com
Sat Nov 1 05:58:47 CET 2008

I'm running MM 2.1.11 on Debian Etch4.0r3 with Postfix 2.3.8. I hesitate to
explain how I made this work... In fact perhaps I shouldn't. It could jinx
me. But in our case, I've got the individual LOCAL virtual email addresses
for each domain defined in the /etc/postfix/virtual file and I've allowed
mailman to define the local virtual email addresses IT needs for the same
domain in the /usr/local/mailman/data/virtual-mailman file. These lists are
mapped to postfix ".db" files /etc/postfix/virtual.db and

These files are defined this way in /etc/postfix/main.cf:

virtual_alias_maps = hash:/etc/postfix/virtual

and in /usr/local/mailman/Mailman/mm_cfg.py they're defined this way:

# Virtual domains

# Set up your virtual host mappings here.  This is primarily used for the #
thru-the-web list creation, so its effects are currently fairly limited.
# Use add_virtualhost() call to add new mappings.  The keys are strings as #
determined by Utils.get_domain(), the values are as appropriate for #
# VIRTUAL_HOSTS = {'lists.example.com':'example.com',
#                  'lists.somethingelse.com':'somethingelse.com'}

VIRTUAL_HOSTS = {'firstdomain.net':'firstdomain.net',

IMAGE_LOGOS = '/icons/'

MTA = 'Postfix'

# added this line to enable POSTFIX_STYLE_VIRTUAL_DOMAINS # details see:
# also: www.howtoforge.com/forums/showthread.php?t=5311

POSTFIX_STYLE_VIRTUAL_DOMAINS = ['firstdomain.net', 'seconddomain.com',

# Are archives public or private by default?
# 0=public, 1=private

#-1 - do not do any archiving
# 0 - do not archive to mbox, use builtin mailman html archiving only # 1 -
do not use builtin mailman html archiving, archive to mbox only # 2 -
archive to both mbox and builtin mailman html archiving.
#     See the settings below for PUBLIC_EXTERNAL_ARCHIVER and
#     PRIVATE_EXTERNAL_ARCHIVER which can be used to replace mailman's
#     builtin html archiving with an external archiver.  The flat mail
#     mbox file can be useful for searching, and is another way to
#     interface external archivers, etc.

At this point I only have the mailman list for one of these domains working.
If I understand the requirements correctly, I will eventually need to add
"add_virtualhost" lines for 

add_virtualhost('www.seconddomain.com', 'seconddomain.com')

Other than those changes which I expect to need to make, the way I have it
configured now seems to be working. 

There were also setup requirements in Apache's virtualhost definition files
too. But the way this is setup is unique on Debian. So I won't try to
explain it except to say Apache's VirtualHost definition files need these
lines included:

## Mailman Setup
        ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
        <Directory "/usr/local/mailman/archives/private/">
#                AddDefaultCharset Off

I HOPE I've got this right. Most of all, I hope this helps you, Scott.

Good Luck!

-----Original Message-----
From: Mark Sapiro [mailto:mark at msapiro.net] 
Sent: Friday, October 31, 2008 2:13 PM
To: Scott Race
Cc: mailman-users at python.org
Subject: Re: [Mailman-Users] Mailman on multiple domains

Scott Race wrote:
>Thanks, fixed the domain name in the mm_cfg.py to read
>Running the /bin/genaliases doesn't return an error, but doesn't
>generate the /data/virtual-mailman file.  The mailman error logs don't
>show anything (no errors since Oct 22).
>Sounds like the virtual-mailman file missing is my main problem, huh?


Go to the list's General Options page and look near the bottom at "Host
name this list prefers for email.". Does this match second-domain.com?

What you ultimately need to do to configure all this depends on whether
or not you will have multiple Mailman domains or a single Mailman

If there is only a single mailman domain = second-domain.com you want
something like

DEFAULT_URL_HOST = 'www.second-domain.com'
DEFAULT_EMAIL_HOST = 'second-domain.com'

in mm_cfg.py

and then run

bin/withlist -l -a -r fix_url

to fix the web_page_url and host_name attributes of all the lists.

If you have more Mailman domains, it's more complex, but until you have
the proper host_name for your lists, genaliases won't create/update

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list