Hello Timo, and all.
Preface: From time to time we have problems with thunderbird. The problem is that mail client begin to sync users inbox (or other folder) and this process didn't stop. Last time we have this situation - our monitoring system shows unusual amount of imap traffic send to one of local hosts. This host was - terminal server and 20 users worked with their mailboxes that time. But normal 20 imap session can't fork that amount of traffic (5.2Gb). After measuring local thunderbird's cached mailboxes we find out that one user have local INBOX about 19Gb and size is rising. On server side - this mailbox was 89Mb. And after killing thunderbird in logs appear: Dec 10 17:35:53 IMAP(user@domain 192.168.2.92): Info: Disconnected: Logged out bytes=1133593/1175103 Dec 10 17:35:53 IMAP(user@domain 192.168.2.92): Info: Disconnected: Logged out bytes=15964/44364 Dec 10 17:35:53 IMAP(user@domain 192.168.2.92): Info: Disconnected: Logged out bytes=54758/944989 Dec 10 17:35:53 IMAP(user@domain 192.168.2.92): Info: Disconnected: Logged out bytes=6532/43930 Dec 10 17:35:53 IMAP(domain@domain 192.168.2.92): Info: Connection closed bytes=235408/4797272694
As you can see - 4.8Gb of data was send to this client - and who knows - what was that. So we have 5.2Gb send to host with 20 active sessions and 4.8Gb send to one user. Of course lifetime of this connection can be much more than last day, but problem disappeared after killing it.
This is not single accident. But this one was hard to find out because of 20-25 users working at the same time from 1 server.
So it will be great if dovecot has feature to limit the amount of data send per connection. For example:
service imap { bytes_per_connection = 100Mb }
And after limit reached - close connection and log warning. This will much simplify fights with sometimes become crazy imap clients.
That do you think?