Mercurial > dovecot > core-2.2
changeset 18489:e00f9e93a9a3
quota: Don't assume mail is too large if a quota root has mail count limit but not size limit.
Based on patch by Alexei Gradinari
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 29 Apr 2015 10:13:19 +0200 |
parents | aa8786771490 |
children | 2dbee58a1a0d |
files | src/plugins/quota/quota.c |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/quota/quota.c Tue Apr 28 14:20:39 2015 +0200 +++ b/src/plugins/quota/quota.c Wed Apr 29 10:13:19 2015 +0200 @@ -1093,14 +1093,12 @@ ret = quota_root_get_rule_limits(roots[i], mailbox_get_vname(ctx->box), &bytes_limit, &count_limit); - if (ret == 0) - continue; if (ret < 0) return -1; /* if size is bigger than any limit, then it is bigger than the lowest limit */ - if (size > bytes_limit) { + if (bytes_limit > 0 && size > bytes_limit) { *too_large_r = TRUE; break; }