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.

Email Filters Boolean Ordering

Discussion in 'E-mail Discussions' 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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page