From: Timo Sirainen Date: Thu, 12 Jan 2023 14:03:28 +0000 (+0200) Subject: lmtp: Replace mail_storage_service_user_get_mail_set() with master_service_settings_p... X-Git-Tag: 2.4.0~2304 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f1e2ffe0d71b72cd777f20a3b156cbb39dfd66f;p=thirdparty%2Fdovecot%2Fcore.git lmtp: Replace mail_storage_service_user_get_mail_set() with master_service_settings_parser_get() --- diff --git a/src/lmtp/lmtp-local.c b/src/lmtp/lmtp-local.c index 6266ebbe94..319a9c7c0f 100644 --- a/src/lmtp/lmtp-local.c +++ b/src/lmtp/lmtp-local.c @@ -434,8 +434,16 @@ lmtp_local_deliver(struct lmtp_local *local, input = mail_storage_service_user_get_input(service_user); username = t_strdup(input->username); - mail_set = mail_storage_service_user_get_mail_set(service_user); set_parser = mail_storage_service_user_get_settings_parser(service_user); + if (master_service_settings_parser_get(rcpt->event, set_parser, + &mail_storage_setting_parser_info, + MASTER_SERVICE_SETTINGS_GET_FLAG_NO_EXPAND, + &mail_set, &error) < 0) { + e_error(rcpt->event, "%s", error); + smtp_server_recipient_reply(rcpt, 451, "4.3.0", + "Temporary internal error"); + return -1; + } smtp_server_connection_get_proxy_data (client->conn, &proxy_data); @@ -452,6 +460,7 @@ lmtp_local_deliver(struct lmtp_local *local, if (settings_parse_line(set_parser, line) < 0) i_unreached(); } + master_service_settings_free(mail_set); i_zero(&lldctx); lldctx.session_id = lrcpt->session_id;