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.6k 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 wirestyle22

      \.ar>{0,1}$ will block it all, but I need a way to exclude country codes. Anyone better at regex than me that can help?

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

        Block it out where? Regex is a generic term.

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

          @scottalanmiller e-mail filtering

          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?:

            @scottalanmiller e-mail filtering

            Email filtering is also not a specific thing. What email filter?

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

              Wouldnt it make more sense to do this on your DNS?

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

                @scottalanmiller Barracuda E-mail Security Gateway

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • JaredBuschJ
                  JaredBusch
                  last edited by

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

                  wirestyle22W 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 in e-mail?:

                    @scottalanmiller Barracuda E-mail Security Gateway

                    We would never have guessed that 🙂

                    What regex do they use?

                    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 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

                      @scott.com.ar is argentina. If this is a country we happen to communicate with I need to be able to exclude

                      How would you title this thread?

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

                        @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.

                        wirestyle22W 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?:

                          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
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post