]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: lmtp-commands - Simplify lmtp_local_add_headers().
authorStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 13 Nov 2019 21:58:13 +0000 (22:58 +0100)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 25 Nov 2019 10:30:07 +0000 (12:30 +0200)
src/lmtp/lmtp-local.c

index 1bd161835ae8bd6a66fb92eddf8824f310fba558..e26a9f7810c2be5eb6cd7f5f69693c4ea0ebcf7e 100644 (file)
@@ -383,11 +383,11 @@ void lmtp_local_add_headers(struct lmtp_local *local,
                            struct smtp_server_transaction *trans,
                            string_t *headers)
 {
+       struct client *client = local->client;
+       const struct lmtp_settings *lmtp_set = client->lmtp_set;
        struct lmtp_local_recipient *const *llrcpts;
-       const struct lmtp_settings *lmtp_set;
        const struct smtp_address *rcpt_to = NULL;
        unsigned int count;
-       void **sets;
 
        str_printfa(headers, "Return-Path: <%s>\r\n",
                    smtp_address_encode(trans->mail_from));
@@ -396,9 +396,6 @@ void lmtp_local_add_headers(struct lmtp_local *local,
        if (count == 1) {
                struct smtp_server_recipient *rcpt = llrcpts[0]->rcpt->rcpt;
 
-               sets = mail_storage_service_user_get_set(llrcpts[0]->service_user);
-               lmtp_set = sets[3];
-
                switch (lmtp_set->parsed_lmtp_hdr_delivery_address) {
                case LMTP_HDR_DELIVERY_ADDRESS_NONE:
                        break;