News for hackers. Stuff that matters.
Re:Show HN: Deep Email Validator by IgorPartola on Wednesday December 16, 2020 @08:22AM (#25442173)
foo@2001::01 is a valid email address, no? So is using the alternative dotless representation of the IPv4 addresses.
Re:Show HN: Deep Email Validator by chrismorgan on Wednesday December 16, 2020 @09:52AM (#25443172)
Per the RFC 5322 addr-spec grammar production, it’s actulaly not: colons aren’t permitted in regular domain name syntax; you need to use the domain literal form: foo@[2001::01]. Same deal with HTTP URLs, IPv6 localhost port 8080 is http://[::1]:8080/.
Re:Show HN: Deep Email Validator by jcranmer on Wednesday December 16, 2020 @11:27AM (#25444458)
foo@[IPv6:2001::01], since it's an IPv6 address. Without the IPv6 prefix, it must be an IPv4 address.
Re:Show HN: Deep Email Validator by chrismorgan on Wednesday December 16, 2020 @12:43PM (#25445623)
Ah hah, https://tools.ietf.org/html/rfc5321#section-4.1.3 defines this. I had tried briefly to find something, but not very hard, and so incorrectly guessed it was like HTTP URLs. Thanks for the correction, this is good to know. With that, I also note that exotic IPv4 address formats (such as the 32-bit integer representation) are excluded in that grammar.