Re:The Correct Way to Validate Email Addresses
by blechschmidt on Wednesday September 07, 2016 @11:14PM
(#12450031)
This might already filter out legitimate users.
dig MX io.
Also, you don't know what new TLDs ICANN might come up with at some point. I am pretty sure there are service providers that do and did limit the TLD length and then TLDs like xn--vermgensberatung-pwb came up.
Re:The Correct Way to Validate Email Addresses
by DHowett on Wednesday September 07, 2016 @11:14PM
(#12450030)
a@[IPv6:2001::1] is, unfortunately for your validation regex, a valid e-mail address.
[EDIT: I see that you consider TLD-free e-mail addresses undeliverable; still!]
Re:The Correct Way to Validate Email Addresses
by bbcbasic on Thursday September 08, 2016 @01:05AM
(#12450416)
.+@.+
FTW?
Re:The Correct Way to Validate Email Addresses
by mnkypete on Thursday September 08, 2016 @03:29AM
(#12450965)
That's what we do. Everything else is just lying to yourself and hoping for the best..
Re:The Correct Way to Validate Email Addresses
by Senji on Friday September 09, 2016 @02:18AM
(#12459984)
Enjoy getting a billion e-mails per second written to root@localhost
Re:The Correct Way to Validate Email Addresses
by bbcbasic on Friday September 09, 2016 @03:37AM
(#12460263)
As if. There would be a single confirmation email sent which would not be clicked.
Re:The Correct Way to Validate Email Addresses
by regularfry on Thursday September 08, 2016 @07:53AM
(#12452138)
Or, more simply, `.@.`.
Re:The Correct Way to Validate Email Addresses
by zeveb on Thursday September 08, 2016 @11:12AM
(#12453738)
That wouldn't allow ceo@cocacola, which is a valid email address (I don't know if mail will be delivered to it, but cocacola is an actual TLD).
Re:The Correct Way to Validate Email Addresses
by tobinfricke on Friday September 09, 2016 @12:42AM
(#12459674)
Ian Goldberg once maintained the email address <n@ai>, touted as the shortest possible. An edge case, but it would fail your validation.
.+@.+\..{2,}
That is, at least one character for the inbox, at least one character for the domain, at least two for the TLD (we assume that TLD-less domains are undeliverable by us). This ensures we don't allow 'a@a' or '[email protected]', but do allow '[email protected]'.