Symptoms
-
Mail cannot be sent or delivered;
-
Following error can be found in the
/var/log/maillog
:postfix/pickup[1002]: C579B70771A5: uid=10004 [email protected]
postfix/cleanup[2160]: C579B70771A5: [email protected]
postfix/qmgr[25399]: C579B70771A5: [email protected], size=356, nrcpt=1 (queue active)
postfix/qmgr[25399]: warning: connect to transport private/plesk-192.0.2.2-: Connection refused
postfix/error[2162]: C579B70771A5: [email protected], relay=none, delay=0.07, delays=0.05/0.01/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable) -
Postfix cannot be started through the systemd, as it reaches the failed state:
# systemctl status postfix.service
● postfix.service – Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2018-04-28 06:46:18 UTC; 8s ago
Process: 2908 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE)
<…>postfix/master[2981]: fatal: open lock file /var/lib/postfix/master.lock: unable to set exclusive lock: Resource temporarily unavailable
postfix/master[2980]: fatal: daemon initialization failure
systemd[1]: postfix.service: control process exited, code=exited status=1
systemd[1]: Failed to start Postfix Mail Transport Agent. -
There is an instance of Postfix
master
daemon running on the server, which is not tracked by the systemd:# ps -eo cmd | grep [p]ostfix
/usr/lib64/plesk-9.0/psa-pc-remote -p inet:[email protected] -t 7210 -P /run/psa-pc-remote.pid -u postfix -g popuser -n
/usr/libexec/postfix/master -w
Cause
A master
daemon is already running on the server, but cannot spawn required transport daemons.
Resolution
-
Connect to the server via SSH.
-
Stop Postfix process:
# kill -9 $(pgrep master)
-
(Optional) Restore permissions for the master lock file:
# chown postfix:postfix /var/lib/postfix/master.lock
# chmod 600 /var/lib/postfix/master.lock
-
Start the Postfix service again:
# service postfix start