I have 3 kinds of software to monitor my public server. They are: Nagios v4 Monit v5.16 ISPConfig built-in monitor I stop the postfix service by running systemctl stop postfix.serviceThen, I waited for 10 minutes but none of the above monitors tried to start postfix service again! I then checked the listening ports by running netstat -nlI discovered that something was listening on TCP 25. Then, I checked postfix service by running systemctl status postfix.serviceIt showed that postfix is dead/inactive! Now my question is: on which ports should postfix listen? Which process was listening on TCP 25 while postfix is dead/inactive? My system is ISPConfig 3.1.7, Ubuntu 16.04.3 amd64.
I don't know what was listening on 25 while postfix was dead ( do daemons die or do they become angels for a while? ) but you could configure monit the way it checks postfix pid for example usually it's Code: check process postfix with pidfile /var/spool/postfix/pid/master.pid start program = "/etc/init.d/postfix start" stop program = "/etc/init.d/postfix stop" if cpu > 60% for 2 cycles then alert if cpu > 80% for 5 cycles then restart if 5 restarts within 5 cycles then timeout maybe your watchdogs conflicted and cycled more than 5 times?