I don’t know why, but the postfix container is not cleanly starting anymore. And I have no clear idea how I might investigate in this issue since I can’t find any useful information in the logs.

This is the output of the postfix-mailcow container of one “run cycle” (which seems to be ended by the watchdog)

mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:33:06,811 INFO Set uid to user 0 succeeded
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:33:06,814 INFO supervisord started with pid 1
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:33:07,817 INFO spawned: 'processes' with pid 7
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:33:07,821 INFO spawned: 'postfix' with pid 8
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:33:07,841 INFO spawned: 'syslog-ng' with pid 9
mailcowdockerized-postfix-mailcow-1  | Uptime: 30  Threads: 6  Questions: 326  Slow queries: 0  Opens: 53  Open tables: 44  Queries per second avg: 10.866
mailcowdockerized-postfix-mailcow-1  | Nov 26 10:33:07 868c0a0fd539 syslog-ng[9]: syslog-ng starting up; version='3.28.1'
mailcowdockerized-postfix-mailcow-1  | Checking if ASN for your IP is listed for Spamhaus Bad ASN List...
mailcowdockerized-postfix-mailcow-1  | The AS of your IP is NOT listed as a banned AS from Spamhaus!
mailcowdockerized-postfix-mailcow-1  | Using the open Spamhaus blocklists.
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:33:09,633 INFO success: processes entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:33:09,634 INFO success: postfix entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:33:09,634 INFO success: syslog-ng entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
mailcowdockerized-postfix-mailcow-1  | chown: cannot access '/usr/share/man/man1/mailq.1.gz': No such file or directory
mailcowdockerized-postfix-mailcow-1  | Nov 26 10:33:16 868c0a0fd539 postfix/postfix-script[279]: fatal: the Postfix mail system is already running
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:39:15,171 WARN received SIGTERM indicating exit request
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:39:15,172 INFO waiting for processes, postfix, syslog-ng to die
mailcowdockerized-postfix-mailcow-1  | Nov 26 10:39:15 868c0a0fd539 syslog-ng[9]: syslog-ng shutting down; version='3.28.1'
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:39:15,276 INFO stopped: syslog-ng (exit status 0)
mailcowdockerized-postfix-mailcow-1  | /usr/lib/postfix/sbin/postfix-script: 216: kill: No such process
mailcowdockerized-postfix-mailcow-1  | 
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:39:16,328 WARN received SIGQUIT indicating exit request
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:39:18,331 INFO waiting for processes, postfix to die
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:39:21,337 INFO stopped: postfix (terminated by SIGTERM)
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:39:21,337 INFO waiting for processes to die
mailcowdockerized-postfix-mailcow-1  | 2023-11-26 10:39:21,338 INFO stopped: processes (terminated by SIGTERM)

This is the process list of the postfix-mailcow container

$ sudo docker compose top postfix-mailcow 
mailcowdockerized-postfix-mailcow-1
UID    PID       PPID      C    STIME   TTY   TIME       CMD
root   1288601   1288581   0    10:45   ?     00:00:00   /usr/bin/python3 /usr/bin/supervisord -c /etc/supervisor/supervisord.conf   
root   1288673   1288601   0    10:46   ?     00:00:00   /bin/bash /usr/local/sbin/stop-supervisor.sh                                
root   1288674   1288601   0    10:46   ?     00:00:00   /bin/bash /opt/postfix.sh                                                   
root   1288675   1288601   0    10:46   ?     00:00:00   /usr/sbin/syslog-ng --foreground --no-caps                                  
root   1288953   1288674   0    10:46   ?     00:00:00   sleep 126144000

I’ve tried to remove as much of the custom configuration as possible (e.g. move data/conf/postfix/extra.cnf away and let it be recreated during startup).
Where do I need to look for further hints why postfix is not starting?

  • Already solved it myself!
    For whatever reason the master.pid file was left in the container volume postfix-vol-1. This is /var/spool/postfix/pid/master.pid from inside the postfix-mailcow container.
    After removing this file and restarting the postfix-mailcow container postfix started regular.

    docker compose exec postfix-mailcow rm /var/spool/postfix/pid/master.pid

Already solved it myself!
For whatever reason the master.pid file was left in the container volume postfix-vol-1. This is /var/spool/postfix/pid/master.pid from inside the postfix-mailcow container.
After removing this file and restarting the postfix-mailcow container postfix started regular.

docker compose exec postfix-mailcow rm /var/spool/postfix/pid/master.pid

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

a year later
No one is typing