]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: client: Make clear that XCLIENT is not sent if the server has no support.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Thu, 1 Mar 2018 13:52:06 +0000 (14:52 +0100)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 13 Mar 2018 05:11:25 +0000 (07:11 +0200)
src/lib-smtp/smtp-client-connection.c

index fb238b805faaa954a3126eff857ffb764b2e88a4..23294dd13705dd80534dfef189cd603a56dbe8a9 100644 (file)
@@ -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);