dovecot-2.2: virtual: Allow "*" to match inbox=yes namespace if ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Aug 8 11:56:53 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/4db555d87a54
changeset: 17687:4db555d87a54
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Aug 08 14:54:46 2014 +0300
description:
virtual: Allow "*" to match inbox=yes namespace if there's otherwise no prefix="" namespace.

diffstat:

 src/plugins/virtual/virtual-config.c |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r 056dfefd81b9 -r 4db555d87a54 src/plugins/virtual/virtual-config.c
--- a/src/plugins/virtual/virtual-config.c	Fri Aug 08 14:54:20 2014 +0300
+++ b/src/plugins/virtual/virtual-config.c	Fri Aug 08 14:54:46 2014 +0300
@@ -263,6 +263,14 @@
 	    (config_ns->flags & NAMESPACE_FLAG_AUTOCREATED) == 0 &&
 	    (iter_ns->flags & NAMESPACE_FLAG_AUTOCREATED) != 0)
 		return TRUE;
+	if ((iter_ns->flags & NAMESPACE_FLAG_INBOX_USER) != 0 &&
+	    (config_ns->flags & NAMESPACE_FLAG_AUTOCREATED) != 0 &&
+	    config_ns->prefix_len == 0) {
+		/* prefix="" namespace was autocreated, so e.g. "*" would match
+		   only that empty namespace. but we want "*" to also match
+		   the inbox=yes namespace, so check it here separately. */
+		return TRUE;
+	}
 	return FALSE;
 }
 


More information about the dovecot-cvs mailing list