dovecot-1.1: Give an error if inbox=yes namespace is missing.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Feb 10 03:07:02 EET 2009
details: http://hg.dovecot.org/dovecot-1.1/rev/ca0ec4198ef4
changeset: 8159:ca0ec4198ef4
user: Timo Sirainen <tss at iki.fi>
date: Mon Feb 09 20:06:57 2009 -0500
description:
Give an error if inbox=yes namespace is missing.
Previously we attempted to set it automatically, but that didn't work.
diffstat:
1 file changed, 4 insertions(+), 15 deletions(-)
src/lib-storage/mail-namespace.c | 19 ++++---------------
diffs (43 lines):
diff -r a91b2f52d453 -r ca0ec4198ef4 src/lib-storage/mail-namespace.c
--- a/src/lib-storage/mail-namespace.c Mon Feb 09 19:58:50 2009 -0500
+++ b/src/lib-storage/mail-namespace.c Mon Feb 09 20:06:57 2009 -0500
@@ -88,8 +88,7 @@ namespace_add_env(pool_t pool, const cha
static bool namespaces_check(struct mail_namespace *namespaces)
{
- struct mail_namespace *ns, *inbox_ns = NULL, *private_ns = NULL;
- unsigned int private_ns_count = 0;
+ struct mail_namespace *ns, *inbox_ns = NULL;
unsigned int subscriptions_count = 0;
char list_sep = '\0';
@@ -103,10 +102,6 @@ static bool namespaces_check(struct mail
}
inbox_ns = ns;
}
- if (ns->type == NAMESPACE_PRIVATE) {
- private_ns = ns;
- private_ns_count++;
- }
if (*ns->prefix != '\0' &&
(ns->flags & NAMESPACE_FLAG_LIST) != 0 &&
ns->prefix[strlen(ns->prefix)-1] != ns->sep) {
@@ -136,15 +131,9 @@ static bool namespaces_check(struct mail
}
if (inbox_ns == NULL) {
- if (private_ns_count == 1) {
- /* just one private namespace. we'll assume it's
- the INBOX namespace. */
- private_ns->flags |= NAMESPACE_FLAG_INBOX;
- } else {
- i_error("namespace configuration error: "
- "inbox=yes namespace missing");
- return FALSE;
- }
+ i_error("namespace configuration error: "
+ "inbox=yes namespace missing");
+ return FALSE;
}
if (list_sep == '\0') {
i_error("namespace configuration error: "
More information about the dovecot-cvs
mailing list