dovecot-2.2: Added mail_shared_explicit_inbox setting.

dovecot at dovecot.org dovecot at dovecot.org
Sun May 20 03:26:35 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/40a544fc4778
changeset: 14538:40a544fc4778
user:      Timo Sirainen <tss at iki.fi>
date:      Fri May 04 21:40:57 2012 +0300
description:
Added mail_shared_explicit_inbox setting.

diffstat:

 doc/example-config/conf.d/10-mail.conf  |  2 ++
 src/lib-storage/mail-storage-settings.c |  2 ++
 src/lib-storage/mail-storage-settings.h |  1 +
 src/lib-storage/mailbox-list.c          |  6 ++++--
 4 files changed, 9 insertions(+), 2 deletions(-)

diffs (65 lines):

diff -r fa6662ab4df3 -r 40a544fc4778 doc/example-config/conf.d/10-mail.conf
--- a/doc/example-config/conf.d/10-mail.conf	Fri May 04 20:14:20 2012 +0300
+++ b/doc/example-config/conf.d/10-mail.conf	Fri May 04 21:40:57 2012 +0300
@@ -97,6 +97,8 @@
   # List the shared/ namespace only if there are visible shared mailboxes.
   #list = children
 #}
+# Should shared INBOX be visible as "shared/user" or "shared/user/INBOX"?
+#mail_shared_explicit_inbox = yes
 
 # System user and group used to access mails. If you use multiple, userdb
 # can override these by returning uid or gid fields. You can use either numbers
diff -r fa6662ab4df3 -r 40a544fc4778 src/lib-storage/mail-storage-settings.c
--- a/src/lib-storage/mail-storage-settings.c	Fri May 04 20:14:20 2012 +0300
+++ b/src/lib-storage/mail-storage-settings.c	Fri May 04 21:40:57 2012 +0300
@@ -48,6 +48,7 @@
 	DEF(SET_BOOL, mail_debug),
 	DEF(SET_BOOL, mail_full_filesystem_access),
 	DEF(SET_BOOL, maildir_stat_dirs),
+	DEF(SET_BOOL, mail_shared_explicit_inbox),
 	DEF(SET_ENUM, lock_method),
 	DEF(SET_STR, pop3_uidl_format),
 
@@ -78,6 +79,7 @@
 	.mail_debug = FALSE,
 	.mail_full_filesystem_access = FALSE,
 	.maildir_stat_dirs = FALSE,
+	.mail_shared_explicit_inbox = TRUE,
 	.lock_method = "fcntl:flock:dotlock",
 	.pop3_uidl_format = "%08Xu%08Xv"
 };
diff -r fa6662ab4df3 -r 40a544fc4778 src/lib-storage/mail-storage-settings.h
--- a/src/lib-storage/mail-storage-settings.h	Fri May 04 20:14:20 2012 +0300
+++ b/src/lib-storage/mail-storage-settings.h	Fri May 04 21:40:57 2012 +0300
@@ -33,6 +33,7 @@
 	bool mail_debug;
 	bool mail_full_filesystem_access;
 	bool maildir_stat_dirs;
+	bool mail_shared_explicit_inbox;
 	const char *lock_method;
 	const char *pop3_uidl_format;
 
diff -r fa6662ab4df3 -r 40a544fc4778 src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Fri May 04 20:14:20 2012 +0300
+++ b/src/lib-storage/mailbox-list.c	Fri May 04 21:40:57 2012 +0300
@@ -428,7 +428,8 @@
 	ns_sep = mail_namespace_get_sep(ns);
 
 	if (*storage_name == '\0' && ns->type == NAMESPACE_SHARED &&
-	    (ns->flags & NAMESPACE_FLAG_INBOX_ANY) != 0) {
+	    (ns->flags & NAMESPACE_FLAG_INBOX_ANY) != 0 &&
+	    !list->mail_set->mail_shared_explicit_inbox) {
 		/* opening shared/$user. it's the same as INBOX. */
 		storage_name = "INBOX";
 	}
@@ -508,7 +509,8 @@
 		return vname;
 	}
 	if (strcmp(vname, "INBOX") == 0 &&
-	    (list->ns->flags & NAMESPACE_FLAG_INBOX_ANY) != 0) {
+	    (list->ns->flags & NAMESPACE_FLAG_INBOX_ANY) != 0 &&
+	    !list->mail_set->mail_shared_explicit_inbox) {
 		/* convert to shared/$user, we don't really care about the
 		   INBOX suffix here. */
 		vname = "";


More information about the dovecot-cvs mailing list