imap_logout_format improvements / ideas

Timo Sirainen tss at iki.fi
Sat Oct 3 08:57:46 UTC 2015


> On 03 Oct 2015, at 02:50, Michael Kliewe <mkliewe at gmx.de> wrote:
> 
> when imap_zlib is enabled, the %i and %o still show the uncompressed bytes. It could be very helpful to access the compressed bytes if the client used COMPRESS, so you can see which clients use COMPRESS, you can see/calculate a percentage (for information only), and if you want to do accounting and/or limit a users traffic, this would be very helpful to get the real amount of bytes travelling the line. Currently if a client uses COMPRESS, your accounting (by parsing the logfile) is wrong by maybe 50% or even more...
> 
> So maybe 4 new variables could be very helpful if imap_zlib is used:
> - total number of compressed bytes read from client
> - total number of compressed bytes sent to client
> - percentage of compressed to uncompressed bytes read from client
> - percentage of compressed to uncompressed bytes sent to client
> 
> If either imap_zlib is not enabled, or the client did not use COMPRESS, set everything to 0 (or "-" or something).

It's a bit problematic to get this information from plugin to imap core.. Also compression can be done in the SSL layer, which is handled by imap-login process so imap process doesn't know about it. And I just mentioned in earlier mail that I'm planning to move COMPRESS code to imap-login as well. So getting the information becomes even more difficult, since now at logout time imap-login needs to somehow tell the imap process how many bytes there were. A bit unnecessary work just for logging purposes.. But maybe it won't be too difficult then. Need to first implement all the new code related to that.



More information about the dovecot mailing list