]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: Add mail_user_settings to struct client
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 14 Mar 2019 16:57:54 +0000 (18:57 +0200)
committerMartti Rannanjärvi <martti.rannanjarvi@open-xchange.com>
Wed, 25 Sep 2019 08:25:20 +0000 (11:25 +0300)
src/lmtp/lmtp-client.c
src/lmtp/lmtp-client.h
src/lmtp/lmtp-settings.c
src/lmtp/lmtp-settings.h

index f0e25b7c263c8152280e173eef1a05a0518d487f..93ba3b3df36aa1cfaaee1604217c98b2930c8902 100644 (file)
@@ -106,6 +106,7 @@ static void client_read_settings(struct client *client, bool ssl)
 {
        struct mail_storage_service_input input;
        const struct setting_parser_context *set_parser;
+       struct mail_user_settings *user_set;
        struct lmtp_settings *lmtp_set;
        struct lda_settings *lda_set;
        const char *error;
@@ -126,13 +127,15 @@ static void client_read_settings(struct client *client, bool ssl)
                                               &set_parser, &error) < 0)
                i_fatal("%s", error);
 
-       lmtp_settings_dup(set_parser, client->pool, &lmtp_set, &lda_set);
+       lmtp_settings_dup(set_parser, client->pool,
+                         &user_set, &lmtp_set, &lda_set);
        const struct var_expand_table *tab =
                mail_storage_service_get_var_expand_table(storage_service, &input);
        if (settings_var_expand(&lmtp_setting_parser_info, lmtp_set,
                                client->pool, tab, &error) <= 0)
                i_fatal("Failed to expand settings: %s", error);
        client->service_set = master_service_settings_get(master_service);
+       client->user_set = user_set;
        client->lmtp_set = lmtp_set;
        client->unexpanded_lda_set = lda_set;
 }
index ffb8cbf631f5f1aef48d71c0e50ce25430e38ac2..f8a885df1cd452ae89a39b68a51e2813f0d984e2 100644 (file)
@@ -75,6 +75,7 @@ struct client {
        struct event *event;
 
        const struct setting_parser_info *user_set_info;
+       const struct mail_user_settings *user_set;
        const struct lda_settings *unexpanded_lda_set;
        const struct lmtp_settings *lmtp_set;
        const struct master_service_settings *service_set;
index 1666ec98fe816f4b242a95b9f4e7e011424d4aae..04f725aa833d80244f698fd6fa39b6bfb6f29b3a 100644 (file)
@@ -137,6 +137,7 @@ static bool lmtp_settings_check(void *_set, pool_t pool ATTR_UNUSED,
 
 void lmtp_settings_dup(const struct setting_parser_context *set_parser,
                       pool_t pool,
+                      struct mail_user_settings **user_set_r,
                       struct lmtp_settings **lmtp_set_r,
                       struct lda_settings **lda_set_r)
 {
@@ -144,6 +145,7 @@ void lmtp_settings_dup(const struct setting_parser_context *set_parser,
 
        sets = master_service_settings_parser_get_others(master_service,
                                                         set_parser);
+       *user_set_r = settings_dup(&mail_user_setting_parser_info, sets[0], pool);
        *lda_set_r = settings_dup(&lda_setting_parser_info, sets[2], pool);
        *lmtp_set_r = settings_dup(&lmtp_setting_parser_info, sets[3], pool);
 }
index ca8ad135f43b7a35fca7531814db5ec07cfa2ce7..59cf8ac1fe42b58188e0e782f66e16f58935b035 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef LMTP_SETTINGS_H
 #define LMTP_SETTINGS_H
 
+struct mail_user_settings;
 struct lda_settings;
 struct lmtp_settings;
 
@@ -34,6 +35,7 @@ extern const struct setting_parser_info lmtp_setting_parser_info;
 
 void lmtp_settings_dup(const struct setting_parser_context *set_parser,
                       pool_t pool,
+                      struct mail_user_settings **user_set_r,
                       struct lmtp_settings **lmtp_set_r,
                       struct lda_settings **lda_set_r);