diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2016-07-08 18:49:10 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2016-07-08 18:49:10 +0100 |
commit | 98c82a3de2d8582aae76e91c4a8d4bcf3e7c55f0 (patch) | |
tree | 8f608107150a7f26e91ef04f5d059bbbcaaf6e3b /src | |
parent | 8b9476ba56f0fd05ac8303ad86a41e0242bc876d (diff) |
Cutthrough: disable on >1 addr from routing, and on verify option success_on_redirect
Diffstat (limited to 'src')
-rw-r--r-- | src/src/route.c | 4 | ||||
-rw-r--r-- | src/src/verify.c | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/src/route.c b/src/src/route.c index f7a532567..57dfc09e6 100644 --- a/src/src/route.c +++ b/src/src/route.c @@ -1657,10 +1657,10 @@ for (r = addr->start_router ? addr->start_router : routers; r; r = nextr) set flag. */ if (r->dsn_lasthop && !(addr->dsn_flags & rf_dsnlasthop)) - { + { addr->dsn_flags |= rf_dsnlasthop; HDEBUG(D_route) debug_printf("DSN: last hop for %s\n", addr->address); - } + } HDEBUG(D_route) debug_printf("calling %s router\n", r->name); diff --git a/src/src/verify.c b/src/src/verify.c index 476276037..a73004028 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -1266,7 +1266,8 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. && rcpt_count == 1 && done && yield == OK - && (options & (vopt_callout_recipsender|vopt_callout_recippmaster)) == vopt_callout_recipsender + && (options & (vopt_callout_recipsender|vopt_callout_recippmaster|vopt_success_on_redirect)) + == vopt_callout_recipsender && !random_local_part && !pm_mailfrom && cutthrough.fd < 0 @@ -2266,6 +2267,12 @@ while (addr_new) of $address_data to be that of the child */ vaddr->prop.address_data = addr->prop.address_data; + + /* If stopped because more than one new address, cannot cutthrough */ + + if (addr_new && addr_new->next) + cancel_cutthrough_connection("multiple addresses from routing"); + yield = OK; goto out; } |