Email filters operator precedence
Hi all,
I wonder whether cPanel email filters follow standard mathematical logical operators precedence, or it uses another logic. I mean what if I add 5 filters with 4 operators, out of which 2 OR & 2 AND. Accordingly to normal rules, AND has higher precedence than OR, however it's common to use a scheme like (Filter1 OR Filter2 OR Filter3 OR ...) AND Filterx. But there are no parenthesis in cPanel's email filter GUI, how does it interpret a syntax like "Filter1 OR Filter2 OR Filter3 AND Filterx" ?
Thanks, Peter
-
Do I really have to multiply the last ANDed Filter as many times as there are ORed ones ?
And what about more complicated expressions ?
0 -
Hey there! Email filters are read in the order they appear on the page, from top to bottom. The OR conditions are also read in order the same way.
0 -
So you say, given the expression :
Filter1 OR Filter2 AND Filter3
is interpreted as :
1. Filter1 is evaluated.
2. Filter2 is evaluated, and is ORed with Filter1. Let's name this Result1.
3. Then, Filter3 is evaluated, and is ANDed with Result1.So therefore
Filter1 OR Filter2 AND Filter3 = (Filter1 OR Filter2) AND Filter3
Filter1 AND Filter2 OR Filter3 = (Filter1 AND Filter2) OR Filter3so
Filter1 OP1 Filter2 OP2 Filter3 ... OPn Filtern
is equal to
(((Filter1 OP1 Filter2) OP2 Filter3) ...) OPn FilternReally ?
0 -
I'm not sure what your bottom section means with all the parenthesis, but I agree with everything else, yes.
0
Please sign in to leave a comment.
Comments
4 comments