From: Anton Dollmaier Date: Thu, 27 Sep 2018 21:00:22 +0000 (+0200) Subject: submission-login: proxy: Fix omission of spaces between XCLIENT command parameters. X-Git-Tag: 2.3.6~95 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=356d27691c48ca242d74f6073e547393a2431674;p=thirdparty%2Fdovecot%2Fcore.git submission-login: proxy: Fix omission of spaces between XCLIENT command parameters. It would send for example: > XCLIENT ADDR=10.0.1.2PORT=39074 The other end will obviously not accept this. -- Commit message modified by Stephan Bosch --- diff --git a/src/submission-login/submission-proxy.c b/src/submission-login/submission-proxy.c index d3e89abc29..466ee57a8d 100644 --- a/src/submission-login/submission-proxy.c +++ b/src/submission-login/submission-proxy.c @@ -51,19 +51,19 @@ proxy_send_xclient(struct submission_client *client, struct ostream *output) } str = t_str_new(128); - str_append(str, "XCLIENT "); + str_append(str, "XCLIENT"); if (str_array_icase_find(client->proxy_xclient, "ADDR")) { - str_append(str, "ADDR="); + str_append(str, " ADDR="); str_append(str, net_ip2addr(&client->common.ip)); } if (str_array_icase_find(client->proxy_xclient, "PORT")) - str_printfa(str, "PORT=%u", client->common.remote_port); + str_printfa(str, " PORT=%u", client->common.remote_port); if (str_array_icase_find(client->proxy_xclient, "SESSION")) { - str_append(str, "SESSION="); + str_append(str, " SESSION="); str_append(str, client_get_session_id(&client->common)); } if (str_array_icase_find(client->proxy_xclient, "TTL")) - str_printfa(str, "TTL=%u", client->common.proxy_ttl - 1); + str_printfa(str, " TTL=%u", client->common.proxy_ttl - 1); if (str_array_icase_find(client->proxy_xclient, "FORWARD") && str_len(fwd) > 0) { str_append(str, " FORWARD=");