12 comments

[ 4.6 ms ] story [ 34.7 ms ] thread
Love it. Minor but question 8 should maybe be 'trailing' instead of 'tailing'?
would be nice if what valid means was clearly defined before the test. what the rfc's regex allows is probably the least useful way to think about email validation.
As far as I know, that emoji question due to the same reason IDN is allowed in URLs, and they even went as far as their own RFC for it https://datatracker.ietf.org/doc/html/rfc6530 (very similar to the 6532 cited repeatedly, but more important(?) because every system in between the sender and recipient needs to know about hops, whereas the recipient is the terminal node's problem

The LHS is, as far as I know, because the LHS of _all_ email addresses is "if it's deliverable", modulo the rest of the call-outs from the rest of the quiz

There should have been questions without "@" as well...
Funny. I definitely knew there were some unique characteristics, but this took it to a new level.
Some notes:

* Single-label domains are problematic in several ways. Traditionally they are used as local abbreviations on the assumption that TLDs can’t be mail domains – tho that’s false, because several ccTLDs have had MX records at one time or another. Still, mail software can vary in whether it might treat single-label domains as abbreviations or TLDs or both. And there’s the historical anomaly that RFC 2821’s syntax disallows single-label domains; this was a drafting mistake not an intentional change.

* Spaces around local parts are valid or not depending on which spec you are following, so question 7 is badly framed. You need to be clear whether you are parsing a mail address as in the SMTP envelope, or an address and display name as in a message header.

* Similarly, comments are not valid in SMTP so the questions about comments are also poorly framed.

* And the syntax of domain literals / address literals is specified by SMTP, so question 16 and 18 are based on not reading enough of the RFCs.

15/21.

I was expecting a question about simple%example1.com@example2.com.

which I remember was a useful trick when I worked as a sendmail admin in the early 2000s.

Last week I created a script for finding which TLD's have MX records. Result:

    cf: ["mail.intnet.cf."]
    gp: ["ns1.nic.gp."]
    gt: ["aspmx.l.google.com.", "alt1.aspmx.l.google.com.", "alt2.aspmx.l.google.com.", "aspmx2.googlemail.com.", "aspmx4.googlemail.com.", "aspmx5.googlemail.com."]
    hr: ["alpha.carnet.hr."]
    km: ["mail1.comorestelecom.km."]
    mq: ["mx1-mq.mediaserv.net."]
    mr: ["mail.nic.mr."]
    tt: ["ASPMX.L.GOOGLE.COM.", "ALT1.ASPMX.L.GOOGLE.COM."]
    ua: ["mr.kolo.net."]
    ws: ["mail.worldsite.ws."]
    موريتانيا: ["mail.nic.mr."]
    عرب: ["your-dns-needs-immediate-attention.عرب."]
PS: Only http://uz/ seems to have a "working" HTTP server, returning the 500 status code.
I'm not sure if I'd count examples with spaces and comments towards valid emails, because one could argue these are not part of the address, they're email header syntax details. Like, sure, FWS from RFC can be used somewhere in the address, but it can also be in any other header. Also, CFWS and whatnot are going to get stripped anyway by the time you'd have to deal with SMTP (see Forward-path in RFC 5321, which doesn't allow `(nonsense in parentheses)`), so I don't think they should be considered part of the valid address anyway.