fanf2 2006/06/07 16:06:26 BST
Modified files:
exim-doc/doc-txt ChangeLog
exim-src/src acl.c
exim-src ACKNOWLEDGMENTS
Log:
Fix from Dean Brooks for ratelimit per_rcpt in acl_not_smtp.
Revision Changes Path
1.355 +3 -0 exim/exim-doc/doc-txt/ChangeLog
1.46 +1 -0 exim/exim-src/ACKNOWLEDGMENTS
1.59 +6 -2 exim/exim-src/src/acl.c
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.354
retrieving revision 1.355
diff -u -u -r1.354 -r1.355
--- ChangeLog 31 May 2006 19:34:57 -0000 1.354
+++ ChangeLog 7 Jun 2006 15:06:25 -0000 1.355
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.354 2006/05/31 19:34:57 fanf2 Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.355 2006/06/07 15:06:25 fanf2 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -25,6 +25,9 @@
TF/03 Note in the spec that $authenticated_id is not set for local
submissions from trusted users.
+
+TF/04 The ratelimit per_rcpt option now works correctly in acl_not_smtp.
+ Thanks to Dean Brooks <dean@???> for the patch.
Exim version 4.62
Index: acl.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/acl.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -u -r1.58 -r1.59
--- acl.c 4 Apr 2006 17:05:45 -0000 1.58
+++ acl.c 7 Jun 2006 15:06:26 -0000 1.59
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/acl.c,v 1.58 2006/04/04 17:05:45 fanf2 Exp $ */
+/* $Cambridge: exim/exim-src/src/acl.c,v 1.59 2006/06/07 15:06:26 fanf2 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -2035,6 +2035,7 @@
Arguments:
arg the option string for ratelimit=
+ where ACL_WHERE_xxxx indicating which ACL this is
log_msgptr for error messages
Returns: OK - Sender's rate is above limit
@@ -2044,7 +2045,7 @@
*/
static int
-acl_ratelimit(uschar *arg, uschar **log_msgptr)
+acl_ratelimit(uschar *arg, int where, uschar **log_msgptr)
{
double limit, period;
uschar *ss, *key;
@@ -2263,6 +2264,9 @@
if (per_byte)
dbd->rate = (message_size < 0 ? 0.0 : (double)message_size)
* (1 - a) / i_over_p + a * dbd->rate;
+ else if (per_cmd && where == ACL_WHERE_NOTSMTP)
+ dbd->rate = (double)recipients_count
+ * (1 - a) / i_over_p + a * dbd->rate;
else
dbd->rate = (1 - a) / i_over_p + a * dbd->rate;
}
@@ -2873,7 +2877,7 @@
#endif
case ACLC_RATELIMIT:
- rc = acl_ratelimit(arg, log_msgptr);
+ rc = acl_ratelimit(arg, where, log_msgptr);
break;
case ACLC_RECIPIENTS:
Index: ACKNOWLEDGMENTS
===================================================================
RCS file: /home/cvs/exim/exim-src/ACKNOWLEDGMENTS,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -u -r1.45 -r1.46
--- ACKNOWLEDGMENTS 4 Apr 2006 09:09:45 -0000 1.45
+++ ACKNOWLEDGMENTS 7 Jun 2006 15:06:26 -0000 1.46
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-src/ACKNOWLEDGMENTS,v 1.45 2006/04/04 09:09:45 ph10 Exp $
+$Cambridge: exim/exim-src/ACKNOWLEDGMENTS,v 1.46 2006/06/07 15:06:26 fanf2 Exp $
EXIM ACKNOWLEDGEMENTS
@@ -77,6 +77,7 @@
Mike Bethune Help with debugging an elusive ALRM signal bug
Ard Biesheuvel Lookup code for accessing an Interbase database
Richard Birkett Fix for empty -f address crash
+Dean Brooks Fix for ratelimit per_rcpt in acl_not_smtp.
Nick Burrett Patch for CONFIGURE_FILE_USE_EUID in exicyclog
Matthew Byng-Maddick Patch for qualify_domain in redirect router
Patch for ignore_target_hosts in ipliteral router