Definition of get_site_email in Utils.py

Hi,
we recently moved our Mailman server from a RHEL 3 machine running Mailman 2.1.9 to a RHEL 5 system running Mailman 2.1.14. Everything went very smoothly, but today I noticed one small issue. For various reasons we use 'lists.uni-koeln.de' as URL_HOST, but as EMAIL_HOST we use 'uni-koeln.de'. So the address for the sitelist is mailman@uni-koeln.de. On the old system we were able to receive mail for @lists.uni-koeln.de addresses as well, but on the new system we can't. But the listinfo CGI uses mailman@lists.uni-koeln.de as the site address. I checked out the code, but didn't really understand it – I'm more of a Perl guy ;)
def get_site_email(hostname=None, extra=None): if hostname is None: hostname = mm_cfg.VIRTUAL_HOSTS.get(get_domain(), get_domain()) if extra is None: return '%s@%s' % (mm_cfg.MAILMAN_SITE_LIST, hostname) return '%s-%s@%s' % (mm_cfg.MAILMAN_SITE_LIST, extra, hostname)
Shouldn't that use the DEFAULT_EMAIL_HOST instead? I fixed our specific problem by hardcoding the return value, but it seems to me that could be a more general issue ...
Thanks, Sebastian
.:.Sebastian Hagedorn - RZKR-R1 (Gebäude 52), Zimmer 18.:.
.:.Regionales Rechenzentrum (RRZK).:.
.:.Universität zu Köln / Cologne University - ✆ +49-221-478-5587.:.

On 10/29/2010 4:33 AM, Sebastian Hagedorn wrote:
The code is correct. The problem is you have no VIRTUAL_HOSTS entry with key lists.uni-koeln.de and value uni-koeln.de.
If you have defined
DEFAULT_URL_HOST = 'lists.uni-koeln.de' DEFAULT_EMAIL_HOST = 'uni-koeln.de'
in mm_cfg.py then you also need to include after those definitions
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

-- Mark Sapiro <mark@msapiro.net> is rumored to have mumbled on 29. Oktober 2010 21:22:34 -0700 regarding Re: [Mailman-Users] Definition of get_site_email in Utils.py:
D'oh! Thanks, Mark, we actually had that, but in the course of the upgrade I messed it up :( The add_virtualhost was placed *before* the definition of the variables ...
Thanks for your help!
Sebastian Hagedorn - RZKR-R1 (Flachbau), Zi. 18, Robert-Koch-Str. 10 Regionales Rechenzentrum (RRZK) Universität zu Köln / Cologne University - Tel. +49-221-478-5587

On 10/29/2010 4:33 AM, Sebastian Hagedorn wrote:
The code is correct. The problem is you have no VIRTUAL_HOSTS entry with key lists.uni-koeln.de and value uni-koeln.de.
If you have defined
DEFAULT_URL_HOST = 'lists.uni-koeln.de' DEFAULT_EMAIL_HOST = 'uni-koeln.de'
in mm_cfg.py then you also need to include after those definitions
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

-- Mark Sapiro <mark@msapiro.net> is rumored to have mumbled on 29. Oktober 2010 21:22:34 -0700 regarding Re: [Mailman-Users] Definition of get_site_email in Utils.py:
D'oh! Thanks, Mark, we actually had that, but in the course of the upgrade I messed it up :( The add_virtualhost was placed *before* the definition of the variables ...
Thanks for your help!
Sebastian Hagedorn - RZKR-R1 (Flachbau), Zi. 18, Robert-Koch-Str. 10 Regionales Rechenzentrum (RRZK) Universität zu Köln / Cologne University - Tel. +49-221-478-5587
participants (2)
-
Mark Sapiro
-
Sebastian Hagedorn