[exim] Re: Bug in Exim - duplicating messages

Pàgina inicial
Delete this message
Reply to this message
Autor: Russell Stuart
Data:  
A: exim-users
Assumpte: [exim] Re: Bug in Exim - duplicating messages
On Sat, 2005-02-26 at 12:47, Russell Stuart wrote:
> The conditions trigger the bug are:
>
> 1.  A new address is added with a redirect router with the unseen
>     directive.

>
> 2. There is a retry record pending for new address.
>
> 3.  The new address is moved to the front of deliver.c's delivery
>     queue by another re-direct router.

>
> 4.  A "control = queue_only" is in effect (perhaps - not sure about
>     this one).

>
> 5. The original address can be successfully delivered to.
>
> If all these conditions are met, then each time a queue running
> comes along, it will create a duplicate email to original
> address. This will happen until the retry record expires.



Here is a patch that fixes the problem:


diff -Nur exim4-4.44.keep/src/deliver.c exim4-4.44/src/deliver.c
--- exim4-4.44.keep/src/deliver.c       2005-01-12 07:27:26.000000000 +1000
+++ exim4-4.44/src/deliver.c    2005-02-26 15:41:16.000000000 +1000
@@ -2065,6 +2072,7 @@
       same headers to be removed
       same uid/gid for running the transport
       same first host if a host list is set
+      .... and not bloody well delivered!
     */


     while ((next = *anchor) != NULL && batch_count < tp->batch_max)
@@ -2079,7 +2087,8 @@
         same_ugid(tp, addr, next) &&
         ((addr->host_list == NULL && next->host_list == NULL) ||
          (addr->host_list != NULL && next->host_list != NULL &&
-          Ustrcmp(addr->host_list->name, next->host_list->name) == 0));
+          Ustrcmp(addr->host_list->name, next->host_list->name) == 0)) &&
+        !previously_transported(next);


       /* If the transport has a batch_id setting, batch_id will be non-NULL
       from the expansion outside the loop. Expand for this address and compare.