]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission: Limit the set of capabilities to those that are actually supported.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Mon, 5 Mar 2018 20:02:49 +0000 (21:02 +0100)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 13 Mar 2018 05:17:03 +0000 (07:17 +0200)
Particularly, the XCLIENT capability was inappropriately enabled when the
backend MTA announced support. XCLIENT is not supported by Dovecot post-login.

src/submission/submission-client.c
src/submission/submission-common.h

index 5264799d84934f3b314000caee8cd2c61f52ca65..c4f8cf3812c42cc0b7e5059085cbb13e1f2c5153 100644 (file)
@@ -94,6 +94,7 @@ static void client_proxy_ready_cb(const struct smtp_reply *reply,
                SMTP_CAPABILITY_SIZE | SMTP_CAPABILITY_ENHANCEDSTATUSCODES |
                SMTP_CAPABILITY_CHUNKING | SMTP_CAPABILITY_BURL |
                SMTP_CAPABILITY_VRFY;
+       caps &= SUBMISSION_SUPPORTED_SMTP_CAPABILITIES;
        smtp_server_connection_set_capabilities(client->conn, caps);
 
        /* now that we know our capabilities, commence server protocol dialog */
index 49c97f8feb4d09403d7cf8d1312724d433973774..ff1700e77970532befb04610db2df76d6e89913c 100644 (file)
 /* Maximum time to wait for QUIT reply from relay server */
 #define SUBMISSION_MAX_WAIT_QUIT_REPLY_MSECS 2000
 
+#define SUBMISSION_SUPPORTED_SMTP_CAPABILITIES                      \
+       (SMTP_CAPABILITY_AUTH | SMTP_CAPABILITY_PIPELINING |          \
+        SMTP_CAPABILITY_SIZE | SMTP_CAPABILITY_ENHANCEDSTATUSCODES | \
+        SMTP_CAPABILITY_CHUNKING | SMTP_CAPABILITY_BURL |            \
+        SMTP_CAPABILITY_DSN | SMTP_CAPABILITY_VRFY)
+
 typedef void submission_client_created_func_t(struct client **client);
 
 extern submission_client_created_func_t *hook_client_created;