From 678851304e8976c45ffec61d49d77316fd9d9b70 Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Mon, 24 Nov 2003 23:52:46 +0000 Subject: Create(): Take an optional emailhost name and use that to calculate the valid postingaddr. If not given (the default), use DEFAULT_EMAIL_HOST as before. --- Mailman/MailList.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Mailman/MailList.py') diff --git a/Mailman/MailList.py b/Mailman/MailList.py index 3122423e..475ef22a 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -432,7 +432,8 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin, # # List creation # - def Create(self, name, admin, crypted_password, langs=None): + def Create(self, name, admin, crypted_password, + langs=None, emailhost=None): if Utils.list_exists(name): raise Errors.MMListAlreadyExistsError, name # Validate what will be the list's posting address. If that's @@ -440,7 +441,9 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin, # part doesn't really matter, since that better already be valid. # However, most scripts already catch MMBadEmailError as exceptions on # the admin's email address, so transform the exception. - postingaddr = '%s@%s' % (name, mm_cfg.DEFAULT_EMAIL_HOST) + if emailhost is None: + emailhost = mm_cfg.DEFAULT_EMAIL_HOST + postingaddr = '%s@%s' % (name, emailhost) try: Utils.ValidateEmail(postingaddr) except Errors.MMBadEmailError: -- cgit v1.2.3