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.

Are mail filters case sensitive

Discussion in 'E-mail Discussions' started by Bosque Bill, Jan 17, 2015.

  1. Bosque Bill

    Bosque Bill Member

    Joined:
    Jan 9, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I couldn't find anywhere if terms used in mail filters are case sensitive or not?

    Example, I set up a filter:

    Any Header contains Brain Stimulator

    will that be true for "brain stimulator"? or do I need to use regex for case insensitivity?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    When creating an account or user-level filter in cPanel, the words "is", "matches", "contains", "begins", and "ends" are written in lowercase to the file at /etc/vfilters/${DOMAIN}. This allows for case-insensitive matching.

    Thank you.
     
  3. Bosque Bill

    Bosque Bill Member

    Joined:
    Jan 9, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the reply, Michael. I tried to find the file you describe, being a curious fellow, but did not see a vfilters directory under etc. I did find a filters.cache in the .cpanel directory which does seem to contain my account-level filters.

    I'll grant that maybe I'm not understanding your explanation and the file to which you refer lies upstream only within the purview of the cPanel code and/or database. The file I did find within /home/[username] is as follows.

    File Manager View shows:

    filter.cache
    perl Storable(v0.7) data (network-ordered) (major 2) (minor 9)


    And the file begins with the "Brain Power" filter:

    pst0 C
    /dev/null dest
    save action actions
    Brain Power
    filtername
    1 unescaped
    containsmatch
    $message_headerspart
    oropt
    Brain Power val rules
    1 enabled
    /dev/null dest
    save action actions


    My hope is that this filter would match "Brain Power" or "brain power" and so forth.

    Thanks.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The /etc/vfilters directory is only accessible with "root" access to the server your website is hosted on. Case-insensitive matching happens by default with filters created in cPanel.

    Thank you.
     
  5. Bosque Bill

    Bosque Bill Member

    Joined:
    Jan 9, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the clarification. I appreciate your taking time to reply.
     
Loading...

Share This Page