[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
/usr/local/mailman/data/virtual-mailman.db

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

virtual_alias_maps = hash:/etc/postfix/virtual
    hash:/usr/local/mailman/data/virtual-mailman

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 #
DEFAULT_HOST_NAME.
# VIRTUAL_HOSTS = {'lists.example.com':'example.com',
#                  'lists.somethingelse.com':'somethingelse.com'}

VIRTUAL_HOSTS = {'firstdomain.net':'firstdomain.net',
                 'seconddomain.com':'seconddomain.com',
                 'thirddomain.com':'thirddomain.com'}

IMAGE_LOGOS = '/icons/'

MTA = 'Postfix'

#
# added this line to enable POSTFIX_STYLE_VIRTUAL_DOMAINS # details see:
www.gnu.org/software/mailman/mailman-install/postfix-virtual.html
# also: www.howtoforge.com/forums/showthread.php?t=5311
# POSTFIX_STYLE_VIRTUAL_DOMAINS = ['',]

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

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

# ARCHIVE_TO_MBOX
#-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.
ARCHIVE_TO_MBOX = 2

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')
add_virtualhost('www.thirddomain.com','thirddomain.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
        </Directory>

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
['second-domain.com'].
>
>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?


Yes.

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
domain.

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'
add_virtual_hosts(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

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
virtual-mailman.

-- 
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