Exim Configuration Editor

vikins

Well-Known Member
Oct 3, 2006
120
1
168
AFAICT, you cannot disable these in the Exim Configuration Editor. You can, however, do it by editing /etc/exim.conf and /etc/exim_outgoing.conf (if you have that one) and changing the line:

headers_add = "${perl{mailtrapheaders}}"

to this:

# headers_add = "${perl{mailtrapheaders}}"

Then stop and start Exim. If your exim.conf is ever recreated, you'll have to redo the mod.
I've been using this method of editing /etc/exim.conf for a long time. We now how the Advanced Exim Configuration editor available in WHM. I see this section in there, but it does not seem to be editable. Can anybody comment if there is a way to make the above change through the editor so that it will be preserved during exim updates and rebuilds?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

The following post from another analyst might help:

Code:
The X-AntiAbuse headers are added by the following in the routers in exim:

headers_add = "${perl{mailtrapheaders}}"

I was able to remove these headers in testing,  but this required basically a complete re-write of Section: POSTMAILCOUNT in Exim's advanced editor as the editor does not let you easily edit these default routers.

Basically,  I copied the whole section,  renamed the routers,  commented out the headers_add lines here and pasted the whole lot into the POSTMAILCOUNT input window in Exim advanced editor.

---------------------
#
# Lookup host router for remote smtp and ignores verisign site finder 'service'
# and uses domain keys
# This matches lookup exactly except we look for X-Boxtrapper: so we can determine
# what is a boxtrapper generated message in the log.  Note: there is nothing to
# prevent X-Boxtrapper from being added to non-boxtrapper messages so this is for
# logging reasons only
#
boxtrapper_verify_dkim_lookuphost_new:
    driver = dnslookup
    domains = ! +local_domains
    condition = "${if eq {$h_X-Boxtrapper:}{}{0}{1}}"
    #ignore verisign to prevent waste of bandwidth
    ignore_target_hosts = +loopback : 64.94.110.0/24
    require_files = "+/var/cpanel/domain_keys/private/${sender_address_domain}"
#    headers_add = "${perl{mailtrapheaders}}"
    transport = dkim_remote_smtp

#
# Lookup host router for remote smtp and ignores verisign site finder 'service' and uses domain keys
#


dkim_lookuphost_new:
    driver = dnslookup
    domains = ! +local_domains
    #ignore verisign to prevent waste of bandwidth
    ignore_target_hosts = +loopback : 64.94.110.0/24
    require_files = "+/var/cpanel/domain_keys/private/${sender_address_domain}"
#    headers_add = "${perl{mailtrapheaders}}"
    transport = dkim_remote_smtp

#
# Lookup host router for remote smtp and ignores verisign site finder 'service'
# This matches lookup exactly except we look for X-Boxtrapper: so we can determine
# what is a boxtrapper generated message in the log.  Note: there is nothing to
# prevent X-Boxtrapper from being added to non-boxtrapper messages so this is for
# logging reasons only
#


boxtrapper_verify_lookuphost_new:
    driver = dnslookup
    domains = ! +local_domains
    condition = "${if eq {$h_X-Boxtrapper:}{}{0}{1}}"
    #ignore verisign to prevent waste of bandwidth
    ignore_target_hosts = +loopback : 64.94.110.0/24
#    headers_add = "${perl{mailtrapheaders}}"
    transport = remote_smtp

#
# Lookup host router for remote smtp and ignores verisign site finder 'service'
#


lookuphost_new:
    driver = dnslookup
    domains = ! +local_domains
    #ignore verisign to prevent waste of bandwidth
    ignore_target_hosts = +loopback : 64.94.110.0/24
#    headers_add = "${perl{mailtrapheaders}}"
    transport = remote_smtp


# This router routes to remote hosts over SMTP by explicit IP address,
# given as a "domain literal" in the form [nnn.nnn.nnn.nnn]. The RFCs
# require this facility, which is why it is enabled by default in Exim.
# If you want to lock it out, set forbid_domain_literals in the main
# configuration section above.


#
# Literal Transports .. ignores verisigns sitefinder service
#

literal_new:
    driver = ipliteral
    domains = ! +local_domains
#    headers_add = "${perl{mailtrapheaders}}"
    ignore_target_hosts = +loopback : 64.94.110.0/24
    transport = remote_smtp
-------------------
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
There's no supported method, however there is a workaround referenced in my previous response.

Thank you.
 

brsnik

Registered
Jul 16, 2016
1
0
1
MKD
cPanel Access Level
Root Administrator
When the server gets restarted, settings are overwritten. Headers are shown again...

What is a way to change it without it getting overwritten??
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
When the server gets restarted, settings are overwritten. Headers are shown again...
Could you let us know the specific steps you took, and what in-particular was overwritten?

Thank you.
 

motanica

Registered
May 3, 2017
1
0
1
Romania
cPanel Access Level
Root Administrator
Hello,

The correct way to do this, is I guess, editing the perl script that generate headers. (don't forget to make a backup of this file before editing)

Code:
nano /etc/exim.pl.local
Then, you carefully should be able to search (ctrl+w) and modify all variables containing : "X-AntiAbuse"

After restarting that config may not be overwritten.