Great Circle Associates Majordomo-Workers
(February 1997)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: User unknown shouldn't be getting through
From: Jason L Tibbitts III <tibbs @ hpc . uh . edu>
Date: 02 Feb 1997 16:40:45 -0600
To: majordomo-workers @ greatcircle . com
In-reply-to: Brock Rozen's message of Sun, 2 Feb 1997 17:06:33 -0500 (EST)
References: <Pine.OSF.3.95.970202170502.12465A-100000@webdreams.com>

>>>>> "BR" == Brock Rozen <brozen@webdreams.com> writes:

BR> If it fails, then it's a bad addr

BR> if ($email =~ /(@.*@)|(\.\.)/ ||
BR>   $email !~ /^.+\@[a-zA-Z0-9\-_\.]+\.[a-zA-Z0-9]{2,3}$/)

First off, I'll give you the benefit of the doubt and assume you mean for
this to apply to a mailbox specifier and not a fully commented address.
Even so, this complains about some perfectly legal addresses, anything with
more than one `@' in it, like, say,

 "tibbs@home"@hpc.uh.edu

Please, don't try to get into this until you have read RFC821 very
closely.  Every time we complain about legal addresses (like with the `/'
problem) we get lots of complaints.  There are a lot of bizarre corner
cases, and if you can't provide data that you've taken all of them into
account then the code just isn't safe to use.

The last comparison isn't a terribly bad idea, though, but even then it
disallows the perfectly legal 'tibbs' and 'tibbs@host' (though the later is
already trapped, which also generates complaints from users).  I'm not also
absolutely certain that there aren't other legal characters in a hostname.

 - J<


Follow-Ups:
References:
Indexed By Date Previous: Re: subject_prefix without subjects...
From: Jason L Tibbitts III <tibbs@hpc.uh.edu>
Next: Re: subject_prefix without subjects...
From: Leo Bicknell <bicknell@ufp.org>
Indexed By Thread Previous: Re: User unknown shouldn't be getting through
From: Brock Rozen <brozen@webdreams.com>
Next: Re: User unknown shouldn't be getting through
From: Brock Rozen <brozen@webdreams.com>

Google
 
Search Internet Search www.greatcircle.com