From 642dd9b7d29541f9621f2844a0a2ba2013e93b10 Mon Sep 17 00:00:00 2001 From: klm Date: Thu, 23 Apr 1998 15:49:40 +0000 Subject: ValidEmail(): Elide the constraint that addresses have their top-level domain among those iterated among valid_toplevels. Depending on ensuing discussion on the mailman-developers list, i'll probably cut this out completely. --- modules/mm_utils.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'modules/mm_utils.py') diff --git a/modules/mm_utils.py b/modules/mm_utils.py index cde26f78a..7b78a534f 100644 --- a/modules/mm_utils.py +++ b/modules/mm_utils.py @@ -5,7 +5,7 @@ message and address munging, a handy-dandy routine to map a function on all the maillists, the Logging routines, and whatever else doesn't belong elsewhere.""" -__version__ = "$Revision: 462 $" +__version__ = "$Revision: 464 $" import sys, string, fcntl, os, random, regsub, re @@ -111,16 +111,16 @@ def ValidEmail(str): return 1 if len(domain_parts) < 2: return 0 - if domain_parts[-1] not in valid_toplevels: - if len(domain_parts) <> 4: - return 0 - try: - domain_parts = map(eval, domain_parts) - except: - return 0 - for i in domain_parts: - if i < 0 or i > 255: - return 0 +## if domain_parts[-1] not in valid_toplevels: +## if len(domain_parts) <> 4: +## return 0 +## try: +## domain_parts = map(eval, domain_parts) +## except: +## return 0 +## for i in domain_parts: +## if i < 0 or i > 255: +## return 0 return 1 -- cgit v1.2.3-70-g09d2