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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    124
    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:
    631
    Likes Received:
    200
    Trophy Points:
    43
    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:
     
    #2 rpvw, Feb 23, 2018
    Last edited: Feb 23, 2018
  3. bear

    bear Well-Known Member

    Joined:
    Sep 24, 2002
    Messages:
    124
    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:
    631
    Likes Received:
    200
    Trophy Points:
    43
    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
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    I've marked this thread as solved.

    Thank you.
     
Loading...

Share This Page