[Dovecot] mail_max_userip_connections exceeded.

Joseph Tam jtam.home at gmail.com
Sat Jan 21 02:48:54 EET 2012


Simon Brereton <simon.brereton at buongiorno.com> writes:

> /var/log/mail.log.1:2490:Jan 19 12:02:55 mail dovecot: imap-login:
> Maximum number of connections from user+IP exceeded
> (mail_max_userip_connections): user=<user at example.com>, method=PLAIN,
> rip=127.0.0.1, secured
>
> I never changed this from the default 10.  When I googled this error
> there was a thread on this list from May 2011 that indicated one would
> need one connection per user per subscribed folder.  However, I know
> that user doesn't have 10 folders, let alone 10 subscribed folders!  I
> can increase, it but it's not going to scale well.  And there are
> people on this list with many 1000x users than I have - so how do they
> deal with that?
>
> 127.0.0.1 is obviously webmail (IMP5).

IMAP proxy or lack of proxy?

IMAP proxy could be a problem if the user had opened more than 10 (unique)
mailboxes.  The proxy would keep this connection open until a timeout, and
after some time, could accumulate more connections than your limit.

The lack of proxy could solve your problem if for some reason your webmail
software is not closing the IMAP connection properly (I assume IMP does a
connect/authenticate/IMAP command/logout for every webmail operation).
Every connection (even to the same mailbox) would open up a new connection.
The proxy software will recognize the reconnnection and funnel it through
its cached connection.

You can lsof the user's IMAP processes (or troll through
/proc/{imap-process} or what you have) to figure out which mailboxes it
has opened.  On my system, file descriptor 9 and 11 gives you the names
of the index files that indicate which mailboxes are being accessed.

Joseph Tam <jtam.home at gmail.com>



More information about the dovecot mailing list