News for hackers. Stuff that matters.
Re:"Email is Easy" email address quiz by stavros on Sunday August 17, 2025 @03:47PM (#44934352)
This is fun, but it feels suspiciously close to my old presentation about the exact same thing:

https://www.youtube.com/watch?v=xxX81WmXjPg

Maybe it's just a coincidence, but a shoutout would have been nice if not.

Re:"Email is Easy" email address quiz by samwho on Sunday August 17, 2025 @03:51PM (#44934390)
Coincidence. I hadn’t seen this.

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!

Re:"Email is Easy" email address quiz by samwho on Sunday August 17, 2025 @04:41PM (#44934761)
Your talk is a lot better than my quiz.

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.

Re:"Email is Easy" email address quiz by Dilettante_ on Sunday August 17, 2025 @03:51PM (#44934385)
Same guy made https://jsdate.wtf, also posted to HN, and also containing material from someone else's talk I'm pretty sure.

Edit: I was wrong!

Re:"Email is Easy" email address quiz by samwho on Sunday August 17, 2025 @03:55PM (#44934409)
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.
Re:"Email is Easy" email address quiz by Dilettante_ on Sunday August 17, 2025 @04:02PM (#44934466)
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.

[1]https://www.destroyallsoftware.com/talks/wat

Re:"Email is Easy" email address quiz by samwho on Sunday August 17, 2025 @04:06PM (#44934494)
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.

Re:"Email is Easy" email address quiz by zvr on Sunday August 17, 2025 @04:12PM (#44934538)
There should have been questions without "@" as well...
Re:"Email is Easy" email address quiz by samwho on Sunday August 17, 2025 @04:17PM (#44934572)
Are there valid emails without an @? I’m very vaguely aware of bang paths but didn’t want to include them because they’re a bit too esoteric.
Re:"Email is Easy" email address quiz by fanf2 on Sunday August 17, 2025 @05:14PM (#44934998)
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.
Re:"Email is Easy" email address quiz by zvr on Sunday August 17, 2025 @08:46PM (#44936268)
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, ...

Re:"Email is Easy" email address quiz by mdaniel on Sunday August 17, 2025 @03:41PM (#44934316)
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

Re:"Email is Easy" email address quiz by xigoi on Sunday August 17, 2025 @03:36PM (#44934261)
I scored 17/21 on https://e-mail.wtf and all I got was this lousy text to share on social media.
Re:"Email is Easy" email address quiz by docsaintly on Sunday August 17, 2025 @01:56PM (#44933485)
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. :)

https://www.iana.org/help/example-domains

Re:"Email is Easy" email address quiz by TMWNN on Sunday August 17, 2025 @04:04PM (#44934483)
Yes. If I'd known that other questions would also use example.com, I would have answered the first question correctly.
Re:"Email is Easy" email address quiz by wredcoll on Sunday August 17, 2025 @02:40PM (#44933838)
I've actually been wondering for a while if example.com is a valid example email address.
Re:"Email is Easy" email address quiz by mdaniel on Sunday August 17, 2025 @03:32PM (#44934225)
Well, "valid," yes, but "deliverable" thankfully, no

  $ dig MX example.com.

  ;; ANSWER SECTION:
  example.com.  3600 IN MX 0 .
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
Re:"Email is Easy" email address quiz by SoftTalker on Sunday August 17, 2025 @03:36PM (#44934262)
Some of the other examples which are "technically valid but obsolete" I would consider safe to call invalid for practical purposes.
Re:"Email is Easy" email address quiz by samwho on Sunday August 17, 2025 @03:48PM (#44934360)
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.
Re:"Email is Easy" email address quiz by olddustytrail on Sunday August 17, 2025 @03:41PM (#44934314)
Exactly. Not valid because it can't be routed.
Re:"Email is Easy" email address quiz by paulnpace on Sunday August 17, 2025 @07:17PM (#44935773)
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.
Re:"Email is Easy" email address quiz by ch33zer on Sunday August 17, 2025 @03:33PM (#44934234)
Love it. Minor but question 8 should maybe be 'trailing' instead of 'tailing'?
Re:"Email is Easy" email address quiz by samwho on Sunday August 17, 2025 @03:49PM (#44934372)
Good eyes! Code is at https://github.com/samwho/e-mail.wtf if you’d like to open a PR
Re:"Email is Easy" email address quiz by rpgraham84 on Sunday August 17, 2025 @03:35PM (#44934252)
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.
Re:"Email is Easy" email address quiz by samwho on Sunday August 17, 2025 @03:56PM (#44934424)
I do have a short sentence on the homepage saying I used https://github.com/jackbearheart/email-addresses as the validator for the examples. It could be more clearly defined, though.
Re:"Email is Easy" email address quiz by mdaniel on Sunday August 17, 2025 @03:47PM (#44934354)
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
Re:"Email is Easy" email address quiz by tmdetect on Sunday August 17, 2025 @04:26PM (#44934652)
Funny. I definitely knew there were some unique characteristics, but this took it to a new level.
Re:"Email is Easy" email address quiz by samwho on Sunday August 17, 2025 @04:30PM (#44934689)
Thank you <3 which one got the biggest laugh?
Re:"Email is Easy" email address quiz by nocoiner on Sunday August 17, 2025 @08:14PM (#44936088)
I chortled audibly at the goatse one.
Re:"Email is Easy" email address quiz by fanf2 on Sunday August 17, 2025 @05:10PM (#44934977)
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.

Re:"Email is Easy" email address quiz by jayski on Sunday August 17, 2025 @05:58PM (#44935294)
15/21.

I was expecting a question about simple%[email protected].

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

Re:"Email is Easy" email address quiz by tyilo on Monday August 18, 2025 @04:31PM (#44944968)
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.
Re:"Email is Easy" email address quiz by vthriller on Thursday August 21, 2025 @03:45AM (#44970179)
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.