Skip to content

Commit

Permalink
quota: Log an error if mail's size can't be read.
Browse files Browse the repository at this point in the history
We were still logging "Internal quota calculation error" but not necessarily
any other reason.
  • Loading branch information
sirainen committed Aug 4, 2016
1 parent b3a52b0 commit 7730456
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/quota/quota.c
Expand Up @@ -1093,8 +1093,12 @@ int quota_try_alloc(struct quota_transaction_context *ctx,
uoff_t size;
int ret;

if (mail_get_physical_size(mail, &size) < 0)
if (mail_get_physical_size(mail, &size) < 0) {
i_error("quota: Failed to get mail size (box=%s, uid=%u): %s",
mail->box->vname, mail->uid,
mailbox_get_last_error(mail->box, NULL));
return -1;
}

ret = quota_test_alloc(ctx, size, too_large_r);
if (ret <= 0)
Expand Down

0 comments on commit 7730456

Please sign in to comment.