We had that very annoying situation where what should have been a simple server shutdown, switch power source, server start-up resulted in an hour of frustration. Somewhere between the last time we rebooted this Zimbra server and today CentOS decided to re-add postfix to it's start-up list so that when Zimbra tries to start postfix properly it finds the port is already bound and in use.
Jan 13 08:20:24 zimbra postfix/master[15322]: fatal: bind 0.0.0.0 port 25: Address already in use
So we have to check to see what's listening on port 25
Code: Select all
[root@zimbra ~]# netstat -lnp |grep :25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1932/master
tcp6 0 0 ::1:25 :::* LISTEN 1932/master
[root@zimbra ~]# ps -ef | grep 1932
root 1932 1 0 08:09 ? 00:00:00 /usr/libexec/postfix/master -w
postfix 1977 1932 0 08:09 ? 00:00:00 pickup -l -t unix -u
postfix 1978 1932 0 08:09 ? 00:00:00 qmgr -l -t unix -u
root 30599 4741 0 08:35 pts/0 00:00:00 grep --color=auto 1932
And then we shut down postfix
Code: Select all
systemctl stop postfix.service
Next we restart the mta (and make sure everything else is running)
Code: Select all
/etc/init.d/zimbra start
Host zimbra.servername.com
Starting zmconfigd...Done.
Starting dnscache...Done.
Starting logger...Done.
Starting convertd...Done.
Starting mailbox...Done.
Starting memcached...Done.
Starting proxy...Done.
Starting amavis...Done.
Starting antispam...Done.
Starting antivirus...Done.
Starting opendkim...Done.
Starting snmp...Done.
Starting spell...Done.
Starting mta...Done.
Starting stats...Done.
Starting service webapp...Done.
Starting zimbra webapp...Done.
Starting zimbraAdmin webapp...Done.
Starting zimlet webapp...Done.
Next is to disable it from starting up automatically
Code: Select all
systemctl disable postfix
Removed symlink /etc/systemd/system/multi-user.target.wants/postfix.service.
How do we make CentOS 7 never re-enable postfix?
Perhaps a solution might be for the Zimbra start-up script (in /etc/init.d/zimbra) to be modified to first try and shut down any existing postfix services before it starts it's own services?