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.

Multiple Rules in e-mail filter

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

  1. JJAC

    JJAC Member

    Joined:
    Feb 18, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    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,279
    Likes Received:
    8
    Trophy Points:
    38
    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:
    1
    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,279
    Likes Received:
    8
    Trophy Points:
    38
    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