I'd like to know if the email filters in Cpanel can be set to filter on more headers.
I'm setting up a PHP script to deal with emails sent to support@domain. The script works fine but I need to be able to set up further filters.
I began by setting up a filter to pipe mail to the PHP script where the "To" field contained "support@domain". This works wonderfully.
I also need to set up filters so that mail with "support@domain" gets piped if it is in the CC or BCC fields.
I know that I can choose to set up a filter with the option "Any header" but this is not proving too useful, as an email addressed to "support@domain" is likely to have the string "support@domain" present more than once in the entire headers, meaning that with such a filter mail addressed to support@domain normally gets passed on to the PHP script twice.
I tried manually editing the .filter file in /home/accountusername/ from:
toCode:$header_to: contains "support@domain"+++++++|/home/accountusername/path/to/script.php
and evenCode:$header_cc: contains "support@domain"+++++++|/home/accountusername/path/to/script.php
But this fails to filter mail on the CC header and obviously isn't the right thing to do.Code:$header_cc: contains "support@domain"+++++++|/home/accountusername/path/to/script.php $header_to: contains "support@domain"+++++++|/home/accountusername/path/to/script.php
Any idea how I can filter mail specifically on the CC and BCC fields?



LinkBack URL
About LinkBacks
Reply With Quote





