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!

SOLVED Account level filter "or" failing

Discussion in 'E-mail Discussion' started by bear, Feb 23, 2018.

Tags:
  1. bear

    bear Well-Known Member

    Joined:
    Sep 24, 2002
    Messages:
    126
    Likes Received:
    2
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Creating a filter for a single email account based on "from" and "does not contain" domain.tld to fail with error message works perfectly. Add an "or" and a second identical line (with a different domain), and it fails totally, rejecting all email, even from the valid domains in the filter. Checking the logs, it's just saying it was failed because of the filter.

    I'd swear this has worked in the past, but I can't get it to allow more than one such line. I've tried all sorts of different criteria in this, and they all fall over. Have I missed something, or possibly misconfigured something on the server(s)? More than one server does this.
     
  2. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    779
    Likes Received:
    274
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Create multiple rules rather than a complex and/or rule.
    If you want your 2 line rule to work to discard messages that do not have a from <contains> example.com or from <contains> example.net ..... somewhat unintuitively, use the AND operator.
    See the following screenshot filter.jpeg

    Also, remember that complex and/or rules are processed as follows:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 rpvw, Feb 23, 2018
    Last edited: Feb 23, 2018
  3. bear

    bear Well-Known Member

    Joined:
    Sep 24, 2002
    Messages:
    126
    Likes Received:
    2
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Counter intuitive indeed, but that works. :P
    Using AND instead of OR allows the filter to process only the wanted domains, and reject all others.
    Thanks!
     
  4. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    779
    Likes Received:
    274
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    I think you will find the confusion stems from the comparator used:

    Does NOT contain .... something
    AND
    Does NOT contain .... something else
    AND
    Does NOT contain .... something else
    Then do this action

    or

    Contains ... something
    OR
    Contains ... something else
    OR
    Contains ... something else
    Then do this action
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,745
    Likes Received:
    1,884
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    I've marked this thread as solved.

    Thank you.
     
    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