dovecot-1.2: Quota: If mail_debug=yes, log when quota warning sc...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 29 18:41:59 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/1dc1f8163166
changeset: 8352:1dc1f8163166
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 29 18:41:56 2008 +0200
description:
Quota: If mail_debug=yes, log when quota warning script is executed.
diffstat:
1 file changed, 9 insertions(+), 5 deletions(-)
src/plugins/quota/quota.c | 14 +++++++++-----
diffs (31 lines):
diff -r cd83c5dc66d8 -r 1dc1f8163166 src/plugins/quota/quota.c
--- a/src/plugins/quota/quota.c Wed Oct 29 18:23:31 2008 +0200
+++ b/src/plugins/quota/quota.c Wed Oct 29 18:41:56 2008 +0200
@@ -773,10 +773,14 @@ static int quota_transaction_set_limits(
return 0;
}
-static void quota_warning_execute(const char *cmd)
-{
- int ret = system(cmd);
-
+static void quota_warning_execute(struct quota_root *root, const char *cmd)
+{
+ int ret;
+
+ if (root->quota->set->debug)
+ i_info("quota: Executing warning: %s", cmd);
+
+ ret = system(cmd);
if (ret < 0) {
i_error("system(%s) failed: %m", cmd);
} else if (WIFSIGNALED(ret)) {
@@ -813,7 +817,7 @@ static void quota_warnings_execute(struc
bytes_current >= (uint64_t)warnings[i].rule.bytes_limit) ||
(count_before < (uint64_t)warnings[i].rule.count_limit &&
count_current >= (uint64_t)warnings[i].rule.count_limit)) {
- quota_warning_execute(warnings[i].command);
+ quota_warning_execute(root, warnings[i].command);
break;
}
}
More information about the dovecot-cvs
mailing list