From d249751089e06abcf9e233f2643451f9bfe1571e Mon Sep 17 00:00:00 2001 From: msapiro <> Date: Sat, 18 Mar 2006 17:23:04 +0000 Subject: Improved fix for bug 1275856 to return host part of DEFAULT_URL if any from get_domain() if VIRTUAL_HOST_OVERVIEW off. --- Mailman/Utils.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Mailman/Utils.py b/Mailman/Utils.py index 872eb072..d0eca99a 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -680,13 +680,11 @@ def get_domain(): if mm_cfg.VIRTUAL_HOST_OVERVIEW and host: return host.lower() else: - # See the note in Defaults.py concerning DEFAULT_HOST_NAME - # vs. DEFAULT_EMAIL_HOST. - # MAS: This is inconsistent - DEFAULT_URL_HOST is correct. - # DEFAULT_HOST_NAME should really be the host portion of - # DEFAULT_URL, but that's not a setting, and these have been - # deprecated since Aug., 2001, so leave it. - hostname = mm_cfg.DEFAULT_HOST_NAME or mm_cfg.DEFAULT_URL_HOST + # See the note in Defaults.py concerning DEFAULT_URL + # vs. DEFAULT_URL_HOST. + hostname = ((mm_cfg.DEFAULT_URL + and urlparse.urlparse(mm_cfg.DEFAULT_URL)[1]) + or mm_cfg.DEFAULT_URL_HOST) return hostname.lower() -- cgit v1.2.3