From: Josef 'Jeff' Sipek Date: Thu, 17 Sep 2020 19:43:02 +0000 (-0400) Subject: login-common: Include the proxy's source address in log messages X-Git-Tag: 2.3.13~134 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=372a88e7019fba875ed154d81b6cd0c20a988b64;p=thirdparty%2Fdovecot%2Fcore.git login-common: Include the proxy's source address in log messages --- diff --git a/src/login-common/client-common-auth.c b/src/login-common/client-common-auth.c index 3328d0df1c..00db836aa7 100644 --- a/src/login-common/client-common-auth.c +++ b/src/login-common/client-common-auth.c @@ -264,6 +264,11 @@ static void proxy_free_password(struct client *client) static void client_proxy_append_conn_info(string_t *str, struct client *client) { + const char *source_host; + + source_host = login_proxy_get_source_host(client->login_proxy); + if (source_host[0] != '\0') + str_printfa(str, " from %s", source_host); if (strcmp(client->virtual_user, client->proxy_user) != 0) { /* remote username is different, log it */ str_printfa(str, " as user %s", client->proxy_user);