How to Build a Custom Filter Rule File

February 17, 2024 / How-to Guide

This guide helps in understanding how to build a custom filter rule file. Creating a custom filter rule file provides administrators with the flexibility to tailor email-filtering criteria to their organization’s needs, ensuring efficient management, and adherence to specific policies or standards.

To build a custom filter rule file, follow the steps:

  1. Generate a file in the /usr/local/cpanel/etc/exim/sysfilter/options/ directory.
  2. Inside the file, input your personalised filter rules; for instance, to prohibit emails from [email protected], include the subsequent rule-
    if ("$h_from:" contains "[email protected]")
    then fail
  3. Go to WHM’s Exim Configuration Manager Interface (WHM » Home » Service Configuration » Exim Configuration Manager), and within the Basic Editor section, choose the Filters tab.
  4. Turn off any unnecessary filter rules, then save your changes.
    Caution: By default, the Exim configuration activates all custom filter rules located in the /usr/local/cpanel/etc/exim/sysfilter/options/ directory.

This way, you can build a custom filter rule file. Hope you liked our article. Should you have any query, feel free to contact our support staff. They are available 24/7 for you.

Spread the love