Imap: Fatal: listen(993) failed: Address alr eady in use

Booted the server the other day and got the message that dovecot can’t start because listen address 993 was already in use.

Any logins to squirrelmail received an error message. To solve this I run the command

lsof -i :993

This will list the application listening on the particular port and you can go ahead and kill it or assign it a different port. Remember to change the port number (993) to whatever port your imap server or whatever program you are troubleshooting is supposed to be listening on.
To start dovecot the command is:

/etc/init.d/dovecot start