changeset 20543:6a73133e0bf9

quota: Log an error if mail's size can't be read. We were still logging "Internal quota calculation error" but not necessarily any other reason.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Mon, 01 Aug 2016 22:18:08 +0300
parents 37e2fcca9e0f
children 88b0b65c732b
files src/plugins/quota/quota.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/quota/quota.c	Fri Jul 29 00:59:43 2016 +0300
+++ b/src/plugins/quota/quota.c	Mon Aug 01 22:18:08 2016 +0300
@@ -1093,8 +1093,12 @@
 	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)