Nice n' Easy JQuery Image Rotator
Using PHP pspell Spell Check Functions with a Custom Dictionary
A Simple ISAPI Filter for Authentication on IIS
Installing Xdebug for use with Eclipse or Netbeans on Linux
Changing Mailman Python Scripts for Virtual Host Support
Getting Set up with Ogre 3D on Ubuntu

Mailman Virtual Hosts Info Collected from the Web

Thursday, 17 September 09, 11:05 am

The situation is this: A single server with multiple IP addresses and related hostnames acts as a mailman server. Mailman is a mailing list manager with a builtin web archive and subscription management system written in php. As shipped it injects a file called mailman.conf into /etc/httpd/conf.d that uses mod_alias to redirect traffic of the form http://host.domain.tld/mailman to run the php scripts necessary to provide the management and archive service. The RedirectMatch statement used to effect this is:

RedirectMatch ^/mailman/?$

However, this arrangement is awkward in that it requires a URL in the form http://host.domain.tld/mailman to reach the mailman web interface. What is desired is that a URL in the form http://mailman.domain.tld achieve the same result.

Solution. The key to this lies in removing the default mailman.conf file and setting up a virtual host configuration that contains the directives in mailman.conf and provides two rewrite rules specifically tailored to the mailman virtual host. The first directive produces the same effect as the default RedirectMatch in mailman.conf:

RewriteRule ^/mailman/?$ [L,R]

The second provides the identical effect if the user simply uses the host name (

RewriteRule ^/$ [L,R]

The [L,] flag tells the rewrite engine to stop processing with this ruleset. The [,R] tells it to process the redirect without stripping the host part.

The entire virtual host configuration file follows:
<VirtualHost> DocumentRoot /var/lib/mailman/archives/public ServerName   ScriptAlias /mailman/ /usr/lib/mailman/cgi-bin/   <Directory /usr/lib/mailman/cgi-bin/> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory>   Alias /pipermail/ /var/lib/mailman/archives/public/   <Directory /var/lib/mailman/archives/public> Options Indexes MultiViews FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory>   <Directory "/var/lib/mailman/archives/public"> Options +Indexes +FollowSymLinks Order allow,deny allow from all </Directory>   RewriteEngine on RewriteLog "/var/log/httpd/rewrite_log" RewriteLogLevel 0   RewriteRule ^/mailman/?$ [L,R]   RewriteRule ^/$ [L,R]   </VirtualHost>
Now what I need to do is to find out how one disguises the internal URI so that calls to only display in the address bar of the browser and not

But the essential part is working now.


One more thing. Do not forget that this change may require that be altered to use the hostname alias rather than the fqdn of the host and mailman restarted. Otherwise the internal links to the archives may not work.


One of the greatest limitations of Mailman has been its "virtual domain" support. That's where a single server supports mailing lists that live under different domains, such as and

Unfortunately, the virtual domain support hasn't improved recently.

Here is how Mailman supports virtual domains, at least when using the Postfix mail transport. When you want to setup a mailing list called listname, you create an alias file entry that says something like:
listname: "|/usr/local/mailman/mail/mailman post listname"

This takes incoming email messages sent to listname and feeds them into the Mailman system.

If this list lives under a virtual domain, say, then you also create a virtual file entry that says: listname

This maps the fully qualified virtual domain name of the list ( to its alias (listname).

This approach requires that list names are unique across virtual domains. That is, you couldn't create one mailing list called and another called on the same Mailman installation. That's because both of them want to map to a single alias called discuss.

This is a widely known limitation. It's discussed in the Mailman FAQ here:

I wish that Mailman used a qualified name internally, rather than the bare listname, to identify mailing lists. That way you could have one list called and and the two lists would be internally distinct.

I investigated some possible kludge workarounds, but they required changing the real_name configuration setting (the listname displayed to the public) for the list, which Mailman prohibits.

So the solution seems to be either apply some official patches (noted in that FAQ entry) or wait for Mailman release 3.0.

Majordomo apparently has better support for virtual domains out of the box. There's a chart here comparing it and mailman.

Here's a message from one of the many mailman lists:

You can run all virtual domains off one mailman installation as long as the LISTNAME portion of LISTNAME@DOMAIN is unique across all lists. E.g., you couldn't have and under the same installation.

If administratively feasible, a good way to accomplish this would be
to assign all of your domains some unique tag, so that their lists are, etc.

That said, you should be able to alias to FOO-admin and to BAR-admin, but you'd have to take special care not to
confuse the users. This was discussed earlier, I believe, but I don't
recall the final conclusion.
Leave Comment

/xkcd/ Thread

About This Page