Interestingly you say comments aren’t valid in the middle of the local part but I thought they are, and the parser I used agreed. Maybe obsolete behaviour?
I didn’t realise quotes could be dot separated but it makes sense now I look back over the EBNF! That’s really cool.
Sorry I made you think I’d stolen your content, I can totally see why you’d think that. I promise you that was the first time I watched that video.
Similar to this I got my examples for jsdate.wtf through reading the v8 date parsing code and experimentation. Wasn’t aware there was a talk with similar examples for JS dates, would be interested to see it.
My bad, I was thinking about a much older talk[1], maybe something about the theme activated the same neurons. Sorry for making an accusation like that for what turns out was no reason.
It’s okay <3 it doesn’t surprise me that both of these topics have been covered before, and both are fairly small input spaces so there’s bound to be similarities or overlap.
I do love Gary’s “wat” talk, it was certainly part of the inspiration to make these.
I think using example.com is a bit of a trick question. It is known as an example domain which is invalid for all purposes, except of course for serving as an example. :)
Almost certainly the same for its .org .net and .example friends. There were some other TLDs that were designed for use in documentation, but I don't have the RFC in front of me right now to cite them
Yeah, I almost put a disclaimer at the end saying that while these examples are valid according to the spec, that has no bearing on whether they’re usable in practice. Email is the Wild West.
An explanation of the use of example.com would have informed users that addresses should be evaluated as such, otherwise, AFAICT, all of the examples provided are invalid.
* 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.
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
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.
I see some of the sibling comments seem to imply that "valid" means that it's deliverable at that moment in time, which would make producing a quiz like this some nonsense because then they'd have to actually register xn--tp8h as a domain, and create an MX record for it
Well, of course, in a multi-user system you can send an email to "user". Typically used for system processes to email "root" back in the day, or "postmaster" or other system accounts, as well.
Bang paths host!user or even host1!host2!user were used in the past, and I think they are still supported by most MTAs. They are definitely valid syntax for email addresses. I mean, if you're talking about quotes and parentheses, ...
Canonically postmaster is valid without a domain in SMTP. Traditionally mail messages can be composed to local users without writing domains in their addressses, and the message submission service will add domains where necessary.
https://www.youtube.com/watch?v=xxX81WmXjPg
Maybe it's just a coincidence, but a shoutout would have been nice if not.
I got my examples mostly from looking through https://github.com/jackbearheart/email-addresses/blob/master... and reading the EBNF in RFC 5322.
Will watch your video!
Interestingly you say comments aren’t valid in the middle of the local part but I thought they are, and the parser I used agreed. Maybe obsolete behaviour?
I didn’t realise quotes could be dot separated but it makes sense now I look back over the EBNF! That’s really cool.
Sorry I made you think I’d stolen your content, I can totally see why you’d think that. I promise you that was the first time I watched that video.
Edit: I was wrong!
[1]https://www.destroyallsoftware.com/talks/wat
I do love Gary’s “wat” talk, it was certainly part of the inspiration to make these.
https://www.iana.org/help/example-domains
* 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.
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
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.
Bang paths host!user or even host1!host2!user were used in the past, and I think they are still supported by most MTAs. They are definitely valid syntax for email addresses. I mean, if you're talking about quotes and parentheses, ...