The steps in this document are for advanced users only.
The Exim system filter file scans messages that your server has received, but that it has not yet delivered. To add custom filter rules to your Exim configuration, you may either create custom filter rule files for Exim to include in its configuration, or create a custom Exim system filter file.
How to create a custom filter rule file
To create a custom filter rule file, perform the following steps:
- Create a file in the
Within that file, enter your custom filter rules. For example, to block mail from
firstname.lastname@example.org, add the following rule:
- Navigate to WHM's Exim Configuration Manager interface (WHM >> Home >> Service Configuration >> Exim Configuration Manager). In the Basic Editor section, select the Filters tab.
- Disable any undesired filter rules.
- Click Save.
The Exim configuration enables all of the custom filter rules within the
How to create a custom Exim system filter file
To create a custom system filter file, perform the following steps:
Log in to the server as the
Run the following command to copy the
We strongly recommend that you copy this file before you edit it. If you experience problems, use the file to revert your changes.
Confirm that the new file has the following ownership and file permissions:
- Use your preferred text editor to edit the
- Navigate to WHM's Exim Configuration Manager interface (WHM >> Home >> Service Configuration >> Exim Configuration Manager).
In the Basic Editor section of the interface, select the textbox option for the System Filter File setting.
Regardless of which option you select, the Exim configuration will include all of the files within the
- Enter the new file's absolute path in the text box (for example,
Exim restarts when you save changes in the Exim Configuration Manager interface.
For more information about the Exim system filter file, visit Exim's system filter documentation.
How to block additional extensions
file is the system's default filter file. It contains the following sections:
- Single-part MIME messages with suspicious name extensions.
- Single-part MIME messages with suspicious name extensions that use unquoted filenames.
- Embedded VBS attachments.
- Embedded VBS attachments that use unquoted filenames.
To block a new extension, edit the regular expressions in the following lines:
To unblock an extension, remove it from those regular expressions.
For example, if you blocked the
.foo extension, your changes would resemble the following example: