X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/8b9476ba56f0fd05ac8303ad86a41e0242bc876d..2d14f39731e88a6d6bb9f1b5c56f497eb12198c4:/src/src/verify.c diff --git a/src/src/verify.c b/src/src/verify.c index 476276037..d890f5fc6 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -759,7 +759,7 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. ? string_sprintf(" SIZE=%d", message_size + ob->size_addition) : US""; #ifdef SUPPORT_TLS - tls_offered = !!(peer_offered & PEER_OFFERED_TLS); + smtp_peer_options |= peer_offered & PEER_OFFERED_TLS; #endif /* If TLS is available on this connection attempt to @@ -889,13 +889,16 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. /* Need proper integration with the proper transport mechanism. */ if (cutthrough.delivery) { +#ifndef DISABLE_DKIM + uschar * s; +#endif if (addr->transport->filter_command) { cutthrough.delivery = FALSE; HDEBUG(D_acl|D_v) debug_printf("Cutthrough cancelled by presence of transport filter\n"); } #ifndef DISABLE_DKIM - if (ob->dkim_domain) + else if ((s = ob->dkim.dkim_domain) && (s = expand_string(s)) && *s) { cutthrough.delivery = FALSE; HDEBUG(D_acl|D_v) debug_printf("Cutthrough cancelled by presence of DKIM signing\n"); @@ -1266,7 +1269,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 @@ -1555,9 +1559,9 @@ return cutthrough_response('3', NULL) == '3'; } -/* fd and use_crlf args only to match write_chunk() */ +/* fd and tctx args only to match write_chunk() */ static BOOL -cutthrough_write_chunk(int fd, uschar * s, int len, BOOL use_crlf) +cutthrough_write_chunk(int fd, transport_ctx * tctx, uschar * s, int len) { uschar * s2; while(s && (s2 = Ustrchr(s, '\n'))) @@ -1576,6 +1580,8 @@ return TRUE; BOOL cutthrough_headers_send(void) { +transport_ctx tctx; + if(cutthrough.fd < 0) return FALSE; @@ -1584,12 +1590,13 @@ if(cutthrough.fd < 0) */ HDEBUG(D_acl) debug_printf("----------- start cutthrough headers send -----------\n"); -if (!transport_headers_send(&cutthrough.addr, cutthrough.fd, - cutthrough.addr.transport->add_headers, - cutthrough.addr.transport->remove_headers, - &cutthrough_write_chunk, TRUE, - cutthrough.addr.transport->rewrite_rules, - cutthrough.addr.transport->rewrite_existflags)) +tctx.tblock = cutthrough.addr.transport; +tctx.addr = &cutthrough.addr; +tctx.check_string = US"."; +tctx.escape_string = US".."; +tctx.options = topt_use_crlf; + +if (!transport_headers_send(cutthrough.fd, &tctx, &cutthrough_write_chunk)) return FALSE; HDEBUG(D_acl) debug_printf("----------- done cutthrough headers send ------------\n"); @@ -2266,6 +2273,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; }