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!

Email Filters Boolean Ordering

Discussion in 'E-mail Discussion' started by jimmyjudas, Dec 14, 2015.

  1. jimmyjudas

    jimmyjudas Registered

    Joined:
    Dec 14, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi,

    What's the best way to set up a filter along the lines of this:

    from:abc@def.com AND (subject:Hello OR subject: Hi)​

    We don't have the option to use parentheses when creating a filter and it's my understanding that entering:

    from:abc@def.com AND
    subject:Hello OR
    subject: Hi
    would be parsed as:

    (from:abc@def.com AND subject:Hello) OR subject: Hi​
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,443
    Likes Received:
    1,962
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Please let us know if this filter rule meets your requirements:

    Code:
    #Test-Filter
    if
    $header_from: is "abc@def.com"
    and $header_subject: contains "Hello"
    or $header_subject: contains "Hi"
    then
    save "/dev/null" 660
    endif
    The use of "and" and "or" is possible under the "Email Filters" option in cPanel:

    How to Configure Mail Filters - cPanel Knowledge Base - cPanel Documentation

    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