Commit 2759a52d authored by Nick Mathewson's avatar Nick Mathewson 🎨
Browse files

r17278@catbus: nickm | 2007-12-20 14:17:42 -0500

 Add . handling to normalizeEmail

parent 976bc5a5
......@@ -156,9 +156,16 @@ def normalizeEmail(addr, domainmap):
domain = domainmap.get(domain, None)
if domain is None:
raise UnsupportedDomain("Domain not supported", addr)
#XXXX Do these rules also hold for Yahoo?
# addr+foo@ is an alias for addr@
idx = localpart.find('+')
if idx >= 0:
localpart = localpart[:idx]
# j.doe@ is the same as jdoe@.
localpart = localpart.replace(".")
return "%s@%s"%(localpart, domain)
class EmailBasedDistributor(bridgedb.Bridges.BridgeHolder):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment