From: Timo Sirainen Date: Wed, 7 Jun 2017 21:20:38 +0000 (+0300) Subject: master: Append to existing DOVECOT_PRESERVE_ENVS instead of overwriting it X-Git-Tag: 2.3.0.rc1~1458 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18be696381e6db96ce0dfc731af75b503dde6cd7;p=thirdparty%2Fdovecot%2Fcore.git master: Append to existing DOVECOT_PRESERVE_ENVS instead of overwriting it --- 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, '=');