[dovecot-cvs] dovecot: Better implementation for mail_index_uint32_to_offset()...

dovecot at dovecot.org dovecot at dovecot.org
Tue May 29 00:09:55 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/f7cdb61c6892
changeset: 5666:f7cdb61c6892
user:      Timo Sirainen <tss at iki.fi>
date:      Tue May 29 00:09:44 2007 +0300
description:
Better implementation for mail_index_uint32_to_offset() and
mail_index_offset_to_uint32().

diffstat:

1 file changed, 10 insertions(+), 13 deletions(-)
src/deliver/deliver.c |   23 ++++++++++-------------

diffs (36 lines):

diff -r 1680709ec0a2 -r f7cdb61c6892 src/deliver/deliver.c
--- a/src/deliver/deliver.c	Sun May 27 16:45:27 2007 +0300
+++ b/src/deliver/deliver.c	Tue May 29 00:09:44 2007 +0300
@@ -665,22 +665,19 @@ 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) 
+		mail_env = getenv("MAIL_LOCATION");
 	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));
-	}
+		/* 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