From: Stephan Bosch Date: Mon, 5 Mar 2018 20:02:49 +0000 (+0100) Subject: submission: Limit the set of capabilities to those that are actually supported. X-Git-Tag: 2.3.1~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e7482beba487d44501d3ba2e51071fb6c618f3d2;p=thirdparty%2Fdovecot%2Fcore.git submission: Limit the set of capabilities to those that are actually supported. Particularly, the XCLIENT capability was inappropriately enabled when the backend MTA announced support. XCLIENT is not supported by Dovecot post-login. --- diff --git a/src/submission/submission-client.c b/src/submission/submission-client.c index 5264799d84..c4f8cf3812 100644 --- a/src/submission/submission-client.c +++ b/src/submission/submission-client.c @@ -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 */ diff --git a/src/submission/submission-common.h b/src/submission/submission-common.h index 49c97f8feb..ff1700e779 100644 --- a/src/submission/submission-common.h +++ b/src/submission/submission-common.h @@ -19,6 +19,12 @@ /* 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;