dovecot-2.2: quota: Use quota_last_extra only for LDA/LMTP (not ...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Feb 11 03:07:28 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/c890fa3b5efd
changeset: 15760:c890fa3b5efd
user: Timo Sirainen <tss at iki.fi>
date: Mon Feb 11 03:07:24 2013 +0200
description:
quota: Use quota_last_extra only for LDA/LMTP (not for IMAP).
diffstat:
src/plugins/quota/quota.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r 7a2ca282a53e -r c890fa3b5efd src/plugins/quota/quota.c
--- a/src/plugins/quota/quota.c Mon Feb 11 03:03:12 2013 +0200
+++ b/src/plugins/quota/quota.c Mon Feb 11 03:07:24 2013 +0200
@@ -994,10 +994,13 @@
const char *mailbox_name;
unsigned int i, count;
uint64_t bytes_limit, count_limit, current, limit, diff;
+ bool use_last_extra;
int ret;
ctx->limits_set = TRUE;
mailbox_name = mailbox_get_vname(ctx->box);
+ /* use last_mail_max_extra_bytes only for LDA/LMTP */
+ use_last_extra = (ctx->box->flags & MAILBOX_FLAG_POST_SESSION) != 0;
/* find the lowest quota limits from all roots and use them */
roots = array_get(&ctx->quota->roots, &count);
@@ -1028,7 +1031,8 @@
diff = limit - current;
if (ctx->bytes_ceil2 > diff)
ctx->bytes_ceil2 = diff;
- diff += roots[i]->set->last_mail_max_extra_bytes;
+ diff += !use_last_extra ? 0 :
+ roots[i]->set->last_mail_max_extra_bytes;
if (ctx->bytes_ceil > diff)
ctx->bytes_ceil = diff;
}
More information about the dovecot-cvs
mailing list