Skip to content

Commit

Permalink
submission,submission-login: Implicitly enable CHUNKING when submissi…
Browse files Browse the repository at this point in the history
…on_backend_capabilities setting includes BINARYMIME.

BINARYMIME requires CHUNKING support and we should not expect administrators to
always be aware of that fact.
  • Loading branch information
stephanbosch committed Oct 29, 2018
1 parent 1ea5d9a commit daca99f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/submission-login/client.c
Expand Up @@ -50,6 +50,13 @@ client_parse_backend_capabilities(struct submission_client *subm_client )

subm_client->backend_capabilities |= cap;
}

/* Make sure CHUNKING support is always enabled when BINARYMIME is
enabled by explicit configuration. */
if (HAS_ALL_BITS(subm_client->backend_capabilities,
SMTP_CAPABILITY_BINARYMIME)) {
subm_client->backend_capabilities |= SMTP_CAPABILITY_CHUNKING;
}
}

static int submission_login_start_tls(void *conn_ctx,
Expand Down
7 changes: 7 additions & 0 deletions src/submission/submission-client.c
Expand Up @@ -96,6 +96,13 @@ static void client_parse_backend_capabilities(struct client *client)
client->backend_capabilities |= cap;
}

/* Make sure CHUNKING support is always enabled when BINARYMIME is
enabled by explicit configuration. */
if (HAS_ALL_BITS(client->backend_capabilities,
SMTP_CAPABILITY_BINARYMIME)) {
client->backend_capabilities |= SMTP_CAPABILITY_CHUNKING;
}

client->backend_capabilities_configured = TRUE;
}

Expand Down

0 comments on commit daca99f

Please sign in to comment.