From time to time, mail users (with Thunderbird email client) get the message from my iRedMail server "Cannot connect to server. Maximum number of concurrent IMAP connections exceeded".

These users do not have other devices accessing their mail from the same network, so I would not know why there should be any more than 1 or 2 concurrent connection per user. Multiple mail boxes may keep multiple connections open but that would be max. 3 or 4.Usually, this gets set with the setting " mail_max_userip_connections".

My config file /etc/dovecot/dovecot.conf did not contain this setting at all, so I added it and set it to 25 instead of the default 10. i discovered there is another config file in /etc/dovecot/conf.d/ called "20-imap.conf" which does contain a line for this setting, so I also set it there. Then I did "service dovecot restart" to put the setting into effect.By the way, which config file is actually getting used? There is no "include" in the /etc/dovecot/dovecot.conf file, so I guess they won't be used?

Now, no matter, what I set in these files, the users are stil getting this error (max number of connections exceeded), so it does not seem to take any of those config files into account. The dovecot.log file does not contain the login attempt when it fails with this error.

Issuing "service dovecot restart" handles the problem and the users can access mail again. But then it occurs again a few hours later.

Re: Maximum number of concurrent IMAP connections exceeded

Your reply was spot-on - I had added the ail_max_userip_connections setting outside these protocol brackets.I added it to IMAP and POP brackets, and now it seems okay. At least I haven't seen this error any more.Thanks for the tip.