Question
How to manage custom, server-wide Exim filters in cPanel, and how to quickly enable and disable them in the WHM UI?
Answer
This guide explains the cPanel specific steps for managing custom server wide filters for Exim.
This guide provides an example with basic logging, new header addition, and basic conditional syntax, but cPanel support is not able to provide support for the details of crafting custom filters to fit your specific needs. Please reach out to a systems administrator or review the documentation for those questions.
Before getting into the specifics of managing custom filters this introduction will also cover some basic concepts to help you understand if a custom Exim filter is the right solution for your situation. Please see the "Procedure" section below for cPanel specifics of managing filters.
- Login to the server via SSH or Terminal as the
rootuser. Create a new text file under the
/usr/local/cpanel/etc/exim/sysfilter/optionsdirectory.# touch /usr/local/cpanel/etc/exim/sysfilter/options/FILTER
Note: Keep in mind that the name of the file you create will be used in the WHM UI in later steps, so it is important to choose a filename that accurately represents what the filter should accomplish.
- Open the newly created file with the text editor of your choice, and add your filter configuration.
- Now that the filter is in place you can enable the new filter via WHM. Login to WHM as the root user.
- Navigate to Home / Service Configuration / Exim Configuration Manager
- Click on the grey Filters tab in the Exim Configuration Manager.
Scroll to the bottom until you see the custom filter:
Note: The yellow exclamation point indicates that a new option has been enabled, but Exim has not yet been restarted so the change is not yet in effect.
- Set the option for that filter to either On or Off.
Click the blue Save button to rebuild the Exim configuration to include this new filter and restart Exim to read the newly built configuration.
Warning: If there is a syntax or other problem with your new filter, Exim may fail to start properly. Pay close attention to the output provided on the next screen for any possible error messages.
- Login to WHM as the
rootuser. - Navigate to: Home / Service Configuration / Exim Configuration Manager
- Click on the grey Filters tab in the Exim Configuration Manager.
- Scroll to the bottom and look for the custom filter of interest.
- Set the option for that filter to either On or Off.
- Click the blue Save button to rebuild the Exim configuration and restart.
Comments
0 comments
Article is closed for comments.