]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3: Expand settings to fix rawlog_dir
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 6 Oct 2017 11:39:00 +0000 (14:39 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 10 Oct 2017 06:45:07 +0000 (09:45 +0300)
Even if %variables weren't used in rawlog_dir, the path was always prefixed
with "0".

src/pop3/main.c

index ad5786147cad5a33e6edcb93311b0c5fe631a11b..b2a5cf024eb6f670d3650a68d2549af9b0b7b0b7 100644 (file)
@@ -10,6 +10,7 @@
 #include "str.h"
 #include "process-title.h"
 #include "restrict-access.h"
+#include "settings-parser.h"
 #include "master-service.h"
 #include "master-login.h"
 #include "master-interface.h"
@@ -102,7 +103,7 @@ client_create_from_input(const struct mail_storage_service_input *input,
                "-ERR [SYS/TEMP] "MAIL_ERRSTR_CRITICAL_MSG"\r\n";
        struct mail_storage_service_user *user;
        struct mail_user *mail_user;
-       const struct pop3_settings *set;
+       struct pop3_settings *set;
 
        if (mail_storage_service_lookup_next(storage_service, input,
                                             &user, &mail_user, error_r) <= 0) {
@@ -117,6 +118,9 @@ client_create_from_input(const struct mail_storage_service_input *input,
        if (set->verbose_proctitle)
                verbose_proctitle = TRUE;
 
+       settings_var_expand(&pop3_setting_parser_info, set,
+                           mail_user->pool, mail_user_var_expand_table(mail_user));
+
        *client_r = client_create(fd_in, fd_out, input->session_id,
                                  mail_user, user, set);