Exim not starting up. Ubuntu 22.04

This means sendmail is listening on localhost on ports 25 and 587

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sendmail-mta 1283 root 4u IPv4 24317 0t0 TCP 127.0.0.1:25 (LISTEN)
sendmail-mta 1283 root 5u IPv4 24318 0t0 TCP 127.0.0.1:587 (LISTEN)

And this means exim4 has been removed (r) but config files are still installed (c):

rc exim4 4.95-4ubuntu2.4 all metapackage to ease Exim MTA (v4) installation
rc exim4-base 4.95-4ubuntu2.4 arm64 support files for all Exim MTA (v4) packages
rc exim4-config 4.95-4ubuntu2.4 all configuration for the Exim MTA (v4)
rc exim4-daemon-heavy 4.95-4ubuntu2.4 arm64 Exim MTA (v4) daemon with extended features, including exiscan-acl

So something happened.

First I would backup exim4 conf files:

mkdir /root/backup-exim4/
cp -rf /etc/exim4/ /root/backup-exim4/

Then I would reinstall exim:

apt install exim4 exim4-base exim4-config exim4-daemon-heavy

Note: maybe you should remove sendmail, to view what are the installed sendmail packages you can use this command:

dpkg -l | grep -Ei '^ii.*sendmail'

Once exim4 is installed, I would recover main conf file:

cp /root/backup-exim4/exim4/exim4.conf.template /etc/exim4/

And restart exim4:

systemctl restart exim4

As I don’t know what you did or what happened I can’t provide more details.

1 Like