By default a Courier IMAP configured server only allows 4 connections per IP which causes usually a lot of problems with nearly every eMail client, causing for example the following exception:
Unable to connect to your IMAP server. You may have exceeded the maximum number of connections to this server.
Then edit your imap config
sudo nano /etc/courier-imap/imapd
And extend the connection limits
... MAXDAEMONS=80 ... MAXPERIP=40 ...
Don't forget to restart the server
sudo /etc/init.d/courier-imap restart