The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

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

  1. toplisek

    toplisek Active Member

    Joined:
    Jan 7, 2010
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    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:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. toplisek

    toplisek Active Member

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

    Is this correct?
     
  4. jayharland

    jayharland Member

    Joined:
    Apr 18, 2014
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    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 Active Member

    Joined:
    Jan 7, 2010
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    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:
    243
    Likes Received:
    3
    Trophy Points:
    18
    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.
     
  7. toplisek

    toplisek Active Member

    Joined:
    Jan 7, 2010
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page