From 7816e25460a991aae1ec3be1e6bcba09b4756e1f Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Tue, 15 Mar 2005 12:27:54 +0000 Subject: [PATCH] Fix obscure duplicate delivery bug caused by local transport batching combined with certain patterns of homonymic redirection. --- doc/doc-txt/ChangeLog | 11 ++++++++++- src/ACKNOWLEDGMENTS | 5 +++-- src/src/deliver.c | 4 +++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 2ad7d4c07..cdd74fbda 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -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 ------------------------------------------- @@ -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. +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 ---------------------------------------- diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS index 093a0adfc..8314c699a 100644 --- a/src/ACKNOWLEDGMENTS +++ b/src/ACKNOWLEDGMENTS @@ -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 @@ -20,7 +20,7 @@ relatively small patches. Philip Hazel Lists created: 20 November 2002 -Last updated: 08 March 2005 +Last updated: 15 March 2005 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 +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 diff --git a/src/src/deliver.c b/src/src/deliver.c index 14d2217b8..7dc460ce7 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -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 * @@ -2080,6 +2080,7 @@ while (addr_local != NULL) 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 @@ -2093,6 +2094,7 @@ while (addr_local != NULL) { 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) && -- 2.25.1