From: Stephan Bosch Date: Thu, 1 Mar 2018 13:52:06 +0000 (+0100) Subject: lib-smtp: client: Make clear that XCLIENT is not sent if the server has no support. X-Git-Tag: 2.3.1~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34f492adf7937ca881acf3ce53527e4aed4ad7be;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: client: Make clear that XCLIENT is not sent if the server has no support. --- diff --git a/src/lib-smtp/smtp-client-connection.c b/src/lib-smtp/smtp-client-connection.c index fb238b805f..23294dd137 100644 --- a/src/lib-smtp/smtp-client-connection.c +++ b/src/lib-smtp/smtp-client-connection.c @@ -628,7 +628,8 @@ smtp_client_connection_send_xclient(struct smtp_client_connection *conn, if (!conn->set.peer_trusted) return; - if (conn->cap_xclient_args == NULL) + if ((conn->capabilities & SMTP_CAPABILITY_XCLIENT) == 0 || + conn->cap_xclient_args == NULL) return; str = t_str_new(64);