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!

Are mail filters case sensitive

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

  1. Bosque Bill

    Bosque Bill Member

    Joined:
    Jan 9, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    51
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Bosque Bill

    Bosque Bill Member

    Joined:
    Jan 9, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    51
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Bosque Bill

    Bosque Bill Member

    Joined:
    Jan 9, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    51
    Thanks for the clarification. I appreciate your taking time to reply.
     
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