/etc/cpanel_exim_system_filter missing options

phph

Registered
Oct 21, 2015
2
0
1
Berlin, Germany
cPanel Access Level
Root Administrator
I created a custom filter file according to the instructions (How to create a custom filter file), successfully tested it with
Code:
exim -bF /usr/local/cpanel/etc/exim/sysfilter/options/remove_x-php-script < ~/tmp/mail
, activated it in WHM Exim Configuration Manager > Basic Editor > Filters, which should have written a new /etc/cpanel_exim_system_filter. But the newly generated file /etc/cpanel_exim_system_filter does not contain the new filter.

It only contains /usr/local/cpanel/etc/exim/sysfilter/options/attachments but none of the other activated options.

Has anyone got any advice?

As a temporary work-around I have added my filter directly to /etc/cpanel_exim_system_filter which works as expected. But I’d much rather be able to use the system WHM provides.

This is with WHM v70.0.41.

Thanks a lot!
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,126
667
263
Houston
cPanel Access Level
DataCenter Provider
Hi @phph

It sounds like you were still trying to use the original system filter file. Per the documentation:

  1. Navigate to WHM's Exim Configuration Manager interface (WHM >> Home >> Service Configuration >> Exim Configuration Manager).
  2. In the Basic Editor section of the interface, select the textbox option for the System Filter File setting.


  3. Enter the new file's absolute path in the text box (for example, /etc/cpanel_system_filter_new).
You need to update the path to the new system filter file in the exim configuration before it will function.
 

phph

Registered
Oct 21, 2015
2
0
1
Berlin, Germany
cPanel Access Level
Root Administrator
Hi @phph

It sounds like you were still trying to use the original system filter file. Per the documentation:



You need to update the path to the new system filter file in the exim configuration before it will function.
Hi @cPanelLauren

Thank you for your reply!

Just to clarify: If I create a custom filter in /usr/local/cpanel/etc/exim/sysfilter/options/ and activate it using WHM, I still need to set a custom path to a new system filter file? I have not created a new filter file, nor do I want to. I would like to use the sysfilter/options/ and then have WHM build a new system filter file under the default name with the chosen options included.

The file /etc/cpanel_exim_system_filter does get rebuilt when I change options in WHM >> Home >> Service Configuration >> Exim Configuration Manager, but it does not contain the any chosen options from /usr/local/cpanel/etc/exim/sysfilter/options/ apart from the attachments-file.

Is there maybe a custom script in /scripts that generates the filter-file that I could run manually to see if it throws up any errors?

Best

phph
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,126
667
263
Houston
cPanel Access Level
DataCenter Provider
Hi @phph

You do need to create a new system filter file and point exim to that file, otherwise the default system filter file will get rebuilt. There isn't a custom script for this. All you'll need to do is create the new one and add your options to that so the system knows where to look for your customizations.


Thanks!