Exim cannot start due to access restrictions

  • Platform information:

    • Hardware: Raspberry Pi3
    • OS: OpenHABian from this website
    • openHAB version: 3
  • Issue of the topic: After setting up Exim through openhabian-config, Exim cannot start. See syslog. I have had the same problem with mosquitto. Therefore I suspect something wrong with the privileges set up with the default distribution for Pi3/OH3. I have not altered the settings in any other way than through openhabian-config

  • If logs where generated please post these here using code fences:
    Jan 24 18:00:42 openhabianpi3 systemd[1]: exim4.service: Succeeded.
    Jan 24 18:00:42 openhabianpi3 systemd[1]: Stopped LSB: exim Mail Transport Agent.
    Jan 24 18:00:42 openhabianpi3 systemd[1]: Starting LSB: exim Mail Transport Agent…
    Jan 24 18:00:43 openhabianpi3 exim[7390]: 2021-01-24 18:00:43 exim 4.92 daemon started: pid=7390, -q30m, listening for SMTP on []:25 [::1]:25
    Jan 24 18:00:43 openhabianpi3 exim[7390]: 2021-01-24 18:00:43 Cannot open main log file “/var/log/exim4/mainlog”: Permission denied: euid=112 egid=119
    Jan 24 18:00:43 openhabianpi3 exim4[7132]: Starting MTA: exim4.
    Jan 24 18:00:43 openhabianpi3 exim[7390]: exim: could not open panic log - aborting: see message(s) above

Do you use ZRAM ?
What is the output of

ls -ld /var/log/exim4/ /var/log/exim4/mainlog

Thanks for replying Wolfgang.

I think I am using zram. This is the result of your command:

ls: cannot access '/var/log/exim4/mainlog': No such file or directory
drwxr-xr-x 2 Debian-exim root 4096 Jan 24 18:03 /var/log/exim4/

I did a check on a system that does not use ZRAM and the permissions of the directory are as follows:

ls -ld /var/log/exim4/ /var/log/exim4/mainlog 
drwxr-s--- 2 Debian-exim adm 4096 Jan 25 07:30 /var/log/exim4/
-rw-r----- 1 Debian-exim adm  404 Jan 25 07:31 /var/log/exim4/mainlog

Either try to repair the permissions of the /var/log/exim4 folder that they look as above manually or stop ZRAM install exim4 and start ZRAM again. These would be the steps that I would try.

Thanks a lot Wolfgang. Exim is running now.

I stopped zram with systemctl stop zram-config
Then went through the openhab-config dialogs and
started zram with systemctl start zram-config
Didn’t work, so I sudo reboot now

And it’s ok now.

Although I am not receiving any mail yet, at least I can read the log to figure out why!