dovecot: mail_debug=yes: Log quota warnings. Log rule limits in ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Dec 21 18:21:35 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/e78c47c6ee8e
changeset: 7010:e78c47c6ee8e
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Dec 21 18:21:31 2007 +0200
description:
mail_debug=yes: Log quota warnings. Log rule limits in bytes.

diffstat:

1 file changed, 9 insertions(+), 2 deletions(-)
src/plugins/quota/quota.c |   11 +++++++++--

diffs (29 lines):

diff -r 24233c8361fc -r e78c47c6ee8e src/plugins/quota/quota.c
--- a/src/plugins/quota/quota.c	Fri Dec 21 18:21:06 2007 +0200
+++ b/src/plugins/quota/quota.c	Fri Dec 21 18:21:31 2007 +0200
@@ -311,9 +311,9 @@ int quota_root_add_rule(struct quota_roo
 
 	if (root->quota->debug) {
 		i_info("Quota rule: root=%s mailbox=%s "
-		       "storage=%lldkB messages=%lld", root->name,
+		       "bytes=%lld messages=%lld", root->name,
 		       rule->mailbox_name != NULL ? rule->mailbox_name : "",
-		       (long long)rule->bytes_limit / 1024,
+		       (long long)rule->bytes_limit,
 		       (long long)rule->count_limit);
 	}
 	return ret;
@@ -439,6 +439,13 @@ int quota_root_add_warning_rule(struct q
 	warning->command = i_strdup(p+1);
 	warning->bytes_limit = rule.bytes_limit;
 	warning->count_limit = rule.count_limit;
+
+	if (root->quota->debug) {
+		i_info("Quota warning: bytes=%llu messages=%llu command=%s",
+		       (unsigned long long)warning->bytes_limit,
+		       (unsigned long long)warning->count_limit,
+		       warning->command);
+	}
 	return 0;
 }
 


More information about the dovecot-cvs mailing list