imap_logout_format improvements / ideas
http://hg.dovecot.org/dovecot-2.2/rev/93bba97afb2a http://hg.dovecot.org/dovecot-2.2/rev/e0a17714f0c9
So all in all, you can now add to imap_logout_format:
# %i - total number of bytes read from client # %o - total number of bytes sent to client # %{fetch_hdr_count} - Number of mails with mail header data sent to client # %{fetch_hdr_bytes} - Number of bytes with mail header data sent to client # %{fetch_body_count} - Number of mails with mail body data sent to client # %{fetch_body_bytes} - Number of bytes with mail body data sent to client # %{deleted} - Number of mails where client added \Deleted flag # %{expunged} - Number of mails that client expunged # %{trashed} - Number of mails that client copied/moved to the # special_use=\Trash mailbox.
Any thoughts on what else would be useful?
I was also thinking about separating (deletes and) expunges from Trash vs non-Trash, but I'm not sure how useful that would be (and what would it be called?) It's also a bit annoying that a copy+expunge to a Trash will return expunged=1 trashed=1, but a move to Trash (via IMAP MOVE) will return expunged=0 trashed=1. But trying to fix that would be too much trouble.
# %i - total number of bytes read from client # %o - total number of bytes sent to client # %{fetch_hdr_count} - Number of mails with mail header data sent to client # %{fetch_hdr_bytes} - Number of bytes with mail header data sent to client # %{fetch_body_count} - Number of mails with mail body data sent to client # %{fetch_body_bytes} - Number of bytes with mail body data sent to client # %{deleted} - Number of mails where client added \Deleted flag # %{expunged} - Number of mails that client expunged # %{trashed} - Number of mails that client copied/moved to the # special_use=\Trash mailbox.
Any thoughts on what else would be useful?
Number of mails that have been \Seen ?
I have been running Dovecot with full debug logging so I am not aware if the same information is already available elsewhere in the log at production loglevel.
Paolo
are the above captioned patches n 2.2.18?
On 5/15/15, Paolo Cravero paolo.cravero@csi.it wrote:
# %i - total number of bytes read from client # %o - total number of bytes sent to client # %{fetch_hdr_count} - Number of mails with mail header data sent to client # %{fetch_hdr_bytes} - Number of bytes with mail header data sent to client # %{fetch_body_count} - Number of mails with mail body data sent to client # %{fetch_body_bytes} - Number of bytes with mail body data sent to client # %{deleted} - Number of mails where client added \Deleted flag # %{expunged} - Number of mails that client expunged # %{trashed} - Number of mails that client copied/moved to the # special_use=\Trash mailbox.
Any thoughts on what else would be useful?
Number of mails that have been \Seen ?
I have been running Dovecot with full debug logging so I am not aware if the same information is already available elsewhere in the log at production loglevel.
Paolo
-- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 (c) E-Mail: larryrtx@gmail.com US Mail: 108 Turvey Cove, Hutto, TX 78634-5688
Hi Timo,
Am 15.05.2015 um 13:59 schrieb Timo Sirainen:
http://hg.dovecot.org/dovecot-2.2/rev/93bba97afb2a http://hg.dovecot.org/dovecot-2.2/rev/e0a17714f0c9
So all in all, you can now add to imap_logout_format:
# %i - total number of bytes read from client # %o - total number of bytes sent to client # %{fetch_hdr_count} - Number of mails with mail header data sent to client # %{fetch_hdr_bytes} - Number of bytes with mail header data sent to client # %{fetch_body_count} - Number of mails with mail body data sent to client # %{fetch_body_bytes} - Number of bytes with mail body data sent to client # %{deleted} - Number of mails where client added \Deleted flag # %{expunged} - Number of mails that client expunged # %{trashed} - Number of mails that client copied/moved to the # special_use=\Trash mailbox.
Any thoughts on what else would be useful?
I was also thinking about separating (deletes and) expunges from Trash vs non-Trash, but I'm not sure how useful that would be (and what would it be called?) It's also a bit annoying that a copy+expunge to a Trash will return expunged=1 trashed=1, but a move to Trash (via IMAP MOVE) will return expunged=0 trashed=1. But trying to fix that would be too much trouble. 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).
Thanks Michael
On 03 Oct 2015, at 02:50, Michael Kliewe mkliewe@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.
participants (4)
-
Larry Rosenman
-
Michael Kliewe
-
Paolo Cravero
-
Timo Sirainen