diff options
author | bwarsaw <> | 2003-11-24 23:52:46 +0000 |
---|---|---|
committer | bwarsaw <> | 2003-11-24 23:52:46 +0000 |
commit | 678851304e8976c45ffec61d49d77316fd9d9b70 (patch) | |
tree | c74cb4267f7b12ec9c3b1f6bdba8a0a8d09c701a /Mailman | |
parent | 824d1e6b135c1fddda9a2fbefdb3a17f58b36003 (diff) | |
download | mailman2-678851304e8976c45ffec61d49d77316fd9d9b70.tar.gz mailman2-678851304e8976c45ffec61d49d77316fd9d9b70.tar.xz mailman2-678851304e8976c45ffec61d49d77316fd9d9b70.zip |
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.
Diffstat (limited to 'Mailman')
-rw-r--r-- | Mailman/MailList.py | 7 |
1 files changed, 5 insertions, 2 deletions
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: |