How to increase the number of parallel connections on our IMAP server

botond published 2018/06/05, k - 15:29 time

We may want to access our email accounts from multiple computers and / or mobile devices at the same time, IMAP protocol, which provides a convenient way to synchronize your mail in real time. This is not a problem until you reach the limit of the number of parallel connections (per IP address) configured on the server by default.

The IMAP protocol keeps you connected to your email account while your mail client is running on your computer or mobile phone. This way, if you use your account from multiple computers or mobile phones at the same time, it keeps as many connections as you need to connect. Also, if you create subdirectories in your email account to sort your mail, then there will be a link for them. This way, we can quickly reach the limit, which can be a nuisance when the email client prints out "dovecot: imap-login: Maximum number of connections from user + IP exceeded"Here is the solution to this problem.

 

 

In IMAP servers such as DovecotThere is also a factory setting, which must be set to a higher value in this case, of course considering the load, performance and capacity of our server.

 

In this example, In a server environment installed on Debian 8 make this setting, so it is not guaranteed that other distributions will have to do exactly the same.

 

To change this setting, log in as root and open the following file eg. the dwarf-with:

nano /etc/dovecot/dovecot.conf

Look for the "protocol imap" section in the file (search in Nano: CTRL + W).

Here, if you don't have the following line inside, let's make it look like this:

protocol imap {
	mail_max_userip_connections = 100
}

Of course, set the value according to everyone's needs. It should be assumed that the default value is 10, so there are factory default connections per IP address and email address.

This limit does not matter if you connect to the account from other IP addresses. Only connections from the same IP address and the same email account are counted for this setting.

Once you have set the required limit, save the file and restart Dovecot:

service dovecot restart

You will no longer throw the above error message if you set this limit high enough.