From 7a9e0ae14e5544e8377d1f91298d0ec9a482bf12 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Tue, 4 Jun 2019 14:18:59 +0100 Subject: [PATCH] Events: avoid evaluating intermediates for unneeded events --- src/src/deliver.c | 2 +- src/src/queue.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src/deliver.c b/src/src/deliver.c index b26e5dbd4..dc2e577dd 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -6244,7 +6244,7 @@ if (process_recipients != RECIP_IGNORE) } #ifndef DISABLE_EVENT - if (process_recipients != RECIP_ACCEPT) + if (process_recipients != RECIP_ACCEPT && event_action) { uschar * save_local = deliver_localpart; const uschar * save_domain = deliver_domain; diff --git a/src/src/queue.c b/src/src/queue.c index 89ac87f94..f54124c5e 100644 --- a/src/src/queue.c +++ b/src/src/queue.c @@ -1252,7 +1252,7 @@ switch(action) if (removed) { #ifndef DISABLE_EVENT - for (int i = 0; i < recipients_count; i++) + if (event_action) for (int i = 0; i < recipients_count; i++) { tree_node *delivered = tree_search(tree_nonrecipients, recipients_list[i].address); -- 2.25.1