[Mailman-Users] Setting domain in URLs

Richard Barrett r.barrett at openinfo.co.uk
Mon Feb 9 23:56:47 CET 2004

On 9 Feb 2004, at 22:39, Paul Makepeace wrote:

> Je 2004-02-09 22:24:10 +0000, Richard Barrett skribis:
>> On 9 Feb 2004, at 22:16, Paul Makepeace wrote:
>>> I host mailing lists on several domains on the same machine. I'd 
>>> prefer
>>> it that when viewing a listinfo page for ml at domainA.example the URL
>>> contain domainA.example rather than DEFAULT_URL_HOST
>>> (I had originally thought it might be settable via "Host name this 
>>> list
>>> prefers for email" but that seems something different.)
>>> Is this possible? I tried various things like %(hostname)s but they
>>> didn't seem to get interpolated (my Python is newbie level).
>>> Sorry if this is a FAQ - I didn't see reference to it at
>>> http://www.python.org/cgi-bin/faqw-mm.py?req=index
>> http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.029.htp
> I don't (yet) see how this bears on my question.
> I "host mailing lists on several domains", those domains are different
> and thus I would like the domains to appear in the URLs rather than the
> So let's say I have (in mm_cfg.py) DEFAULT_URL_HOST = 'foo-domain.com'
> and two mailing lists, foo at foo-domain.com and bar at bar-domain.com I 
> would
> like http://bar-domain.com/mailman/listinfo/bar to show URLs with bar-
> domain.com rather than foo-domain.com

In that case, per the FAQ entry 4.029 that I cited, you might want to 
say in $prefix/mm_cfg.py:

DEFAULT_EMAIL_HOST = 'foo-domain.com'
DEFAULT_URL_HOST = 'foo-domain.com'
add_virtualhost('bar-domain.com', 'bar-domain.com')

and use fix_url to set the foo-domain.com lists to use foo-domain.com 
and bar-domain.com lists to use bar-domain.com. Then the generated URLs 
associated with each list will include the correct virtual host. Also 
visiting http://<domain>/mailman/listinfo will list only those lists 
associated with <domain> if you set VIRTUAL_HOST_OVERVIEW = On 
(actually the default) in mm_cfg.py

Run $bin/fix_url.py with --help to get instructions on its use.

> Quite simply, I would prefer non-domain specific URLs:
> href="/mailman/..." rather than forcing the
> href="http://wrong.domain/..."

Unbfortunately Mailman doesn't work that way but if you set up the 
virtual hosts you may be able to achieve some of what you want.

> (Attempting to set DEFAULT_URL_HOST = '' doesn't seem to do
> anything useful.)
> **
> The URL given in the "Overview of all foo.com mailing lists" allows
> interpolation of the current URL with a %s. Something like that would 
> be
> useful.
> Cheers,
> Paul
> -- 
> Paul Makepeace ................................  
> http://paulm.com/ecademy
> "What is the capital of Norway? On tuesdays."
>    -- http://paulm.com/toys/surrealism/

More information about the Mailman-Users mailing list