Avoid clearing first_delivery flag on the initial half of a 2-phase queue run
[exim.git] / src / src / deliver.c
index 29e2b719df1b076acc3ae9120fb309bf9b737457..ec39cf15e4c997b10ccc7054eefd50735b129917 100644 (file)
@@ -8416,7 +8416,7 @@ else if (addr_defer != (address_item *)(+1))
   /* If this was a first delivery attempt, unset the first time flag, and
   ensure that the spool gets updated. */
 
-  if (f.deliver_firsttime)
+  if (f.deliver_firsttime && !f.queue_2stage)
     {
     f.deliver_firsttime = FALSE;
     update_spool = TRUE;