prevent overlapping postfix services

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
rotorboy
Advanced member
Advanced member
Posts: 161
Joined: Fri Sep 12, 2014 11:24 pm

prevent overlapping postfix services

Postby rotorboy » Sat Jan 13, 2018 6:01 pm

Greetings,

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?


User avatar
DualBoot
Outstanding Member
Outstanding Member
Posts: 720
Joined: Mon Apr 18, 2016 8:18 pm
Location: Earth
ZCS/ZD Version: ZCS FLOSS - 8.7.11 Mutli servers

Re: prevent overlapping postfix services

Postby DualBoot » Sun Jan 14, 2018 2:48 pm

Hello,

best solution is to have a minimal CentOS installation and purge the Postfix package.
I have already encounter this kind of problem with chkconfig, each time there was
an update of postfix, it re-enabled the postfix service.
Another solution it is to point the Postfix Unit in Systemd to the Zimbra Postfix binary ?

Regards,

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 41 guests