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

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src retry.c exim/exim-test runtest exim/exim-test/stderr 0357 0358 0388 0529 5005
ph10 2006/02/09 14:50:59 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         retry.c 
    exim-test            runtest 
    exim-test/stderr     0357 0358 0388 0529 5005 
  Log:
  If a message is older than the "first failed" time when computing a
  retry, use the message arrival time instead of the "first failed" time.


  Revision  Changes    Path
  1.289     +10 -0     exim/exim-doc/doc-txt/ChangeLog
  1.7       +18 -1     exim/exim-src/src/retry.c
  1.3       +1 -0      exim/exim-test/runtest
  1.3       +3 -0      exim/exim-test/stderr/0357
  1.3       +4 -0      exim/exim-test/stderr/0358
  1.3       +4 -4      exim/exim-test/stderr/0388
  1.2       +1 -0      exim/exim-test/stderr/0529
  1.3       +2 -0      exim/exim-test/stderr/5005


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.288
  retrieving revision 1.289
  diff -u -r1.288 -r1.289
  --- ChangeLog    8 Feb 2006 16:10:46 -0000    1.288
  +++ ChangeLog    9 Feb 2006 14:50:58 -0000    1.289
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.288 2006/02/08 16:10:46 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.289 2006/02/09 14:50:58 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -105,6 +105,16 @@
   PH/18 If quota_warn_message contains a From: header, Exim now refrains from
         adding the default one. Similarly, if it contains a Reply-To: header, the
         errors_reply_to option, if set, is not used.
  +
  +PH/19 When calculating a retry time, Exim used to measure the "time since
  +      failure" by looking at the "first failed" field in the retry record. Now
  +      it does not use this if it is later than than the arrival time of the
  +      message. Instead it uses the arrival time. This makes for better
  +      behaviour in cases where some deliveries succeed, thus re-setting the
  +      "first failed" field. An example is a quota failure for a huge message
  +      when small messages continue to be delivered. Without this change, the
  +      "time since failure" will always be short, possible causing more frequent
  +      delivery attempts for the huge message than are intended.





  Index: retry.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/retry.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- retry.c    8 Feb 2006 14:28:51 -0000    1.6
  +++ retry.c    9 Feb 2006 14:50:58 -0000    1.7
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/retry.c,v 1.6 2006/02/08 14:28:51 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/retry.c,v 1.7 2006/02/09 14:50:58 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -684,6 +684,16 @@
           /* Compute how long this destination has been failing */


           failing_interval = now - retry_record->first_failed;
  +        DEBUG(D_retry) debug_printf("failing_interval=%d message_age=%d\n",
  +          failing_interval, message_age);
  +
  +        /* If the message has been on the queue longer than the recorded time
  +        of failure, use the message's age instead. This can happen when some
  +        messages can be delivered and others cannot; a successful delivery will
  +        reset the first_failed time, and this can lead to a failing message
  +        being retried too often. */
  +
  +        if (message_age > failing_interval) failing_interval = message_age;


           /* Search for the current retry rule. The cutoff time of the
           last rule is handled differently to the others. The rule continues
  @@ -738,7 +748,14 @@


           This implements "timeout this rule if EITHER the host (or routing or
           directing) has been failing for more than the maximum time, OR if the
  -        message has been on the queue for more than the maximum time." */
  +        message has been on the queue for more than the maximum time."
  +
  +        February 2006: It is possible that this code is no longer needed
  +        following the change to the retry calculation to use the message age if
  +        it is larger than the time since first failure. It may be that the
  +        expired flag is always set when the other conditions are met. However,
  +        this is a small bit of code, and it does no harm to leave it in place,
  +        just in case. */


           if (received_time <= retry_record->first_failed &&
               addr == endaddr && !retry_record->expired && rule != NULL)


  Index: runtest
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/runtest,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- runtest    8 Feb 2006 14:28:51 -0000    1.2
  +++ runtest    9 Feb 2006 14:50:58 -0000    1.3
  @@ -1,6 +1,6 @@
   #! /usr/bin/perl -w


-# $Cambridge: exim/exim-test/runtest,v 1.2 2006/02/08 14:28:51 ph10 Exp $
+# $Cambridge: exim/exim-test/runtest,v 1.3 2006/02/09 14:50:58 ph10 Exp $

   ###############################################################################
   # This is the controlling script for the "new" test suite for Exim. It should #
  @@ -417,6 +417,7 @@
     # Time to retry may vary
     s/time to retry = \S+/time to retry = tttt/;
     s/retry record exists: age=\S+/retry record exists: age=ttt/;
  +  s/failing_interval=\S+ message_age=\S+/failing_interval=ttt message_age=ttt/;


     # Date/time in exim -bV output
     s/\d\d-[A-Z][a-z]{2}-\d{4}\s\d\d:\d\d:\d\d/07-Mar-2000 12:21:52/g;


  Index: 0357
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stderr/0357,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- 0357    8 Feb 2006 14:28:52 -0000    1.2
  +++ 0357    9 Feb 2006 14:50:58 -0000    1.3
  @@ -37,6 +37,7 @@
   userx@???
   locking TESTSUITE/spool/db/retry.lockfile
   retry for R:userx@??? = * 0 0
  +failing_interval=ttt message_age=ttt
   Writing retry data for R:userx@???
     first failed=dddd last try=dddd next try=+1 expired=0
     errno=-44 more_errno=dd,A SMTP error from remote mail server after RCPT TO:<userx@???>: host 127.0.0.1 [127.0.0.1]: 451 Temporary error
  @@ -85,6 +86,7 @@
   locking TESTSUITE/spool/db/retry.lockfile
   deleted retry information for R:test.ex
   retry for R:userx@??? = * 0 0
  +failing_interval=ttt message_age=ttt
   Writing retry data for R:userx@???
     first failed=dddd last try=dddd next try=+1 expired=0
     errno=-44 more_errno=dd,A SMTP error from remote mail server after RCPT TO:<userx@???>: host 127.0.0.1 [127.0.0.1]: 451 Temporary error
  @@ -134,6 +136,7 @@
   locking TESTSUITE/spool/db/retry.lockfile
   deleted retry information for R:test.ex
   retry for R:userx@??? = * 0 0
  +failing_interval=ttt message_age=ttt
   Writing retry data for R:userx@???
     first failed=dddd last try=dddd next try=+2 expired=0
     errno=-44 more_errno=dd,A SMTP error from remote mail server after RCPT TO:<userx@???>: host 127.0.0.1 [127.0.0.1]: 451 Temporary error


  Index: 0358
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stderr/0358,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- 0358    8 Feb 2006 14:28:52 -0000    1.2
  +++ 0358    9 Feb 2006 14:50:58 -0000    1.3
  @@ -47,11 +47,13 @@
   usery@???
   locking TESTSUITE/spool/db/retry.lockfile
   retry for R:usery@??? = * 0 0
  +failing_interval=ttt message_age=ttt
   Writing retry data for R:usery@???
     first failed=dddd last try=dddd next try=+1 expired=0
     errno=-44 more_errno=dd,A SMTP error from remote mail server after RCPT TO:<usery@???>: host 127.0.0.1 [127.0.0.1]: 451 Temporary error
   userx@???
   retry for R:userx@??? = * 0 0
  +failing_interval=ttt message_age=ttt
   Writing retry data for R:userx@???
     first failed=dddd last try=dddd next try=+1 expired=0
     errno=-44 more_errno=dd,A SMTP error from remote mail server after RCPT TO:<userx@???>: host 127.0.0.1 [127.0.0.1]: 451 Temporary error
  @@ -117,12 +119,14 @@
   locking TESTSUITE/spool/db/retry.lockfile
   deleted retry information for R:test.ex
   retry for R:usery@??? = * 0 0
  +failing_interval=ttt message_age=ttt
   Writing retry data for R:usery@???
     first failed=dddd last try=dddd next try=+2 expired=0
     errno=-44 more_errno=dd,A SMTP error from remote mail server after RCPT TO:<usery@???>: host 127.0.0.1 [127.0.0.1]: 451 Temporary error
   userx@???
   deleted retry information for R:test.ex
   retry for R:userx@??? = * 0 0
  +failing_interval=ttt message_age=ttt
   Writing retry data for R:userx@???
     first failed=dddd last try=dddd next try=+2 expired=0
     errno=-44 more_errno=dd,A SMTP error from remote mail server after RCPT TO:<userx@???>: host 127.0.0.1 [127.0.0.1]: 451 Temporary error


  Index: 0388
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stderr/0388,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- 0388    8 Feb 2006 14:28:52 -0000    1.2
  +++ 0388    9 Feb 2006 14:50:58 -0000    1.3
  @@ -145,9 +145,9 @@
   x@y in "*"? yes (matched "*")
   retry for R:x@y = * 0 0
   dbfn_read: key=R:x@y
  -on queue longer than maximum retry
  +failing_interval=ttt message_age=ttt
   Writing retry data for R:x@y
  -  first failed=dddd last try=dddd next try=+0 expired=0
  +  first failed=dddd last try=dddd next try=+1 expired=1
     errno=-44 more_errno=dd,A SMTP error from remote mail server after RCPT TO:<x@y>: host 127.0.0.1 [127.0.0.1]: 451 Temporary error
   dbfn_write: key=R:x@y
   address match: subject=*@V4NET.0.0.0 pattern=*
  @@ -155,9 +155,9 @@
   *@V4NET.0.0.0 in "*"? yes (matched "*")
   retry for T:V4NET.0.0.0:V4NET.0.0.0:1224 (y) = * 0 0
   dbfn_read: key=T:V4NET.0.0.0:V4NET.0.0.0:1224
  -on queue longer than maximum retry
  +failing_interval=ttt message_age=ttt
   Writing retry data for T:V4NET.0.0.0:V4NET.0.0.0:1224
  -  first failed=dddd last try=dddd next try=+0 expired=0
  +  first failed=dddd last try=dddd next try=+1 expired=1
     errno=dd more_errno=dd,A Network Error
   dbfn_write: key=T:V4NET.0.0.0:V4NET.0.0.0:1224
   timed out: all retries expired


  Index: 0529
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stderr/0529,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 0529    8 Feb 2006 14:28:52 -0000    1.1
  +++ 0529    9 Feb 2006 14:50:58 -0000    1.2
  @@ -38,6 +38,7 @@
   TESTSUITE/test-mail/rmbox
   locking TESTSUITE/spool/db/retry.lockfile
   retry for T:TESTSUITE/test-mail/rmbox:x@??? = *@test.ex -22 0
  +failing_interval=ttt message_age=ttt
   Writing retry data for T:TESTSUITE/test-mail/rmbox:x@???
     first failed=dddd last try=dddd next try=+900 expired=0
     errno=-22 more_errno=dd mailbox is full (MTA-imposed quota exceeded while writing to TESTSUITE/test-mail/rmbox)


  Index: 5005
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stderr/5005,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- 5005    8 Feb 2006 14:28:52 -0000    1.2
  +++ 5005    9 Feb 2006 14:50:58 -0000    1.3
  @@ -486,6 +486,7 @@
   userx@??? in "*"? yes (matched "*")
   retry for T:userx@??? = * 0 0
   dbfn_read: key=T:userx@???
  +failing_interval=ttt message_age=ttt
   Writing retry data for T:userx@???
     first failed=dddd last try=dddd next try=+86400 expired=0
     errno=-22 more_errno=dd mailbox is full (MTA-imposed quota exceeded while writing to tmp/MAILDIR.myhost.test.ex)
  @@ -652,6 +653,7 @@
   userx@??? in "*"? yes (matched "*")
   retry for T:userx@??? = * 0 0
   dbfn_read: key=T:userx@???
  +failing_interval=ttt message_age=ttt
   Writing retry data for T:userx@???
     first failed=dddd last try=dddd next try=+86400 expired=0
     errno=-22 more_errno=dd mailbox is full (MTA-imposed quota exceeded while writing to tmp/MAILDIR.myhost.test.ex)