[Mailman-Users] Definition of get_site_email in Utils.py
Mark Sapiro
mark at msapiro.net
Sat Oct 30 06:22:34 CEST 2010
On 10/29/2010 4:33 AM, Sebastian Hagedorn wrote:
>
> 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())
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 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 ...
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 at msapiro.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