Netstat display wrong process associated to listening port

By default dovecot run pop , imap , pop3 and imaps on the following ports:

110: pop
143: imap
995: pop3s
993: imaps

install dovecot-pop3d then copy dovecot.socket to /etc/systemd

sudo cp /lib/systemd/system/dovecot.socket /etc/systemd/system/
sudo systemctl reenable dovecot.socket

Modify dovecot.socket:

sudo sed -i '/:143$/s/^/#/' /etc/systemd/system/dovecot.socket

Restart the service:

sudo systemctl stop dovecot.service
sudo systemctl start dovecot.socket
sudo systemctl daemon-reload

Check the status:

sudo systemctl status dovecot.socket

Tags:

Debian

Netstat