In article <14D6CA6C-2F5F-4FAB-8602-41B700DB727E@viagenie.ca>, Marc Blanchet <marc.blanchet@viagenie.ca> wrote:
The recommendation I made during the Java tutorial on UA is as follows: - use a simple regex to throw out the basic errors (example: an (EAI email address must have a « @ « and at least one « . » on the right side; you can enhance this a bit, but if you go too much, then you start getting into trouble) - use a library for verifying IDNA. - there is not that much one can do on the left side of an EAI email address. maybe just verifying it is a valid UTF-8 string.
John Levine also wrote similarly in a previous email in this thread.
You can do a little more validation of the mailbox to be sure it follows the syntax rules, e.g., doesn't have two unquoted dots in a row. For practical purposes I would also exclude % and ! which used to be (ab)used for source routing and are likely to fail. -- Regards, John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies", Please consider the environment before reading this e-mail. https://jl.ly