Introduction
A system-level filter can block email for an entire server based on the subject line. This article provides the steps to create such a filter.
Procedure
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Create the filter file.
touch /usr/local/cpanel/etc/exim/sysfilter/options/block_subjects.conf
- Open the file in your preferred text editor.
- Add the following to the text file.
if ("$h_subject:" contains "example subject")Please note that "example subject" must be replaced with the text that should be matched. You can also add additional if/then/endif statements for each additional text string you want matched.
then fail
endif - Log in to WHM as the ‘root’ user.
- Navigate to "Home / Service Configuration / Exim Configuration Manager."
- Click on the Filters tab.
- Verify that the custom filter just created is enabled.
- Click the "Save" button.
Comments
0 comments
Article is closed for comments.