There are some parts in exim.conf which you might need to modify. And they can not be changed in included files. DirectAdmin when updating exim's configuration file will rewrite your changes. And here is how you can solve it.
Let's for an example try and modify log_selector in /etc/exim.conf. We are going to add the following attributes:
+incoming_interface +outgoing_interface +incoming_port +outgoing_port
to make logging more verbose with these attributes.
Let's create a patch for it.
The following commands will create a hook for custombuild, which will be executed by the script automatically. Run it as root in a server's console once:
mkdir -p /usr/local/directadmin/custombuild/custom/hooks/exim_conf/post/ cd /usr/local/directadmin/custombuild/custom/hooks/exim_conf/post/ touch poralix_patch_exim_conf.sh chmod 750 poralix_patch_exim_conf.sh cat > poralix_patch_exim_conf.sh <<EOF #!/bin/bash #---------------------------------------------------------------------- # Description: A script to patch exim.conf #---------------------------------------------------------------------- # By Poralix // www.poralix.com echo "Patching log_selector in /etc/exim.conf"; perl -pi -e 's/^log_selector = \\/log_selector = +incoming_interface +outgoing_interface +incoming_port +outgoing_port \\/' /etc/exim.conf; service exim restart; EOF
After the command completes you should see a new file:
This is the patch for exim.conf that will do what we need.
In order to apply the patch run the following command as root:
/usr/local/directadmin/custombuild/build exim_conf
The exim.conf will be patched automatically every time you install it with custombuild.