Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to block all IP's from certain countries which use .EU extension?

Discussion in 'E-mail Discussion' started by toplisek, Nov 7, 2014.

  1. toplisek

    toplisek Well-Known Member

    Joined:
    Jan 7, 2010
    Messages:
    139
    Likes Received:
    8
    Trophy Points:
    68
    How to block all IP's from certain countries which use .EU extension?

    I have seen massive spam messages using .EU extension and certain countries (outside EU...).

    How to block inside Accounting filtering?
    Is this technically possible?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,513
    Likes Received:
    424
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. toplisek

    toplisek Well-Known Member

    Joined:
    Jan 7, 2010
    Messages:
    139
    Likes Received:
    8
    Trophy Points:
    68
    So, I should put for all discarded messages the following:
    Rules: From, Matches regex
    \.link(\>)?$
    \.us(\>)?$

    Is this correct?
     
  4. jayharland

    jayharland Active Member

    Joined:
    Apr 18, 2014
    Messages:
    30
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Website Owner
    Here is what I use to block all foreign or country specific domains.

    From --- Matches Regex
    .*@.*\.(?!(.*\.)?(com|net|org|int|edu|gov|biz|mil|coop|us))

    This will only let through emails coming from .com, .net, .org, etc.

    The downside is that the web is changing, there are now .ws and other domains that are legit and not top level country domains. I've had to tweak this filter a lot by combining it with other filters using AND.
     
  5. toplisek

    toplisek Well-Known Member

    Joined:
    Jan 7, 2010
    Messages:
    139
    Likes Received:
    8
    Trophy Points:
    68
    I'm new to this.

    1. Is there official website and article to use Regex syntax?
    2. You use actually ALLOW. How to BLOCK ONLY EU and additionally
    3. How to block .EU ONLY from outside Europe? We have seen many SPAM using .EU and outside Europe.


    Is this possible?
     
  6. lorio

    lorio Well-Known Member

    Joined:
    Feb 25, 2004
    Messages:
    286
    Likes Received:
    11
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    How do you currently recognize that the SPAM mail with a .EU email adress is from outside of Europe?
    How do you define outside of Europe technically?

    Via IP-adress from the sending server? From other IP-Adresses inside the mailheader? Or something else?

    I would resist implementing such a rule if you offer email services to paying customers.
    Emails with .EU TLD outside of Europe is NO reliable indicator for SPAM.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. toplisek

    toplisek Well-Known Member

    Joined:
    Jan 7, 2010
    Messages:
    139
    Likes Received:
    8
    Trophy Points:
    68
    I see Message preferences. It shows me an IP outside EU using .EU extension.

    In the start I will block .US domains.

    How to change this: From --- Matches Regex into disallow .US?
    .*@.*\.(?!(.*\.)?(com|net|org|int|edu|gov|biz|mil|coop|us))
     
    #7 toplisek, Nov 12, 2014
    Last edited: Nov 12, 2014
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,142
    Likes Received:
    1,932
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice