http://www.perlmonks.org?node_id=711132


in reply to Practical e-mail address validation

tye,
What I would rather see on CPAN is a email address validation that allows you to pick and choose (as well as add your own) what rules you want to play by. For instance "do not accept email address that require an open relay to work" or "accept email address that have a period before @ in violation of the RFC".

Now on to your problem at hand. Are the following email addresses "equivalent"?

1. foo@bar.com 2. Foo@bar.com 3. foo@BAR.com
It turns out that 1 and 3 are but 2 is not. You have already mentioned this. I only bring it up again to point out another "rule" for this theoretical CPAN module - to consider case in the user portion of the address. Here is another one that may be difficult to tell:
1. foo@bar.com 2. foo%bar.com@asdf.com # corrected
These are functionally equivalent because it expects the MTA at asdf.com to relay the mail to bar.com.

So I have no practical use for your validation routines but would love to see a more flexible module - for reasons I mention here as well as ones mentioned here, here and there.

Cheers - L~R