Which ports are postfix and dovecot listening on?

Discussion in 'Installation/Configuration' started by concept21, Oct 6, 2017.

  1. concept21

    concept21 Member

    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.service​
    Then, 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 -nl​
    I discovered that something was listening on TCP 25. Then, I checked postfix service by running
    systemctl status postfix.service​
    It 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? :eek:

    My system is ISPConfig 3.1.7, Ubuntu 16.04.3 amd64.
     
  2. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    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?
     

Share This Page