I'm at a loss for figuring out why Postfix is giving me grief. It fails to start automatically when I start my machine, but when I manually start it then it works but it also complains with the error message:
Code:
fatal: the Postfix mail system is already running
This is quite odd considering it wasn't actually running, so it's as if it tried to start it twice.
I also get the same behavior when installing it fresh or when installing some other package:
Code:
Setting up postfix (3.4.13-0ubuntu1.2) ...
Postfix (main.cf) configuration was not changed. If you need to make changes,
edit /etc/postfix/main.cf (and others) as needed. To view Postfix
configuration values, see postconf(1).
After modifying main.cf, be sure to run 'systemctl reload postfix'.
Job for postfix.service failed because the control process exited with error code.
See "systemctl status postfix.service" and "journalctl -xe" for details.
invoke-rc.d: initscript postfix, action "restart" failed.
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/etc/systemd/system/postfix.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-05-18 21:55:19 PDT; 42ms ago
Process: 2158538 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE)
May 18 21:55:18 Hoth systemd[1]: Starting Postfix Mail Transport Agent...
May 18 21:55:18 Hoth postfix/postfix-script[2158544]: fatal: the Postfix mail system is already running
May 18 21:55:19 Hoth systemd[1]: postfix.service: Control process exited, code=exited, status=1/FAILURE
May 18 21:55:19 Hoth systemd[1]: postfix.service: Failed with result 'exit-code'.
May 18 21:55:19 Hoth systemd[1]: Failed to start Postfix Mail Transport Agent.
dpkg: error processing package postfix (--configure):
installed postfix package post-installation script subprocess returned error exit status 1
I've tried purging it and reinstalling it to no avail, this appears to be a stock issue but then why hasn't anyone else complained about this?
When I use systemctl to stop postfix it seems to work fine, there are no "postfix" processes running and nothing is listening on TCP port 25. Then when I start postfix using systemctl it complains with the same error message noted above, that it's already running. I've also checked to make sure that there's no stale
"/var/spool/postfix/pid/master.pid" PID file.
What I have been able to determine is that the
"/usr/lib/postfix/sbin/master" process, run by
"/etc/postfix/postfix-script", returns non-zero, so the error message that Postfix is already running might be a red herring.