ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?

    Scheduled Pinned Locked Moved IT Discussion
    regexe-mailfiltering
    24 Posts 5 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller @wirestyle22
      last edited by

      @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

      How would you title this thread?

      We aren't sure, as we need a clear goal. You are asking a technical question that doesn't have any obvious goal to accomplish.

      1 Reply Last reply Reply Quote 0
      • wirestyle22W
        wirestyle22 @JaredBusch
        last edited by wirestyle22

        @JaredBusch said in How do I block anything after .com that is not a country code with a regular expression in e-mail?:

        @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression in e-mail?:

        @JaredBusch said in How do I block anything after .com that is not a country code with a regular expression for e-mail?:

        I don't even know WTF the title of this means.
        After .com means more shit after the m? Like this? [email protected]

        @jareddoesntunderstandthetitle.com.*

        but I need it to not block country codes as some of our doctors communicate internationally

        What about .org or .net or .tokyo or .tech? These are all valid.

        What about hotmail.co.jp? It is not after .com...

        WTF are you actually trying to accomplish here?
        This just seems like a disaster.

        .jp would be excluded because it's a country code. I'd apply the same regex to .co .org, .net .tokyo.

        1 Reply Last reply Reply Quote 0
        • wirestyle22W
          wirestyle22
          last edited by

          The goal is when an e-mail is coming in from [email protected] EXCEPT country codes, they are blocked.

          scottalanmillerS 2 Replies Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @wirestyle22
            last edited by

            @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

            The goal is when an e-mail is coming in from [email protected] EXCEPT country codes, they are blocked.

            That's 100% different than the original question which was blocking the portion of a URL but keeping the email. We were flabbergasted that you wanted to keep spam coming in, but just alter URLs to look valid but be useless.

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller @wirestyle22
              last edited by

              @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

              The goal is when an e-mail is coming in from [email protected] EXCEPT country codes, they are blocked.

              Simple answer is, if you could do this, every spam filter would do it automatically. They don't, because it can't be done reliably.

              wirestyle22W 1 Reply Last reply Reply Quote 1
              • wirestyle22W
                wirestyle22 @scottalanmiller
                last edited by wirestyle22

                @scottalanmiller said in How do I block anything after .com that is not a country code with a regular expression in e-mail?:

                @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                The goal is when an e-mail is coming in from [email protected] EXCEPT country codes, they are blocked.

                Simple answer is, if you could do this, every spam filter would do it automatically. They don't, because it can't be done reliably.

                So it's too broad? I do similar things to usernames such as:

                from:.+<.*\..{2,}\..*\@

                This blocks any e-mail that has two periods in the username but ignores it if it's a single character.

                [email protected] would make it through.
                [email protected] would not.

                It has reduced our spam by 95% and I've only seen 3 instances of false positives in 4 months of it being active.

                scottalanmillerS 2 Replies Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @wirestyle22
                  last edited by

                  @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                  So it's too broad?

                  Yes, too broad to be reliable.

                  1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @wirestyle22
                    last edited by

                    @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                    It has reduced our spam by 95% and I've only seen 3 instances of false positives in 4 months of it being active.

                    The question is, how many false positives are okay?

                    wirestyle22W 1 Reply Last reply Reply Quote 0
                    • wirestyle22W
                      wirestyle22 @scottalanmiller
                      last edited by

                      @scottalanmiller said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                      @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                      It has reduced our spam by 95% and I've only seen 3 instances of false positives in 4 months of it being active.

                      The question is, how many false positives are okay?

                      You try to have as little false positives as possible while also having as little spam as possible. Can't prevent either 100%

                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @wirestyle22
                        last edited by

                        @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                        @scottalanmiller said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                        @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                        It has reduced our spam by 95% and I've only seen 3 instances of false positives in 4 months of it being active.

                        The question is, how many false positives are okay?

                        You try to have as little false positives as possible while also having as little spam as possible. Can't prevent either 100%

                        That's not really an answer. And yes, you can prevent the one 100%.

                        DashrenderD 1 Reply Last reply Reply Quote 1
                        • DashrenderD
                          Dashrender @scottalanmiller
                          last edited by

                          @scottalanmiller said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                          @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                          @scottalanmiller said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                          @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                          It has reduced our spam by 95% and I've only seen 3 instances of false positives in 4 months of it being active.

                          The question is, how many false positives are okay?

                          You try to have as little false positives as possible while also having as little spam as possible. Can't prevent either 100%

                          That's not really an answer. And yes, you can prevent the one 100%.

                          Exactly - don't filter, and you will have 0% false positives.

                          stacksofplatesS 1 Reply Last reply Reply Quote 0
                          • stacksofplatesS
                            stacksofplates @Dashrender
                            last edited by

                            @Dashrender said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                            @scottalanmiller said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                            @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                            @scottalanmiller said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                            @wirestyle22 said in How do I block anything after .com that is not a country code with a regular expression for e-mail filtering purposes?:

                            It has reduced our spam by 95% and I've only seen 3 instances of false positives in 4 months of it being active.

                            The question is, how many false positives are okay?

                            You try to have as little false positives as possible while also having as little spam as possible. Can't prevent either 100%

                            That's not really an answer. And yes, you can prevent the one 100%.

                            Exactly - don't filter, and you will have 0% false positives.

                            Or block 100% and you have no spam 😊

                            1 Reply Last reply Reply Quote 1
                            • scottalanmillerS
                              scottalanmiller
                              last edited by

                              You will need to trigger the spam filters and get a list of every country domain.

                              1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller
                                last edited by

                                What spam examples will this block?

                                1 Reply Last reply Reply Quote 0
                                • 1
                                • 2
                                • 1 / 2
                                • First post
                                  Last post