How can make permanent changes in exim.conf?

Operating System & Version
CENTOS 7.7
cPanel & WHM Version
v86.0.17

Nirjonadda

Well-Known Member
May 8, 2013
724
27
78
cPanel Access Level
Root Administrator
Hello,

I followed the following instructions to remove the: X-Ham-Report from message header. Edit /etc/exim.conf and Find and comment out the following line shown below. Restart exim after save the file.

#add_header = X-Ham-Report: ${sg{$spam_report}{\N\n \n\N}{\n}}

Such changes are temporary and will be reverted when UPCP or EximUP runs. How can order to make the changes permanent? If I am right exim.conf.local stores the changes made through Exim configuration editor.

I want my changes will not lost during next Exim update. Can somebody describe what I need to do step by step?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
You can not make any changes directly to the exim configuration file. All customizations need to be made through exim.conf.local where they will be retained once exim is rebuilt.

Which instructions are you following?
 

Nirjonadda

Well-Known Member
May 8, 2013
724
27
78
cPanel Access Level
Root Administrator
Which instructions are you following?
I followed the following instructions to remove the: X-Ham-Report from message header under WHM/CPanel but THIS DIDN'T WORK FOR ME.

To complete this task you do need root access to your server by SSH to create the custom filter, and access to WHM to enable it.

Here are the steps taken:
  1. Login as root (or su root)
  2. Create a file in /usr/local/cpanel/etc/exim/sysfilter/options
    1. I named this file: remove_x_ham_report_header
  3. Edit (nano) this file to include the code shown below
  4. Save the file
  5. Login to WHM
  6. Under "Exim Configuration Manager" -> "Basic Editor" -> "Filters"
  7. Near the bottom you need to enable the newly created filter (it'll be disabled by default), it should be named "Custom Filter: remove_x_ham_report_header"
remove_x_ham_report_header code:

Code:
#HamRemoval
if
$header_to: is "Unsubscribe email address"
then
headers remove "X-Ham-Report"
deliver "Unsubscribe email address"
endif