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!

Multiple Rules in e-mail filter

Discussion in 'E-mail Discussion' started by JJAC, Mar 16, 2009.

  1. JJAC

    JJAC Member

    Joined:
    Feb 18, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    51
    If I set up an e-mail filter with more than two rules, how do they get
    grouped?

    For example if I enter A or B and C, does that get processed as:
    (A or B) and C
    or as
    A or (B and C)
    ?

    Is there any way to set up a filter with the following grouping of rules:
    (A or B) and (C or D)
    ?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    EDIT: See JJAC's post below.
     
    #2 cPanelDavidG, Mar 23, 2009
    Last edited: Mar 23, 2009
  3. JJAC

    JJAC Member

    Joined:
    Feb 18, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    51
    I did some testing on my own, and it seem to me that AND is always processed before OR.

    So:
    A or B and C will be processed as: A or (B and C).
    A and B or C will be processed as: (A and B) or C.
    A or B and C or D will be processed as: A or (B and C) or D.

    To acheive (A or B) and (C or D), one must enter:
    A and C or A and D or B and C or B and D
    which will get processed as:
    (A and c) or (A and D) or (B and c) or (B and D).

    It would be nice if cPanel documented this somewhere.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Ah, order of logical operator precedence. That makes sense :).

    I'll bring this to the attention of our documentation team.
     
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