restrict_access_allow_coredumps(TRUE);
set = mail_storage_service_user_get_set(user)[1];
- if (settings_var_expand(&imap_urlauth_worker_setting_parser_info, set,
- mail_user->pool,
- mail_user_var_expand_table(mail_user),
- &error) <= 0) {
+ if (mail_user_var_expand(mail_user, &imap_urlauth_worker_setting_parser_info,
+ set, &error) <= 0) {
client_send_line(client, "NO");
client_abort(client, t_strdup_printf(
"Session aborted: Failed to expand settings: %s", error));
if (imap_set->verbose_proctitle)
verbose_proctitle = TRUE;
- if (settings_var_expand(&smtp_submit_setting_parser_info, smtp_set,
- mail_user->pool, mail_user_var_expand_table(mail_user),
- &errstr) <= 0 ||
- settings_var_expand(&imap_setting_parser_info, imap_set,
- mail_user->pool, mail_user_var_expand_table(mail_user),
- &errstr) <= 0) {
+ if (mail_user_var_expand(mail_user, &smtp_submit_setting_parser_info,
+ smtp_set, &errstr) <= 0 ||
+ mail_user_var_expand(mail_user, &imap_setting_parser_info,
+ imap_set, &errstr) <= 0) {
*error_r = t_strdup_printf("Failed to expand settings: %s", errstr);
mail_user_deinit(&mail_user);
mail_storage_service_user_unref(&user);
bool stderr_rejection)
{
struct mail_deliver_context ctx;
- const struct var_expand_table *var_table;
struct lda_settings *lda_set;
struct smtp_submit_settings *smtp_set;
const char *errstr;
int ret;
- var_table = mail_user_var_expand_table(dinput->rcpt_user);
smtp_set = mail_storage_service_user_get_set(service_user)[1];
lda_set = mail_storage_service_user_get_set(service_user)[2];
- ret = settings_var_expand(
- &lda_setting_parser_info,
- lda_set, dinput->rcpt_user->pool, var_table,
- &errstr);
+ ret = mail_user_var_expand(dinput->rcpt_user, &lda_setting_parser_info,
+ lda_set, &errstr);
if (ret > 0) {
- ret = settings_var_expand(
+ ret = mail_user_var_expand(dinput->rcpt_user,
&smtp_submit_setting_parser_info,
- smtp_set, dinput->rcpt_user->pool, var_table,
- &errstr);
+ smtp_set, &errstr);
}
if (ret <= 0)
i_fatal("Failed to expand settings: %s", errstr);
}
/* expand settings after we can expand %h */
- if (settings_var_expand_with_funcs(user->set_info, user->set,
- user->pool, mail_user_var_expand_table(user),
- mail_user_var_expand_func_table, user,
- &error) <= 0) {
+ if (mail_user_var_expand(user, user->set_info, user->set,
+ &error) <= 0) {
user->error = p_strdup_printf(user->pool,
"Failed to expand settings: %s", error);
}
struct lda_settings *lda_set;
struct mail_namespace *ns;
struct setting_parser_context *set_parser;
- const struct var_expand_table *var_table;
void **sets;
const char *line, *error, *username;
int ret;
local->rcpt_user = rcpt_user;
sets = mail_storage_service_user_get_set(service_user);
- var_table = mail_user_var_expand_table(rcpt_user);
smtp_set = sets[1];
lda_set = sets[2];
- ret = settings_var_expand(
- &smtp_submit_setting_parser_info,
- smtp_set, client->pool, var_table,
- &error);
+ ret = mail_user_var_expand(rcpt_user, &smtp_submit_setting_parser_info,
+ smtp_set, &error);
if (ret > 0) {
- ret = settings_var_expand(
- &lda_setting_parser_info,
- lda_set, client->pool, var_table,
- &error);
+ ret = mail_user_var_expand(rcpt_user, &lda_setting_parser_info,
+ lda_set, &error);
}
if (ret <= 0) {
e_error(rcpt->event, "Failed to expand settings: %s", error);
if (set->verbose_proctitle)
verbose_proctitle = TRUE;
- if (settings_var_expand(&pop3_setting_parser_info, set,
- mail_user->pool, mail_user_var_expand_table(mail_user),
- &errstr) <= 0) {
+ if (mail_user_var_expand(mail_user, &pop3_setting_parser_info, set,
+ &errstr) <= 0) {
*error_r = t_strdup_printf("Failed to expand settings: %s", errstr);
mail_user_deinit(&mail_user);
mail_storage_service_user_unref(&user);
if (set->verbose_proctitle)
verbose_proctitle = TRUE;
- if (settings_var_expand(&submission_setting_parser_info, set,
- mail_user->pool, mail_user_var_expand_table(mail_user),
- &errstr) <= 0) {
+ if (mail_user_var_expand(mail_user, &submission_setting_parser_info,
+ set, &errstr) <= 0) {
*error_r = t_strdup_printf("Failed to expand settings: %s", errstr);
send_error(fd_out, event, set->hostname,
"4.3.5", MAIL_ERRSTR_CRITICAL_MSG);