Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6459:c6849b4a3812 HEAD
Mark deliver's dummy mbox namespace as internal and don't include it in
quota calculation.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 22 Sep 2007 15:49:02 +0300 |
parents | cca479cb3ef0 |
children | d4df001f9bd0 |
files | src/deliver/deliver.c src/lib-storage/mail-namespace.h src/plugins/quota/quota-storage.c |
diffstat | 3 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/deliver/deliver.c Sat Sep 22 15:14:20 2007 +0300 +++ b/src/deliver/deliver.c Sat Sep 22 15:49:02 2007 +0300 @@ -760,6 +760,7 @@ exit(EX_TEMPFAIL); mbox_ns = mail_namespaces_init_empty(namespace_pool); + mbox_ns->flags |= NAMESPACE_FLAG_INTERNAL; if (mail_storage_create(mbox_ns, "mbox", "/tmp", destination, 0, FILE_LOCK_METHOD_FCNTL, &error) < 0) i_fatal("Couldn't create internal mbox storage: %s", error);
--- a/src/lib-storage/mail-namespace.h Sat Sep 22 15:14:20 2007 +0300 +++ b/src/lib-storage/mail-namespace.h Sat Sep 22 15:49:02 2007 +0300 @@ -13,7 +13,9 @@ /* Namespace is visible only by explicitly using its full prefix */ NAMESPACE_FLAG_HIDDEN = 0x02, /* Namespace is visible with LIST */ - NAMESPACE_FLAG_LIST = 0x04 + NAMESPACE_FLAG_LIST = 0x04, + /* Namespace is created for internal use only. */ + NAMESPACE_FLAG_INTERNAL = 0x10 }; struct mail_namespace {
--- a/src/plugins/quota/quota-storage.c Sat Sep 22 15:14:20 2007 +0300 +++ b/src/plugins/quota/quota-storage.c Sat Sep 22 15:49:02 2007 +0300 @@ -453,7 +453,8 @@ MODULE_CONTEXT_SET_SELF(storage, quota_storage_module, qstorage); - if (storage->ns->type == NAMESPACE_PRIVATE) { + if (storage->ns->type == NAMESPACE_PRIVATE && + (storage->ns->flags & NAMESPACE_FLAG_INTERNAL) == 0) { /* register to user's quota roots */ quota_add_user_storage(quota_set, storage); }