[dovecot-cvs] dovecot: Don't expand %variables in mail setting coming from use...
dovecot at dovecot.org
dovecot at dovecot.org
Sun May 27 16:45:34 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/1680709ec0a2
changeset: 5665:1680709ec0a2
user: Timo Sirainen <tss at iki.fi>
date: Sun May 27 16:45:27 2007 +0300
description:
Don't expand %variables in mail setting coming from userdb.
diffstat:
1 file changed, 13 insertions(+), 10 deletions(-)
src/deliver/deliver.c | 23 +++++++++++++----------
diffs (36 lines):
diff -r b796701a6927 -r 1680709ec0a2 src/deliver/deliver.c
--- a/src/deliver/deliver.c Fri May 25 18:17:54 2007 +0300
+++ b/src/deliver/deliver.c Sun May 27 16:45:27 2007 +0300
@@ -665,19 +665,22 @@ int main(int argc, char *argv[])
mailbox_list_register_all();
/* MAIL comes from userdb, MAIL_LOCATION from dovecot.conf.
+ We don't want to expand settings coming from userdb.
FIXME: should remove these and support namespaces.. */
mail_env = getenv("MAIL");
- if (mail_env == NULL)
+ if (mail_env == NULL) {
mail_env = getenv("MAIL_LOCATION");
- if (mail_env == NULL) {
- /* Keep this for backwards compatibility */
- mail_env = getenv("DEFAULT_MAIL_ENV");
- }
- if (mail_env != NULL) {
- table = get_var_expand_table(destination, getenv("HOME"));
- mail_env = expand_mail_env(mail_env, table);
- }
- env_put(t_strconcat("MAIL=", mail_env, NULL));
+ if (mail_env == NULL) {
+ /* Keep this for backwards compatibility */
+ mail_env = getenv("DEFAULT_MAIL_ENV");
+ }
+ if (mail_env != NULL) {
+ table = get_var_expand_table(destination,
+ getenv("HOME"));
+ mail_env = expand_mail_env(mail_env, table);
+ }
+ env_put(t_strconcat("MAIL=", mail_env, NULL));
+ }
module_dir_init(modules);
More information about the dovecot-cvs
mailing list