summaryrefslogtreecommitdiff
path: root/Mailman/MailCommandHandler.py
diff options
context:
space:
mode:
authorcotton1998-10-12 12:47:12 +0000
committercotton1998-10-12 12:47:12 +0000
commit918014eb343a767f86db40d136f2f39c793b1a24 (patch)
tree21b2acc2db39633476d2cf13488e5311643302ef /Mailman/MailCommandHandler.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/MailCommandHandler.py')
-rw-r--r--Mailman/MailCommandHandler.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Mailman/MailCommandHandler.py b/Mailman/MailCommandHandler.py
index 9ef4a5c42..7702eae82 100644
--- a/Mailman/MailCommandHandler.py
+++ b/Mailman/MailCommandHandler.py
@@ -84,6 +84,10 @@ class MailCommandHandler:
mail = Message.IncomingMessage()
subject = mail.getheader("subject")
sender = string.lower(mail.GetSender())
+ #
+ # shouldn't this be checking the username only part?
+ # why 'orphanage'?
+ #
if sender in ['daemon', 'nobody', 'mailer-daemon', 'postmaster',
'orphanage', 'postoffice']:
# This is for what are probably delivery-failure notices of
@@ -433,7 +437,7 @@ class MailCommandHandler:
digest = 0
done_digest = 1
elif string.lower(arg)[:8] == 'address=' and not address:
- address = string.lower(arg)[8:]
+ address = Utils.LCDomain(arg[8:])
elif not password:
password = arg
else:
@@ -445,7 +449,7 @@ class MailCommandHandler:
password = "%s%s" % (Utils.GetRandomSeed(),
Utils.GetRandomSeed())
if not address:
- subscribe_address = string.lower(mail.GetSender())
+ subscribe_address = Utils.LCDomain(mail.GetSender())
else:
subscribe_address = address
remote = mail.GetSender()