Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7972:97f3adc9ac61 HEAD
deliver: Don't let plugin section override other settings (at least for now).
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 08 Jul 2008 16:26:54 +0530 |
parents | 7a6e72d2c599 |
children | 6ccb546b9615 |
files | src/deliver/deliver.c |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/deliver/deliver.c Tue Jul 08 16:00:53 2008 +0530 +++ b/src/deliver/deliver.c Tue Jul 08 16:26:54 2008 +0530 @@ -691,6 +691,7 @@ const char *mail_env, *const *envs, *home; unsigned int i, count; string_t *str; + char *env, *p; home = getenv("HOME"); @@ -700,7 +701,19 @@ 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");