summaryrefslogtreecommitdiff
path: root/src/mailman/Utils.py
diff options
context:
space:
mode:
authorBarry Warsaw2009-02-12 22:52:18 -0500
committerBarry Warsaw2009-02-12 22:52:18 -0500
commit8d43a75b5c7a278bbf9f5bd5143bee4b2925f3b1 (patch)
tree49538d15e71f0b520758f6e2f189aa5f143baaa3 /src/mailman/Utils.py
parent8b8586ca375b23787b5a74761773cd759f74994e (diff)
downloadmailman-8d43a75b5c7a278bbf9f5bd5143bee4b2925f3b1.tar.gz
mailman-8d43a75b5c7a278bbf9f5bd5143bee4b2925f3b1.tar.zst
mailman-8d43a75b5c7a278bbf9f5bd5143bee4b2925f3b1.zip
Diffstat (limited to 'src/mailman/Utils.py')
-rw-r--r--src/mailman/Utils.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/mailman/Utils.py b/src/mailman/Utils.py
index 023da728f..05da4c1d5 100644
--- a/src/mailman/Utils.py
+++ b/src/mailman/Utils.py
@@ -147,40 +147,6 @@ def wrap(text, column=70, honor_leading_ws=True):
-def QuotePeriods(text):
- JOINER = '\n .\n'
- SEP = '\n.\n'
- return JOINER.join(text.split(SEP))
-
-
-def LCDomain(addr):
- "returns the address with the domain part lowercased"
- atind = addr.find('@')
- if atind == -1: # no domain part
- return addr
- return addr[:atind] + '@' + addr[atind+1:].lower()
-
-
-# TBD: what other characters should be disallowed?
-_badchars = re.compile(r'[][()<>|;^,\000-\037\177-\377]')
-
-def ValidateEmail(s):
- """Verify that the an email address isn't grossly evil."""
- # Pretty minimal, cheesy check. We could do better...
- if not s or ' ' in s:
- raise errors.InvalidEmailAddress(repr(s))
- if _badchars.search(s) or s[0] == '-':
- raise errors.InvalidEmailAddress(repr(s))
- from mailman.email.utils import split_email
- user, domain_parts = split_email(s)
- # Local, unqualified addresses are not allowed.
- if not domain_parts:
- raise errors.InvalidEmailAddress(repr(s))
- if len(domain_parts) < 2:
- raise errors.InvalidEmailAddress(repr(s))
-
-
-
def GetPossibleMatchingAddrs(name):
"""returns a sorted list of addresses that could possibly match
a given name.