summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-12-20 15:49:39 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2020-12-20 15:51:00 +0000
commit94ecf089d68ac5b85c2a99177a8e4b4d35d5aa2e (patch)
tree11c435b84c49a91dc0848b984990fe4ba20ee8d5 /src
parent46694b802ce0302f3c3344be933cc9737d4d4f4c (diff)
Fix local delivery delay when combined with remote callout/hold. Bug 2599
Diffstat (limited to 'src')
-rw-r--r--src/src/deliver.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c
index 4e6f08f89..ec5990cc1 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -7067,13 +7067,23 @@ if ( mua_wrapper
/* If this is a run to continue deliveries to an external channel that is
-already set up, defer any local deliveries. */
+already set up, defer any local deliveries.
-if (continue_transport)
+jgh 2020/12/20: I don't see why; locals should be quick.
+The defer goes back to version 1.62 in 1997. A local being still deliverable
+during a continued run might result from something like a defer during the
+original delivery, eg. in a DB lookup. Unlikely but possible.
+
+To avoid delaying a local when combined with a callout-hold for a remote
+delivery, test continue_sequence rather than continue_transport. */
+
+if (continue_sequence > 1 && addr_local)
{
+ DEBUG(D_deliver|D_retry|D_route)
+ debug_printf("deferring local deliveries due to continued-transport\n");
if (addr_defer)
{
- address_item *addr = addr_defer;
+ address_item * addr = addr_defer;
while (addr->next) addr = addr->next;
addr->next = addr_local;
}