[Mailman-Users] scripts/owners not setting list domain
Peter Radcliffe
pir at pir.net
Fri Nov 17 12:44:08 CET 2006
Mark Sapiro <msapiro at value.net> probably said:
> Peter Radcliffe wrote:
> >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
I've got what the Defaults file and the FAQ says is the default
setting for virtual hosts for my url/email hosts.
> >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'd say that if that even given a misconfiguration, if the
VIRTUAL_HOSTS lookup fails it should be falling back to
DEFAULT_EMAIL_HOST, not returning DEFAULT_URL_HOST which it seems to
be to me.
> 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().
Nope, I checked quite specificly through the upgrade instructions and
the config code and removed all the old config options. Still couldn't
get it to use the DEFAULT_EMAIL_HOST.
# fgrep DEFAULT_URL ~mailman/Mailman/mm_cfg.py
DEFAULT_URL_HOST = 'www.pir.net'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
DEFAULT_URL_PATTERN = 'https://%s/mailman/'
# fgrep DEFAULT_HOST_NAME ~mailman/Mailman/mm_cfg.py
#
My names config section is as I listed above, the rest is smtp,
archive, qrunners, etc, settings, which all seem to give the desired
results.
> Your patch is OK, but it shouldn't be necessary and it affects bounce
> processing which is tricky for owners anyway.
If it shouldn't be necessary then I'm missing something since I can't
get that chunk of code to output the right answer... admittedly my
python is a bit rusty, though.
Ta,
P.
--
pir
More information about the Mailman-Users
mailing list