433
top 50 comments
sorted by: hot top controversial new old
[-] maxwells_daemon@lemmy.world 14 points 1 hour ago

I don't care who the IRS sends, I am not validating emails with spaces on them.

[-] tyler@programming.dev 5 points 48 minutes ago

You shouldn’t be validating emails yourself anyway. Use a library or check for only the @ and then send an email confirmation.

[-] canihasaccount@lemmy.world 10 points 1 hour ago

What if we 👉@👈 ..? 🤭

[-] thomasloven@lemmy.world 1 points 6 minutes ago

If qoutes are removed and internal spaces are invalid, how could ":(){␣:|:&␣};:"@example.com be valid?

[-] TomasEkeli@programming.dev 2 points 25 minutes ago

I don't validate emails, I test them.

That's your email? OK, what did we send it? if we couldn't send to it or the user can't read it there's no reason to accept it.

OK, maybe I do some light validation first, but I don't trust the email address just because it's email-address-shaped.

[-] ChaoticNeutralCzech@feddit.org 2 points 9 minutes ago

What kind of "light validation"? I'm guessing a .*@.* regex match.

[-] qqq@lemmy.world 2 points 6 minutes ago
[-] dawcas@scribe.disroot.org 6 points 1 hour ago

13 right answers and I didn't expect so many lol

I'll never validate some of the 💩 I've learnt today.

[-] pineapplelover@lemmy.dbzer0.com 1 points 11 minutes ago

13 here too

[-] Endymion_Mallorn@kbin.melroy.org 4 points 53 minutes ago

Wow. if I ever have the madness required to self-host, I'll have my email at an IP address.

[-] rmuk@feddit.uk 3 points 36 minutes ago

I'm gonna have a mailbox per device and the addresses will be deviceip@serverip. 10.254.17.5@145.80.205.19.

[-] Natanael@infosec.pub 2 points 19 minutes ago

Needs to be IPv6, including support for subnets to message multiple devices

[-] Blackmist@feddit.uk 25 points 2 hours ago

I don't think it really matters what the standard is, because you'll be completely limited by some 25 year old bit of Regex from Stack Overflow that every web developer ever has implemented into their form sanity checks.

[-] frezik@lemmy.blahaj.zone 8 points 2 hours ago

The main one that gets passed around will match the weirdness fine. In fact, it probably matches things you don't want, anyway.

A signin/registration form really only needs to do sanity checks to get rid of obviously bad addresses. You'll have to send a round-trip email confirmation message to make sure the email is real, anyway, so why bother going into great detail? Just check that there's an '@' symbol and a dot in the domain. Most of the rest is wanking off.

[-] Dremor@lemmy.world 3 points 1 hour ago

A domaine without tld (me@home) is a valide address. I saw an email server being used as a mqtt-like server this way (it is very old and predate those software).

[-] frezik@lemmy.blahaj.zone 2 points 1 hour ago

An address without a domain is irrelevant for a signin/registration form. Which is like 90% of the code being written in the wild to validate addresses.

If you're writing an email server, then you need to care about all these details. Most of us never will.

[-] ChaoticNeutralCzech@feddit.org 1 points 5 minutes ago

Hey! IPv6 is valid in the inter-network context and needs no dots!

[-] frezik@lemmy.blahaj.zone 1 points 4 minutes ago

You gonna fill an IPv6 address for your email server into the DoorDash signin page?

[-] Dack@programming.dev 5 points 1 hour ago

I got 13/21. I mean thats not bad 😄

[-] Speiser0@feddit.org 11 points 3 hours ago

Pretty much everything I've seen in e-mail is needlessly complicated and weird. So of course addresses are as well.

[-] CommanderCloon@lemmy.ml 41 points 4 hours ago* (last edited 4 hours ago)

Question 5 is incorrect, name@example is a fully valid email address, even after RFC 2822

The spec of RFC 2822 defines an address (3.4.1) as:

local- part "@" domain

domain is defined (3.4.1) as:

domain = dot-atom / domain-literal / obs-domain

dot-atom is defined (3.2.4) as:

dot-atom = [CFWS] dot-atom-text [CFWS]
dot-atom-text = 1*atext *("." 1*atext)

1*atext meaning at least 1 alphanumeric character, followed by *("." 1*atext) meaning at least 0 "." 1*atext


If tomorrow, google decided to use its google top-level domain as an email domain, it would be perfectly valid, as could any other company owning top-level domains

Google even owns a gmail TLD so I wouldn't even be surprised if they decided to use it

[-] HereIAm@lemmy.world 10 points 3 hours ago

I don't know if they changes the answer to the question, but it now says name@example is valid.

[-] CommanderCloon@lemmy.ml 13 points 3 hours ago

It does say it's valid, but also that it's obsolete, and while the RFC does define valid but obsolete specs, there is nothing defining domains without a dot as obsolete, and it is in fact defined in the regular spec, not the obsolete section

[-] HereIAm@lemmy.world 3 points 3 hours ago

I see what you mean, I'm with you now.

[-] spankmonkey@lemmy.world 3 points 3 hours ago

It says valid but obsolete, which sounds like a contradiction to me.

This is technically valid but considered obsolete. RFC 822 allowed domains without dots, but RFC 2822 made this obsolete.

Do email suffix not indicate a different domain like .org and .com for websites?

[-] frezik@lemmy.blahaj.zone 25 points 4 hours ago* (last edited 4 hours ago)

Two of my "favorite" features it didn't even touch on. You can have nested comments:

foo(one(two(three(four(five(six(seven)))))))@example.com

This will actually fail on that big email regex that gets copied around (originally from Mastering Regular Expressions in 1997), because it can only handle comment nesting to a depth of six. It is actually possible to do indefinite nesting now with recursive regex, but it was developed before that feature existed.

RFC822 also allows routing addresses through multiple servers:

<@foo.example.com@bar.example.com:123@example.com>

But this is almost always denied on modern email servers because it was abused by spammers.

[-] TheBigRoomXXL@leminal.space 3 points 2 hours ago

The routing feature is so cursed XD

[-] nimble@lemmy.blahaj.zone 28 points 4 hours ago
[-] Turious@leaf.dance 7 points 2 hours ago
[-] Endymion_Mallorn@kbin.melroy.org 1 points 55 minutes ago

No ring for that.

[-] hellfire103@lemmy.ca 24 points 4 hours ago

I scored 13/21 on https://e-mail.wtf/ and all I got was this lousy text to share on social media.

load more comments (1 replies)
[-] brisk@aussie.zone 16 points 5 hours ago

Tap for spoilerEmail addresses can have comments?!

[-] frezik@lemmy.blahaj.zone 6 points 2 hours ago* (last edited 1 hour ago)

Nested comments. RFC822 had a whole bunch of bad ideas in it, but nobody thought much of it at the time. Most programming languages don't even do nested comments, because they want to filter them out with a simple lexer before the grammar ever sees it.

[-] bjoern_tantau@swg-empire.de 25 points 6 hours ago

I had to make an email address just for paypal because those idiots don't accept subdomains in email addresses.

[-] frezik@lemmy.blahaj.zone 16 points 4 hours ago

Pizza Hut doesn't allow dashes in the domain. This prevents me from ordering Pizza Hut with the email under my personal domain. This can be considered a feature.

[-] MonkderVierte@lemmy.zip 34 points 6 hours ago* (last edited 4 hours ago)

My top five from this (all valid):

  • ":(){␣:|:&␣};:"@example.com # fork bomb
  • 👉@👈 and poop@[💩]
  • "@"@[@]
  • c̷̨̈́i̵̮̅l̶̠̐͊͝ȁ̷̠̗̆̍̍n̷͖̘̯̍̈͒̅t̶͍͂͋ř̵̞͈̓ȯ̷̯̠-̸͚̖̟͋s̴͉̦̭̔̆̃͒û̵̥̪͆̒̕c̸̨̨̧̺̎k̵̼͗̀s̸̖̜͍̲̈́͋̂͠@example.com
  • fed-up-yet@␣example.com␣ # ␣ = whitespace
[-] toynbee@lemmy.world 14 points 3 hours ago

TIL that emoji transcend spoilers.

Emoji showing through spoilers

[-] NessD@lemmy.world 22 points 7 hours ago

14 / 21

This is the score you get when you answer "valid" for every question. Good job.

[-] tostiman@sh.itjust.works 15 points 4 hours ago

My score was lower 💀

[-] Blackmist@feddit.uk 7 points 5 hours ago

I didn't do that but got 14 anyway.

[-] aeternum@lemmy.blahaj.zone 4 points 3 hours ago

Same. I answered what i thought was correct and got 14!

[-] dabster291@lemmy.zip 1 points 45 minutes ago
load more comments (1 replies)
[-] NeatNit@discuss.tchncs.de 57 points 9 hours ago* (last edited 7 hours ago)

I scored 16/21 on https://e-mail.wtf/ and all I got was this lousy text to share on social media.

This was fun!

Edit: people, upvote the OP, not me

load more comments (9 replies)
load more comments
view more: next ›
this post was submitted on 18 Aug 2025
433 points (99.3% liked)

Programmer Humor

25773 readers
1908 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS