Are mail filters case sensitive

Bosque Bill

Member
Jan 9, 2008
6
0
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?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.
 

Bosque Bill

Member
Jan 9, 2008
6
0
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.