From 02ccfa7ad5a4c105f261058418bab333b337de92 Mon Sep 17 00:00:00 2001
From: Timo Sirainen <timo.sirainen@open-xchange.com>
Date: Fri, 8 Mar 2024 10:32:07 +0200
Subject: [PATCH] global: Adjust to var_expand() API change

---
 src/lib-sieve/plugins/vacation/cmd-vacation.c | 4 ++--
 src/plugins/lda-sieve/lda-sieve-plugin.c      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib-sieve/plugins/vacation/cmd-vacation.c b/src/lib-sieve/plugins/vacation/cmd-vacation.c
index 15c2fb9c3..9aa77de60 100644
--- a/src/lib-sieve/plugins/vacation/cmd-vacation.c
+++ b/src/lib-sieve/plugins/vacation/cmd-vacation.c
@@ -1053,8 +1053,8 @@ act_vacation_get_default_subject(const struct sieve_action_exec_env *aenv,
 
 	str = t_str_new(256);
 	tab = _get_var_expand_table(aenv, header);
-	if (var_expand(str, config->default_subject_template,
-		       tab, &error) <= 0) {
+	if (var_expand_with_table(str, config->default_subject_template,
+				  tab, &error) <= 0) {
 		e_error(aenv->event,
 			"Failed to expand deliver_log_format=%s: %s",
 			config->default_subject_template, error);
diff --git a/src/plugins/lda-sieve/lda-sieve-plugin.c b/src/plugins/lda-sieve/lda-sieve-plugin.c
index ea9f2dfab..bc688ba2d 100644
--- a/src/plugins/lda-sieve/lda-sieve-plugin.c
+++ b/src/plugins/lda-sieve/lda-sieve-plugin.c
@@ -214,8 +214,8 @@ lda_sieve_result_amend_log_message(const struct sieve_script_env *senv,
 	table = mail_deliver_ctx_get_log_var_expand_table(mdctx, message);
 
 	str = t_str_new(256);
-	if (var_expand(str, mdctx->set->deliver_log_format,
-		       table, &error) <= 0) {
+	if (var_expand_with_table(str, mdctx->set->deliver_log_format,
+				  table, &error) <= 0) {
 		e_error(mdctx->event,
 			"Failed to expand deliver_log_format=%s: %s",
 			mdctx->set->deliver_log_format, error);
-- 
GitLab