If you are struggling to connect to your IMAP mailboxes but other machines on the same network are working fine, then chances are you are hitting the rather restrictive max connections per IP setting that is the default with Courier IMAP and Plesk. As standard it is limited to only 4 connections per IP. For me that was taken up by one machine connecting to 2 inboxes and also running a mail notifier system (which of course doubled up the connections).
After nearly tearing my hair out, I stumbled across the following posts:
And 30 seconds later I’m connected. I’m bound to hit this issue again in the future so I have added this post as a reminder.
I changed MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40.
/etc/init.d/courier-imap stop /etc/init.d/courier-imap start