• pyre@lemmy.world
    link
    fedilink
    arrow-up
    23
    ·
    7 days ago

    nice. though valid but obsolete is not a thing… if it’s obsolete it’s invalid.

  • codapine@lemmy.zip
    link
    fedilink
    arrow-up
    23
    ·
    7 days 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.

      • Appoxo@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        1
        ·
        6 days 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

    • BlushedPotatoPlayers@sopuli.xyz
      link
      fedilink
      arrow-up
      2
      ·
      7 days 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

    • notarobot@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      6 days 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

      • bignose@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        6 days 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@lemmy.zip
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          5 days 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

        • notarobot@lemmy.zip
          link
          fedilink
          arrow-up
          1
          ·
          6 days 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])+)\\])
          
      • ulterno@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        6 days 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.

  • geissi@feddit.org
    link
    fedilink
    English
    arrow-up
    10
    ·
    7 days ago

    I vaguely remember a panel where a guy went through various cases like these.

    One of the things that stood out is that not every email provides implements the same specs, so one provider might allow you to set up a “valid” email address that might not be able to communicate with other providers as they consider it “invalid”.

  • lefaucet@slrpnk.net
    link
    fedilink
    arrow-up
    2
    ·
    6 days ago

    So much better than I thought it would be! Thank you for making the world a better & more informed place

  • gedhrel@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    6 days ago

    I kind of expected a lot of this; I remember the sendmail 4 book from back in the day when O’Reilly had that, DNS and BIND, and Perl as the entirety of its corpus.

  • Mikelius@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    7 days ago

    And after that, I now can’t wait for the next pull request with a regular expression on email validation to come through.

    • lemmyng@piefed.ca
      link
      fedilink
      English
      arrow-up
      52
      ·
      8 days 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@infosec.pub
        link
        fedilink
        English
        arrow-up
        37
        ·
        8 days ago

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

        • JohnEdwa@sopuli.xyz
          link
          fedilink
          arrow-up
          25
          ·
          edit-2
          7 days 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

          • NaibofTabr@infosec.pub
            link
            fedilink
            English
            arrow-up
            6
            ·
            7 days 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?

          • Frezik@lemmy.blahaj.zone
            link
            fedilink
            English
            arrow-up
            11
            ·
            7 days 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>
            
  • irish_link@lemmy.world
    link
    fedilink
    arrow-up
    73
    ·
    8 days ago

    THIS THING IS STUPID!!!

    Or it’s just me that is the fool. Thanks for sharing. I just learned about 9 new things.

    • rtxn@lemmy.world
      link
      fedilink
      arrow-up
      42
      arrow-down
      1
      ·
      edit-2
      8 days ago

      All of the modern internet is built on the decaying carcasses of temporary solutions and things that seemed like a good idea at the moment but are now too widely used to change.