Good evening everybody,
I’ve just spawn a Debian 12 droplet on DigitalOcean for getting some more realistic testing scenarios around NS8.
After installation and configuration of ns8-mail the postfix container within mail module was not able to bind to port TCP/25 and constantly restarted.
024-03-19T00:01:11+01:00 [1:mail1:systemd] Started postfix.service - Postfix MTA/MSA server.
2024-03-19T00:01:13+01:00 [1:mail1:postfix/postfix-script] the Postfix mail system is not running
2024-03-19T00:01:14+01:00 [1:mail1:postfix/postfix-script] starting the Postfix mail system
2024-03-19T00:01:14+01:00 [1:mail1:postfix/master] fatal: bind 0.0.0.0 port 25: Address in use
2024-03-19T00:01:15+01:00 [1:mail1:podman] 2024-03-18 23:01:15.612948608 +0000 UTC m=+0.538394023 container died 1115cb2595282d3c745da8e0f72421b97d6110e6ea6db20eb3f6b4b7861fbc30 (image=ghcr.io/nethserver/mail-postfix:1.3.4, name=postfix, PODMAN_SYSTEMD_UNIT=postfix.service, io.buildah.version=1.23.1)
2024-03-19T00:01:15+01:00 [1:mail1:podman] 2024-03-18 23:01:15.651481958 +0000 UTC m=+0.576927343 container cleanup 1115cb2595282d3c745da8e0f72421b97d6110e6ea6db20eb3f6b4b7861fbc30 (image=ghcr.io/nethserver/mail-postfix:1.3.4, name=postfix, PODMAN_SYSTEMD_UNIT=postfix.service, io.buildah.version=1.23.1)
2024-03-19T00:01:15+01:00 [1:mail1:systemd] postfix.service: Main process exited, code=exited, status=1/FAILURE
2024-03-19T00:01:15+01:00 [1:mail1:podman] 2024-03-18 23:01:15.82923951 +0000 UTC m=+0.150357443 container remove 1115cb2595282d3c745da8e0f72421b97d6110e6ea6db20eb3f6b4b7861fbc30 (image=ghcr.io/nethserver/mail-postfix:1.3.4, name=postfix, PODMAN_SYSTEMD_UNIT=postfix.service, io.buildah.version=1.23.1)
2024-03-19T00:01:15+01:00 [1:mail1:postfix] 1115cb2595282d3c745da8e0f72421b97d6110e6ea6db20eb3f6b4b7861fbc30
2024-03-19T00:01:15+01:00 [1:mail1:systemd] postfix.service: Failed with result 'exit-code'.
2024-03-19T00:01:15+01:00 [1:mail1:systemd] postfix.service: Consumed 3.227s CPU time.
2024-03-19T00:01:15+01:00 [1:mail1:systemd] postfix.service: Scheduled restart job, restart counter is at 154.
Cause: Debian 12 (not sure if by default or only within the DigitalOcean image) spawns exim4 on the host OS (packages: exim4-daemon-light exim4-base exim4-config) thus port TCP/25 is already bound.
As it is a testing system I’ve simply uninstalled exim4 and voilá postfix container starts fine and is reachable.
My suggestion: Might it be feasible to check (e.g. during configure-module) if anything else is listening on TCP/25 and at least display a notification within the UI?
I’d rather not suggest to disable or even remove the OS-shipped mail server as this might lead to OS-level notifications not getting delivered at all. I myself use nullmailer for that, this could also be an alternative for others as well.
Kind regards
Christoph