From 583d130bce73dd0492f8518d2a7673c37c2f8ce5 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Tue, 24 Jan 2023 12:42:39 +0200 Subject: [PATCH] imap: Include net_in_bytes, net_out_bytes in event These fields are mainly intended for the mail_user_session_finished event. --- src/imap/imap-client.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.47.3