From: Timo Sirainen Date: Thu, 21 Nov 2019 13:12:12 +0000 (+0200) Subject: imap: Add local/remote_ip/port to imap client event fields X-Git-Tag: 2.3.9~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e1d2cb0edbd7dcc1239ecb9cf5ca0012c6945ce;p=thirdparty%2Fdovecot%2Fcore.git imap: Add local/remote_ip/port to imap client event fields --- diff --git a/src/imap/main.c b/src/imap/main.c index 6f6b7d9e97..7f6e98ab44 100644 --- a/src/imap/main.c +++ b/src/imap/main.c @@ -253,6 +253,14 @@ int client_create_from_input(const struct mail_storage_service_input *input, { .key = "session", .value = input->session_id }, { .key = NULL } }); + if (input->local_ip.family != 0) + event_add_str(event, "local_ip", net_ip2addr(&input->local_ip)); + if (input->local_port != 0) + event_add_int(event, "local_port", input->local_port); + if (input->remote_ip.family != 0) + event_add_str(event, "remote_ip", net_ip2addr(&input->remote_ip)); + if (input->remote_port != 0) + event_add_int(event, "remote_port", input->remote_port); service_input = *input; service_input.parent_event = event;