Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
TheBigRoomXXL ( TheBigRoomXXL@leminal.space )  to Programmer Humor@programming.devEnglish · 1 year ago

Everyone knows what an email address is, right? (Quiz)

e-mail.wtf

external-link
message-square
86
link
fedilink
545
external-link

Everyone knows what an email address is, right? (Quiz)

e-mail.wtf

TheBigRoomXXL ( TheBigRoomXXL@leminal.space )  to Programmer Humor@programming.devEnglish · 1 year ago
message-square
86
link
fedilink
Email is Easy
e-mail.wtf
external-link
Everyone knows what an email address is, right?
alert-triangle
You must log in or # to comment.
  • NeatNit ( NeatNit@discuss.tchncs.de ) 
    link
    fedilink
    arrow-up
    64
    ·
    edit-2
    1 year 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

    • Not a newt ( lemmyng@piefed.ca ) 
      link
      fedilink
      English
      arrow-up
      35
      ·
      1 year ago

      13/21 here. Mostly got hung up on several “this was valid in earlier RFC, and later removed” kind of situations. There are several where I picked the correct answer, but where I know many websites that won’t accept it as valid, and that’s not even the more esoteric ones.

      • NaibofTabr ( NaibofTabr@infosec.pub ) 
        link
        fedilink
        English
        arrow-up
        24
        ·
        1 year ago

        Yeah I feel like the correct answer for anything obsoleted by a more recent RFC should be “Invalid”.

        • JohnEdwa ( JohnEdwa@sopuli.xyz ) 
          link
          fedilink
          arrow-up
          21
          ·
          1 year ago

          But they will work, and according to the spec, you have to build your system so that it can handle those cases. Obsolete doesn’t mean incorrect or invalid, just a “you shouldn’t do this any more”.

          Obsolete Syntax
          Earlier versions of this standard allowed for different (usually more liberal) syntax than is allowed in this version. Also, there have been syntactic elements used in messages on the Internet whose interpretation have never been documented. Though some of these syntactic forms MUST NOT be generated according to the grammar in section 3, they MUST be accepted and parsed by a conformant receiver.

          https://datatracker.ietf.org/doc/html/rfc2822#section-4

          • Frezik ( frezik@lemmy.blahaj.zone ) 
            link
            fedilink
            English
            arrow-up
            7
            ·
            1 year ago

            Some of those “obsolete” things are outright blocked for specific reasons. For example, routing addresses through multiple servers. It was abused by spammers, so it’s almost always denied these days.

            Looks like this:

            <@foo.example.com@bar.example.com:123@example.com>
            
          • NaibofTabr ( NaibofTabr@infosec.pub ) 
            link
            fedilink
            English
            arrow-up
            4
            ·
            1 year ago

            Well shit, yeah, that “MUST be accepted and parsed” is pretty explicit. That sucks. What is even the point of revising standards? How the fuck do we ever get rid of some of these bad ideas?

    • First_Thunder ( First_Thunder@lemmy.zip ) 
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      I got 14/21

      • dditty ( dditty@lemmy.dbzer0.com ) 
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        Me too and it said that is the amount you’d get if you just picked “valid” for every response. Lmao

      • ReCursing ( ReCursing@feddit.uk ) 
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        Samsies

    • db0 ( db0@lemmy.dbzer0.com ) 
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      Yay! Same. But only because I’ve already heard of some email craziness before.

    • Empricorn ( Empricorn@feddit.nl ) 
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Don’t tell me what to do!

    • Redjard ( Redjard@lemmy.dbzer0.com ) 
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      yay 16/21 club

  • Blackmist ( Blackmist@feddit.uk ) 
    link
    fedilink
    English
    arrow-up
    48
    ·
    1 year 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 ( frezik@lemmy.blahaj.zone ) 
      link
      fedilink
      English
      arrow-up
      16
      ·
      1 year 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.

  • CommanderCloon ( CommanderCloon@lemmy.ml ) 
    link
    fedilink
    arrow-up
    41
    ·
    edit-2
    1 year 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

    • /home/pineapplelover ( pineapplelover@lemmy.dbzer0.com ) 
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      I didn’t understand this one. How do you have a no dot domain? Like you need to distinguish from example.com or example.wtf

      Edit: do you mean if you own .google you can have your email@google address?

      • DaPorkchop_ [they/she/it] ( DaPorkchop_@lemmy.ml ) 
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        Yes, the top-level domain is still just a domain. I’m not aware of any public Internet services which are reachable from a TLD directly, and it’s strongly discouraged by ICANN, but there isn’t any technical limitation preventing e.g. someone at Verisign from setting up example@com.

      • Atherel ( Atherel@lemmy.dbzer0.com ) 
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        you could also send mails within your local network, the hostname just has to resolve and have a mail service running

  • nimble ( nimble@lemmy.blahaj.zone ) 
    link
    fedilink
    English
    arrow-up
    34
    ·
    edit-2
    1 year ago

    deleted by creator

    • Turious ( Turious@leaf.dance ) 
      link
      fedilink
      arrow-up
      10
      ·
      1 year ago

      Bottom-ass email address.

      • Endymion_Mallorn ( Endymion_Mallorn@kbin.melroy.org ) 
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        No ring for that.

  • Frezik ( frezik@lemmy.blahaj.zone ) 
    link
    fedilink
    English
    arrow-up
    31
    ·
    1 year 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 ( TheBigRoomXXL@leminal.space ) OP
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      The routing feature is so cursed XD

      • ∃∀λ ( eah@programming.dev ) 
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        https://en.wikipedia.org/wiki/UUCP#Mail_routing

  • TomasEkeli ( TomasEkeli@programming.dev ) 
    link
    fedilink
    arrow-up
    24
    ·
    1 year 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 ( ChaoticNeutralCzech@feddit.org ) 
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

      What kind of “light validation”? I’m guessing a .*@.* regex match.

      • TomasEkeli ( TomasEkeli@programming.dev ) 
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        1 year ago

        Almost correct. ^.+@.+$

        Too hard to validate properly to be worth it. Even if it is technically valid that’s insufficient. It must also work, and the easiest way to test that is to use it and verify that the user got what we sent.

    • GiveOver ( GiveOver@feddit.uk ) 
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Hooray, you have better security than Apple, who won’t let me use my own email because some idiot in Australia used it first.

    • who ( who@feddit.org ) 
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 year ago

      I don’t validate emails, I test them.

      Hooray! You get a gold star.

      OK, maybe I do some light validation first,

      I hope your “validation” does nothing more than show a warning that the user is allowed to ignore.

      I have seen too many systems built by people who think they know what’s valid or not before and after the @ sign*, and they are almost always dead wrong. In the worst cases, such systems accept an unusual-looking address and claim to send the expected verification message, but never actually send it. Of course, these systems won’t work for some people, and since none of their online docs or support staff know why, those people will be locked out of using the system and funneled into bottomless pit of misery if they try. Please don’t build broken garbage like this.

      *Fun fact: Not so terribly long ago, even the @ sign didn’t have to be present. Some email addresses were bang paths. I’m not sure if any of these are still in use, but it wouldn’t shock me to learn that they are.

  • Hellfire103 ( hellfire103@lemmy.ca ) 
    link
    fedilink
    English
    arrow-up
    23
    ·
    1 year ago

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

  • MonkderVierte ( MonkderVierte@lemmy.zip ) 
    link
    fedilink
    arrow-up
    20
    ·
    edit-2
    1 year 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
    • Not a newt ( lemmyng@piefed.ca ) 
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 year ago

      Spoilers!

      • MonkderVierte ( MonkderVierte@lemmy.zip ) 
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        deleted by creator

  • Björn ( bjoern_tantau@swg-empire.de ) 
    link
    fedilink
    arrow-up
    17
    ·
    1 year ago

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

    • Frezik ( frezik@lemmy.blahaj.zone ) 
      link
      fedilink
      English
      arrow-up
      15
      ·
      1 year 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.

  • codapine ( codapine@lemmy.zip ) 
    link
    fedilink
    arrow-up
    16
    ·
    1 year ago

    Also as the registrant of one of those new fancy TLDs, much like the owner of this website (email.wtf), their own email addresses will fail those stupid email validation checks that only believe in example@example.[com|net|org]

    Shitty websites will fail “example@email.wtf”, guaranteed - despite it being 100% valid AND potentially live.

    Source - I have a “.family” domain for my email server. Totally functional, but some shitty websites refuse to believe it.

    • locuester ( locuester@lemmy.zip ) 
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Yeah I have a .engineering for my biz. I also registered mycompanyengineering.com to get through places that won’t take the new TLDs.

      Usually banks.

      • Appoxo ( Appoxo@lemmy.dbzer0.com ) 
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Seems like a weird choice as the primary TLD.
        I’d switch it just to reduce the annoying typing hassle and to avoid misspelling.

        It’s already unusual if I say “My email is givenName@LastName.eu”
        And that trips so many persons.
        First: I have my own domain
        Second: It’s not gmail, apple or a local provider
        Third: The TLD isnt .de or .com but .eu

    • JackFrostNCola ( JackFrostNCola@aussie.zone ) 
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I have plenty of website reject even my fairly vanilla [email]+XYZ@ address add–ons

    • notarobot ( notarobot@lemmy.zip ) 
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I’m not sure I blame the sites. The spec is so complex that it’s not even possible to know which regex to use

      • axEl7fB5 ( axEl7fB5@lemmy.cafe ) 
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago
        const emailRegExp = /^[\w.!#$%&'*+/=?^`{|}~-]+@[a-z\d-]+(?:\.[a-z\d-]+)*$/i;
        

        per the HTML specification. From https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Form_validation#validating_forms_without_a_built-in_api

        • notarobot ( notarobot@lemmy.zip ) 
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          That’s one very random place to find that. There are a lot of different one and there is no way we all just agree to use that one.

          Look art his site that shows a more complete and (in theory) official website. While also explaining that there is no regex that is perfect

          https://emailregex.com/

          (Compete regex for the lazy)

          (?:\[a-z0-9!#$%&'\*+/=?^\_\`{|}\~-]+(?:\\.\[a-z0-9!#$%&'\*+/=?^\_\`{|}\~-]+)\*|"(?:\[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\\\\[\x01-\x09\x0b\x0c\x0e-\x7f])\*")@(?:(?:\[a-z0-9]\(?:\[a-z0-9-]\*\[a-z0-9])?\\.)+\[a-z0-9]\(?:\[a-z0-9-]\*\[a-z0-9])?|\\\[(?:(?:25\[0-5]|2\[0-4]\[0-9]|\[01]?\[0-9]\[0-9]?)\\.){3}(?:25\[0-5]|2\[0-4]\[0-9]|\[01]?\[0-9]\[0-9]?|\[a-z0-9-]\*\[a-z0-9]:(?:\[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\\\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\\])
          
          • axEl7fB5 ( axEl7fB5@lemmy.cafe ) 
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            MDN isn’t a very random place?

            • notarobot ( notarobot@lemmy.zip ) 
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              No. But it’s on the form validation topic.

      • bignose ( bignose@programming.dev ) 
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        The spec is so complex that it’s not even possible to know which regex to use

        Yes. Almost like a regex is not the correct tool to use, and instead they should use a well-tested library function to validate email addresses.

        • notarobot ( notarobot@lemmy.zip ) 
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Exactly! But its not obvios. So most of those shitty websites don’t even know they have a problem.

          Then there are also people ignoring it on purpose. I once read a reddit comment saying 'well of your address looks like “John wick 🐶❤️”@2001:0db8:85a3:0000:0000:8a2e:0370:7334 I don’t event want your email in my DB because oit will break something

      • ulterno ( ulterno@programming.dev ) 
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        I have a feeling, the ones codapine is stating, didn’t even care to half-read the spec and just went with what they knew from experience.
        Maybe they didn’t even know there was a spec.
        Maybe they asked ChatGPT for the regex.

    • BlushedPotatoPlayers ( BlushedPotatoPlayers@sopuli.xyz ) 
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I have a spam collecting address @freemail.hu , the domain is live and working since 96, sometimes it’s not accepted, because it’s not Gmail I guess

  • dumnezero ( dumnezero@piefed.social ) 
    link
    fedilink
    English
    arrow-up
    16
    ·
    1 year ago

    Thanks to RFC 6532, Zalgo text is a-okay.

    hmmm…

    Yay! You’re average! Time to start making plans for what you’ll do when an LLM takes your job.

    I already have plans.

  • Cam ( dawcas@scribe.disroot.org ) 
    link
    fedilink
    arrow-up
    12
    ·
    1 year ago

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

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

    • /home/pineapplelover ( pineapplelover@lemmy.dbzer0.com ) 
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      13 here too

  • Speiser0 ( Speiser0@feddit.org ) 
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago

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

  • brisk ( brisk@aussie.zone ) 
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago
    Tap for spoiler

    Email addresses can have comments?!

    • Frezik ( frezik@lemmy.blahaj.zone ) 
      link
      fedilink
      English
      arrow-up
      7
      ·
      1 year 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.

  • rumba ( rumba@lemmy.zip ) 
    link
    fedilink
    English
    arrow-up
    11
    ·
    1 year ago

    I lost it at the fork bomb. I mean I hit valid because there was no way it was on the and not valid, but there’s no way i’d have expected that. after that I just kept guessing the most stupid answer and did pretty well

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
    • If the mod doesn’t find it funny, you’re banned. Ha-ha!.. For real: do not use the community for “statements”. There are other places for such content. Keep it chill and funny.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.22K users / day
  • 3.15K users / week
  • 4.66K users / month
  • 7.96K users / 6 months
  • 462 local subscribers
  • 33.8K subscribers
  • 1.59K Posts
  • 26.1K Comments
  • Modlog
  • mods:
  • Feyter ( Feyter@programming.dev ) 
  • adr1an ( anzo@programming.dev ) 
  • BurningTurtle ( BurningTurtle@programming.dev ) 
  • Pierre-Yves Lapersonne ( pylapp@programming.dev ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code