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.
    • wirestyle22W
      wirestyle22
      last edited by

      The goal is when an e-mail is coming in from any@domain.com.anything 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 any@domain.com.anything 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 any@domain.com.anything 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 any@domain.com.anything 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.

            ian.h.moran@gmail.com would make it through.
            ian.hm.moran@gmail.com 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
                            • 2 / 2
                            • First post
                              Last post