Check for Running Processes
First check to see if dovecot is currently running:root@server [~]# ps -flC dovecot
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
5 S root 14919 1 0 85 5 - 2666 - 00:36 ? 00:00:03 /usr/sbin/dovecot
Service Availability
If a processes exists, check that the service is listening:Checking Port 110:
[root@server ~]# fuser 110/tcp
110/tcp: 22127 23159 25144
Checking Port 143:
[root@server ~]# fuser 143/tcp143/tcp: 23487 256590 25543
You can use lsof -i command too, like lsof -i :110 etc ..
Resolution:
Restarting Dovecot
Regardless, restart the service to bring it back online quickly.[root@server ~]# /etc/init.d/dovecot restartIf it fails to start, watch for errors in /var/log/maillog
Stopping Dovecot Imap: [ OK ]
Starting Dovecot Imap: [ OK ]
If nothing useful is logged there, then attempt to run the dovecot binary manually.
Running Dovecot From Binary:
[root@server ~]# /usr/sbin/dovecot
If there are any errors, they will then be logged to our terminal.
Common Errors
Error: service(auth): Socket already exists: /var/run/dovecot/auth-*Occasionally we will find that Dovecot will not start due to various socket files left behind when it was terminated. The following will remove all associated socket files and allow us to restart Dovecot.
Removing Socket Files:
root@server [~]# rm -fv /var/run/dovecot/auth-{login,client,userdb,master}
removed `/var/run/dovecot/auth-login'
removed `/var/run/dovecot/auth-client'
removed `/var/run/dovecot/auth-userdb'
removed `/var/run/dovecot/auth-master'
You can also kill any running dovecot process and restart it too
root@server [~]#ps fauxxw | grep dovecot | grep -v grep | awk '{print $2}' | xargs kill -9 ; /etc/init.d/dovecot restart