Users who have multiple computers connecting to the Courier-IMAP server from behind a firewall or a single computer that runs an IMAP client that takes advantage of mailbox caching.

This article applies to you if you are seeing this message when accessing your email:

Unable to connect to your IMAP server.
You may have exceeded the maximum number of connections to this server.

To increase this restriction you can modify your IMAP configuration file located at /etc/courier-imap/imapd using the following Perl commands which perform a “find and replace”:

perl -p -i -e 's/^MAXDAEMONS=40/MAXDAEMONS=80/g' /etc/courier-imap/imapd
perl -p -i -e 's/^MAXPERIP=4/MAXPERIP=40/g' /etc/courier-imap/imapd

Then to complete the changes restart the courier-IMAP service using the following commands:

/etc/init.d/courier-imap stop
/etc/init.d/courier-imap start