Hello Timo, have you had the time to take a look at this code for the
quota-warning to run.
In the quota-rewrite patch and in the 1.1beta13 code the warning command
is executed with this condition
if ((bytes_current < warnings[i].bytes_limit &&
bytes_current >= warnings[i].bytes_limit) ||
(count_current < warnings[i].count_limit &&
count_current >= warnings[i].count_limit)) {
quota_warning_execute(warnings[i].command);
And I think that the "if" condition is never TRUE bytes_current can't be
"<" and ">=" than warnings[i].bytes_limit at the same time, right?
In the patch previous patch that I've sent to the list the "if" looks like:
if ((bytes_current -
ctx->bytes_used < warnings[i].bytes_limit &&
bytes_current >= warnings[i].bytes_limit) ||
(count_current -
ctx->count_used < warnings[i].count_limit &&
count_current >= warnings[i].count_limit)) {
Regards and happy new year
Juan C. Blanco
Timo Sirainen wrote:
On Tue, 2007-12-11 at 16:42 +0100, Juan C. Blanco wrote:
The other problem is when checking the limits to execute the scripts,
the "quota_warnings_execute" function is checking if the warning limit
is reached with this comparison:
if ((bytes_current < warnings[i].bytes_limit &&
bytes_current +
ctx->bytes_used >= warnings[i].bytes_limit) || ...
Fixed: http://hg.dovecot.org/dovecot/rev/71b9541adad1
I'll update quota-rewrite patch soon also.
--
+----------------------------------------------------------------+
| Juan C. Blanco |
| |
| Centro de Calculo | |
| Facultad de Informatica U.P.M. | E-mail: [EMAIL PROTECTED] |
| Campus de Montegancedo | |
| Boadilla del Monte | Tel.: (+34) 91 336 7466 |
| 28660 MADRID (Spain) | Fax : (+34) 91 336 6913 |
+----------------------------------------------------------------+