dovecot-1.1: Quota: If mail_debug=yes, log when quota warning sc...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 29 18:44:28 EET 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/dcea00b0e290
changeset: 7979:dcea00b0e290
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 29 18:41:26 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 59c997c38079 -r dcea00b0e290 src/plugins/quota/quota.c
--- a/src/plugins/quota/quota.c Wed Oct 29 18:23:21 2008 +0200
+++ b/src/plugins/quota/quota.c Wed Oct 29 18:41:26 2008 +0200
@@ -718,10 +718,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->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)) {
@@ -758,7 +762,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