]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3: Include net_in_bytes, net_out_bytes in event
authorAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 24 Jan 2023 10:48:03 +0000 (12:48 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 16 Mar 2023 05:38:57 +0000 (07:38 +0200)
These fields are mainly intended for the mail_user_session_finished event.

src/pop3/pop3-client.c

index 428d8b8109547fa5c27ca6b5cd86fa3ba204a4ad..6c1766b8a68be9efd9970e1d12f7822d3d176bb1 100644 (file)
@@ -562,6 +562,10 @@ static const char *client_stats(struct client *client)
                        "Failed to expand pop3_logout_format=%s: %s",
                        client->set->pop3_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);
 }