How to increase the number of simultaneous IMAP connections in Plesk

- by

Plesk-LogoBy default Plesk sets up the IMAP Email Service on your server so that four simultaneous connections can be made from the same IP address in the same timeframe. This is to protect your servers from too many connections.

This however isn’t cutting it if you have a small office full of people on the same IP, connecting from 4 computers, 16 iphones and 12 iPads every 5 minutes.

The solution: tweak the IMAP configuration file, restart the daemon and have a good life. Let me show you how to do it on Plesk 11 and CentOS 6.4.

The file you’ll want to tweak is called imapd and lives in

/etc/courier-imap/imapd

Log in to your server with root credentials and edit the file with your favourite text editor (like vi). Near the top you’ll find the following lines. They’re not directly underneath each other, but instead are separated by helpful comments to explain what they do:

MAXDAEMONS = 40
MAXPERIP = 4

You may have guessed what these do: the first limits the amount of simultaneous IMAP daemons at the same time, while the second one limits the amount of simultaneous connections from the same IP at the same time. Change them according to your needs: perhaps count the amount of devices/services that connect, then add a few more for good measure.

I’m setting mine to 80 daemons and 20 IP connections like so:

MAXDAEMONS = 80
MAXPERIP = 20

Next we need to restart the IMAP service for the changes to take effect:

service courier-imap restart

Alternatively you can restart the service like this:

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

The rest, as they say, is history.

Help! I’ve messed up that file!

Fear not – here’s a clean copy, taken from Plesk 11.0.9 on CentOS 6.4. Just in case:

Further Reading



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

1 thought on “How to increase the number of simultaneous IMAP connections in Plesk”

  1. I’ve noticed that when you upgrade Plesk to a new version (say from 11.0 to 11.5) those changes are overwritten. You’ll have to add those again after every major upgrade (this does not include micro updates).

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.