From: Timo Sirainen Date: Thu, 14 Mar 2019 16:57:54 +0000 (+0200) Subject: lmtp: Add mail_user_settings to struct client X-Git-Tag: 2.3.8~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af9dca48756d98506586bc9d793aba042623ebaf;p=thirdparty%2Fdovecot%2Fcore.git lmtp: Add mail_user_settings to struct client --- diff --git a/src/lmtp/lmtp-client.c b/src/lmtp/lmtp-client.c index f0e25b7c26..93ba3b3df3 100644 --- a/src/lmtp/lmtp-client.c +++ b/src/lmtp/lmtp-client.c @@ -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; } diff --git a/src/lmtp/lmtp-client.h b/src/lmtp/lmtp-client.h index ffb8cbf631..f8a885df1c 100644 --- a/src/lmtp/lmtp-client.h +++ b/src/lmtp/lmtp-client.h @@ -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; diff --git a/src/lmtp/lmtp-settings.c b/src/lmtp/lmtp-settings.c index 1666ec98fe..04f725aa83 100644 --- a/src/lmtp/lmtp-settings.c +++ b/src/lmtp/lmtp-settings.c @@ -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); } diff --git a/src/lmtp/lmtp-settings.h b/src/lmtp/lmtp-settings.h index ca8ad135f4..59cf8ac1fe 100644 --- a/src/lmtp/lmtp-settings.h +++ b/src/lmtp/lmtp-settings.h @@ -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);