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!

Account Level Filter for IP Range

Discussion in 'E-mail Discussion' started by drippin, Apr 29, 2014.

  1. drippin

    drippin Registered

    Joined:
    Apr 29, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I am using Account Level Filtering to block spam. I recently found that most US spam comes from IP ranges, so I am trying to use "Matches Regex" to block the ranges. My example below is the Regex to block range 198.46.152.0 to 198.46.152.255:

    \b\[198\.46\.152\.(?:12[0-7]|1[01][0-9]|[1-9]?[0-9])\]\b

    Here is my filter.yaml content:

    match: matches
    opt: or
    part: $message_headers
    val: \b\[198\.46\.152\.(?:12[0-7]|1[01][0-9]|[1-9]?[0-9])\]\b

    I've tested the regex and it appears OK.

    My question is : Does the rule look correct?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,621
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    Have you considered blocking the IP range under "Access Lists" in "WHM Home » Service Configuration » Exim Configuration Manager", or do you only have cPanel access on this server? Here is a regular expression you could try for the IP range you referenced:

    Code:
    ^198\.46\.152\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. drippin

    drippin Registered

    Joined:
    Apr 29, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Thank you so much. I do not have access to the server. I will try in Account Level Filter.
     
  4. drippin

    drippin Registered

    Joined:
    Apr 29, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I dropped the anchors and it is working.
    Thanks again.
     
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