]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
quota: Log an error if mail's size can't be read.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 1 Aug 2016 19:18:08 +0000 (22:18 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 1 Aug 2016 22:03:32 +0000 (01:03 +0300)
We were still logging "Internal quota calculation error" but not necessarily
any other reason.

src/plugins/quota/quota.c

index 6e9d2924bae1eb7cd53f321fa766559b001f4a1e..d7b634f433f44113348410fa46da83fb976225a9 100644 (file)
@@ -1094,8 +1094,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)