]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission: Split off obtaining the relay connection capabilities into a separate...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 2 Sep 2018 15:04:14 +0000 (17:04 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 12 Feb 2019 13:40:41 +0000 (15:40 +0200)
src/submission/submission-client.c

index 4ced04a4651808c84e0f0d482ba0fb386f70c406..a4c4abcac74250f6a30f7652e0f9ebdd635345a1 100644 (file)
@@ -433,13 +433,19 @@ void client_disconnect(struct client *client, const char *enh_code,
        }
 }
 
+static uoff_t
+client_proxy_get_max_mail_size(struct client *client)
+{
+       return smtp_client_connection_get_size_capability(client->proxy_conn);
+}
+
 uoff_t client_get_max_mail_size(struct client *client)
 {
        uoff_t max_size;
 
        /* Account for the backend server's SIZE limit and calculate our own
           relative to it. */
-       max_size = smtp_client_connection_get_size_capability(client->proxy_conn);
+       max_size = client_proxy_get_max_mail_size(client);
        if (max_size == 0 || max_size <= SUBMISSION_MAX_ADDITIONAL_MAIL_SIZE) {
                max_size = client->set->submission_max_mail_size;
        } else {