Modifying exim4.conf.template so that an upgrade doesnt override the changes i made

Hey Team,

I hope you are all well and looking forward to the weekend.

I need to add a line to the exim4.conf.template file, but im concerned that any update hestia pushes will clear the line i’ve added.

Is there a correct way to do this so that additions dont get wiped on a new push to the exim4.conf.template file?

Cheers :slight_smile:

Usually exim4.conf.template is not overwritten by HestiaCP updates. I have around a 20 HestiaCP servers with the exim4.conf.template file modified, and none of them have ever had any problem with it during all these years.

Also, if you want to be sure, just in case HestiaCP records changes (I doubt it in this case), you can edit it via the “Server Settings” icon (a gear icon on the top right under the admin user) and then edit the “Exim4” service, where you will be editing exim4.conf.template via the HestiaCP panel.

Ahhhhh … Nice one :slight_smile:

Thanks so much for the reply!

What are you changing/adding?

I’m asking because Hestia doesn’t replace the exim4.conf.template completely but it could replace specific directives.

For example, recently we modified the deny message for dns block lists to:

deny    message       = Rejected because $sender_host_address is in a black list at ${if match{$dnslist_domain}{^[^.]+[.](.+dq[.]spamhaus.*)}{$1}{$dnslist_domain}}\n$dnslist_text

And in a next release we will also modify the dkim_selector directive.

Hey @sahsanu

I am using Tenants in AWS SES, that requires headers to map, so im adding a headers_add line after the driver in the smtp_relay_smtp like so;

smtp_relay_smtp:
driver = smtp
headers_add = ${lookup{$sender_address_domain}lsearch{/etc/exim4/ses_tenants}{X-SES-TENANT: $value\nX-SES-CONFIGURATION-SET: email-tenants}}
hosts_require_auth = $host_address
hosts_require_tls = $host_address

Ok, then you should have no problem :wink:

Beautiful :slight_smile:

Thank you :folded_hands: