> Is there any RFC that says this is an invalid format for email address?  
> (don't confuse with POSIX usernames, I'm talking straight email 
> addresses)

it's somewhat cryptic, but the following regex will match the RFC 822
(with the TLD's manually added by me, since the rfc isn't that
specific):

((?:
   (?:[^<>\(\)\[\]\\.,;:[EMAIL PROTECTED]"]+(?:\.[^<>\(\)\[\]\\.,;:[EMAIL 
PROTECTED]"]+)*)
   |
   (?:"[^"]+")
 )
 # Required domain part
 @
 (?:
   (?:\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])
   |
   (?:[a-z\-0-9]+\.)+(?:biz|com|edu|gov|i?nfo|org|mil|net|[a-z]{2})
))

This even catches some formats that I think I remember courier having
issues with, like <"<=@ @=>"@[127.0.0.1]>  (or perhaps there is some
part of the RFC that has been modified for normal email addresses, that
excludes some weird stuff like that)...

-Chris



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to