if (mailbox_list_get_storage(&list, &name, &storage) == 0 &&
strcmp(storage->name, MAILDIR_STORAGE_NAME) != 0) {
/* non-maildir namespace, skip */
- i_warning("quota: Namespace '%s' is not Maildir, "
- "skipping for Maildir++ quota",
- root->maildirsize_ns->prefix);
+ if ((storage->class_flags &
+ MAIL_STORAGE_CLASS_FLAG_NOQUOTA) == 0) {
+ i_warning("quota: Namespace '%s' is not Maildir, "
+ "skipping for Maildir++ quota",
+ root->maildirsize_ns->prefix);
+ }
root->maildirsize_path = NULL;
return FALSE;
}
if (QUOTA_LIST_CONTEXT(box->list) == NULL)
return;
+ if ((box->storage->class_flags & MAIL_STORAGE_CLASS_FLAG_NOQUOTA) != 0)
+ return;
+
qbox = p_new(box->pool, struct quota_mailbox, 1);
qbox->module_ctx.super = *v;
box->vlast = &qbox->module_ctx.super;
if (root != NULL)
root->ns = list->ns;
- if ((list->ns->flags & NAMESPACE_FLAG_NOQUOTA) != 0 ||
- strncmp(list->ns->set->location, "virtual:", 8) == 0) /* FIXME: remove ugly workaround */
+ if ((list->ns->flags & NAMESPACE_FLAG_NOQUOTA) != 0)
add = FALSE;
else if (list->ns->owner == NULL) {
/* public namespace - add quota only if namespace is
bool quota_root_is_namespace_visible(struct quota_root *root,
struct mail_namespace *ns)
{
+ struct mailbox_list *list = ns->list;
+ struct mail_storage *storage;
+ const char *name = "";
+
+ /* this check works as long as there is only one storage per list */
+ if (mailbox_list_get_storage(&list, &name, &storage) == 0 &&
+ (storage->class_flags & MAIL_STORAGE_CLASS_FLAG_NOQUOTA) != 0)
+ return FALSE;
+
if (root->ns != NULL) {
if (root->ns != ns)
return FALSE;