joaosavioli

Well-Known Member
Feb 7, 2008
64
11
58
Hi,

I´m trying to use "headers_remove = received" bellow remote_smtp: in exim.conf, but my lines are excluded after cpanel update.
Please, how could I write these line bellow remote_smtp?
remote:smtp:
headers_remove = received

I've tried to use exim advanced editor, but I didn´t know how could I add these lines bellow "remote_smtp:".

Thank you!
Joao
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello Joao,

Can you share some more information about the intent of this customization? We may be able to offer an alternative solution using a supported method of customizing Exim (E.g. using Exim Configuration Manager >> Advanced Editor).

Thank you.
 

joaosavioli

Well-Known Member
Feb 7, 2008
64
11
58
Hi,

Thank you for replying!
The original content is:
remote_smtp:
driver = smtp
interface = <; ${if > {${extract{size}{${stat:/etc/mailips}}}}{0}{${lookup{${lc:${perl{get_message_sender_domain}}}}lsearch{/etc/mailips}{$value}{${lookup{${lc:$original_domain}}lsearch{/etc/mailips}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailips}{$value}{}}}}}}}}
helo_data = ${if > {${extract{size}{${stat:/etc/mailhelo}}}}{0}{${lookup{${lc:${perl{get_message_sender_domain}}}}lsearch{/etc/mailhelo}{$value}{${lookup{${lc:$original_domain}}lsearch{/etc/mailhelo}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}}}}}{$primary_hostname}}
hosts_try_chunking = XX.XX.XX.XX

I'd like to change for:
remote_smtp:
driver = smtp
interface = <; ${if > {${extract{size}{${stat:/etc/mailips}}}}{0}{${lookup{${lc:${perl{get_message_sender_domain}}}}lsearch{/etc/mailips}{$value}{${lookup{${lc:$original_domain}}lsearch{/etc/mailips}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailips}{$value}{}}}}}}}}
helo_data = ${if > {${extract{size}{${stat:/etc/mailhelo}}}}{0}{${lookup{${lc:${perl{get_message_sender_domain}}}}lsearch{/etc/mailhelo}{$value}{${lookup{${lc:$original_domain}}lsearch{/etc/mailhelo}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}}}}}{$primary_hostname}}
headers_remove = received
hosts_try_chunking = XX.XX.XX.XX


Thank you!
Joao
 

joaosavioli

Well-Known Member
Feb 7, 2008
64
11
58
Hi @cPanelMichael, thank you for replying.

In the past, I had my primary domain blocked in spamhaus, and all ip that use any subdomain of the primary domain had listed is spamhaus database. When exim send email with headers, it show the local hostname.

I've fixed the problem in spamhaus, and now I'm free from database, and my intent is prevent the same problem in the future.

Cheers,
Joao
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello Joao,

Thank you for the additional information. It's not possible to make this particular change to the Exim configuration using WHM >> Exim Configuration Manager >> Advanced Editor.

As a workaround, you can first browse to the Backup tab in WHM » Service Configuration » Exim Configuration Manager to create a backup of your current Exim configuration settings. You'd then need to create a custom bash script that automatically replaces the entry in /etc/exim.conf with your preferred changes. Once the custom bash script is developed, you could make use of a Standardized Hook to execute the bash script after every cPanel update:

Tutorial - How to Setup Standardized Hooks with BASH in cPanel & WHM

If you require help from a third-party system administrator, we provide a list of companies offering system administration services on the link below:

System Administration Services | cPanel Forums

Note that it's possible modifying a message's header violates RFC guidelines, so that's something you should research before implementing this workaround.

Additionally, I recommend opening a feature request if you'd like to see support for the ability to edit this Exim configuration value directly from WHM >> Exim Configuration Manager >> Advanced Editor.

Thank you.