summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw1998-12-30 21:07:31 +0000
committerbwarsaw1998-12-30 21:07:31 +0000
commit2689390571775df942cd3ce0085f8a8bb0ea6482 (patch)
tree3dca25620febd2410457fab65e16dfbef4621a51
parent5d1484c4b9458a8afc6c88d4ad5365bb8fdd39c4 (diff)
downloadmailman-2689390571775df942cd3ce0085f8a8bb0ea6482.tar.gz
mailman-2689390571775df942cd3ce0085f8a8bb0ea6482.tar.zst
mailman-2689390571775df942cd3ce0085f8a8bb0ea6482.zip
AddMember(), ApprovedAddMember(): In both cases, normalize address
through Utils.ParseAddrs() to get the real email address out of the name argument.
-rw-r--r--Mailman/MailList.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 7a0e0caca..90a590c43 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -750,6 +750,13 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
def AddMember(self, name, password, digest=0, remote=None):
self.IsListInitialized()
+ # normalize the name, it could be of the form
+ #
+ # <person@place.com> User Name
+ # person@place.com (User Name)
+ # etc
+ #
+ name = Utils.ParseAddrs(name)
# Remove spaces... it's a common thing for people to add...
name = string.join(string.split(name), '')
# lower case only the domain part
@@ -827,6 +834,13 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
admin_notif = 1
else:
admin_notif = 0
+ # normalize the name, it could be of the form
+ #
+ # <person@place.com> User Name
+ # person@place.com (User Name)
+ # etc
+ #
+ name = Utils.ParseAddrs(name)
name = Utils.LCDomain(name)
if self.IsMember(name):
raise Errors.MMAlreadyAMember