News for hackers. Stuff that matters.
Re:Show HN: Deep Email Validator by Veen on Wednesday December 16, 2020 @07:48AM (#25441896)
Yeah, looks like they're doing super-naive address validation:

https://github.com/mfbx9da4/deep-email-validator/blob/master...

Re:Show HN: Deep Email Validator by Arnt on Wednesday December 16, 2020 @08:06AM (#25442020)
OTOH, that code looks as if it'll find the vast majority of the problems more careful analysis could find, both simply and without bad consequences.

All that happens if that naïve code fails is that it does an MX lookup that's bound to fail, and then the code returns a bad error message ("couldn't find MX" instead of more properly "syntax error in domain part").

Re:Show HN: Deep Email Validator by stevekemp on Wednesday December 16, 2020 @09:18AM (#25442726)
If an MX record isn't present you can fall back on the A-record.

(If, and only if, no MX record for the domain is present, treat the domain as if it had an MX record with the given domain as the target hostname and a preference value of 0)

Re:Show HN: Deep Email Validator by Arnt on Wednesday December 16, 2020 @11:30AM (#25444502)
If you want to be pedantic... not in the relevant case, no. In the relevant case (the domain is syntactically invalid but the naïve check didn't discover that) the response without MX RRs already tells you that there won't be an A (or AAAA).