An Exim system filter, which can be found in /etc/system_filter.exim on a server running CentOS used to be installed from a rpm package. And recently (reported on 09-28-2018) Directadmin changed their way to install Exim and manage the filter. Since that custombuild script will take care of the file. And if you have customized it you need to take care of keeping your changes safe.
My system_filter.exim was overwritten after update, how to avoid it?
CustomBuild updates /etc/system_filter.exim if eximconf=yes is set in the options.conf file.
The simplest way would be setting "chattr +i" for it, if you have any customization done to it and eximconf=yes set in the options.conf file. Check it with the following command:
grep ^eximconf= /usr/local/directadmin/custombuild/options.conf
Protect the file
chattr +i /etc/system_filter.exim
and control results with the command
lsattr /etc/system_filter.exim
if you see the similar output
----i---------- /etc/system_filter.exim
It would mean the file is now immutable.
To disable the protection run the following command:
chattr -i /etc/system_filter.exim
It would be an official way on how to keep customization safe with Custombuild and Directadmin. Run the following commands:
mkdir -p /usr/local/directadmin/custombuild/custom/exim cd /usr/local/directadmin/custombuild/custom/exim [ -f ./system_filter.exim ] || cp -p /etc/system_filter.exim .
and control it with the following command:
ls -1 /usr/local/directadmin/custombuild/custom/exim/system_filter.exim
expected results:
/usr/local/directadmin/custombuild/custom/exim/system_filter.exim
That's it.
A related thread on Directadmin forums: