[Mailman-Users] Virtual Domains

William R. Dickson wrd at awenet.com
Mon Oct 2 20:42:31 CEST 2000

Hi all,

There's been lots of talk about setting up virtual domains in
Mailman.  Here's how I did it.  Let's assume two domains, foo.com and

First, I do a separate mailman installation for each.  Mailman's not very
big, so the disk overhead's not a problem.  I create a /usr/local/mailman
directory.  I create two subdirectories in there, named for each domain,
so I have /usr/local/mailman/foo.com and /usr/local/mailman/bar.com.  I
then do (logged in as the mailman user):

configure --prefix=/usr/local/mailman/foo.com --with-mail-gid=31
make install
crontab -e
(then, in vi):
:r /usr/local/src/mailman/cron/crontab.in
make clean
configure --prefix=/usr/local/mailman/bar.com --with-mail-gid=31
make install
crontab -e
(then, in vi):
:r /usr/local/src/mailman/cron/crontab.in
make clean

Let's figure on a list named "test" in each domain: test at foo.com and
test at bar.com.

In the virtusertable, I set up virtual addresses like so:

test at foo.com                 test-foo.com
test-request at foo.com         test-request-foo.com
test-admin at foo.com           test-admin-foo.com
owner-test at foo.com           owner-test-foo.com
test-owner at foo.com           owner-test-foo.com

test at bar.com                 test-bar.com
test-request at bar.com         test-request-bar.com
test-admin at bar.com           test-admin-bar.com
owner-test at bar.com           test-admin-bar.com
test-owner at bar.com           test-admin-bar.com

Now, I set up the aliases.  I keep each domain's mailman aliases in its
own file, cumbersomely named aliases-mailman-foo.com and
aliases-mailman-bar.com.  Sendmail obviously needs to be set up to read
these alias files.  (Please excuse the pine wrapping here; naturally,
there would be no carriage returns in the alias entries.)

in aliases-mailman-foo.com:

test-foo.com: "|/usr/local/mailman/foo.com/mail/wrapper post test"
test-request-foo.com: "|/usr/local/mailman/foo.com/mail/wrapper mailcmd test"
test-admin-foo.com: "|/usr/local/mailman/foo.com/mail/wrapper mailowner test"

in aliases-mailman-bar.com:

test-bar.com: "|/usr/local/mailman/bar.com/mail/wrapper post test"
test-request-bar.com: "|/usr/local/mailman/bar.com/mail/wrapper mailcmd test"
test-admin-bar.com: "|/usr/local/mailman/bar.com/mail/wrapper mailowner test"

Finally, you need virtual domains set up in apache:

        ServerAdmin listmaster at foo.com
        DocumentRoot /usr/local/mailman/www
        ServerName lists.foo.com
        ScriptAlias /mailman/ "/usr/local/mailman/foo.com/cgi-bin/"
        Alias /pipermail/ "/usr/local/mailman/foo.com/archives/public/"
        Alias /icons/ "/usr/local/mailman/img/"
        ErrorDocument 404 http://lists.foo.com/mailman/listinfo
        ErrorDocument 403 http://lists.foo.com/mailman/listinfo
        <Directory "/usr/local/mailman/foo.com/archives/public/">
                Options FollowSymLinks
                AllowOverride None

        ServerAdmin listmaster at bar.com
        DocumentRoot /usr/local/mailman/www
        ServerName lists.bar.com
        ScriptAlias /mailman/ "/usr/local/mailman/bar.com/cgi-bin/"
        Alias /pipermail/ "/usr/local/mailman/bar.com/archives/public/"
        Alias /icons/ "/usr/local/mailman/img/"
        ErrorDocument 404 http://lists.bar.com/mailman/listinfo
        ErrorDocument 403 http://lists.bar.com/mailman/listinfo
        <Directory "/usr/local/mailman/bar.com/archives/public/">
                Options FollowSymLinks
                AllowOverride None

I think that about covers how I do it.  I'm sure somebody can point out
things that could be done more efficiently, but this works pretty darn
well.  I'd be happy to answer questions, but be patient for answers :).


 William R. Dickson -- Consuming the Earth's limited resources since 1968
 wrd at awenet.com   http://www.awenet.com/~wrd/  (PGP public key available)

   Burns:  That's right...keep eating...Little do you know you're drawing
           ever closer to the poison donut!  There is a poison one, isn't
           there, Smithers?

Smithers:  Ah, no sir, I discussed this with our lawyers.  They consider
           it murder.

   Burns:  Damn their oily hides!

More information about the Mailman-Users mailing list