From 18be696381e6db96ce0dfc731af75b503dde6cd7 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 8 Jun 2017 00:20:38 +0300 Subject: [PATCH] master: Append to existing DOVECOT_PRESERVE_ENVS instead of overwriting it --- src/master/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/master/main.c b/src/master/main.c index 9bab46402d..0ce87462dd 100644 --- a/src/master/main.c +++ b/src/master/main.c @@ -431,6 +431,11 @@ master_set_import_environment(const struct master_service_settings *set) return; t_array_init(&keys, 8); + /* preserve existing DOVECOT_PRESERVE_ENVS */ + value = getenv(DOVECOT_PRESERVE_ENVS_ENV); + if (value != NULL) + array_append(&keys, &value, 1); + /* add new environments */ envs = t_strsplit_spaces(set->import_environment, " "); for (; *envs != NULL; envs++) { value = strchr(*envs, '='); -- 2.47.3