Skip to content

Commit

Permalink
pop3: Expand settings to fix rawlog_dir
Browse files Browse the repository at this point in the history
Even if %variables weren't used in rawlog_dir, the path was always prefixed
with "0".
  • Loading branch information
sirainen authored and Timo Sirainen committed Oct 6, 2017
1 parent 078e0f0 commit c13ec21
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/pop3/main.c
Expand Up @@ -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"
Expand Down Expand Up @@ -102,7 +103,8 @@ 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;
const char *errstr;

if (mail_storage_service_lookup_next(storage_service, input,
&user, &mail_user, error_r) <= 0) {
Expand All @@ -117,6 +119,15 @@ client_create_from_input(const struct mail_storage_service_input *input,
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) {
*error_r = t_strdup_printf("Failed to expand settings: %s", errstr);
mail_user_unref(&mail_user);
mail_storage_service_user_unref(&user);
return -1;
}

*client_r = client_create(fd_in, fd_out, input->session_id,
mail_user, user, set);

Expand Down

0 comments on commit c13ec21

Please sign in to comment.