Fix obscure duplicate delivery bug caused by local transport batching
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Tue, 15 Mar 2005 12:27:54 +0000 (12:27 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Tue, 15 Mar 2005 12:27:54 +0000 (12:27 +0000)
combined with certain patterns of homonymic redirection.

doc/doc-txt/ChangeLog
src/ACKNOWLEDGMENTS
src/src/deliver.c

index 2ad7d4c07589c31c048d3b1e0312eb3333636b3f..cdd74fbda9bfa9c85e86d17ab15ff9d1d287e18f 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.89 2005/03/15 11:37:21 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.90 2005/03/15 12:27:54 ph10 Exp $
 
 Change log file for Exim from version 4.21
 -------------------------------------------
 
 Change log file for Exim from version 4.21
 -------------------------------------------
@@ -31,6 +31,15 @@ PH/03. A redirect router that has both "unseen" and "one_time" set does not
        again. For this reason, Exim now forbids the simultaneous setting of
        these two options.
 
        again. For this reason, Exim now forbids the simultaneous setting of
        these two options.
 
+PH/04. Change 4.11/85 fixed an obscure bug concerned with addresses that are
+       redirected to themselves ("homonym" addresses). Read the long ChangeLog
+       entry if you want to know the details. The fix, however, neglected to
+       consider the case when local delivery batching is involved. The test for
+       "previously delivered" was not happening when checking to see if an
+       address could be batched with a previous (undelivered) one; under
+       certain circumstances this could lead to multiple deliveries to the same
+       address. A one-line patch to add the appropriate test fixes the bug.
+
 
 A note about Exim versions 4.44 and 4.50
 ----------------------------------------
 
 A note about Exim versions 4.44 and 4.50
 ----------------------------------------
index 093a0adfceee96ae18e534ef0f23bf1cd04e751e..8314c699af17a40db1d48957f87ef0e6d18de016 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.14 2005/03/08 11:38:21 ph10 Exp $
+$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.15 2005/03/15 12:27:54 ph10 Exp $
 
 EXIM ACKNOWLEDGEMENTS
 
 
 EXIM ACKNOWLEDGEMENTS
 
@@ -20,7 +20,7 @@ relatively small patches.
 Philip Hazel
 
 Lists created: 20 November 2002
 Philip Hazel
 
 Lists created: 20 November 2002
-Last updated:  08 March 2005
+Last updated:  15 March 2005
 
 
 THE OLD LIST
 
 
 THE OLD LIST
@@ -197,6 +197,7 @@ Heiko Schlichting         Diagnosis of intermittent daemon crash bug
 Stephan Schulz            Patch for $host_data caching error
 Tony Sheen                Log files with datestamped names and auto rollover
 Martin Sluka              Patch for exigrep to include non-message lines
 Stephan Schulz            Patch for $host_data caching error
 Tony Sheen                Log files with datestamped names and auto rollover
 Martin Sluka              Patch for exigrep to include non-message lines
+Russell Stuart            Diagnosis of obscure batch multiple delivery bug
 Tamas Tevesz              Patch for crypt16() support
 Johan Thelmen             Support for the F-Secure virus scanner
 William Thompson          Suggested patch for acl_smtp_helo
 Tamas Tevesz              Patch for crypt16() support
 Johan Thelmen             Support for the F-Secure virus scanner
 William Thompson          Suggested patch for acl_smtp_helo
index 14d2217b8b2490c56a4285acfb038b1574546973..7dc460ce7f433677801420193fa81b24c7066bb5 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/deliver.c,v 1.7 2005/02/17 11:58:25 ph10 Exp $ */
+/* $Cambridge: exim/src/src/deliver.c,v 1.8 2005/03/15 12:27:54 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -2080,6 +2080,7 @@ while (addr_local != NULL)
     same characteristics. These are:
 
       same transport
     same characteristics. These are:
 
       same transport
+      not previously delivered (see comment about 50 lines above)
       same local part if the transport's configuration contains $local_part
       same domain if the transport's configuration contains $domain
       same errors address
       same local part if the transport's configuration contains $local_part
       same domain if the transport's configuration contains $domain
       same errors address
@@ -2093,6 +2094,7 @@ while (addr_local != NULL)
       {
       BOOL ok =
         tp == next->transport &&
       {
       BOOL ok =
         tp == next->transport &&
+        !previously_transported(next) &&
         (!uses_lp  || Ustrcmp(next->local_part, addr->local_part) == 0) &&
         (!uses_dom || Ustrcmp(next->domain, addr->domain) == 0) &&
         same_strings(next->p.errors_address, addr->p.errors_address) &&
         (!uses_lp  || Ustrcmp(next->local_part, addr->local_part) == 0) &&
         (!uses_dom || Ustrcmp(next->domain, addr->domain) == 0) &&
         same_strings(next->p.errors_address, addr->p.errors_address) &&