You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you think this is something that would be a worthwhile addition to the email_address gem, perhaps as a host_validation: :public_suffix option?
The text was updated successfully, but these errors were encountered:
eliotsykes
changed the title
Validating common email typos without MX, using public suffix gem
Validating common email typos without MX/network lookup, using public suffix gem
May 21, 2021
Closing this issue as I've learned more about the public suffix database, and tried it against some real emails, its validation throws up some false negatives.
For example "@gov.bm" and "@sa.gov.au" are valid email domains but the public suffix db will flag them as invalid.
Possibly the public suffix db could be used only as a positive signal:
If an email domain passes public suffix validation, treat is as valid
If an email domain fails public suffix validation, only then perform an MX lookup (minimizes network trips, consider caching the result)
I'm researching preventing common TLD and public suffix typos like "mailbox@gmail.cpm", whilst avoiding an MX lookup for performance reasons.
One proposed solution is to check the address domain against the public suffix database using strict validation:
Do you think this is something that would be a worthwhile addition to the email_address gem, perhaps as a
host_validation: :public_suffix
option?The text was updated successfully, but these errors were encountered: