dovecot-2.0: lib-storage: Give a better error message if mail_lo...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jan 26 21:48:16 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/fc02e620204d
changeset: 12577:fc02e620204d
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jan 25 00:32:50 2011 +0200
description:
lib-storage: Give a better error message if mail_location has INBOX but no mail root dir.

diffstat:

 src/lib-storage/mailbox-list.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 3582271a897e -r fc02e620204d src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Tue Jan 25 00:10:46 2011 +0200
+++ b/src/lib-storage/mailbox-list.c	Tue Jan 25 00:32:50 2011 +0200
@@ -264,6 +264,12 @@
 		*error_r = t_strconcat(error, "mail root dir in: ", data, NULL);
 		return -1;
 	}
+	if (strncmp(set_r->root_dir, "INBOX=", 6) == 0) {
+		/* probably mbox user trying to avoid root_dir */
+		*error_r = t_strconcat("Mail root directory not given: ",
+				       data, NULL);
+		return -1;
+	}
 
 	while (*tmp != NULL) {
 		str = split_next_arg(&tmp);


More information about the dovecot-cvs mailing list