[exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Tony Finch
Date:  
À: exim-cvs
Sujet: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src acl.c globals.c globals.h
fanf2 2005/06/10 20:27:05 BST

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         acl.c globals.c globals.h 
  Log:
  Another ratelimit tweak. I didn't anticipate people using per_cmd
  ratelimits more than once in the same ACL (e.g. to increase the
  delay for higher rates) so the code didn't do the right thing in
  that situation. There's now a per_cmd cache which is reset at the
  start of each ACL run.


  Revision  Changes    Path
  1.152     +2 -1      exim/exim-doc/doc-txt/ChangeLog
  1.39      +5 -3      exim/exim-src/src/acl.c
  1.28      +1 -0      exim/exim-src/src/globals.c
  1.20      +1 -0      exim/exim-src/src/globals.h


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.151
  retrieving revision 1.152
  diff -u -u -r1.151 -r1.152
  --- ChangeLog    10 Jun 2005 13:39:52 -0000    1.151
  +++ ChangeLog    10 Jun 2005 19:27:05 -0000    1.152
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.151 2005/06/10 13:39:52 tom Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.152 2005/06/10 19:27:05 fanf2 Exp $


Change log file for Exim from version 4.21
-------------------------------------------
@@ -35,7 +35,8 @@

TF/03 Added the control = fakedefer ACL modifier.

  -TF/04 Added the ratelimit ACL condition. See NewStuff for details.
  +TF/04 Added the ratelimit ACL condition. See NewStuff for details. Thanks to
  +      Mark Lowes for thorough testing.


TK/02 Rewrote SPF support to work with libspf2 versions >1.2.0.


  Index: acl.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/acl.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -u -r1.38 -r1.39
  --- acl.c    10 Jun 2005 18:59:34 -0000    1.38
  +++ acl.c    10 Jun 2005 19:27:05 -0000    1.39
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/acl.c,v 1.38 2005/06/10 18:59:34 fanf2 Exp $ */
  +/* $Cambridge: exim/exim-src/src/acl.c,v 1.39 2005/06/10 19:27:05 fanf2 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -2012,8 +2012,7 @@
   HDEBUG(D_acl) debug_printf("ratelimit condition limit=%.0f period=%.0f key=%s\n",
     limit, period, key);


-/* If we are dealing with rate limits per connection, per message, or per byte,
-see if we have already computed the rate by looking in the relevant tree. For
+/* See if we have already computed the rate by looking in the relevant tree. For
per-connection rate limiting, store tree nodes and dbdata in the permanent pool
so that they survive across resets. */

  @@ -2025,8 +2024,10 @@
     anchor = &ratelimiters_conn;
     store_pool = POOL_PERM;
     }
  -if (per_mail || per_byte)
  +else if (per_mail || per_byte)
     anchor = &ratelimiters_mail;
  +else if (per_cmd)
  +  anchor = &ratelimiters_cmd;


   if (anchor != NULL && (t = tree_search(*anchor, key)) != NULL)
     {
  @@ -3326,6 +3327,7 @@


*user_msgptr = *log_msgptr = NULL;
sender_verified_failed = NULL;
+ratelimiters_cmd = NULL;

   if (where == ACL_WHERE_RCPT)
     {


  Index: globals.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/globals.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -u -r1.27 -r1.28
  --- globals.c    24 May 2005 08:15:02 -0000    1.27
  +++ globals.c    10 Jun 2005 19:27:05 -0000    1.28
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/globals.c,v 1.27 2005/05/24 08:15:02 tom Exp $ */
  +/* $Cambridge: exim/exim-src/src/globals.c,v 1.28 2005/06/10 19:27:05 fanf2 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -780,6 +780,7 @@
   uschar *queue_smtp_domains     = NULL;


   unsigned int random_seed       = 0;
  +tree_node *ratelimiters_cmd    = NULL;
   tree_node *ratelimiters_conn   = NULL;
   tree_node *ratelimiters_mail   = NULL;
   uschar *raw_active_hostname    = NULL;


  Index: globals.h
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/globals.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -u -r1.19 -r1.20
  --- globals.h    24 May 2005 08:15:02 -0000    1.19
  +++ globals.h    10 Jun 2005 19:27:05 -0000    1.20
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/globals.h,v 1.19 2005/05/24 08:15:02 tom Exp $ */
  +/* $Cambridge: exim/exim-src/src/globals.h,v 1.20 2005/06/10 19:27:05 fanf2 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -505,6 +505,7 @@
   extern uschar *queue_smtp_domains;     /* Ditto, for these domains */


   extern unsigned int random_seed;       /* Seed for random numbers */
  +extern tree_node *ratelimiters_cmd;    /* Results of command ratelimit checks */
   extern tree_node *ratelimiters_conn;   /* Results of connection ratelimit checks */
   extern tree_node *ratelimiters_mail;   /* Results of per-mail ratelimit checks */
   extern uschar *raw_active_hostname;    /* Pre-expansion */