It is very easy to hit the Courier IMAP connection limit on a VPS or dedicated server with Parallels Plesk. Plesk by default limits the number of connections to 4 per IP which is already one connection less than most email clients. Desktop email clients usually default to 5 simultaneous server connections in order to speed up mailbox caching etc.
This can cause unwanted error messages such as “too many simultaneous server connections” when attempting to send/receive email. This is especially the case when utilizing multiple computers behind one IP address through a single router/firewall. For example, having 5 computers running in an office with email clients utilizing the 5 possible default server connections each, is already 25 possible connections on one IP address, this is how problems occur.
To Increase the number of Courier-IMAP connections from a single IP on a Plesk CentOS based server, follow these simple steps:
Note: Alternatively, you can use Perl find & replace, as illustrated in this Parallels KB article.
1) Log into your server via SSH
2) Open the IMAP configuration file with your favorite editor as follows:
# vi /etc/courier-imap/imapd
3) Modify the MAXDAEMONS & MAXPERIP variables as follows:
4) Write the changes to the file and exit your editor
5) Restart the Courier-IMAP service
# service courier-imapd restart
That’s it, now your total connections allowed per IP is 40, ten times the default of 4.