# HG changeset patch # User Timo Sirainen # Date 1496870438 -10800 # Node ID fe8060e2ad476370bd78bbf0ce13c611f3badb0e # Parent ca38a4e36fad1f4a6df290457a90d5a8b12c98d4 master: Append to existing DOVECOT_PRESERVE_ENVS instead of overwriting it diff -r ca38a4e36fad -r fe8060e2ad47 src/master/main.c --- a/src/master/main.c Thu Jun 08 00:14:30 2017 +0300 +++ b/src/master/main.c Thu Jun 08 00:20:38 2017 +0300 @@ -431,6 +431,11 @@ 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, '=');