dovecot-1.2: deliver: Don't let plugin section override other se...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jul 8 13:57:01 EEST 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/97f3adc9ac61
changeset: 7972:97f3adc9ac61
user: Timo Sirainen <tss at iki.fi>
date: Tue Jul 08 16:26:54 2008 +0530
description:
deliver: Don't let plugin section override other settings (at least for now).
diffstat:
1 file changed, 14 insertions(+), 1 deletion(-)
src/deliver/deliver.c | 15 ++++++++++++++-
diffs (32 lines):
diff -r 7a6e72d2c599 -r 97f3adc9ac61 src/deliver/deliver.c
--- 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 @@ 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");
More information about the dovecot-cvs
mailing list