[Dovecot] Limiting number of IMAP connections per user
tss at iki.fi
Fri Sep 22 18:04:56 EEST 2006
On Wed, 2006-09-20 at 18:54 +1000, Simon L Jackson wrote:
> Is there a way of limiting the number of IMAP connections (i.e.
> processes) per user?
> Despite asking users to set their email client settings to limit
> themselves to 2 connections, some still have this set to 10 or more.
Unfortunately not. This doesn't really fit into Dovecot's current
architecture so it'd require somewhat ugly hacks or larger changes.
Nothing in Dovecot keeps track of how many connections a user has.
Hmm. Except you could write a wrapper imap binary, which works something
# increase user's connection counter (sql command, or txt file)
# decrease user's connection counter
Best would be if you stored it in SQL, and then in pass_query you'd fail
the connection if the counter was too high (and preferrably also return
reason-field which contains some "Too many connections" string).
Or if you can't use SQL, you can just check the connection counter in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20060922/5d0dc456/attachment.pgp
More information about the dovecot