From: Aki Tuomi Date: Tue, 24 Jan 2023 10:42:39 +0000 (+0200) Subject: imap: Include net_in_bytes, net_out_bytes in event X-Git-Tag: 2.4.0~2927 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=583d130bce73dd0492f8518d2a7673c37c2f8ce5;p=thirdparty%2Fdovecot%2Fcore.git imap: Include net_in_bytes, net_out_bytes in event These fields are mainly intended for the mail_user_session_finished event. --- diff --git a/src/imap/imap-client.c b/src/imap/imap-client.c index dff67c267a..8ffbf1d9c4 100644 --- a/src/imap/imap-client.c +++ b/src/imap/imap-client.c @@ -339,6 +339,10 @@ const char *client_stats(struct client *client) "Failed to expand imap_logout_format=%s: %s", client->set->imap_logout_format, error); } + + event_add_int(client->event, "net_in_bytes", i_stream_get_absolute_offset(client->input)); + event_add_int(client->event, "net_out_bytes", client->output->offset); + return str_c(str); }