Topic: Maximum number of concurrent IMAP connections exceeded

==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Ubuntu 12.04
- Related log if you're reporting an issue:

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.

Any advice welcome.


Re: Maximum number of concurrent IMAP connections exceeded

*) iRedMail uses only /etc/dovecot/dovecot.conf, all files under /etc/dovecot/conf.d/ are ignored (no "include" command in dovecot.conf).

*) Did you add "mail_max_userip_connections" inside "protocol imap {}" block? e.g.

protocol imap {
  mail_max_userip_connections = 50

it's better to show us "dovecot -n".


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.


Re: Maximum number of concurrent IMAP connections exceeded

Great, thanks for your feedback.
I added this setting in dovecot.conf, by comment out by default, so that user can easily find it and related error log.
https://bitbucket.org/zhb/iredmail/comm … 91b5699bd2