Exim not starting up. Ubuntu 22.04

root@srv2:/var/log/exim4# systemctl status exim4
● exim4.service - LSB: exim Mail Transport Agent
Loaded: loaded (/etc/init.d/exim4; generated)
Active: active (exited) since Fri 2024-03-15 22:22:46 IST; 4min 27s ago
Docs: man:systemd-sysv-generator(8)
Process: 3147481 ExecStart=/etc/init.d/exim4 start (code=exited, status=0/SUCCESS)
CPU: 2ms

Mar 15 22:22:46 srv2.hypweb.in systemd[1]: Starting LSB: exim Mail Transport Agent…
Mar 15 22:22:46 srv2.hypweb.in systemd[1]: Started LSB: exim Mail Transport Agent.

My Exim Not working.

Yours & ours first aid kit contain the logfiles. Pleae have a look at them.

I don’t have a lot of knowledge.
Where can i find those?

/var/log/exim4/mainlog

File is Empty.

Can Anyone Help on this?

Show the output of these commands (as root):

systemctl start exim4
systemctl status exim4 --no-pager -l
lsof -Pn +c0 -i:25,465,587 -sTCP:LISTEN
v-list-firewall
dpkg -l | grep exim4
ls -la /etc/exim4/
ls -la /var/log/exim4/

● exim4.service - LSB: exim Mail Transport Agent
Loaded: loaded (/etc/init.d/exim4; generated)
Active: active (exited) since Fri 2024-03-15 22:22:46 IST; 23h ago
Docs: man:systemd-sysv-generator(8)
Process: 3147481 ExecStart=/etc/init.d/exim4 start (code=exited, status=0/SUCCESS)
Process: 159896 ExecReload=/etc/init.d/exim4 reload (code=exited, status=0/SUCCESS)
CPU: 2ms

Mar 15 22:22:46 SERVERHOSTNAME systemd[1]: Starting LSB: exim Mail Transport Agent…
Mar 15 22:22:46 SERVERHOSTNAME systemd[1]: Started LSB: exim Mail Transport Agent.
Mar 16 01:51:04 SERVERHOSTNAME systemd[1]: Reloading LSB: exim Mail Transport Agent…
Mar 16 01:51:04 SERVERHOSTNAME systemd[1]: Reloaded LSB: exim Mail Transport Agent.
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)
RULE ACTION PROTO PORT IP SPND DATE


1 ACCEPT ICMP 0 0.0.0.0/0 no 2014-09-16
2 ACCEPT TCP 2083,2087 0.0.0.0/0 no 2023-12-26
3 ACCEPT TCP 143,993 0.0.0.0/0 no 2014-05-25
4 ACCEPT TCP 110,995 0.0.0.0/0 no 2014-05-25
5 ACCEPT TCP 25,465,587 0.0.0.0/0 no 2018-11-07
6 ACCEPT TCP 53 0.0.0.0/0 no 2014-05-25
7 ACCEPT UDP 53 0.0.0.0/0 no 2014-05-25
8 ACCEPT TCP 21,12000-12100 0.0.0.0/0 no 2014-05-25
9 ACCEPT TCP 80,443 0.0.0.0/0 no 2014-09-24
10 ACCEPT TCP 2222 0.0.0.0/0 no 2023-12-26
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
total 88
drwxr-xr-x 4 root root 4096 Mar 15 22:21 .
drwxr-xr-x 132 root root 12288 Mar 15 21:29 …
drwxr-xr-x 9 root root 4096 Dec 25 23:43 conf.d
-rw-r–r-- 1 root root 32 Dec 26 00:02 dnsbl.conf
drwxr-xr-x 2 root root 4096 Jan 29 01:14 domains
-rw-r–r-- 1 root root 20129 Mar 15 22:22 exim4.conf.template
-rw-r----- 1 root root 20133 Mar 15 22:22 exim4.conf.template.vst.back
-rw-r–r-- 1 root root 3 Dec 26 00:02 limit.conf
-rw-r----- 1 root Debian-exim 204 Oct 25 06:06 passwd.client
-rw-r–r-- 1 root root 0 Dec 26 00:02 spam-blocks.conf
-rw-r----- 1 root Debian-exim 17 Dec 26 00:02 srs.conf
-rw-r–r-- 1 root root 442 Dec 26 00:02 system.filter
-rw-r–r-- 1 root root 1036 Dec 25 23:44 update-exim4.conf.conf
-rw-r–r-- 1 root root 0 Dec 26 00:02 white-blocks.conf
total 144
drwxr-s— 2 Debian-exim adm 4096 Mar 15 22:16 .
drwxrwxr-x 19 root syslog 4096 Mar 16 00:00 …
-rw-r–r-- 1 root adm 82228 Mar 15 22:15 hst-install-ubuntu.sh
-rw-r–r-- 1 root adm 4497 Mar 15 22:15 hst-install.sh
-rwxr-xr-x 1 root adm 1495 Mar 15 22:16 install_ioncube.sh
-rw-r–r-- 1 Debian-exim adm 0 Mar 15 21:58 mainlog
-rw-r----- 1 Debian-exim adm 28341 Dec 26 01:03 mainlog.1
-rw-r–r-- 1 root adm 0 Mar 15 21:59 rejectlog
-rw-r----- 1 Debian-exim adm 7066 Dec 26 01:03 rejectlog.1

This was the Output for the commands you told me to run

For the next time, write also the command before the output.

Anyways, what happened to that server? I’m asking because exim4 has been uninstalled and sendmail is installed instead.

i only installed the Server as my pervious backup was corrupted.
Since then, the exim isn’t working

How can i Install it and make sure my mail server is working now? This server has about 50GB of Data

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

Exim is green now.
Checking if a notification mail arrives.

Thsnks for the help.
Working fine now.

1 Like

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