From 211a82ddb463ac044ba20d51208e5f5a169dcb6c Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 20 Sep 2008 00:33:07 -0400 Subject: Support for proper domains by interface. Add a test and update modules as necessary. Finally delete DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST. Now add_domain() must be called in the confirmation file for every domain. add_domain() itself is now pretty much just a proxy for the Domain constructor. Add stop() as an alias for pdb.set_trace() to the documentation doctest globs. --- mailman/Cgi/create.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mailman/Cgi/create.py') diff --git a/mailman/Cgi/create.py b/mailman/Cgi/create.py index c2b8b710d..a5be1be15 100644 --- a/mailman/Cgi/create.py +++ b/mailman/Cgi/create.py @@ -151,8 +151,12 @@ def process_request(doc, cgidata): # Make sure the url host name matches one of our virtual domains. Then # calculate the list's posting address. url_host = Utils.get_request_domain() - email_host = config.get_email_host(url_host) - if not email_host: + # Find the IDomain matching this url_host if there is one. + for email_host, domain in config.domains: + if domain.url_host == url_host: + email_host = domain.email_host + break + else: safehostname = Utils.websafe(url_host) request_creation(doc, cgidata, _('Unknown virtual host: $safehostname')) -- cgit v1.2.3-70-g09d2