[Mailman-Users] Virtual domains

Mark Sapiro msapiro at value.net
Wed Aug 17 04:36:07 CEST 2005


Forrest Aldrich wrote:
>
>The virtual domain we're using will be MX'd to our hosts, but served 
>"virtually" via Mailman.   In otherwords:
>
>DEFAULT_EMAIL_HOST = ourdomain.com
>
>DEFAULT_URL_HOST = www.ourdomain.com
>
>[ ... ]
>
>I'm not sure what I'd put here for add_virtualhost():
>
>add_virtualhost('virtual.com', DEFAULT_EMAIL_HOST)
>
>?

If DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST were set to what you want
when you ran configure, they will be correct in Defaults.py and the

add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

that's in Defaults.py will also make the correct 'default' entry in the
VIRTUAL_HOSTS dictionary.

In this case, re-stating

DEFAULT_EMAIL_HOST = 'ourdomain.com'
DEFAULT_URL_HOST = 'www.ourdomain.com'

(note the required quotes), and

add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

in mm_cfg.py is unnecessary, but probably good documentation.

If DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST are not correct in
Defaults.py, then you should have

DEFAULT_EMAIL_HOST = 'ourdomain.com'
DEFAULT_URL_HOST = 'www.ourdomain.com'
VIRTUAL_HOSTS.clear()
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

in mm_cfg.py. The VIRTUAL_HOSTS.clear() line removes the incorrect
entry from VIRTUAL_HOSTS that was added in Defaults.py.

Then, following the above you need

add_virtualhost('virtual.url.domain', 'virtual.email.domain')

where virtual.url.domain is the domain in
http://virtual.url.domain/mailman/listinfo, i.e., the URL of the
listinfo page that you want to show those public lists that are in
that virtual domain, and virtual.email.domain is the domain for e-mail
to those lists as in listname at virtual.email.domain,
listname-request at virtual.email.domain, etc.

Note that 'virtual.url.domain' must be different from
'www.ourdomain.com' or else the second add_virtualhost() entry will
just replace the first.

I am not sure just what you want. If you want all lists to have the
same web domain and only want their e-mail domains to be different,
then you don't want to use Mailman's virtual hosts feature. You just
want DEFAULT_URL_HOST and DEFAULT_EMAIL_HOST and you can change the
e-mail domain of a list after creating it by changing the host_name
(Host name this list prefers for email.) attribute on the list's
General Options page.

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