Any changes made to Exim config file doesn't work

Any changes made to exim4.conf.template deesn’t work:

Jun 22 13:39:02 portal systemd[1]: Starting exim4.service - LSB: exim Mail Transport Agent…
Jun 22 13:39:02 portal exim4[7645]: Starting MTA:
Jun 22 13:39:02 portal exim4[7887]: 2024-06-22 13:39:02 Exim configuration error in line 505 of /var/lib/exim4/config.autogenerat>
Jun 22 13:39:02 portal exim4[7887]: Unexpected end of configuration file: .endif missing
Jun 22 13:39:02 portal exim4[7889]: Invalid new configfile /var/lib/exim4/config.autogenerated.tmp, not installing
Jun 22 13:39:02 portal exim4[7889]: /var/lib/exim4/config.autogenerated.tmp to /var/lib/exim4/config.autogenerated
Jun 22 13:39:02 portal systemd[1]: exim4.service: Control process exited, code=exited, status=1/FAILURE
Jun 22 13:39:02 portal systemd[1]: exim4.service: Failed with result ‘exit-code’.
Jun 22 13:39:02 portal systemd[1]: Failed to start exim4.service - LSB: exim Mail Transport Agent.

What changes have you made? Because the error says that there is an .endif missing in the conf.

The same for your other post, if you don’t show what you did…

cat -A /etc/exim4/exim4.conf.template | nc termbin.com 9999

And show the url you will get to view your Exim conf.

root@portal ~ # cat -A /etc/exim4/exim4.conf.template | nc termbin.com 9999
https://termbin.com/1mos
root@portal ~ #
root@portal ~ #

You have the same problem, you need to convert it to unix format.

cd /etc/exim4/
dos2unix exim4.conf.template
systemctl restart exim4

this fixed it. Thank you so much.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.