Mail server not accessable via port 25, 587

NethServer Version: 8
Module: Mail Server

Looks like Postfix is failing to bind port 25

2024-04-29T16:03:16+12:00 [1:mail1:systemd] Starting postfix.service - Postfix MTA/MSA server...
2024-04-29T16:03:16+12:00 [1:mail1:postfix] [WARNING] ghcr.io/nethserver/mail-postfix:1.3.6 certificate for mail.sianali.online not found
2024-04-29T16:03:16+12:00 [1:mail1:postfix] systemctl --user is-enabled clamav.service
2024-04-29T16:03:16+12:00 [1:mail1:postfix] enabled
2024-04-29T16:03:16+12:00 [1:mail1:podman]
2024-04-29T16:03:16+12:00 [1:mail1:podman] 2024-04-29 16:03:16.992293055 +1200 NZST m=+0.085108651 container create ffa8405b0d72725575c10bae359f5d6446e51efa2df21ae7aa221304e4f396c1 (image=ghcr.io/nethserver/mail-postfix:1.3.6, name=postfix, PODMAN_SYSTEMD_UNIT=postfix.service, io.buildah.version=1.23.1)
2024-04-29T16:03:17+12:00 [1:mail1:podman] 2024-04-29 16:03:16.919859558 +1200 NZST m=+0.012675124 image pull  ghcr.io/nethserver/mail-postfix:1.3.6
2024-04-29T16:03:17+12:00 [1:mail1:systemd] Started libpod-ffa8405b0d72725575c10bae359f5d6446e51efa2df21ae7aa221304e4f396c1.scope - libcrun container.
2024-04-29T16:03:17+12:00 [1:mail1:podman] 2024-04-29 16:03:17.062372602 +1200 NZST m=+0.155188179 container init ffa8405b0d72725575c10bae359f5d6446e51efa2df21ae7aa221304e4f396c1 (image=ghcr.io/nethserver/mail-postfix:1.3.6, name=postfix, PODMAN_SYSTEMD_UNIT=postfix.service, io.buildah.version=1.23.1)
2024-04-29T16:03:17+12:00 [1:mail1:podman] 2024-04-29 16:03:17.069799813 +1200 NZST m=+0.162615399 container start ffa8405b0d72725575c10bae359f5d6446e51efa2df21ae7aa221304e4f396c1 (image=ghcr.io/nethserver/mail-postfix:1.3.6, name=postfix, PODMAN_SYSTEMD_UNIT=postfix.service, io.buildah.version=1.23.1)
2024-04-29T16:03:17+12:00 [1:mail1:postfix] ffa8405b0d72725575c10bae359f5d6446e51efa2df21ae7aa221304e4f396c1
2024-04-29T16:03:17+12:00 [1:mail1:systemd] Started postfix.service - Postfix MTA/MSA server.
2024-04-29T16:03:19+12:00 [1:mail1:postfix/postfix-script] the Postfix mail system is not running
2024-04-29T16:03:19+12:00 [1:mail1:postfix/postfix-script] starting the Postfix mail system
2024-04-29T16:03:19+12:00 [1:mail1:postfix/master] fatal: bind 0.0.0.0 port 25: Address in use
2024-04-29T16:03:20+12:00 [1:mail1:podman] 2024-04-29 16:03:20.631716785 +1200 NZST m=+0.015318373 container died ffa8405b0d72725575c10bae359f5d6446e51efa2df21ae7aa221304e4f396c1 (image=ghcr.io/nethserver/mail-postfix:1.3.6, name=postfix, PODMAN_SYSTEMD_UNIT=postfix.service, io.buildah.version=1.23.1)
2024-04-29T16:03:20+12:00 [1:mail1:podman] 2024-04-29 16:03:20.669380017 +1200 NZST m=+0.052981615 container cleanup ffa8405b0d72725575c10bae359f5d6446e51efa2df21ae7aa221304e4f396c1 (image=ghcr.io/nethserver/mail-postfix:1.3.6, name=postfix, PODMAN_SYSTEMD_UNIT=postfix.service, io.buildah.version=1.23.1)
2024-04-29T16:03:20+12:00 [1:mail1:systemd] postfix.service: Main process exited, code=exited, status=1/FAILURE
2024-04-29T16:03:20+12:00 [1:mail1:podman] 2024-04-29 16:03:20.766761328 +1200 NZST m=+0.063512997 container remove ffa8405b0d72725575c10bae359f5d6446e51efa2df21ae7aa221304e4f396c1 (image=ghcr.io/nethserver/mail-postfix:1.3.6, name=postfix, PODMAN_SYSTEMD_UNIT=postfix.service, io.buildah.version=1.23.1)
2024-04-29T16:03:20+12:00 [1:mail1:postfix] ffa8405b0d72725575c10bae359f5d6446e51efa2df21ae7aa221304e4f396c1
2024-04-29T16:03:20+12:00 [1:mail1:systemd] postfix.service: Failed with result 'exit-code'.
2024-04-29T16:03:20+12:00 [1:mail1:systemd] postfix.service: Consumed 1.007s CPU time.
2024-04-29T16:03:20+12:00 [1:mail1:systemd] postfix.service: Scheduled restart job, restart counter is at 339.
2024-04-29T16:03:20+12:00 [1:mail1:systemd] Stopped postfix.service - Postfix MTA/MSA server.
2024-04-29T16:03:20+12:00 [1:mail1:systemd] postfix.service: Consumed 1.007s CPU time.

Any solutions/thoughts?

check if the port is used by another application normally it should not for a first installation

ss -tulpn | grep :25

you could try to stop and restart postfix with a delay to be sure the port is closed

runagent -m mail1
systemctl --user stop postfix
sleep 5
systemctl --user start postfix

one question what are the ressource of this server, is it a VM, what cpu and ram ?

1 Like
Netid     State      Recv-Q     Send-Q         Local Address:Port           Peer Address:Port     Process
tcp       LISTEN     0          20                 127.0.0.1:25                  0.0.0.0:*         users:(("exim4",pid=1219,fd=4))
tcp       LISTEN     0          20                     [::1]:25                     [::]:*         users:(("exim4",pid=1219,fd=5))

exim4 - it even has a service

# systemctl status exim4
â—Ź exim4.service - LSB: exim Mail Transport Agent
     Loaded: loaded (/etc/init.d/exim4; generated)
     Active: active (running) since Mon 2024-04-29 15:34:20 NZST; 4h 43min ago
       Docs: man:systemd-sysv-generator(8)
    Process: 845 ExecStart=/etc/init.d/exim4 start (code=exited, status=0/SUCCESS)
      Tasks: 1 (limit: 17813)
     Memory: 16.0M
        CPU: 1.305s
     CGroup: /system.slice/exim4.service
             └─1219 /usr/sbin/exim4 -bd -q30m

Stopped exim4 and masked it out, and it looks like I can move forward.

Must have been installed during the initial Debian install.

Thanks

1 Like

Indeed

1 Like