cPanel updates remove our /etc/antivirus.exim file.

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Hi,

I've noticed that most cPanel updates remove /etc/antivirus.exim

That's a problem for us, because we have some very important anti-spam rules in this file.

So as a result:
cPanel update = Spam flood

I hate to put the immutable bit on antivirus.exim, because for one thing, we are modifying this file throughout the day, and the additional steps would be a bit of a hassle, also may get a little error-prone.

Is there any way to safe have antivirus.exim preserved throughout the cPanel update process?

Thanks much.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello :)

You can use a custom system filter for Exim to add those rules and ensure the changes are preserved. To start, you would copy over the existing Exim filter to the new location:

Code:
cp -a /etc/cpanel_exim_system_filter /etc/cpanel_exim_system_filter_custom
Then, configure the custom filter file as the default filter via the "System Filter File" option under the "Filters" tab in:

"WHM Home » Service Configuration » Exim Configuration Manager"

Within the "/etc/cpanel_exim_system_filter_custom" file, you can add the entries for your custom filter rules.

Thank you.
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
Relief gone:

Now I have looked at all of our servers, and I am finding, apparently after a recent update, that the default setting for /etc/cpanel_exim_system_filter (in the WHM exim configuration), has now reverted back to /etc/antivirus.empty

So I have come full circle, back to the same problem.

Any other ideas?

Question: When this occurs, will the new list I have created in /etc/cpanel_exim_system_filter_custom still be functional, or no?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Please let us know if the following method listed in /etc/cpanel_exim_system_filter is helpful:

Code:
#  1)  #
#  * Place each sysfilter block you wish to include in a unique file at: 
#
#  /usr/local/cpanel/etc/exim/sysfilter/options/ 
#
#  * Enable or disable the custom block in WHM using:
#
#  Service Configuration => Exim Configuration Manager => Filters => Custom Filter: [your unique file]
Thank you.