]> 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)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 2 Mar 2018 02:00:47 +0000 (03:00 +0100)
src/lib-smtp/smtp-client-connection.c

index 677bdf1b28b2d0ce6cd61165b0a23d825eb04f5f..775c3be64160ff8141b0030428c9ddf640d68e1a 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);