[Mailman-Users] Definition of get_site_email in Utils.py

Sebastian Hagedorn Hagedorn at uni-koeln.de
Fri Oct 29 13:33:36 CEST 2010


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 at 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 at 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.:.

More information about the Mailman-Users mailing list