dovecot-2.2: quota: Don't log errors about missing namespaces fo...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Aug 1 15:01:05 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/1705bf7bf484
changeset: 16632:1705bf7bf484
user: Timo Sirainen <tss at iki.fi>
date: Thu Aug 01 15:00:59 2013 +0300
description:
quota: Don't log errors about missing namespaces for autocreated shared mail_users.
diffstat:
src/plugins/quota/quota-storage.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r f7f3ea4cb6df -r 1705bf7bf484 src/plugins/quota/quota-storage.c
--- a/src/plugins/quota/quota-storage.c Thu Aug 01 14:23:33 2013 +0300
+++ b/src/plugins/quota/quota-storage.c Thu Aug 01 15:00:59 2013 +0300
@@ -597,11 +597,13 @@
const struct quota_rule *rule;
const char *name;
struct mail_namespace *ns;
+ /* silence errors for autocreated (shared) users */
+ bool silent_errors = namespaces->user->autocreated;
if (root->ns_prefix != NULL && root->ns == NULL) {
root->ns = mail_namespace_find_prefix(namespaces,
root->ns_prefix);
- if (root->ns == NULL) {
+ if (root->ns == NULL && !silent_errors) {
i_error("quota: Unknown namespace: %s",
root->ns_prefix);
}
@@ -610,7 +612,8 @@
array_foreach(&root->set->rules, rule) {
name = rule->mailbox_name;
ns = mail_namespace_find(namespaces, name);
- if ((ns->flags & NAMESPACE_FLAG_UNUSABLE) != 0)
+ if ((ns->flags & NAMESPACE_FLAG_UNUSABLE) != 0 &&
+ !silent_errors)
i_error("quota: Unknown namespace: %s", name);
}
}
More information about the dovecot-cvs
mailing list