[Mailman-Users] unwinding mailman's use of domains

Mark Sapiro msapiro at value.net
Mon Oct 31 00:28:58 CET 2005


Heather Madrone wrote:
>
>I'd like to set up the new server so that I can access my Mailman
>pages in any of the following ways:
>
>	http://www.host.domain/mailman/listinfo
>	http://localhost/mailman/listinfo
>	http://192.168.123.100/mailman/listinfo
>	http://host.local/mailman/listinfo
>
>Is there a way to reset the DEFAULT_URL_HOST and 
>DEFAULT_EMAIL_HOST to use host.domain without
>setting up virtual hosts?


Just by coincidence, I wrote FAQ 4.62
<http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.062.htp>
and it kind of addresses this.

What you need to do is pick one canonical url host and email host and
set DEFAULT_URL_HOST and DEFAULT_EMAIL_HOST to those values (probably
'www.host.domain' and 'host.domain') and run fix_url to fix all your
lists.

Then you need to put a rewrite in your web server to rewrite all the
other host names to the canonical one (maybe only for mailman).

In Apache, this might look like:

RewriteEngine on
RewriteCond %{HTTP_HOST}    !^www\.host\.domain [NC]
RewriteCond %{HTTP_HOST}    !^$
RewriteRule ^/mailman(/.*)  http://www.host.domain/mailman$1   [L,R]

Of course the one big issue I see is the following. Can you access
www.host.domain from your side of the router? If not, then you have a
problem and probably the best you can do is set VIRTUAL_HOST_OVERVIEW
= Off if that is an option.

-- 
Mark Sapiro <msapiro at value.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