[Mailman-Users] scripts/owners not setting list domain

Mark Sapiro msapiro at value.net
Fri Nov 17 01:52:06 CET 2006


Peter Radcliffe wrote:
>
>I checked I had gotten rid of all the old variables, had run
>add_virtualhost() properly in mm_cfg.py, ran fix_url, restarted the
>qrunners, etc, everything I could find about it until I ran
>across;
>  http://mail.python.org/pipermail/mailman-users/2006-April/050706.html
>
>It seems, as that person says, that scripts/owner calls
>Utils.get_site_email() with no hostname which goes through
>get_domain() to get where it's looking for... which pulls the hostname
>out of mm_cfg.DEFAULT_URL_HOST.


Yes, but then it looks that up in VIRTUAL_HOSTS


>Now, to my mind, using a URL host for email is never the right answer
>unless no DEFAULT_EMAIL_HOST has been configured.


Agreed


>My mm_cfg.py section is thus;
>------------------------------------------------------------------
>DEFAULT_EMAIL_HOST = 'list.pir.net'
>DEFAULT_URL_HOST = 'www.pir.net'
>VIRTUAL_HOSTS.clear()
>add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
>------------------------------------------------------------------
>
>I can't see a way to configure that to get what I think is the right
>answer from 
>  hostname = mm_cfg.VIRTUAL_HOSTS.get(get_domain(), get_domain())
>but perhaps I'm missing something.


The above says call get_domain() and use the result as a key to be
looked up in VIRTUAL_HOSTS and return the value associated with that
key or if the key is not found, return the result of get_domain().

So get_domain() should return DEFAULT_URL_HOST which when looked up in
VIRTUAL_HOSTS should return DEFAULT_EMAIL_HOST.

I suspect since this is a Mailman 2.0.x upgrade that you may still have
a setting for DEFAULT_URL in mm_cfg.py. If so, remove it, and any
setting for DEFAULT_HOST_NAME. These are deprecated and if present
will override DEFAULT_URL_HOST in get_domain().

>My answer was the following patch to scripts/owner. Since there is a
>known list name at that point why not get the domain to use from it's
>config?

Your patch is OK, but it shouldn't be necessary and it affects bounce
processing which is tricky for owners anyway.

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