From 5fb4009ce8522d930e6fc78698395a267f2c42ab Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 8 Jul 2008 16:26:54 +0530 Subject: [PATCH] deliver: Don't let plugin section override other settings (at least for now). --HG-- branch : HEAD --- src/deliver/deliver.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/deliver/deliver.c b/src/deliver/deliver.c index 444d09ca63..a82ae27191 100644 --- a/src/deliver/deliver.c +++ b/src/deliver/deliver.c @@ -691,6 +691,7 @@ static void expand_envs(const char *user) const char *mail_env, *const *envs, *home; unsigned int i, count; string_t *str; + char *env, *p; home = getenv("HOME"); @@ -700,7 +701,19 @@ static void expand_envs(const char *user) for (i = 0; i < count; i++) { str_truncate(str, 0); var_expand(str, envs[i], table); - env_put(str_c(str)); + + env = str_c_modifiable(str); + p = strchr(env, '='); + if (p != NULL) { + *p = '\0'; + /* more or less temporary solution to allow lda section + to override plugin settings. after config rewrite + this should go away. */ + if (getenv(env) == NULL) { + *p = '='; + env_put(env); + } + } } mail_env = getenv("MAIL_LOCATION"); -- 2.47.3