From fbd0a83db9f2c380dd281e243ecfff40b7acfcfd Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Thu, 1 Mar 2018 14:52:06 +0100 Subject: [PATCH] lib-smtp: client: Make clear that XCLIENT is not sent if the server has no support. --- src/lib-smtp/smtp-client-connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib-smtp/smtp-client-connection.c b/src/lib-smtp/smtp-client-connection.c index 677bdf1b28..775c3be641 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);