Reed O'Brien <r...@koansys.com> added the comment:

Working toward a perfect email regex is pretty much a fool's errand. 

The colander RE would miss my name reed.o'br...@reedobrien.com :(  The 
formencode one would allow my apostrophe :) but alas both would also allow 
invalid emails: reed...obrien@, .re...@. Simultaneously both would disallow 
valid 
emails: "@ @"@, "shit this is valid?"@. So forth and so on. 

The whole mess of local atoms aside, the domain.... I am -1  on the proposal to 
use the formencode RE. There are currently 2 TLDs that are more than 4 
characters .travel and .museum. I have never seen anything from them. in fact I 
have never seen anything from a 4 letter TLD, but I will ignore that for now.

In reality the only way to validate an email is to try sending mail to it. I 
have in the 
past done domain validation via DNS lookup for an MX record. Alas, most mail 
systems will fall back to a record of last resort and deliver to an A record or 
even 
a CNAME. That however is another mess.

The proposed domain RE modification would accept domains like 
prolly.should.be.an.edu.museum. It will, however, also allow invalid domains 
such as its.ironic and fuck.ICANN. I think this would allow far more invalid 
emails 
than blocking > 4 chars in the domain would reject invalid emails; for now.

Besides, you can provide your own validator if you have a special need (say an 
app that is local only) or it is an app for a .museum.

----------
status: unread -> chatting

__________________________________
Repoze Bugs <b...@bugs.repoze.org>
<http://bugs.repoze.org/issue172>
__________________________________
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to