summaryrefslogtreecommitdiff
path: root/Mailman/MailList.py
diff options
context:
space:
mode:
authorcotton1998-10-12 12:47:12 +0000
committercotton1998-10-12 12:47:12 +0000
commit918014eb343a767f86db40d136f2f39c793b1a24 (patch)
tree21b2acc2db39633476d2cf13488e5311643302ef /Mailman/MailList.py
parent617cab957347d5f6c9e39100408d940c28c3b406 (diff)
downloadmailman-918014eb343a767f86db40d136f2f39c793b1a24.tar.gz
mailman-918014eb343a767f86db40d136f2f39c793b1a24.tar.zst
mailman-918014eb343a767f86db40d136f2f39c793b1a24.zip
These changes allow case-preserved usernames in email addresses of
list members. I have yet to look at handling of -admin addresses. Also, there is a configurable variable in Defaults.py that allows the site admin to decide whether or not to do "smart address matching" - where scott@chronis.pobox.com matches scott@pobox.com as the same address (these addresses are in reality different addresses ;). A listing of the changes to the files follows: Defaults.py.in - added SMART_ADDRESS_MATCH variable and a short description, defaulting to 1. MailCommanHandler: removed string.lower(address) in processSubscribeCmd and replaced it with Utils.LCDomain(address) MailList.py: made AddMember and ApprovedAddMember use Utils.LCDomain(address) instead of string.lower(address) Utils.py: got rid of top level domain listing and commented out corresponding code in ValidEmail since it seems clear that we have no intention of using this anymore. added LCDomain(address) which lowercases only the domain part of an address if there is a domain part. made AddressesMatch use LCDomain instead of string.lower, made it check LCDomain(addr1) == LCDomain(addr2) if mm_cfg.SMART_ADDRESS_MATCH is set to 0, and do the match it used to do if that variable is set to 1. scott
Diffstat (limited to 'Mailman/MailList.py')
-rw-r--r--Mailman/MailList.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 6ef9e9c0c..82a12efd4 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -681,7 +681,9 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
def AddMember(self, name, password, digest=0, remote=None):
self.IsListInitialized()
# Remove spaces... it's a common thing for people to add...
- name = string.join(string.split(string.lower(name)), '')
+ name = string.join(string.split(name), '')
+ # lower case only the domain part
+ name = Utils.LCDomain(name)
# Validate the e-mail address to some degree.
if not Utils.ValidEmail(name):
@@ -739,15 +741,12 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
def ApprovedAddMember(self, name, password, digest, ack=None):
- # XXX klm: It *might* be nice to leave the case of the name alone,
- # but provide a common interface that always returns the
- # lower case version for computations.
if ack is None:
if self.send_welcome_msg:
ack = 1
else:
ack = 0
- name = string.lower(name)
+ name = Utils.LCDomain(name)
if self.IsMember(name):
raise Errors.MMAlreadyAMember
if digest: