From d093f8e514d0e914bae3dc34b4e4f0a51720c690 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Mon, 19 Dec 2016 13:10:29 +0000 Subject: Split out smtp_setup_conn() from smtp_deliver, in the transport --- test/log/0211 | 6 +++--- test/mail/0211.CALLER | 12 ++++++------ test/scripts/0000-Basic/0211 | 6 +++--- test/stdout/0211 | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'test') diff --git a/test/log/0211 b/test/log/0211 index cbf33c612..74acec3a3 100644 --- a/test/log/0211 +++ b/test/log/0211 @@ -14,7 +14,7 @@ 1999-03-02 09:44:33 End queue run: pid=pppp -qf 1999-03-02 09:44:33 Test: reject connect 1999-03-02 09:44:33 Start queue run: pid=pppp -qf -1999-03-02 09:44:33 10HmaX-0005vi-00 ** userx@domain1 F= R=others T=smtp H=localhost4.test.ex [127.0.0.1]: SMTP error from remote mail server after initial connection: 550 Go away +1999-03-02 09:44:33 10HmaX-0005vi-00 ** userx@domain1 F= R=others T=smtp H=localhost4.test.ex [127.0.0.1]: SMTP error from remote mail server after initial connection: 550 Go away (A) 1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> R=10HmaX-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmaY-0005vi-00 => CALLER F=<> R=all T=local_delivery 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed @@ -22,8 +22,8 @@ 1999-03-02 09:44:33 End queue run: pid=pppp -qf 1999-03-02 09:44:33 Test: reject helo 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmaZ-0005vi-00 ** userx@domain1 F= R=others T=smtp H=localhost4.test.ex [127.0.0.1]: SMTP error from remote mail server after HELO the.local.host.name: 550 Go away -1999-03-02 09:44:33 10HmaZ-0005vi-00 ** usery@domain2 F= R=others T=smtp H=localhost4.test.ex [127.0.0.1]: SMTP error from remote mail server after HELO the.local.host.name: 550 Go away +1999-03-02 09:44:33 10HmaZ-0005vi-00 ** userx@domain1 F= R=others T=smtp H=localhost4.test.ex [127.0.0.1]: SMTP error from remote mail server after HELO the.local.host.name: 550 Go away (C) +1999-03-02 09:44:33 10HmaZ-0005vi-00 ** usery@domain2 F= R=others T=smtp H=localhost4.test.ex [127.0.0.1]: SMTP error from remote mail server after HELO the.local.host.name: 550 Go away (C) 1999-03-02 09:44:33 10HmbA-0005vi-00 <= <> R=10HmaZ-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmbA-0005vi-00 => CALLER F=<> R=all T=local_delivery 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed diff --git a/test/mail/0211.CALLER b/test/mail/0211.CALLER index bf77afff3..12511cd73 100644 --- a/test/mail/0211.CALLER +++ b/test/mail/0211.CALLER @@ -24,7 +24,7 @@ recipients. This is a permanent error. The following address(es) failed: userx@domain1 host localhost4.test.ex [127.0.0.1] SMTP error from remote mail server after initial connection: - 550 Go away + 550 Go away (A) --NNNNNNNNNN-eximdsn-MMMMMMMMMM Content-type: message/delivery-status @@ -35,7 +35,7 @@ Action: failed Final-Recipient: rfc822;userx@domain1 Status: 5.0.0 Remote-MTA: dns; localhost4.test.ex -Diagnostic-Code: smtp; 550 Go away +Diagnostic-Code: smtp; 550 Go away (A) --NNNNNNNNNN-eximdsn-MMMMMMMMMM Content-type: message/rfc822 @@ -80,11 +80,11 @@ recipients. This is a permanent error. The following address(es) failed: usery@domain2 host localhost4.test.ex [127.0.0.1] SMTP error from remote mail server after HELO the.local.host.name: - 550 Go away + 550 Go away (C) userx@domain1 host localhost4.test.ex [127.0.0.1] SMTP error from remote mail server after HELO the.local.host.name: - 550 Go away + 550 Go away (C) --NNNNNNNNNN-eximdsn-MMMMMMMMMM Content-type: message/delivery-status @@ -95,13 +95,13 @@ Action: failed Final-Recipient: rfc822;userx@domain1 Status: 5.0.0 Remote-MTA: dns; localhost4.test.ex -Diagnostic-Code: smtp; 550 Go away +Diagnostic-Code: smtp; 550 Go away (C) Action: failed Final-Recipient: rfc822;usery@domain2 Status: 5.0.0 Remote-MTA: dns; localhost4.test.ex -Diagnostic-Code: smtp; 550 Go away +Diagnostic-Code: smtp; 550 Go away (C) --NNNNNNNNNN-eximdsn-MMMMMMMMMM Content-type: message/rfc822 diff --git a/test/scripts/0000-Basic/0211 b/test/scripts/0000-Basic/0211 index dbe41c723..655b4dd96 100644 --- a/test/scripts/0000-Basic/0211 +++ b/test/scripts/0000-Basic/0211 @@ -38,7 +38,7 @@ exim -qf exim -z "Test: reject connect" **** server PORT_S -550 Go away +550 Go away (A) QUIT 250 OK **** @@ -50,9 +50,9 @@ exim -z "Test: reject helo" server PORT_S 220 Connected OK EHLO -550 Go away +550 Go away (B) HELO -550 Go away +550 Go away (C) QUIT 250 OK **** diff --git a/test/stdout/0211 b/test/stdout/0211 index 93e271c6a..2d484bda5 100644 --- a/test/stdout/0211 +++ b/test/stdout/0211 @@ -22,7 +22,7 @@ Connection request from [127.0.0.1] End of script Listening on port 1224 ... Connection request from [127.0.0.1] -550 Go away +550 Go away (A) QUIT 250 OK End of script @@ -30,9 +30,9 @@ Listening on port 1224 ... Connection request from [127.0.0.1] 220 Connected OK EHLO the.local.host.name -550 Go away +550 Go away (B) HELO the.local.host.name -550 Go away +550 Go away (C) QUIT 250 OK End of script -- cgit v1.2.3 From 02b41d7106c67bbe862d6a44373034684a03c00e Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 24 Dec 2016 21:04:20 +0000 Subject: Use smtp_setup_conn() for verify callout --- src/src/smtp_in.c | 4 +- src/src/transports/smtp.c | 142 +++++------ src/src/transports/smtp.h | 59 +++++ src/src/verify.c | 587 +++++++++++----------------------------------- test/log/0227 | 6 +- test/log/0365 | 8 +- test/log/0376 | 2 +- test/log/0413 | 6 +- test/log/0473 | 4 +- test/log/4204 | 4 +- test/log/4206 | 4 +- test/log/4214 | 4 +- test/log/4216 | 4 +- test/log/4224 | 4 +- test/log/4226 | 4 +- test/log/5405 | 2 +- test/rejectlog/0227 | 6 +- test/rejectlog/0365 | 8 +- test/rejectlog/0376 | 2 +- test/rejectlog/0413 | 6 +- test/rejectlog/0473 | 4 +- test/rejectlog/4204 | 4 +- test/rejectlog/4206 | 4 +- test/rejectlog/4214 | 4 +- test/rejectlog/4216 | 4 +- test/rejectlog/4224 | 4 +- test/rejectlog/4226 | 4 +- test/rejectlog/5405 | 2 +- test/runtest | 5 +- test/stderr/0227 | 7 +- test/stderr/0376 | 2 +- test/stderr/0398 | 2 + test/stderr/0432 | 6 +- test/stderr/0473 | 4 +- test/stderr/5410 | 15 +- test/stderr/5420 | 15 +- test/stderr/5840 | 9 +- test/stdout/0365 | 2 +- test/stdout/4204 | 4 +- test/stdout/4206 | 18 +- test/stdout/4214 | 4 +- test/stdout/4216 | 18 +- test/stdout/4224 | 4 +- test/stdout/4226 | 18 +- 44 files changed, 365 insertions(+), 664 deletions(-) (limited to 'test') diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 04cbbe465..79a1ee02b 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -2917,7 +2917,7 @@ we have not sent a response about it yet, do so now, as a preliminary line for failures, but not defers. However, always log it for defer, and log it for fail unless the sender_verify_fail log selector has been turned off. */ -if (sender_verified_failed != NULL && +if (sender_verified_failed && !testflag(sender_verified_failed, af_sverify_told)) { BOOL save_rcpt_in_progress = rcpt_in_progress; @@ -2933,7 +2933,7 @@ if (sender_verified_failed != NULL && (sender_verified_failed->message == NULL)? US"" : string_sprintf(": %s", sender_verified_failed->message)); - if (rc == FAIL && sender_verified_failed->user_message != NULL) + if (rc == FAIL && sender_verified_failed->user_message) smtp_respond(smtp_code, codelen, FALSE, string_sprintf( testflag(sender_verified_failed, af_verify_pmfail)? "Postmaster verification failed while checking <%s>\n%s\n" diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index f3247245d..1ce0cbe11 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -8,12 +8,6 @@ #include "../exim.h" #include "smtp.h" -#define PENDING 256 -#define PENDING_DEFER (PENDING + DEFER) -#define PENDING_OK (PENDING + OK) - -#define DELIVER_BUFFER_SIZE 4096 - /* Options specific to the smtp transport. This transport also supports LMTP over TCP/IP. The options must be in alphabetic order (note that "_" comes @@ -327,7 +321,7 @@ gid = gid; /* Pass back options if required. This interface is getting very messy. */ -if (tf != NULL) +if (tf) { tf->interface = ob->interface; tf->port = ob->port; @@ -346,11 +340,8 @@ host lists, provided that the local host wasn't present in the original host list. */ if (!testflag(addrlist, af_local_host_removed)) - { - for (; addrlist != NULL; addrlist = addrlist->next) - if (addrlist->fallback_hosts == NULL) - addrlist->fallback_hosts = ob->fallback_hostlist; - } + for (; addrlist; addrlist = addrlist->next) + if (!addrlist->fallback_hosts) addrlist->fallback_hosts = ob->fallback_hostlist; return OK; } @@ -458,7 +449,7 @@ for (addr = addrlist; addr; addr = addr->next) { addr->basic_errno = errno_value; addr->more_errno |= orvalue; - if (msg != NULL) + if (msg) { addr->message = msg; if (pass_message) setflag(addr, af_pass_message); @@ -610,7 +601,7 @@ if (*errno_value == 0 || *errno_value == ECONNRESET) { *errno_value = ERRNO_SMTPCLOSED; *message = US string_sprintf("Remote host closed connection " - "in response to %s%s", pl, smtp_command); + "in response to %s%s", pl, smtp_command); } else *message = US string_sprintf("%s [%s]", host->name, host->address); @@ -1471,61 +1462,9 @@ return OK; * Make connection for given message * *************************************************/ -typedef struct { - address_item * addrlist; - host_item * host; - int host_af; - int port; - uschar * interface; - - BOOL lmtp:1; - BOOL smtps:1; - BOOL ok:1; - BOOL send_rset:1; - BOOL send_quit:1; - BOOL setting_up:1; - BOOL esmtp:1; - BOOL esmtp_sent:1; - BOOL pending_MAIL:1; -#ifndef DISABLE_PRDR - BOOL prdr_active:1; -#endif -#ifdef SUPPORT_I18N - BOOL utf8_needed:1; -#endif - BOOL dsn_all_lasthop:1; -#if defined(SUPPORT_TLS) && defined(EXPERIMENTAL_DANE) - BOOL dane:1; - BOOL dane_required:1; -#endif - - int max_rcpt; - - uschar peer_offered; - uschar * igquotstr; - uschar * helo_data; -#ifdef EXPERIMENTAL_DSN_INFO - uschar * smtp_greeting; - uschar * helo_response; -#endif - - smtp_inblock inblock; - smtp_outblock outblock; - uschar buffer[DELIVER_BUFFER_SIZE]; - uschar inbuffer[4096]; - uschar outbuffer[4096]; - - transport_instance * tblock; - smtp_transport_options_block * ob; -} smtp_context; - /* Arguments: ctx connection context - message_defer return set TRUE if yield is OK, but all addresses were deferred - because of a non-recipient, non-host failure, that is, a - 4xx response to MAIL FROM, DATA, or ".". This is a defer - that is specific to the message. suppress_tls if TRUE, don't attempt a TLS connection - this is set for a second attempt after TLS initialization fails verify TRUE if connection is for a verify callout, FALSE for @@ -1541,8 +1480,7 @@ Returns: OK - the connection was made and the delivery attempted; to expand */ int -smtp_setup_conn(smtp_context * sx, BOOL * message_defer, BOOL suppress_tls, - BOOL verify) +smtp_setup_conn(smtp_context * sx, BOOL suppress_tls, BOOL verify) { #if defined(SUPPORT_TLS) && defined(EXPERIMENTAL_DANE) dns_answer tlsa_dnsa; @@ -1554,7 +1492,7 @@ int save_errno; int yield = OK; int rc; -sx->ob = (smtp_transport_options_block *)(sx->tblock->options_block); +sx->ob = (smtp_transport_options_block *) sx->tblock->options_block; sx->lmtp = strcmpic(sx->ob->protocol, US"lmtp") == 0; sx->smtps = strcmpic(sx->ob->protocol, US"smtps") == 0; @@ -1574,15 +1512,14 @@ sx->dane_required = verify_check_given_host(&sx->ob->hosts_require_dane, sx->hos #endif if ((sx->max_rcpt = sx->tblock->max_addresses) == 0) sx->max_rcpt = 999999; -sx->helo_data = NULL; sx->peer_offered = 0; sx->igquotstr = US""; +if (!sx->helo_data) sx->helo_data = sx->ob->helo_data; #ifdef EXPERIMENTAL_DSN_INFO sx->smtp_greeting = NULL; sx->helo_response = NULL; #endif -*message_defer = FALSE; smtp_command = US"initial connection"; sx->buffer[0] = '\0'; @@ -1615,7 +1552,8 @@ tls_out.ocsp = OCSP_NOT_REQ; /* Flip the legacy TLS-related variables over to the outbound set in case they're used in the context of the transport. Don't bother resetting -afterward as we're in a subprocess. */ +afterward (when being used by a transport) as we're in a subprocess. +For verify, unflipped once the callout is dealt with */ tls_modify_variables(&tls_out); @@ -1634,6 +1572,9 @@ specially so they can be identified for retries. */ if (continue_hostname == NULL) { + if (verify) + HDEBUG(D_verify) debug_printf("interface=%s port=%d\n", sx->interface, sx->port); + /* This puts port into host->port */ sx->inblock.sock = sx->outblock.sock = smtp_connect(sx->host, sx->host_af, sx->port, sx->interface, @@ -1641,8 +1582,19 @@ if (continue_hostname == NULL) if (sx->inblock.sock < 0) { - set_errno_nohost(sx->addrlist, errno == ETIMEDOUT ? ERRNO_CONNECTTIMEOUT : errno, - NULL, DEFER, FALSE); + uschar * msg = NULL; + int save_errno = errno; + if (verify) + { + msg = strerror(errno); + HDEBUG(D_verify) debug_printf("connect: %s\n", msg); + } + set_errno_nohost(sx->addrlist, + save_errno == ETIMEDOUT ? ERRNO_CONNECTTIMEOUT : save_errno, + verify ? string_sprintf("could not connect: %s", msg) + : NULL, + DEFER, FALSE); + sx->send_quit = FALSE; return DEFER; } @@ -1684,18 +1636,26 @@ if (continue_hostname == NULL) sense if helo_data contains ${lookup dnsdb ...} stuff). The expansion is delayed till here so that $sending_interface and $sending_port are set. */ - sx->helo_data = expand_string(sx->ob->helo_data); + if (sx->helo_data) + if (!(sx->helo_data = expand_string(sx->helo_data))) + if (verify) + log_write(0, LOG_MAIN|LOG_PANIC, + "<%s>: failed to expand transport's helo_data value for callout: %s", + sx->addrlist->address, expand_string_message); + #ifdef SUPPORT_I18N if (sx->helo_data) { - uschar * errstr = NULL; - if ((sx->helo_data = string_domain_utf8_to_alabel(sx->helo_data, &errstr)), errstr) - { - errstr = string_sprintf("failed to expand helo_data: %s", errstr); - set_errno_nohost(sx->addrlist, ERRNO_EXPANDFAIL, errstr, DEFER, FALSE); - yield = DEFER; - goto SEND_QUIT; - } + expand_string_message = NULL; + if ((sx->helo_data = string_domain_utf8_to_alabel(sx->helo_data, + &expand_string_message)), + expand_string_message) + if (verify) + log_write(0, LOG_MAIN|LOG_PANIC, + "<%s>: failed to expand transport's helo_data value for callout: %s", + sx->addrlist->address, expand_string_message); + else + sx->helo_data = NULL; } #endif @@ -1892,6 +1852,7 @@ else sx->inblock.sock = sx->outblock.sock = fileno(stdin); smtp_command = big_buffer; sx->host->port = sx->port; /* Record the port that was used */ + sx->helo_data = NULL; /* ensure we re-expand ob->helo_data */ } /* If TLS is available on this connection, whether continued or not, attempt to @@ -1905,7 +1866,10 @@ for error analysis. */ #ifdef SUPPORT_TLS if ( smtp_peer_options & PEER_OFFERED_TLS && !suppress_tls - && verify_check_given_host(&sx->ob->hosts_avoid_tls, sx->host) != OK) + && verify_check_given_host(&sx->ob->hosts_avoid_tls, sx->host) != OK + && ( !verify + || verify_check_given_host(&sx->ob->hosts_verify_avoid_tls, sx->host) != OK + ) ) { uschar buffer2[4096]; if (smtp_write_command(&sx->outblock, FALSE, "STARTTLS\r\n") < 0) @@ -2226,8 +2190,6 @@ SEND_QUIT: if (sx->send_quit) (void)smtp_write_command(&sx->outblock, FALSE, "QUIT\r\n"); -/*END_OFF:*/ - #ifdef SUPPORT_TLS tls_close(FALSE, TRUE); #endif @@ -2249,8 +2211,10 @@ if (sx->send_quit) if (fcntl(sx->inblock.sock, F_SETFL, O_NONBLOCK) == 0) for (rc = 16; read(sx->inblock.sock, sx->inbuffer, sizeof(sx->inbuffer)) > 0 && rc > 0;) rc--; /* drain socket */ + sx->send_quit = FALSE; } (void)close(sx->inblock.sock); +sx->inblock.sock = sx->outblock.sock = -1; #ifndef DISABLE_EVENT (void) event_raise(sx->tblock->event_action, US"tcp:close", NULL); @@ -2468,18 +2432,20 @@ uschar *p; smtp_context sx; suppress_tls = suppress_tls; /* stop compiler warning when no TLS support */ +*message_defer = FALSE; sx.addrlist = addrlist; sx.host = host; sx.host_af = host_af, sx.port = port; sx.interface = interface; +sx.helo_data = NULL; sx.tblock = tblock; /* Get the channel set up ready for a message (MAIL FROM being the next SMTP command to send */ -if ((rc = smtp_setup_conn(&sx, message_defer, suppress_tls, FALSE)) != OK) +if ((rc = smtp_setup_conn(&sx, suppress_tls, FALSE)) != OK) return rc; /* If there is a filter command specified for this transport, we can now @@ -3386,7 +3352,7 @@ void smtp_transport_closedown(transport_instance *tblock) { smtp_transport_options_block *ob = - (smtp_transport_options_block *)(tblock->options_block); + (smtp_transport_options_block *)tblock->options_block; smtp_inblock inblock; smtp_outblock outblock; uschar buffer[256]; diff --git a/src/src/transports/smtp.h b/src/src/transports/smtp.h index c8df38ab4..e12c0ab94 100644 --- a/src/src/transports/smtp.h +++ b/src/src/transports/smtp.h @@ -5,6 +5,13 @@ /* Copyright (c) University of Cambridge 1995 - 2015 */ /* See the file NOTICE for conditions of use and distribution. */ +#define DELIVER_BUFFER_SIZE 4096 + +#define PENDING 256 +#define PENDING_DEFER (PENDING + DEFER) +#define PENDING_OK (PENDING + OK) + + /* Private structure for the private options and other private data. */ typedef struct { @@ -82,6 +89,58 @@ typedef struct { #endif } smtp_transport_options_block; +/* smtp connect context */ +typedef struct { + address_item * addrlist; + host_item * host; + int host_af; + int port; + uschar * interface; + + BOOL lmtp:1; + BOOL smtps:1; + BOOL ok:1; + BOOL send_rset:1; + BOOL send_quit:1; + BOOL setting_up:1; + BOOL esmtp:1; + BOOL esmtp_sent:1; + BOOL pending_MAIL:1; +#ifndef DISABLE_PRDR + BOOL prdr_active:1; +#endif +#ifdef SUPPORT_I18N + BOOL utf8_needed:1; +#endif + BOOL dsn_all_lasthop:1; +#if defined(SUPPORT_TLS) && defined(EXPERIMENTAL_DANE) + BOOL dane:1; + BOOL dane_required:1; +#endif + + int max_rcpt; + + uschar peer_offered; + uschar * igquotstr; + uschar * helo_data; +#ifdef EXPERIMENTAL_DSN_INFO + uschar * smtp_greeting; + uschar * helo_response; +#endif + + smtp_inblock inblock; + smtp_outblock outblock; + uschar buffer[DELIVER_BUFFER_SIZE]; + uschar inbuffer[4096]; + uschar outbuffer[4096]; + + transport_instance * tblock; + smtp_transport_options_block * ob; +} smtp_context; + +extern int smtp_setup_conn(smtp_context *, BOOL, BOOL); + + /* Data for reading the private options. */ extern optionlist smtp_transport_options[]; diff --git a/src/src/verify.c b/src/src/verify.c index 0e31ee8b5..4af863c0b 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -171,7 +171,6 @@ dbdata_callout_cache new_domain_record; dbdata_callout_cache_address new_address_record; host_item *host; time_t callout_start_time; -uschar peer_offered = 0; new_domain_record.result = ccache_unknown; new_domain_record.postmaster_result = ccache_unknown; @@ -508,7 +507,7 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. } } } - break; + break; /* host_list */ } if (!done) cancel_cutthrough_connection("incompatible connection"); @@ -519,26 +518,11 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. for (host = host_list; host && !done; host = host->next) { - smtp_inblock inblock; - smtp_outblock outblock; int host_af; int port = 25; - BOOL send_quit = TRUE; - uschar *active_hostname = smtp_active_hostname; - BOOL lmtp; - BOOL smtps; - BOOL esmtp; - BOOL suppress_tls = FALSE; uschar *interface = NULL; /* Outgoing interface to use; NULL => any */ -#if defined(SUPPORT_TLS) && defined(EXPERIMENTAL_DANE) - BOOL dane = FALSE; - BOOL dane_required; - dns_answer tlsa_dnsa; -#endif - uschar inbuffer[4096]; - uschar outbuffer[1024]; + smtp_context sx; uschar responsebuffer[4096]; - uschar * size_str; clearflag(addr, af_verify_pmfail); /* postmaster callout flag */ clearflag(addr, af_verify_nsfail); /* null sender callout flag */ @@ -583,403 +567,92 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. log_write(0, LOG_MAIN|LOG_PANIC, "<%s>: %s", addr->address, addr->message); - /* Set HELO string according to the protocol */ - lmtp= Ustrcmp(tf->protocol, "lmtp") == 0; - smtps= Ustrcmp(tf->protocol, "smtps") == 0; - - - HDEBUG(D_verify) debug_printf("interface=%s port=%d\n", interface, port); - - /* Set up the buffer for reading SMTP response packets. */ - - inblock.buffer = inbuffer; - inblock.buffersize = sizeof(inbuffer); - inblock.ptr = inbuffer; - inblock.ptrend = inbuffer; - - /* Set up the buffer for holding SMTP commands while pipelining */ - - outblock.buffer = outbuffer; - outblock.buffersize = sizeof(outbuffer); - outblock.ptr = outbuffer; - outblock.cmd_count = 0; - outblock.authenticating = FALSE; - - /* Connect to the host; on failure, just loop for the next one, but we - set the error for the last one. Use the callout_connect timeout. */ - - tls_retry_connection: - - /* Reset the parameters of a TLS session */ - tls_out.cipher = tls_out.peerdn = tls_out.peercert = NULL; - - inblock.sock = outblock.sock = - smtp_connect(host, host_af, port, interface, callout_connect, - addr->transport); - if (inblock.sock < 0) + sx.addrlist = addr; + sx.host = host; + sx.host_af = host_af, + sx.port = port; + sx.interface = interface; + sx.helo_data = tf->helo_data; + sx.tblock = addr->transport; + +tls_retry_connection: + /* Set the address state so that errors are recorded in it */ + + addr->transport_return = PENDING_DEFER; + ob->connect_timeout = callout_connect; + ob->command_timeout = callout; + + /* Get the channel set up ready for a message (MAIL FROM being the next + SMTP command to send. If we tried TLS but it failed, try again without + if permitted */ + + if ( (yield = smtp_setup_conn(&sx, FALSE, TRUE)) == DEFER + && addr->basic_errno == ERRNO_TLSFAILURE + && ob->tls_tempfail_tryclear + && verify_check_given_host(&ob->hosts_require_tls, host) != OK + ) { - HDEBUG(D_verify) debug_printf("connect: %s\n", strerror(errno)); - addr->message = string_sprintf("could not connect to %s [%s]: %s", - host->name, host->address, strerror(errno)); + log_write(0, LOG_MAIN, "TLS session failure:" + " callout unencrypted to %s [%s] (not in hosts_require_tls)", + host->name, host->address); + yield = smtp_setup_conn(&sx, TRUE, TRUE); + } + if (yield != OK) + { + if (addr->message) addr->message = string_sprintf("%s [%s] %s", + host->name, host->address, addr->message); + errno = addr->basic_errno; transport_name = NULL; deliver_host = deliver_host_address = NULL; deliver_domain = save_deliver_domain; - continue; - } - -#if defined(SUPPORT_TLS) && defined(EXPERIMENTAL_DANE) - { - int rc; - - tls_out.dane_verified = FALSE; - tls_out.tlsa_usage = 0; - dane_required = - verify_check_given_host(&ob->hosts_require_dane, host) == OK; - - if (host->dnssec == DS_YES) - { - if( dane_required - || verify_check_given_host(&ob->hosts_try_dane, host) == OK - ) - { - if ((rc = tlsa_lookup(host, &tlsa_dnsa, dane_required)) != OK) - return rc; - dane = TRUE; - } - } - else if (dane_required) - { - log_write(0, LOG_MAIN, "DANE error: %s lookup not DNSSEC", host->name); - return FAIL; - } - - if (dane) - ob->tls_tempfail_tryclear = FALSE; - } -#endif /*DANE*/ - - /* Expand the helo_data string to find the host name to use. */ - - if (tf->helo_data) - { - uschar * s = expand_string(tf->helo_data); - if (!s) - log_write(0, LOG_MAIN|LOG_PANIC, "<%s>: failed to expand transport's " - "helo_data value for callout: %s", addr->address, - expand_string_message); - else active_hostname = s; - } - - /* Wait for initial response, and send HELO. The smtp_write_command() - function leaves its command in big_buffer. This is used in error responses. - Initialize it in case the connection is rejected. */ - - Ustrcpy(big_buffer, "initial connection"); - - /* Unless ssl-on-connect, wait for the initial greeting */ - smtps_redo_greeting: - -#ifdef SUPPORT_TLS - if (!smtps || (smtps && tls_out.active >= 0)) -#endif - { -#ifdef TCP_QUICKACK - (void) setsockopt(inblock.sock, IPPROTO_TCP, TCP_QUICKACK, US &off, sizeof(off)); -#endif - if (!(done= smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), '2', callout))) - goto RESPONSE_FAILED; + /* Failure to accept HELO is cached; this blocks the whole domain for all + senders. I/O errors and defer responses are not cached. */ -#ifndef DISABLE_EVENT - lookup_dnssec_authenticated = host->dnssec==DS_YES ? US"yes" - : host->dnssec==DS_NO ? US"no" : NULL; - if (event_raise(addr->transport->event_action, - US"smtp:connect", responsebuffer)) + if (yield == FAIL && (errno == 0 || errno == ERRNO_SMTPCLOSED)) { - lookup_dnssec_authenticated = NULL; - /* Logging? Debug? */ - goto RESPONSE_FAILED; + setflag(addr, af_verify_nsfail); + new_domain_record.result = ccache_reject; + done = TRUE; } - lookup_dnssec_authenticated = NULL; -#endif - } - - /* Not worth checking greeting line for ESMTP support */ - if (!(esmtp = verify_check_given_host(&ob->hosts_avoid_esmtp, host) != OK)) - DEBUG(D_transport) - debug_printf("not sending EHLO (host matches hosts_avoid_esmtp)\n"); - - tls_redo_helo: - -#ifdef SUPPORT_TLS - if (smtps && tls_out.active < 0) /* ssl-on-connect, first pass */ - { - peer_offered &= ~PEER_OFFERED_TLS; - ob->tls_tempfail_tryclear = FALSE; - } - else /* all other cases */ -#endif - - { esmtp_retry: - - if (!(done= smtp_write_command(&outblock, FALSE, "%s %s\r\n", - !esmtp? "HELO" : lmtp? "LHLO" : "EHLO", active_hostname) >= 0)) - goto SEND_FAILED; - if (!smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), '2', callout)) - { - if (errno != 0 || responsebuffer[0] == 0 || lmtp || !esmtp || tls_out.active >= 0) - { - done= FALSE; - goto RESPONSE_FAILED; - } -#ifdef SUPPORT_TLS - peer_offered &= ~PEER_OFFERED_TLS; -#endif - esmtp = FALSE; - goto esmtp_retry; /* fallback to HELO */ - } - - /* Set tls_offered if the response to EHLO specifies support for STARTTLS. */ - - peer_offered = esmtp - ? ehlo_response(responsebuffer, sizeof(responsebuffer), - (!suppress_tls && tls_out.active < 0 ? PEER_OFFERED_TLS : 0) - | 0 /* no IGNQ */ - | 0 /* no PRDR */ -#ifdef SUPPORT_I18N - | (addr->prop.utf8_msg && !addr->prop.utf8_downcvt - ? PEER_OFFERED_UTF8 : 0) -#endif - | 0 /* no DSN */ - | 0 /* no PIPE */ - - /* only care about SIZE if we have size from inbound */ - | (message_size > 0 && ob->size_addition >= 0 - ? PEER_OFFERED_SIZE : 0) - ) - : 0; - } - - size_str = options & vopt_is_recipient && peer_offered & PEER_OFFERED_SIZE - ? string_sprintf(" SIZE=%d", message_size + ob->size_addition) : US""; - -#ifdef SUPPORT_TLS - smtp_peer_options |= peer_offered & PEER_OFFERED_TLS; -#endif - - /* If TLS is available on this connection attempt to - start up a TLS session, unless the host is in hosts_avoid_tls. If successful, - send another EHLO - the server may give a different answer in secure mode. We - use a separate buffer for reading the response to STARTTLS so that if it is - negative, the original EHLO data is available for subsequent analysis, should - the client not be required to use TLS. If the response is bad, copy the buffer - for error analysis. */ - -#ifdef SUPPORT_TLS - if ( peer_offered & PEER_OFFERED_TLS - && verify_check_given_host(&ob->hosts_avoid_tls, host) != OK - && verify_check_given_host(&ob->hosts_verify_avoid_tls, host) != OK - ) - { - uschar buffer2[4096]; - if ( !smtps - && !(done= smtp_write_command(&outblock, FALSE, "STARTTLS\r\n") >= 0)) - goto SEND_FAILED; - - /* If there is an I/O error, transmission of this message is deferred. If - there is a temporary rejection of STARRTLS and tls_tempfail_tryclear is - false, we also defer. However, if there is a temporary rejection of STARTTLS - and tls_tempfail_tryclear is true, or if there is an outright rejection of - STARTTLS, we carry on. This means we will try to send the message in clear, - unless the host is in hosts_require_tls (tested below). */ - - if (!smtps && !smtp_read_response(&inblock, buffer2, sizeof(buffer2), '2', - ob->command_timeout)) - { - if ( errno != 0 - || buffer2[0] == 0 - || buffer2[0] == '4' && !ob->tls_tempfail_tryclear - ) - { - Ustrncpy(responsebuffer, buffer2, sizeof(responsebuffer)); - done= FALSE; - goto RESPONSE_FAILED; - } - } - - /* STARTTLS accepted or ssl-on-connect: try to negotiate a TLS session. */ else - { - int oldtimeout = ob->command_timeout; - int rc; - - ob->command_timeout = callout; - rc = tls_client_start(inblock.sock, host, addr, addr->transport -# ifdef EXPERIMENTAL_DANE - , dane ? &tlsa_dnsa : NULL -# endif - ); - ob->command_timeout = oldtimeout; - - /* TLS negotiation failed; give an error. Try in clear on a new - connection, if the options permit it for this host. */ - if (rc != OK) - { - HDEBUG(D_transport|D_acl|D_v) debug_printf(" SMTP(close)>>\n"); - (void)close(inblock.sock); -# ifndef DISABLE_EVENT - (void) event_raise(addr->transport->event_action, - US"tcp:close", NULL); -# endif - if ( ob->tls_tempfail_tryclear - && !smtps - && verify_check_given_host(&ob->hosts_require_tls, host) != OK - ) - { - log_write(0, LOG_MAIN, "TLS session failure:" - " callout unencrypted to %s [%s] (not in hosts_require_tls)", - host->name, host->address); - suppress_tls = TRUE; - goto tls_retry_connection; - } - - /*save_errno = ERRNO_TLSFAILURE;*/ - /*message = US"failure while setting up TLS session";*/ - send_quit = FALSE; - done= FALSE; - goto TLS_FAILED; - } - - /* TLS session is set up. Copy info for logging. */ - addr->cipher = tls_out.cipher; - addr->peerdn = tls_out.peerdn; - - /* For SMTPS we need to wait for the initial OK response, then do HELO. */ - if (smtps) - goto smtps_redo_greeting; - - /* For STARTTLS we need to redo EHLO */ - goto tls_redo_helo; - } - } - - /* If the host is required to use a secure channel, ensure that we have one. */ - if (tls_out.active < 0) - if ( -# ifdef EXPERIMENTAL_DANE - dane || -# endif - verify_check_given_host(&ob->hosts_require_tls, host) == OK - ) - { - /*save_errno = ERRNO_TLSREQUIRED;*/ - log_write(0, LOG_MAIN, - "H=%s [%s]: a TLS session is required for this host, but %s", - host->name, host->address, - peer_offered & PEER_OFFERED_TLS - ? "an attempt to start TLS failed" - : "the server did not offer TLS support"); - done= FALSE; - goto TLS_FAILED; - } - -#endif /*SUPPORT_TLS*/ - - done = TRUE; /* so far so good; have response to HELO */ - - /* For now, transport_filter by cutthrough-delivery is not supported */ - /* 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 - 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"); - } -#endif - } - - SEND_FAILED: - RESPONSE_FAILED: - TLS_FAILED: - ; - /* Clear down of the TLS, SMTP and TCP layers on error is handled below. */ - - /* Failure to accept HELO is cached; this blocks the whole domain for all - senders. I/O errors and defer responses are not cached. */ - - if (!done) - { - *failure_ptr = US"mail"; /* At or before MAIL */ - if (errno == 0 && responsebuffer[0] == '5') - { - setflag(addr, af_verify_nsfail); - new_domain_record.result = ccache_reject; - } - } - -#ifdef SUPPORT_I18N - else if ( addr->prop.utf8_msg - && !addr->prop.utf8_downcvt - && !(peer_offered & PEER_OFFERED_UTF8) - ) - { - HDEBUG(D_acl|D_v) debug_printf("utf8 required but not offered\n"); - errno = ERRNO_UTF8_FWD; - setflag(addr, af_verify_nsfail); - done = FALSE; - } - else if ( addr->prop.utf8_msg - && (addr->prop.utf8_downcvt || !(peer_offered & PEER_OFFERED_UTF8)) - && !(setflag(addr, af_utf8_downcvt), - from_address = string_address_utf8_to_alabel(from_address, - &addr->message) - ) ) - { - errno = ERRNO_EXPANDFAIL; - setflag(addr, af_verify_nsfail); - done = FALSE; + done = FALSE; + goto no_conn; } -#endif - - /* If we haven't authenticated, but are required to, give up. */ - /* Try to AUTH */ - else done = smtp_auth(responsebuffer, sizeof(responsebuffer), - addr, host, ob, esmtp, &inblock, &outblock) == OK && + /* If we needed to authenticate, smtp_setup_conn() did that. Copy + the AUTH info for logging */ - /* Copy AUTH info for logging */ - ( (addr->authenticator = client_authenticator), - (addr->auth_id = client_authenticated_id), + addr->authenticator = client_authenticator; + addr->auth_id = client_authenticated_id; /* Build a mail-AUTH string (re-using responsebuffer for convenience */ - !smtp_mail_auth_str(responsebuffer, sizeof(responsebuffer), addr, ob) - ) && - ( (addr->auth_sndr = client_authenticated_sender), + done = + !smtp_mail_auth_str(responsebuffer, sizeof(responsebuffer), addr, ob) + && ( + (addr->auth_sndr = client_authenticated_sender), /* Send the MAIL command */ - (smtp_write_command(&outblock, FALSE, + + (smtp_write_command(&sx.outblock, FALSE, #ifdef SUPPORT_I18N - addr->prop.utf8_msg && !addr->prop.utf8_downcvt - ? "MAIL FROM:<%s>%s%s SMTPUTF8\r\n" - : + addr->prop.utf8_msg && !addr->prop.utf8_downcvt + ? "MAIL FROM:<%s>%s%s SMTPUTF8\r\n" + : #endif - "MAIL FROM:<%s>%s%s\r\n", - from_address, responsebuffer, size_str) >= 0) - ) && + "MAIL FROM:<%s>%s%s\r\n", + from_address, + responsebuffer, + options & vopt_is_recipient && sx.peer_offered & PEER_OFFERED_SIZE + ? string_sprintf(" SIZE=%d", message_size + ob->size_addition) + : US"" + + ) >= 0) + ) - smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), - '2', callout); + && smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), + '2', callout); deliver_host = deliver_host_address = NULL; deliver_domain = save_deliver_domain; @@ -1040,10 +713,10 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. { uschar randombuffer[1024]; BOOL random_ok = - smtp_write_command(&outblock, FALSE, + smtp_write_command(&sx.outblock, FALSE, "RCPT TO:<%.1000s@%.1000s>\r\n", random_local_part, rcpt_domain) >= 0 && - smtp_read_response(&inblock, randombuffer, + smtp_read_response(&sx.inblock, randombuffer, sizeof(randombuffer), '2', callout); /* Remember when we last did a random test */ @@ -1072,11 +745,11 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. new_domain_record.random_result = ccache_reject; done = - smtp_write_command(&outblock, FALSE, "RSET\r\n") >= 0 && - smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), + smtp_write_command(&sx.outblock, FALSE, "RSET\r\n") >= 0 && + smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), '2', callout) && - smtp_write_command(&outblock, FALSE, + smtp_write_command(&sx.outblock, FALSE, #ifdef SUPPORT_I18N addr->prop.utf8_msg && !addr->prop.utf8_downcvt ? "MAIL FROM:<%s> SMTPUTF8\r\n" @@ -1084,7 +757,7 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. #endif "MAIL FROM:<%s>\r\n", from_address) >= 0 && - smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), + smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), '2', callout); if (!done) @@ -1096,7 +769,7 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. tls_close(FALSE, TRUE); #endif HDEBUG(D_transport|D_acl|D_v) debug_printf(" SMTP(close)>>\n"); - (void)close(inblock.sock); + (void)close(sx.inblock.sock); #ifndef DISABLE_EVENT (void) event_raise(addr->transport->event_action, US"tcp:close", NULL); @@ -1132,9 +805,9 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. #endif done = - smtp_write_command(&outblock, FALSE, "RCPT TO:<%.1000s>\r\n", + smtp_write_command(&sx.outblock, FALSE, "RCPT TO:<%.1000s>\r\n", rcpt) >= 0 && - smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), + smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), '2', callout); if (done) @@ -1148,7 +821,7 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. /* Do postmaster check if requested; if a full check is required, we check for RCPT TO: (no domain) in accordance with RFC 821. */ - if (done && pm_mailfrom != NULL) + if (done && pm_mailfrom) { /* Could possibly shift before main verify, just above, and be ok for cutthrough. But no way to handle a subsequent rcpt, so just @@ -1157,21 +830,21 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. HDEBUG(D_acl|D_v) debug_printf("Cutthrough cancelled by presence of postmaster verify\n"); done = - smtp_write_command(&outblock, FALSE, "RSET\r\n") >= 0 && - smtp_read_response(&inblock, responsebuffer, + smtp_write_command(&sx.outblock, FALSE, "RSET\r\n") >= 0 && + smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), '2', callout) && - smtp_write_command(&outblock, FALSE, + smtp_write_command(&sx.outblock, FALSE, "MAIL FROM:<%s>\r\n", pm_mailfrom) >= 0 && - smtp_read_response(&inblock, responsebuffer, + smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), '2', callout) && /* First try using the current domain */ (( - smtp_write_command(&outblock, FALSE, + smtp_write_command(&sx.outblock, FALSE, "RCPT TO:\r\n", rcpt_domain) >= 0 && - smtp_read_response(&inblock, responsebuffer, + smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), '2', callout) ) @@ -1182,9 +855,9 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. ( (options & vopt_callout_fullpm) != 0 && - smtp_write_command(&outblock, FALSE, + smtp_write_command(&sx.outblock, FALSE, "RCPT TO:\r\n") >= 0 && - smtp_read_response(&inblock, responsebuffer, + smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), '2', callout) )); @@ -1214,50 +887,55 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. don't give the IP address because this may be an internal host whose identity is not to be widely broadcast. */ - if (!done) +no_conn: + if (!done) switch(errno) { - if (errno == ETIMEDOUT) - { - HDEBUG(D_verify) debug_printf("SMTP timeout\n"); - send_quit = FALSE; - } + case ETIMEDOUT: + HDEBUG(D_verify) debug_printf("SMTP timeout\n"); + sx.send_quit = FALSE; + break; + #ifdef SUPPORT_I18N - else if (errno == ERRNO_UTF8_FWD) + case ERRNO_UTF8_FWD: { extern int acl_where; /* src/acl.c */ errno = 0; addr->message = string_sprintf( - "response to \"%s\" from %s [%s] did not include SMTPUTF8", - big_buffer, host->name, host->address); - addr->user_message = acl_where == ACL_WHERE_RCPT - ? US"533 mailbox name not allowed" + "response to \"EHLO\" from %s [%s] did not include SMTPUTF8", + host->name, host->address); + addr->user_message = acl_where == ACL_WHERE_RCPT + ? US"533 no support for internationalised mailbox name" : US"550 mailbox unavailable"; yield = FAIL; done = TRUE; } + break; #endif - else if (errno == 0) - { - if (*responsebuffer == 0) Ustrcpy(responsebuffer, US"connection dropped"); + case ECONNREFUSED: + sx.send_quit = FALSE; + break; + + case 0: + if (*responsebuffer == 0) Ustrcpy(responsebuffer, US"connection dropped"); - addr->message = - string_sprintf("response to \"%s\" from %s [%s] was: %s", - big_buffer, host->name, host->address, - string_printing(responsebuffer)); + addr->message = + string_sprintf("response to \"%s\" from %s [%s] was: %s", + big_buffer, host->name, host->address, + string_printing(responsebuffer)); - addr->user_message = options & vopt_is_recipient + addr->user_message = options & vopt_is_recipient ? string_sprintf("Callout verification failed:\n%s", responsebuffer) - : string_sprintf("Called: %s\nSent: %s\nResponse: %s", - host->address, big_buffer, responsebuffer); + : string_sprintf("Called: %s\nSent: %s\nResponse: %s", + host->address, big_buffer, responsebuffer); - /* Hard rejection ends the process */ + /* Hard rejection ends the process */ - if (responsebuffer[0] == '5') /* Address rejected */ - { - yield = FAIL; - done = TRUE; - } - } + if (responsebuffer[0] == '5') /* Address rejected */ + { + yield = FAIL; + done = TRUE; + } + break; } /* End the SMTP conversation and close the connection. */ @@ -1274,12 +952,12 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. && !random_local_part && !pm_mailfrom && cutthrough.fd < 0 - && !lmtp + && !sx.lmtp ) { HDEBUG(D_acl|D_v) debug_printf("holding verify callout open for cutthrough delivery\n"); - cutthrough.fd = outblock.sock; /* We assume no buffer in use in the outblock */ + cutthrough.fd = sx.outblock.sock; /* We assume no buffer in use in the outblock */ cutthrough.nrcpt = 1; cutthrough.interface = interface; cutthrough.host = *host; @@ -1300,23 +978,27 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. /* Ensure no cutthrough on multiple address verifies */ if (options & vopt_callout_recipsender) cancel_cutthrough_connection("not usable for cutthrough"); - if (send_quit) + if (sx.send_quit) { - (void) smtp_write_command(&outblock, FALSE, "QUIT\r\n"); + (void) smtp_write_command(&sx.outblock, FALSE, "QUIT\r\n"); /* Wait a short time for response, and discard it */ - smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), + smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), '2', 1); } + if (sx.inblock.sock >= 0) + { #ifdef SUPPORT_TLS - tls_close(FALSE, TRUE); + tls_close(FALSE, TRUE); #endif - HDEBUG(D_transport|D_acl|D_v) debug_printf(" SMTP(close)>>\n"); - (void)close(inblock.sock); + HDEBUG(D_transport|D_acl|D_v) debug_printf(" SMTP(close)>>\n"); + (void)close(sx.inblock.sock); + sx.inblock.sock = sx.outblock.sock = -1; #ifndef DISABLE_EVENT - (void) event_raise(addr->transport->event_action, US"tcp:close", NULL); + (void) event_raise(addr->transport->event_action, US"tcp:close", NULL); #endif + } } } /* Loop through all hosts, while !done */ @@ -1388,8 +1070,8 @@ else /* !done */ options & vopt_is_recipient ? "recipient" : "sender"); yield = DEFER; - if (host_list->next || !addr->message) - addr->message = dullmsg; + addr->message = host_list->next || !addr->message + ? dullmsg : string_sprintf("%s: %s", dullmsg, addr->message); addr->user_message = smtp_return_error_details ? string_sprintf("%s for <%s>.\n" @@ -1412,6 +1094,7 @@ else /* !done */ END_CALLOUT: if (dbm_file) dbfn_close(dbm_file); +tls_modify_variables(&tls_in); return yield; } diff --git a/test/log/0227 b/test/log/0227 index ca551b3c7..e2a0ce295 100644 --- a/test/log/0227 +++ b/test/log/0227 @@ -1,6 +1,6 @@ 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Unknown user 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 Error for <> 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed @@ -15,7 +15,7 @@ 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Don't like postmaster 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= rejected RCPT : Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Recipient not liked -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : response to "initial connection" from 127.0.0.1 [127.0.0.1] was: connection dropped +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] Remote host closed connection in response to initial connection 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : could not connect to 127.0.0.1 [127.0.0.1]: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout diff --git a/test/log/0365 b/test/log/0365 index 569e49dfd..1a8164f63 100644 --- a/test/log/0365 +++ b/test/log/0365 @@ -1,18 +1,18 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<> rejected after DATA: '>' missing at end of address: failing address in "From:" header is: rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER sender verify defer for : could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmaZ-0005vi-00 U=CALLER F= rejected after DATA 1999-03-02 09:44:33 10HmbA-0005vi-00 U=CALLER F=<> rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message 1999-03-02 09:44:33 10HmbB-0005vi-00 U=CALLER F=<> rejected after DATA: '>' missing at end of address: failing address in "From:" header is: rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER sender verify defer for : could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmbD-0005vi-00 U=CALLER F= rejected after DATA 1999-03-02 09:44:33 10HmbE-0005vi-00 U=CALLER F=<> rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message diff --git a/test/log/0376 b/test/log/0376 index c84cd2300..3a380eb8c 100644 --- a/test/log/0376 +++ b/test/log/0376 @@ -1,4 +1,4 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : could not connect to 127.0.0.1 [127.0.0.1]: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 REJECTED 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed diff --git a/test/log/0413 b/test/log/0413 index 1e587828d..d4eed0011 100644 --- a/test/log/0413 +++ b/test/log/0413 @@ -1,6 +1,6 @@ -1999-03-02 09:44:33 U=CALLER sender verify defer for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for : response to "RCPT TO:" from ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] was: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout diff --git a/test/log/0473 b/test/log/0473 index c6e216931..8a7593ade 100644 --- a/test/log/0473 +++ b/test/log/0473 @@ -1,5 +1,5 @@ 1999-03-02 09:44:33 U=CALLER F= rejected RCPT r3@other.ex: response to "MAIL FROM:" from 127.0.0.1 [127.0.0.1] was: 550 NOTOK -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: could not connect to 127.0.0.1 [127.0.0.1]: Connection refused +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Previous (cached) callout verification failure 1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO @@ -7,4 +7,4 @@ 1999-03-02 09:44:33 U=CALLER sender verify fail for 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] SMTP timeout after initial connection diff --git a/test/log/4204 b/test/log/4204 index 0dd1f89a6..859ff859e 100644 --- a/test/log/4204 +++ b/test/log/4204 @@ -4,8 +4,8 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= 세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com U=CALLER P=utf8local-esmtp S=sss for userR@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => userr@test.ex F=<세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com> R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 diff --git a/test/log/4206 b/test/log/4206 index cab609f55..6fe0bbf41 100644 --- a/test/log/4206 +++ b/test/log/4206 @@ -4,9 +4,9 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= userW@test.ex U=CALLER P=utf8local-esmtp S=sss for user.ഇരട്ടിമധുരം@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => user.ഇരട്ടിമധുരം@test.ex F= R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/log/4214 b/test/log/4214 index 97a89fd80..9b3394bfd 100644 --- a/test/log/4214 +++ b/test/log/4214 @@ -4,8 +4,8 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= 세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com U=CALLER P=utf8local-esmtp S=sss for userR@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => userr@test.ex F=<세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com> R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 diff --git a/test/log/4216 b/test/log/4216 index 75941e1d3..d753ff657 100644 --- a/test/log/4216 +++ b/test/log/4216 @@ -4,9 +4,9 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= userW@test.ex U=CALLER P=utf8local-esmtp S=sss for user.ഇരട്ടിമധുരം@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => user.ഇരട്ടിമധുരം@test.ex F= R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/log/4224 b/test/log/4224 index d58181e24..5d6d6ef10 100644 --- a/test/log/4224 +++ b/test/log/4224 @@ -4,8 +4,8 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= 세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com U=CALLER P=utf8local-esmtp S=sss for userR@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => userr@test.ex F=<세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com> R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 diff --git a/test/log/4226 b/test/log/4226 index d2e4a1c8d..56b087d93 100644 --- a/test/log/4226 +++ b/test/log/4226 @@ -4,9 +4,9 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= userW@test.ex U=CALLER P=utf8local-esmtp S=sss for user.ഇരട്ടിമധുരം@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => user.ഇരട്ടിമധുരം@test.ex F= R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/log/5405 b/test/log/5405 index ae3ad767d..a3d2dd452 100644 --- a/test/log/5405 +++ b/test/log/5405 @@ -20,4 +20,4 @@ 1999-03-02 09:44:33 10HmbD-0005vi-00 >> userh@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" 1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userh@domain.com 1999-03-02 09:44:33 10HmbD-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 not right now +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 not right now diff --git a/test/rejectlog/0227 b/test/rejectlog/0227 index 8b2a2a148..33121f92a 100644 --- a/test/rejectlog/0227 +++ b/test/rejectlog/0227 @@ -1,6 +1,6 @@ 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Unknown user 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 Error for <> 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed @@ -31,7 +31,7 @@ F From: abcd@x.y.z 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Don't like postmaster 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= rejected RCPT : Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Recipient not liked -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : response to "initial connection" from 127.0.0.1 [127.0.0.1] was: connection dropped +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] Remote host closed connection in response to initial connection 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : could not connect to 127.0.0.1 [127.0.0.1]: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout diff --git a/test/rejectlog/0365 b/test/rejectlog/0365 index 5dbe6259a..c5985666b 100644 --- a/test/rejectlog/0365 +++ b/test/rejectlog/0365 @@ -16,7 +16,7 @@ P Received: from CALLER by the.local.host.name with local-smtp (Exim x.yz) F From: bad@domain I Message-Id: Date: Tue, 2 Mar 1999 09:44:33 +0000 -1999-03-02 09:44:33 U=CALLER sender verify defer for : could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmaZ-0005vi-00 U=CALLER F= rejected after DATA Envelope-from: @@ -37,15 +37,15 @@ P Received: from CALLER by the.local.host.name with local-smtp (Exim x.yz) F From: I Message-Id: Date: Tue, 2 Mar 1999 09:44:33 +0000 -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message 1999-03-02 09:44:33 10HmbB-0005vi-00 U=CALLER F=<> rejected after DATA: '>' missing at end of address: failing address in "From:" header is: rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER sender verify defer for : could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmbD-0005vi-00 U=CALLER F= rejected after DATA 1999-03-02 09:44:33 10HmbE-0005vi-00 U=CALLER F=<> rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message diff --git a/test/rejectlog/0376 b/test/rejectlog/0376 index 8cac4a1de..753f33ee6 100644 --- a/test/rejectlog/0376 +++ b/test/rejectlog/0376 @@ -1,4 +1,4 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : could not connect to 127.0.0.1 [127.0.0.1]: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 REJECTED 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed diff --git a/test/rejectlog/0413 b/test/rejectlog/0413 index 1e587828d..d4eed0011 100644 --- a/test/rejectlog/0413 +++ b/test/rejectlog/0413 @@ -1,6 +1,6 @@ -1999-03-02 09:44:33 U=CALLER sender verify defer for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for : response to "RCPT TO:" from ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] was: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout diff --git a/test/rejectlog/0473 b/test/rejectlog/0473 index c6e216931..8a7593ade 100644 --- a/test/rejectlog/0473 +++ b/test/rejectlog/0473 @@ -1,5 +1,5 @@ 1999-03-02 09:44:33 U=CALLER F= rejected RCPT r3@other.ex: response to "MAIL FROM:" from 127.0.0.1 [127.0.0.1] was: 550 NOTOK -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: could not connect to 127.0.0.1 [127.0.0.1]: Connection refused +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Previous (cached) callout verification failure 1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO @@ -7,4 +7,4 @@ 1999-03-02 09:44:33 U=CALLER sender verify fail for 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] SMTP timeout after initial connection diff --git a/test/rejectlog/4204 b/test/rejectlog/4204 index 555b43e40..1ecd9cf88 100644 --- a/test/rejectlog/4204 +++ b/test/rejectlog/4204 @@ -1,5 +1,5 @@ -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 H=localhost (the.local.host.name) [127.0.0.1] F=<> rejected RCPT : relay not permitted diff --git a/test/rejectlog/4206 b/test/rejectlog/4206 index e2430e4b8..331f0c3ce 100644 --- a/test/rejectlog/4206 +++ b/test/rejectlog/4206 @@ -1,6 +1,6 @@ -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/rejectlog/4214 b/test/rejectlog/4214 index bf6cb2398..d2d6046c0 100644 --- a/test/rejectlog/4214 +++ b/test/rejectlog/4214 @@ -1,5 +1,5 @@ -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 H=localhost (the.local.host.name) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F=<> rejected RCPT : relay not permitted diff --git a/test/rejectlog/4216 b/test/rejectlog/4216 index e8d8f00f5..9e78c422a 100644 --- a/test/rejectlog/4216 +++ b/test/rejectlog/4216 @@ -1,6 +1,6 @@ -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/rejectlog/4224 b/test/rejectlog/4224 index e36be9236..793a3ad55 100644 --- a/test/rejectlog/4224 +++ b/test/rejectlog/4224 @@ -1,5 +1,5 @@ -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 H=localhost (the.local.host.name) [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no F=<> rejected RCPT : relay not permitted diff --git a/test/rejectlog/4226 b/test/rejectlog/4226 index dd75f12fb..77c0b5980 100644 --- a/test/rejectlog/4226 +++ b/test/rejectlog/4226 @@ -1,6 +1,6 @@ -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/rejectlog/5405 b/test/rejectlog/5405 index 7df2e1018..fc215f576 100644 --- a/test/rejectlog/5405 +++ b/test/rejectlog/5405 @@ -1,2 +1,2 @@ 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 not right now +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 not right now diff --git a/test/runtest b/test/runtest index 6721f1daa..a6560aaa7 100755 --- a/test/runtest +++ b/test/runtest @@ -1082,7 +1082,7 @@ RESET_AFTER_EXTRA_LINE_READ: next if /^PDKIM >> Body data for hash, canonicalized/; # Parts of DKIM-specific debug output depend on the time/date - next if /^date:\w+,{SP}/; + next if /^date:\w+,\{SP\}/; next if /^PDKIM \[[^[]+\] (Header hash|b) computed:/; # Not all platforms support TCP Fast Open, and the compile omits the check @@ -3940,7 +3940,8 @@ foreach $test (@test_list) if ($? != 0) { if (($? & 0xff) == 0) - { printf("Server return code %d", $?/256); } + { printf("Server return code %d for test %d starting line %d", $?/256, + $testno, $subtest_startline); } elsif (($? & 0xff00) == 0) { printf("Server killed by signal %d", $? & 255); } else diff --git a/test/stderr/0227 b/test/stderr/0227 index d676f05a7..7fa279d38 100644 --- a/test/stderr/0227 +++ b/test/stderr/0227 @@ -50,7 +50,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 250 OK SMTP(close)>> LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify defer for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout LOG: smtp_connection MAIN @@ -254,10 +254,9 @@ LOG: smtp_connection MAIN LOG: smtp_connection MAIN SMTP connection from root Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected - SMTP>> QUIT SMTP(close)>> LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify defer for : response to "initial connection" from 127.0.0.1 [127.0.0.1] was: connection dropped + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] Remote host closed connection in response to initial connection LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout LOG: smtp_connection MAIN @@ -266,7 +265,7 @@ LOG: smtp_connection MAIN SMTP connection from root Connecting to 127.0.0.1 [127.0.0.1]:1224 ... failed: Connection refused LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify defer for : could not connect to 127.0.0.1 [127.0.0.1]: Connection refused + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout LOG: smtp_connection MAIN diff --git a/test/stderr/0376 b/test/stderr/0376 index 652477e75..4ad0556b9 100644 --- a/test/stderr/0376 +++ b/test/stderr/0376 @@ -63,7 +63,7 @@ interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... failed: Connection refused connect: Connection refused LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify defer for : could not connect to 127.0.0.1 [127.0.0.1]: Connection refused + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused created log directory TESTSUITE/spool/log LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout diff --git a/test/stderr/0398 b/test/stderr/0398 index 7489a19a1..cb1d4e58b 100644 --- a/test/stderr/0398 +++ b/test/stderr/0398 @@ -135,6 +135,8 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP>> EHLO mail.test.ex cmd buf flush ddd bytes SMTP<< 250 OK +not using PIPELINING +not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM:<> cmd buf flush ddd bytes diff --git a/test/stderr/0432 b/test/stderr/0432 index f819fb0b2..561e816b2 100644 --- a/test/stderr/0432 +++ b/test/stderr/0432 @@ -96,6 +96,8 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP>> EHLO myhost.test.ex cmd buf flush ddd bytes SMTP<< 250 OK +not using PIPELINING +not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM:<> cmd buf flush ddd bytes @@ -307,9 +309,9 @@ MUNGED: ::1 will be omitted in what follows >>> 127.0.0.1 in hosts_avoid_esmtp? no (option unset) >>> SMTP>> EHLO myhost.test.ex >>> cmd buf flush 21 bytes ->>> SMTP timeout >>> SMTP(close)>> +>>> SMTP timeout >>> ----------- end verify ------------ >>> accept: condition test deferred in ACL "mail" -LOG: H=[1.2.3.4] sender verify defer for : Could not complete sender verify callout +LOG: H=[1.2.3.4] sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] SMTP timeout after EHLO myhost.test.ex LOG: H=[1.2.3.4] temporarily rejected MAIL : Could not complete sender verify callout diff --git a/test/stderr/0473 b/test/stderr/0473 index ed7bc5359..048762f95 100644 --- a/test/stderr/0473 +++ b/test/stderr/0473 @@ -43,10 +43,10 @@ callout cache: found domain record for two.test.ex callout cache: no address record found for r11@two.test.ex interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected -SMTP timeout SMTP(close)>> +SMTP timeout LOG: MAIN REJECT - U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout + U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] SMTP timeout after initial connection LOG: smtp_connection MAIN SMTP connection from CALLER closed by QUIT >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/5410 b/test/stderr/5410 index cb1b31b72..2efd8419c 100644 --- a/test/stderr/5410 +++ b/test/stderr/5410 @@ -115,8 +115,11 @@ cmd buf flush ddd bytes 250-8BITMIME 250-PIPELINING 250 HELP +127.0.0.1 in hosts_avoid_pipelining? no (option unset) +using PIPELINING +not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: + SMTP>> MAIL FROM: SIZE=ssss cmd buf flush ddd bytes SMTP<< 250 OK SMTP>> RCPT TO: @@ -327,8 +330,11 @@ considering: *}{:}} expanding: ${if eq {$address_data}{usery}{*}{:}} result: * 127.0.0.1 in hosts_avoid_tls? yes (matched "*") +127.0.0.1 in hosts_avoid_pipelining? no (option unset) +using PIPELINING +not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: + SMTP>> MAIL FROM: SIZE=ssss cmd buf flush ddd bytes SMTP<< 250 OK SMTP>> RCPT TO: @@ -539,8 +545,11 @@ considering: *}{:}} expanding: ${if eq {$address_data}{usery}{*}{:}} result: * 127.0.0.1 in hosts_avoid_tls? yes (matched "*") +127.0.0.1 in hosts_avoid_pipelining? no (option unset) +using PIPELINING +not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: + SMTP>> MAIL FROM: SIZE=ssss cmd buf flush ddd bytes SMTP<< 250 OK SMTP>> RCPT TO: diff --git a/test/stderr/5420 b/test/stderr/5420 index 8ccf0fd6c..eb3f1a9d2 100644 --- a/test/stderr/5420 +++ b/test/stderr/5420 @@ -114,8 +114,11 @@ cmd buf flush ddd bytes 250-8BITMIME 250-PIPELINING 250 HELP +127.0.0.1 in hosts_avoid_pipelining? no (option unset) +using PIPELINING +not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: + SMTP>> MAIL FROM: SIZE=ssss cmd buf flush ddd bytes SMTP<< 250 OK SMTP>> RCPT TO: @@ -326,8 +329,11 @@ considering: *}{:}} expanding: ${if eq {$address_data}{usery}{*}{:}} result: * 127.0.0.1 in hosts_avoid_tls? yes (matched "*") +127.0.0.1 in hosts_avoid_pipelining? no (option unset) +using PIPELINING +not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: + SMTP>> MAIL FROM: SIZE=ssss cmd buf flush ddd bytes SMTP<< 250 OK SMTP>> RCPT TO: @@ -538,8 +544,11 @@ considering: *}{:}} expanding: ${if eq {$address_data}{usery}{*}{:}} result: * 127.0.0.1 in hosts_avoid_tls? yes (matched "*") +127.0.0.1 in hosts_avoid_pipelining? no (option unset) +using PIPELINING +not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) - SMTP>> MAIL FROM: + SMTP>> MAIL FROM: SIZE=ssss cmd buf flush ddd bytes SMTP<< 250 OK SMTP>> RCPT TO: diff --git a/test/stderr/5840 b/test/stderr/5840 index 97fdca69d..b588681d3 100644 --- a/test/stderr/5840 +++ b/test/stderr/5840 @@ -20,12 +20,12 @@ >>> Attempting full verification using callout >>> callout cache: no domain record found for dane256ee.test.ex >>> callout cache: no address record found for rcptuser@dane256ee.test.ex ->>> interface=NULL port=1225 ->>> Connecting to dane256ee.test.ex [ip4.ip4.ip4.ip4]:1225 ... connected MUNGED: ::1 will be omitted in what follows >>> get[host|ipnode]byname[2] looked up these IP addresses: >>> name=thishost.test.ex address=127.0.0.1 >>> ip4.ip4.ip4.ip4 in hosts_require_dane? yes (end of list) +>>> interface=NULL port=1225 +>>> Connecting to dane256ee.test.ex [ip4.ip4.ip4.ip4]:1225 ... connected >>> SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 >>> ip4.ip4.ip4.ip4 in hosts_avoid_esmtp? no (option unset) >>> SMTP>> EHLO myhost.test.ex @@ -51,9 +51,10 @@ MUNGED: ::1 will be omitted in what follows >>> 250-8BITMIME >>> 250-PIPELINING >>> 250 HELP +>>> ip4.ip4.ip4.ip4 in hosts_avoid_pipelining? no (option unset) >>> ip4.ip4.ip4.ip4 in hosts_require_auth? no (option unset) ->>> SMTP>> MAIL FROM:<> ->>> cmd buf flush 14 bytes +>>> SMTP>> MAIL FROM:<> SIZE=ssss +>>> cmd buf flush 24 bytes >>> SMTP<< 250 OK >>> SMTP>> RCPT TO: >>> cmd buf flush 38 bytes diff --git a/test/stdout/0365 b/test/stdout/0365 index 0d6e07977..f05930041 100644 --- a/test/stdout/0365 +++ b/test/stdout/0365 @@ -40,7 +40,7 @@ 550-Rejected after DATA: could not verify "From:" header address 550 bad@domain: Unrouteable address 250 OK -451-could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +451-Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error 451-Could not complete sender verify callout for . 451-The mail server(s) for the domain may be temporarily unreachable, or 451-they may be permanently unreachable from this server. In the latter case, diff --git a/test/stdout/4204 b/test/stdout/4204 index 6944afbe0..0f9825128 100644 --- a/test/stdout/4204 +++ b/test/stdout/4204 @@ -30,7 +30,7 @@ 250-SMTPUTF8 250 HELP 250 OK -533 mailbox name not allowed +533 no support for internationalised mailbox name 221 the.local.host.name closing connection 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 250-the.local.host.name Hello CALLER at client.ffail @@ -40,5 +40,5 @@ 250-SMTPUTF8 250 HELP 250 OK -533 mailbox name not allowed +533 no support for internationalised mailbox name 221 the.local.host.name closing connection diff --git a/test/stdout/4206 b/test/stdout/4206 index a88d667d5..057ddb3aa 100644 --- a/test/stdout/4206 +++ b/test/stdout/4206 @@ -30,13 +30,8 @@ 250-SMTPUTF8 250 HELP 250 OK -550-Callback setup failed while verifying -550-533 mailbox name not allowed -550-The initial connection, or a HELO or MAIL FROM:<> command was -550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards -550-RFC requirements, and stops you from receiving standard bounce -550-messages. This host does not accept mail from domains whose servers -550-refuse bounces. +550-Verification failed for +550-533 no support for internationalised mailbox name 550 Sender verify failed 221 the.local.host.name closing connection 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 @@ -47,12 +42,7 @@ 250-SMTPUTF8 250 HELP 250 OK -550-Callback setup failed while verifying -550-533 mailbox name not allowed -550-The initial connection, or a HELO or MAIL FROM:<> command was -550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards -550-RFC requirements, and stops you from receiving standard bounce -550-messages. This host does not accept mail from domains whose servers -550-refuse bounces. +550-Verification failed for +550-533 no support for internationalised mailbox name 550 Sender verify failed 221 the.local.host.name closing connection diff --git a/test/stdout/4214 b/test/stdout/4214 index 01f10201b..211eedac7 100644 --- a/test/stdout/4214 +++ b/test/stdout/4214 @@ -33,7 +33,7 @@ 250-SMTPUTF8 250 HELP 250 OK -533 mailbox name not allowed +533 no support for internationalised mailbox name 221 the.local.host.name closing connection 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 250-the.local.host.name Hello CALLER at client.ffail @@ -44,5 +44,5 @@ 250-SMTPUTF8 250 HELP 250 OK -533 mailbox name not allowed +533 no support for internationalised mailbox name 221 the.local.host.name closing connection diff --git a/test/stdout/4216 b/test/stdout/4216 index 9194ebc41..fda7256be 100644 --- a/test/stdout/4216 +++ b/test/stdout/4216 @@ -33,13 +33,8 @@ 250-SMTPUTF8 250 HELP 250 OK -550-Callback setup failed while verifying -550-533 mailbox name not allowed -550-The initial connection, or a HELO or MAIL FROM:<> command was -550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards -550-RFC requirements, and stops you from receiving standard bounce -550-messages. This host does not accept mail from domains whose servers -550-refuse bounces. +550-Verification failed for +550-533 no support for internationalised mailbox name 550 Sender verify failed 221 the.local.host.name closing connection 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 @@ -51,12 +46,7 @@ 250-SMTPUTF8 250 HELP 250 OK -550-Callback setup failed while verifying -550-533 mailbox name not allowed -550-The initial connection, or a HELO or MAIL FROM:<> command was -550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards -550-RFC requirements, and stops you from receiving standard bounce -550-messages. This host does not accept mail from domains whose servers -550-refuse bounces. +550-Verification failed for +550-533 no support for internationalised mailbox name 550 Sender verify failed 221 the.local.host.name closing connection diff --git a/test/stdout/4224 b/test/stdout/4224 index 01f10201b..211eedac7 100644 --- a/test/stdout/4224 +++ b/test/stdout/4224 @@ -33,7 +33,7 @@ 250-SMTPUTF8 250 HELP 250 OK -533 mailbox name not allowed +533 no support for internationalised mailbox name 221 the.local.host.name closing connection 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 250-the.local.host.name Hello CALLER at client.ffail @@ -44,5 +44,5 @@ 250-SMTPUTF8 250 HELP 250 OK -533 mailbox name not allowed +533 no support for internationalised mailbox name 221 the.local.host.name closing connection diff --git a/test/stdout/4226 b/test/stdout/4226 index 9194ebc41..fda7256be 100644 --- a/test/stdout/4226 +++ b/test/stdout/4226 @@ -33,13 +33,8 @@ 250-SMTPUTF8 250 HELP 250 OK -550-Callback setup failed while verifying -550-533 mailbox name not allowed -550-The initial connection, or a HELO or MAIL FROM:<> command was -550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards -550-RFC requirements, and stops you from receiving standard bounce -550-messages. This host does not accept mail from domains whose servers -550-refuse bounces. +550-Verification failed for +550-533 no support for internationalised mailbox name 550 Sender verify failed 221 the.local.host.name closing connection 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 @@ -51,12 +46,7 @@ 250-SMTPUTF8 250 HELP 250 OK -550-Callback setup failed while verifying -550-533 mailbox name not allowed -550-The initial connection, or a HELO or MAIL FROM:<> command was -550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards -550-RFC requirements, and stops you from receiving standard bounce -550-messages. This host does not accept mail from domains whose servers -550-refuse bounces. +550-Verification failed for +550-533 no support for internationalised mailbox name 550 Sender verify failed 221 the.local.host.name closing connection -- cgit v1.2.3 From e9166683487c860e0b817153531cb1b2b0485347 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Tue, 10 Jan 2017 23:04:49 +0000 Subject: Use smtp_write_mail_and_rcpt_cmds() for verify callout --- src/src/functions.h | 1 - src/src/structs.h | 12 +- src/src/transports/smtp.c | 310 +++++++++++++++----------------- src/src/transports/smtp.h | 15 +- src/src/verify.c | 408 +++++++++++++++++++------------------------ test/log/0227 | 20 +-- test/log/0365 | 8 +- test/log/0376 | 14 +- test/log/0398 | 6 +- test/log/0413 | 6 +- test/log/0462 | 4 +- test/log/0473 | 12 +- test/log/0538 | 2 +- test/log/4204 | 4 +- test/log/4206 | 4 +- test/log/4214 | 4 +- test/log/4216 | 4 +- test/log/4224 | 4 +- test/log/4226 | 4 +- test/log/5401 | 4 +- test/log/5405 | 2 +- test/rejectlog/0227 | 20 +-- test/rejectlog/0365 | 8 +- test/rejectlog/0376 | 14 +- test/rejectlog/0398 | 2 +- test/rejectlog/0413 | 6 +- test/rejectlog/0462 | 4 +- test/rejectlog/0473 | 12 +- test/rejectlog/0538 | 2 +- test/rejectlog/4204 | 4 +- test/rejectlog/4206 | 4 +- test/rejectlog/4214 | 4 +- test/rejectlog/4216 | 4 +- test/rejectlog/4224 | 4 +- test/rejectlog/4226 | 4 +- test/rejectlog/5401 | 4 +- test/rejectlog/5405 | 2 +- test/scripts/0000-Basic/0376 | 16 +- test/stderr/0227 | 22 +-- test/stderr/0376 | 18 +- test/stderr/0398 | 2 +- test/stderr/0432 | 2 +- test/stderr/0462 | 4 +- test/stderr/0473 | 4 +- test/stderr/5410 | 9 +- test/stderr/5420 | 9 +- test/stderr/5840 | 5 +- test/stdout/0227 | 2 +- test/stdout/0365 | 2 +- test/stdout/0376 | 4 +- test/stdout/0473 | 4 +- 51 files changed, 494 insertions(+), 555 deletions(-) (limited to 'test') diff --git a/src/src/functions.h b/src/src/functions.h index 04d941034..bba8c446b 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -169,7 +169,6 @@ extern BOOL enq_start(uschar *, unsigned); extern uschar *event_raise(uschar *, const uschar *, uschar *); extern void msg_event_raise(const uschar *, const address_item *); #endif -extern uschar ehlo_response(uschar *, size_t, uschar); extern const uschar * exim_errstr(int); extern void exim_exit(int); extern void exim_nullstd(void); diff --git a/src/src/structs.h b/src/src/structs.h index 12d714f28..d9d37f1c0 100644 --- a/src/src/structs.h +++ b/src/src/structs.h @@ -244,17 +244,7 @@ typedef struct transport_context { /* items below only used with option topt_use_bdat */ tpt_chunk_cmd_cb chunk_cb; /* per-datachunk callback */ - struct smtp_inblock * inblock; - struct smtp_outblock * outblock; - host_item * host; - struct address_item * first_addr; - struct address_item **sync_addr; - BOOL pending_MAIL; - BOOL pending_BDAT; - BOOL good_RCPT; - BOOL * completed_address; - int cmd_count; - uschar * buffer; + void * smtp_context; } transport_ctx; diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index af463d66a..95bee582d 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -510,82 +510,62 @@ check_response(host_item *host, int *errno_value, int more_errno, uschar *buffer, int *yield, uschar **message, BOOL *pass_message) { uschar * pl = pipelining_active ? US"pipelined " : US""; +const uschar * s; *yield = '4'; /* Default setting is to give a temporary error */ -/* Handle response timeout */ - -if (*errno_value == ETIMEDOUT) - { - *message = US string_sprintf("SMTP timeout after %s%s", - pl, smtp_command); - if (transport_count > 0) - *message = US string_sprintf("%s (%d bytes written)", *message, - transport_count); - return FALSE; - } - -/* Handle malformed SMTP response */ - -if (*errno_value == ERRNO_SMTPFORMAT) - { - const uschar *malfresp = string_printing(buffer); - while (isspace(*malfresp)) malfresp++; - *message = *malfresp == 0 - ? string_sprintf("Malformed SMTP reply (an empty line) " - "in response to %s%s", pl, smtp_command) - : string_sprintf("Malformed SMTP reply in response to %s%s: %s", - pl, smtp_command, malfresp); - return FALSE; - } - -/* Handle a failed filter process error; can't send QUIT as we mustn't -end the DATA. */ - -if (*errno_value == ERRNO_FILTER_FAIL) - { - *message = US string_sprintf("transport filter process failed (%d)%s", - more_errno, - (more_errno == EX_EXECFAILED)? ": unable to execute command" : ""); - return FALSE; - } - -/* Handle a failed add_headers expansion; can't send QUIT as we mustn't -end the DATA. */ - -if (*errno_value == ERRNO_CHHEADER_FAIL) - { - *message = - US string_sprintf("failed to expand headers_add or headers_remove: %s", - expand_string_message); - return FALSE; - } - -/* Handle failure to write a complete data block */ - -if (*errno_value == ERRNO_WRITEINCOMPLETE) +switch(*errno_value) { - *message = US string_sprintf("failed to write a data block"); - return FALSE; - } + case ETIMEDOUT: /* Handle response timeout */ + *message = US string_sprintf("SMTP timeout after %s%s", + pl, smtp_command); + if (transport_count > 0) + *message = US string_sprintf("%s (%d bytes written)", *message, + transport_count); + return FALSE; + + case ERRNO_SMTPFORMAT: /* Handle malformed SMTP response */ + s = string_printing(buffer); + while (isspace(*s)) s++; + *message = *s == 0 + ? string_sprintf("Malformed SMTP reply (an empty line) " + "in response to %s%s", pl, smtp_command) + : string_sprintf("Malformed SMTP reply in response to %s%s: %s", + pl, smtp_command, s); + return FALSE; + + case ERRNO_FILTER_FAIL: /* Handle a failed filter process error; + can't send QUIT as we mustn't end the DATA. */ + *message = string_sprintf("transport filter process failed (%d)%s", + more_errno, + more_errno == EX_EXECFAILED ? ": unable to execute command" : ""); + return FALSE; + + case ERRNO_CHHEADER_FAIL: /* Handle a failed add_headers expansion; + can't send QUIT as we mustn't end the DATA. */ + *message = + string_sprintf("failed to expand headers_add or headers_remove: %s", + expand_string_message); + return FALSE; + + case ERRNO_WRITEINCOMPLETE: /* failure to write a complete data block */ + *message = string_sprintf("failed to write a data block"); + return FALSE; #ifdef SUPPORT_I18N -/* Handle lack of advertised SMTPUTF8, for international message */ -if (*errno_value == ERRNO_UTF8_FWD) - { - *message = US"utf8 support required but not offered for forwarding"; - DEBUG(D_deliver|D_transport) debug_printf("%s\n", *message); - return TRUE; - } + case ERRNO_UTF8_FWD: /* no advertised SMTPUTF8, for international message */ + *message = US"utf8 support required but not offered for forwarding"; + DEBUG(D_deliver|D_transport) debug_printf("%s\n", *message); + return TRUE; #endif + } /* Handle error responses from the remote mailer. */ if (buffer[0] != 0) { - const uschar *s = string_printing(buffer); - *message = US string_sprintf("SMTP error from remote mail server after %s%s: " - "%s", pl, smtp_command, s); + *message = string_sprintf("SMTP error from remote mail server after %s%s: " + "%s", pl, smtp_command, s = string_printing(buffer)); *pass_message = TRUE; *yield = buffer[0]; return TRUE; @@ -754,6 +734,8 @@ static int sync_responses(smtp_context * sx, int count, int pending_DATA) { address_item *addr = sx->sync_addr; +smtp_transport_options_block *ob = + (smtp_transport_options_block *)sx->tblock->options_block; int yield = 0; /* Handle the response for a MAIL command. On error, reinstate the original @@ -763,7 +745,8 @@ responses before returning, except after I/O errors and timeouts. */ if (sx->pending_MAIL) { count--; - if (!smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), '2', ((smtp_transport_options_block *)sx->tblock->options_block)->command_timeout)) + if (!smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), + '2', ob->command_timeout)) { DEBUG(D_transport) debug_printf("bad response for MAIL\n"); Ustrcpy(big_buffer, mail_command); /* Fits, because it came from there! */ @@ -779,7 +762,7 @@ if (sx->pending_MAIL) while (count-- > 0) { if (!smtp_read_response(&sx->inblock, flushbuffer, sizeof(flushbuffer), - '2', ((smtp_transport_options_block *)sx->tblock->options_block)->command_timeout) + '2', ob->command_timeout) && (errno != 0 || flushbuffer[0] == 0)) break; } @@ -810,7 +793,8 @@ while (count-- > 0) /* The address was accepted */ addr->host_used = sx->host; - if (smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), '2', ((smtp_transport_options_block *)sx->tblock->options_block)->command_timeout)) + if (smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), + '2', ob->command_timeout)) { yield |= 1; addr->transport_return = PENDING_OK; @@ -833,7 +817,7 @@ while (count-- > 0) else if (errno == ETIMEDOUT) { uschar *message = string_sprintf("SMTP timeout after RCPT TO:<%s>", - transport_rcpt_address(addr, sx->tblock->rcpt_include_affixes)); + transport_rcpt_address(addr, sx->tblock->rcpt_include_affixes)); set_errno_nohost(sx->first_addr, ETIMEDOUT, message, DEFER, FALSE); retry_add_item(addr, addr->address_retry_key, 0); update_waiting = FALSE; @@ -861,7 +845,8 @@ while (count-- > 0) "%s", transport_rcpt_address(addr, sx->tblock->rcpt_include_affixes), string_printing(sx->buffer)); setflag(addr, af_pass_message); - msglog_line(sx->host, addr->message); + if (!sx->verify) + msglog_line(sx->host, addr->message); /* The response was 5xx */ @@ -879,38 +864,40 @@ while (count-- > 0) addr->basic_errno = ERRNO_RCPT4XX; addr->more_errno |= ((sx->buffer[1] - '0')*10 + sx->buffer[2] - '0') << 8; + if (!sx->verify) + { #ifndef DISABLE_EVENT - event_defer_errno = addr->more_errno; - msg_event_raise(US"msg:rcpt:host:defer", addr); + event_defer_errno = addr->more_errno; + msg_event_raise(US"msg:rcpt:host:defer", addr); #endif - /* Log temporary errors if there are more hosts to be tried. - If not, log this last one in the == line. */ + /* Log temporary errors if there are more hosts to be tried. + If not, log this last one in the == line. */ - if (sx->host->next) - log_write(0, LOG_MAIN, "H=%s [%s]: %s", sx->host->name, sx->host->address, addr->message); + if (sx->host->next) + log_write(0, LOG_MAIN, "H=%s [%s]: %s", + sx->host->name, sx->host->address, addr->message); #ifndef DISABLE_EVENT - else - msg_event_raise(US"msg:rcpt:defer", addr); + else + msg_event_raise(US"msg:rcpt:defer", addr); #endif - /* Do not put this message on the list of those waiting for specific - hosts, as otherwise it is likely to be tried too often. */ + /* Do not put this message on the list of those waiting for specific + hosts, as otherwise it is likely to be tried too often. */ - update_waiting = FALSE; + update_waiting = FALSE; - /* Add a retry item for the address so that it doesn't get tried again - too soon. If address_retry_include_sender is true, add the sender address - to the retry key. */ + /* Add a retry item for the address so that it doesn't get tried again + too soon. If address_retry_include_sender is true, add the sender address + to the retry key. */ - if (((smtp_transport_options_block *)sx->tblock->options_block)->address_retry_include_sender) - { - uschar *altkey = string_sprintf("%s:<%s>", addr->address_retry_key, - sender_address); - retry_add_item(addr, altkey, 0); - } - else retry_add_item(addr, addr->address_retry_key, 0); + retry_add_item(addr, + ob->address_retry_include_sender + ? string_sprintf("%s:<%s>", addr->address_retry_key, sender_address) + : addr->address_retry_key, + 0); + } } } } /* Loop for next RCPT response */ @@ -918,13 +905,14 @@ while (count-- > 0) /* Update where to start at for the next block of responses, unless we have already handled all the addresses. */ -if (addr != NULL) sx->sync_addr = addr->next; +if (addr) sx->sync_addr = addr->next; /* Handle a response to DATA. If we have not had any good recipients, either previously or in this block, the response is ignored. */ if (pending_DATA != 0 && - !smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), '3', ((smtp_transport_options_block *)sx->tblock->options_block)->command_timeout)) + !smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), + '3', ob->command_timeout)) { int code; uschar *msg; @@ -1296,9 +1284,11 @@ return Ustrcmp(current_local_identity, message_local_identity) == 0; -uschar -ehlo_response(uschar * buf, size_t bsize, uschar checks) +static uschar +ehlo_response(uschar * buf, uschar checks) { +size_t bsize = Ustrlen(buf); + #ifdef SUPPORT_TLS if ( checks & PEER_OFFERED_TLS && pcre_exec(regex_STARTTLS, NULL, CS buf, bsize, 0, PCRE_EOPT, NULL, 0) < 0) @@ -1361,17 +1351,15 @@ smtp_chunk_cmd_callback(int fd, transport_ctx * tctx, { smtp_transport_options_block * ob = (smtp_transport_options_block *)(tctx->tblock->options_block); +smtp_context * sx = tctx->smtp_context; int cmd_count = 0; int prev_cmd_count; -uschar * buffer = tctx->buffer; -smtp_context sx; - /* Write SMTP chunk header command */ if (chunk_size > 0) { - if((cmd_count = smtp_write_command(tctx->outblock, FALSE, "BDAT %u%s\r\n", + if((cmd_count = smtp_write_command(&sx->outblock, FALSE, "BDAT %u%s\r\n", chunk_size, flags & tc_chunk_last ? " LAST" : "") ) < 0) return ERROR; @@ -1379,69 +1367,61 @@ if (chunk_size > 0) data_command = string_copy(big_buffer); /* Save for later error message */ } -prev_cmd_count = cmd_count += tctx->cmd_count; +prev_cmd_count = cmd_count += sx->cmd_count; /* Reap responses for any previous, but not one we just emitted */ if (chunk_size > 0) prev_cmd_count--; -if (tctx->pending_BDAT) +if (sx->pending_BDAT) prev_cmd_count--; if (flags & tc_reap_prev && prev_cmd_count > 0) { - sx.first_addr = tctx->first_addr; - sx.tblock = tctx->tblock; - sx.sync_addr = *tctx->sync_addr; - sx.host = tctx->host; - sx.pending_MAIL = tctx->pending_MAIL; - sx.inblock = *tctx->inblock; - DEBUG(D_transport) debug_printf("look for %d responses" " for previous pipelined cmds\n", prev_cmd_count); - switch(sync_responses(&sx, prev_cmd_count, 0)) + switch(sync_responses(sx, prev_cmd_count, 0)) { case 1: /* 2xx (only) => OK */ - case 3: tctx->good_RCPT = TRUE; /* 2xx & 5xx => OK & progress made */ - case 2: *tctx->completed_address = TRUE; /* 5xx (only) => progress made */ + case 3: sx->good_RCPT = TRUE; /* 2xx & 5xx => OK & progress made */ + case 2: sx->completed_addr = TRUE; /* 5xx (only) => progress made */ case 0: break; /* No 2xx or 5xx, but no probs */ case -1: /* Timeout on RCPT */ default: return ERROR; /* I/O error, or any MAIL/DATA error */ } - *tctx->sync_addr = sx.sync_addr; cmd_count = 1; - if (!tctx->pending_BDAT) + if (!sx->pending_BDAT) pipelining_active = FALSE; } /* Reap response for an outstanding BDAT */ -if (tctx->pending_BDAT) +if (sx->pending_BDAT) { DEBUG(D_transport) debug_printf("look for one response for BDAT\n"); - if (!smtp_read_response(tctx->inblock, sx.buffer, sizeof(sx.buffer), '2', + if (!smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), '2', ob->command_timeout)) { - if (errno == 0 && sx.buffer[0] == '4') + if (errno == 0 && sx->buffer[0] == '4') { errno = ERRNO_DATA4XX; /*XXX does this actually get used? */ - tctx->first_addr->more_errno |= - ((sx.buffer[1] - '0')*10 + sx.buffer[2] - '0') << 8; + sx->first_addr->more_errno |= + ((sx->buffer[1] - '0')*10 + sx->buffer[2] - '0') << 8; } return ERROR; } cmd_count--; - tctx->pending_BDAT = FALSE; + sx->pending_BDAT = FALSE; pipelining_active = FALSE; } else if (chunk_size > 0) - tctx->pending_BDAT = TRUE; + sx->pending_BDAT = TRUE; -tctx->cmd_count = cmd_count; +sx->cmd_count = cmd_count; return OK; } @@ -1456,8 +1436,6 @@ Arguments: ctx connection context suppress_tls if TRUE, don't attempt a TLS connection - this is set for a second attempt after TLS initialization fails - verify TRUE if connection is for a verify callout, FALSE for - a delivery attempt Returns: OK - the connection was made and the delivery attempted; fd is set in the conn context, tls_out set up. @@ -1469,7 +1447,7 @@ Returns: OK - the connection was made and the delivery attempted; to expand */ int -smtp_setup_conn(smtp_context * sx, BOOL suppress_tls, BOOL verify) +smtp_setup_conn(smtp_context * sx, BOOL suppress_tls) { #if defined(SUPPORT_TLS) && defined(EXPERIMENTAL_DANE) dns_answer tlsa_dnsa; @@ -1561,7 +1539,7 @@ specially so they can be identified for retries. */ if (continue_hostname == NULL) { - if (verify) + if (sx->verify) HDEBUG(D_verify) debug_printf("interface=%s port=%d\n", sx->interface, sx->port); /* This puts port into host->port */ @@ -1573,14 +1551,14 @@ if (continue_hostname == NULL) { uschar * msg = NULL; int save_errno = errno; - if (verify) + if (sx->verify) { msg = strerror(errno); HDEBUG(D_verify) debug_printf("connect: %s\n", msg); } set_errno_nohost(sx->addrlist, save_errno == ETIMEDOUT ? ERRNO_CONNECTTIMEOUT : save_errno, - verify ? string_sprintf("could not connect: %s", msg) + sx->verify ? string_sprintf("could not connect: %s", msg) : NULL, DEFER, FALSE); sx->send_quit = FALSE; @@ -1627,7 +1605,7 @@ if (continue_hostname == NULL) if (sx->helo_data) if (!(sx->helo_data = expand_string(sx->helo_data))) - if (verify) + if (sx->verify) log_write(0, LOG_MAIN|LOG_PANIC, "<%s>: failed to expand transport's helo_data value for callout: %s", sx->addrlist->address, expand_string_message); @@ -1639,7 +1617,7 @@ if (continue_hostname == NULL) if ((sx->helo_data = string_domain_utf8_to_alabel(sx->helo_data, &expand_string_message)), expand_string_message) - if (verify) + if (sx->verify) log_write(0, LOG_MAIN|LOG_PANIC, "<%s>: failed to expand transport's helo_data value for callout: %s", sx->addrlist->address, expand_string_message); @@ -1812,7 +1790,7 @@ goto SEND_QUIT; if (sx->esmtp || sx->lmtp) { - sx->peer_offered = ehlo_response(sx->buffer, Ustrlen(sx->buffer), + sx->peer_offered = ehlo_response(sx->buffer, PEER_OFFERED_TLS /* others checked later */ ); @@ -1856,7 +1834,7 @@ for error analysis. */ if ( smtp_peer_options & PEER_OFFERED_TLS && !suppress_tls && verify_check_given_host(&sx->ob->hosts_avoid_tls, sx->host) != OK - && ( !verify + && ( !sx->verify || verify_check_given_host(&sx->ob->hosts_verify_avoid_tls, sx->host) != OK ) ) { @@ -2016,7 +1994,7 @@ if (continue_hostname == NULL { if (sx->esmtp || sx->lmtp) { - sx->peer_offered = ehlo_response(sx->buffer, Ustrlen(sx->buffer), + sx->peer_offered = ehlo_response(sx->buffer, 0 /* no TLS */ | (sx->lmtp && sx->ob->lmtp_ignore_quota ? PEER_OFFERED_IGNQ : 0) | PEER_OFFERED_CHUNKING @@ -2355,11 +2333,12 @@ if (sx->peer_offered & PEER_OFFERED_DSN && !(addr->dsn_flags & rf_dsnlasthop)) /* Return: - 0 good - -1 MAIL response error, any read i/o error - -2 non-MAIL response timeout - -3 internal error; channel still usable - -4 transmit failed + 0 good, rcpt results in addr->transport_return (PENDING_OK, DEFER, FAIL) + -1 MAIL response error + -2 any non-MAIL read i/o error + -3 non-MAIL response timeout + -4 internal error; channel still usable + -5 transmit failed */ int @@ -2372,7 +2351,7 @@ int rc; if (build_mailcmd_options(sx, sx->first_addr) != OK) { *yield = ERROR; - return -3; + return -4; } /* From here until we send the DATA command, we can make use of PIPELINING @@ -2400,7 +2379,7 @@ sx->pending_MAIL = TRUE; /* The block starts with MAIL */ { set_errno_nohost(sx->addrlist, ERRNO_EXPANDFAIL, errstr, DEFER, FALSE); *yield = ERROR; - return -3; + return -4; } setflag(sx->addrlist, af_utf8_downcvt); } @@ -2415,7 +2394,7 @@ mail_command = string_copy(big_buffer); /* Save for later error message */ switch(rc) { case -1: /* Transmission error */ - return -4; + return -5; case +1: /* Cmd was sent */ if (!smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), '2', @@ -2430,6 +2409,8 @@ switch(rc) } sx->pending_MAIL = FALSE; break; + + /* otherwise zero: command queued for pipeline */ } /* Pass over all the relevant recipient addresses for this host, which are the @@ -2443,7 +2424,9 @@ In the MUA wrapper situation, we want to flush the PIPELINING buffer for the last address because we want to abort if any recipients have any kind of problem, temporary or permanent. We know that all recipient addresses will have the PENDING_DEFER status, because only one attempt is ever made, and we know -that max_rcpt will be large, so all addresses will be done at once. */ +that max_rcpt will be large, so all addresses will be done at once. + +For verify we flush the pipeline after any (the only) rcpt address. */ for (addr = sx->first_addr, address_count = 0; addr && address_count < sx->max_rcpt; @@ -2457,7 +2440,7 @@ for (addr = sx->first_addr, address_count = 0; ? dsn_support_yes : dsn_support_no; address_count++; - no_flush = pipelining_active && (!mua_wrapper || addr->next); + no_flush = pipelining_active && !sx->verify && (!mua_wrapper || addr->next); build_rcptcmd_options(sx, addr); @@ -2475,21 +2458,21 @@ for (addr = sx->first_addr, address_count = 0; { /*XXX could we use a per-address errstr here? Not fail the whole send? */ errno = ERRNO_EXPANDFAIL; - return -4; /*XXX too harsh? */ + return -5; /*XXX too harsh? */ } #endif count = smtp_write_command(&sx->outblock, no_flush, "RCPT TO:<%s>%s%s\r\n", rcpt_addr, sx->igquotstr, sx->buffer); - if (count < 0) return -4; + if (count < 0) return -5; if (count > 0) { switch(sync_responses(sx, count, 0)) { case 3: sx->ok = TRUE; /* 2xx & 5xx => OK & progress made */ case 2: sx->completed_addr = TRUE; /* 5xx (only) => progress made */ - break; + break; case 1: sx->ok = TRUE; /* 2xx (only) => OK, but if LMTP, */ if (!sx->lmtp) /* can't tell about progress yet */ @@ -2497,8 +2480,9 @@ for (addr = sx->first_addr, address_count = 0; case 0: /* No 2xx or 5xx, but no probs */ break; - case -1: return -2; /* Timeout on RCPT */ - default: return -1; /* I/O error, or any MAIL error */ + case -1: return -3; /* Timeout on RCPT */ + case -2: return -2; /* non-MAIL read i/o error */ + default: return -1; /* any MAIL error */ } sx->pending_MAIL = FALSE; /* Dealt with MAIL */ } @@ -2581,17 +2565,18 @@ sx.port = port; sx.interface = interface; sx.helo_data = NULL; sx.tblock = tblock; +sx.verify = FALSE; /* Get the channel set up ready for a message (MAIL FROM being the next SMTP command to send */ -if ((rc = smtp_setup_conn(&sx, suppress_tls, FALSE)) != OK) +if ((rc = smtp_setup_conn(&sx, suppress_tls)) != OK) return rc; /* If there is a filter command specified for this transport, we can now set it up. This cannot be done until the identify of the host is known. */ -if (tblock->filter_command != NULL) +if (tblock->filter_command) { BOOL rc; uschar fbuf[64]; @@ -2643,11 +2628,11 @@ sx.completed_addr = FALSE; switch(smtp_write_mail_and_rcpt_cmds(&sx, &yield)) { - case 0: break; - case -1: goto RESPONSE_FAILED; - case -2: goto END_OFF; - case -3: goto SEND_QUIT; - default: goto SEND_FAILED; + case 0: break; + case -1: case -2: goto RESPONSE_FAILED; + case -3: goto END_OFF; + case -4: goto SEND_QUIT; + default: goto SEND_FAILED; } /* If we are an MUA wrapper, abort if any RCPTs were rejected, either @@ -2737,17 +2722,10 @@ else tctx.check_string = tctx.escape_string = NULL; tctx.options |= topt_use_bdat; tctx.chunk_cb = smtp_chunk_cmd_callback; - tctx.inblock = &sx.inblock; - tctx.outblock = &sx.outblock; - tctx.host = host; - tctx.first_addr = sx.first_addr; - tctx.sync_addr = &sx.sync_addr; - tctx.pending_MAIL = sx.pending_MAIL; - tctx.pending_BDAT = FALSE; - tctx.good_RCPT = sx.ok; - tctx.completed_address = &sx.completed_addr; - tctx.cmd_count = 0; - tctx.buffer = sx.buffer; + sx.pending_BDAT = FALSE; + sx.good_RCPT = sx.ok; + sx.cmd_count = 0; + tctx.smtp_context = &sx; } else tctx.options |= topt_end_dot; @@ -2798,10 +2776,10 @@ else smtp_command = US"end of data"; - if (sx.peer_offered & PEER_OFFERED_CHUNKING && tctx.cmd_count > 1) + if (sx.peer_offered & PEER_OFFERED_CHUNKING && sx.cmd_count > 1) { /* Reap any outstanding MAIL & RCPT commands, but not a DATA-go-ahead */ - switch(sync_responses(&sx, tctx.cmd_count-1, 0)) + switch(sync_responses(&sx, sx.cmd_count-1, 0)) { case 3: sx.ok = TRUE; /* 2xx & 5xx => OK & progress made */ case 2: sx.completed_addr = TRUE; /* 5xx (only) => progress made */ diff --git a/src/src/transports/smtp.h b/src/src/transports/smtp.h index f158e701c..d89537b40 100644 --- a/src/src/transports/smtp.h +++ b/src/src/transports/smtp.h @@ -98,15 +98,13 @@ typedef struct { int port; uschar * interface; + BOOL verify:1; BOOL lmtp:1; BOOL smtps:1; BOOL ok:1; - BOOL send_rset:1; - BOOL send_quit:1; BOOL setting_up:1; BOOL esmtp:1; BOOL esmtp_sent:1; - BOOL pending_MAIL:1; #ifndef DISABLE_PRDR BOOL prdr_active:1; #endif @@ -118,9 +116,15 @@ typedef struct { BOOL dane:1; BOOL dane_required:1; #endif - BOOL completed_addr; /* pointer to this used by BDAT callback */ + BOOL pending_MAIL:1; + BOOL pending_BDAT:1; + BOOL good_RCPT:1; + BOOL completed_addr:1; + BOOL send_rset:1; + BOOL send_quit:1; int max_rcpt; + int cmd_count; uschar peer_offered; uschar * igquotstr; @@ -144,7 +148,8 @@ typedef struct { smtp_transport_options_block * ob; } smtp_context; -extern int smtp_setup_conn(smtp_context *, BOOL, BOOL); +extern int smtp_setup_conn(smtp_context *, BOOL); +extern int smtp_write_mail_and_rcpt_cmds(smtp_context *, int *); /* Data for reading the private options. */ diff --git a/src/src/verify.c b/src/src/verify.c index e1f81dd5b..f263060be 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -440,9 +440,8 @@ if (addr->transport == cutthrough.addr.transport) Ustrcpy(resp, US"connection dropped"); addr->message = - string_sprintf("response to \"%s\" from %s [%s] was: %s", - big_buffer, host->name, host->address, - string_printing(resp)); + string_sprintf("response to \"%s\" was: %s", + big_buffer, string_printing(resp)); addr->user_message = string_sprintf("Callout verification failed:\n%s", resp); @@ -624,7 +623,6 @@ coding means skipping this whole loop and doing the append separately. */ int port = 25; uschar *interface = NULL; /* Outgoing interface to use; NULL => any */ smtp_context sx; - uschar responsebuffer[4096]; if (!host->address) { @@ -643,7 +641,7 @@ coding means skipping this whole loop and doing the append separately. */ /* Set IPv4 or IPv6 */ - host_af = Ustrchr(host->address, ':') == NULL ? AF_INET : AF_INET6; + host_af = Ustrchr(host->address, ':') ? AF_INET6 : AF_INET; /* Expand and interpret the interface and port strings. The latter will not be used if there is a host-specific port (e.g. from a manualroute router). @@ -671,6 +669,7 @@ coding means skipping this whole loop and doing the append separately. */ sx.interface = interface; sx.helo_data = tf->helo_data; sx.tblock = addr->transport; + sx.verify = TRUE; tls_retry_connection: /* Set the address state so that errors are recorded in it */ @@ -683,7 +682,7 @@ tls_retry_connection: SMTP command to send. If we tried TLS but it failed, try again without if permitted */ - if ( (yield = smtp_setup_conn(&sx, FALSE, TRUE)) == DEFER + if ( (yield = smtp_setup_conn(&sx, FALSE)) == DEFER && addr->basic_errno == ERRNO_TLSFAILURE && ob->tls_tempfail_tryclear && verify_check_given_host(&ob->hosts_require_tls, host) != OK @@ -692,12 +691,11 @@ tls_retry_connection: log_write(0, LOG_MAIN, "TLS session failure:" " callout unencrypted to %s [%s] (not in hosts_require_tls)", host->name, host->address); - yield = smtp_setup_conn(&sx, TRUE, TRUE); + addr->transport_return = PENDING_DEFER; + yield = smtp_setup_conn(&sx, TRUE); } if (yield != OK) { - if (addr->message) addr->message = string_sprintf("%s [%s] %s", - host->name, host->address, addr->message); errno = addr->basic_errno; transport_name = NULL; deliver_host = deliver_host_address = NULL; @@ -723,68 +721,22 @@ tls_retry_connection: addr->authenticator = client_authenticator; addr->auth_id = client_authenticated_id; - /* Build a mail-AUTH string (re-using responsebuffer for convenience */ + sx.from_addr = from_address; + sx.first_addr = sx.sync_addr = addr; + sx.ok = FALSE; /*XXX these 3 last might not be needed for verify? */ + sx.send_rset = TRUE; + sx.completed_addr = FALSE; - done = - !smtp_mail_auth_str(responsebuffer, sizeof(responsebuffer), addr, ob); + new_domain_record.result = + old_domain_cache_result == ccache_reject_mfnull + ? ccache_reject_mfnull : ccache_accept; - if (done) - { - addr->auth_sndr = client_authenticated_sender; - - /* Send the MAIL command */ - - done = - (smtp_write_command(&sx.outblock, FALSE, -#ifdef SUPPORT_I18N - addr->prop.utf8_msg && !addr->prop.utf8_downcvt - ? "MAIL FROM:<%s>%s%s SMTPUTF8\r\n" - : -#endif - "MAIL FROM:<%s>%s%s\r\n", - from_address, - responsebuffer, - options & vopt_is_recipient && sx.peer_offered & PEER_OFFERED_SIZE - ? string_sprintf(" SIZE=%d", message_size + ob->size_addition) - : US"" - ) >= 0) - - && smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), - '2', callout); - } - - deliver_host = deliver_host_address = NULL; - deliver_domain = save_deliver_domain; + /* Do the random local part check first. Temporarily replace the recipient + with the "random" value */ - /* If the host does not accept MAIL FROM:<>, arrange to cache this - information, but again, don't record anything for an I/O error or a defer. Do - not cache rejections of MAIL when a non-empty sender has been used, because - that blocks the whole domain for all senders. */ - - if (!done) - { - *failure_ptr = US"mail"; /* At or before MAIL */ - if (errno == 0 && responsebuffer[0] == '5') - { - setflag(addr, af_verify_nsfail); - if (from_address[0] == 0) - new_domain_record.result = ccache_reject_mfnull; - } - } - - /* Otherwise, proceed to check a "random" address (if required), then the - given address, and the postmaster address (if required). Between each check, - issue RSET, because some servers accept only one recipient after MAIL - FROM:<>. - - Before doing this, set the result in the domain cache record to "accept", - unless its previous value was ccache_reject_mfnull. In that case, the domain - rejects MAIL FROM:<> and we want to continue to remember that. When that is - the case, we have got here only in the case of a recipient verification with - a non-null sender. */ - - else + if (random_local_part) { + uschar * main_address = addr->address; const uschar * rcpt_domain = addr->domain; #ifdef SUPPORT_I18N @@ -802,64 +754,31 @@ tls_retry_connection: } #endif - new_domain_record.result = old_domain_cache_result == ccache_reject_mfnull - ? ccache_reject_mfnull : ccache_accept; - - /* Do the random local part check first */ + /* This would be ok for 1st rcpt of a cutthrough (XXX do we have a count?) , but no way to + handle a subsequent because of the RSET. So refuse to support any. */ + cancel_cutthrough_connection("random-recipient"); - if (random_local_part) - { - uschar randombuffer[1024]; - BOOL random_ok = - smtp_write_command(&sx.outblock, FALSE, - "RCPT TO:<%.1000s@%.1000s>\r\n", random_local_part, - rcpt_domain) >= 0 && - smtp_read_response(&sx.inblock, randombuffer, - sizeof(randombuffer), '2', callout); - - /* Remember when we last did a random test */ - - new_domain_record.random_stamp = time(NULL); - - /* If accepted, we aren't going to do any further tests below. */ - - if (random_ok) - new_domain_record.random_result = ccache_accept; - - /* Otherwise, cache a real negative response, and get back to the right - state to send RCPT. Unless there's some problem such as a dropped - connection, we expect to succeed, because the commands succeeded above. - However, some servers drop the connection after responding to an - invalid recipient, so on (any) error we drop and remake the connection. - */ - - else if (errno == 0) - { - /* This would be ok for 1st rcpt a cutthrough, but no way to - handle a subsequent. So refuse to support any */ - cancel_cutthrough_connection("random-recipient"); - - if (randombuffer[0] == '5') - new_domain_record.random_result = ccache_reject; + addr->address = string_sprintf("%s@%.1000s", + random_local_part, rcpt_domain); + done = FALSE; + if (smtp_write_mail_and_rcpt_cmds(&sx, &yield) == 0) + switch(addr->transport_return) + { + case PENDING_OK: + new_domain_record.random_result = ccache_accept; + break; + case FAIL: + new_domain_record.random_result = ccache_reject; - done = - smtp_write_command(&sx.outblock, FALSE, "RSET\r\n") >= 0 && - smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), - '2', callout) && + /* Between each check, issue RSET, because some servers accept only + one recipient after MAIL FROM:<>. */ - smtp_write_command(&sx.outblock, FALSE, -#ifdef SUPPORT_I18N - addr->prop.utf8_msg && !addr->prop.utf8_downcvt - ? "MAIL FROM:<%s> SMTPUTF8\r\n" - : -#endif - "MAIL FROM:<%s>\r\n", - from_address) >= 0 && - smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), - '2', callout); + if ((done = + smtp_write_command(&sx.outblock, FALSE, "RSET\r\n") >= 0 && + smtp_read_response(&sx.inblock, sx.buffer, sizeof(sx.buffer), + '2', callout))) + break; - if (!done) - { HDEBUG(D_acl|D_v) debug_printf("problem after random/rset/mfrom; reopen conn\n"); random_local_part = NULL; @@ -868,113 +787,144 @@ tls_retry_connection: #endif HDEBUG(D_transport|D_acl|D_v) debug_printf(" SMTP(close)>>\n"); (void)close(sx.inblock.sock); + sx.inblock.sock = sx.outblock.sock = -1; #ifndef DISABLE_EVENT (void) event_raise(addr->transport->event_action, US"tcp:close", NULL); #endif goto tls_retry_connection; - } - } - else done = FALSE; /* Some timeout/connection problem */ - } /* Random check */ + } - /* If the host is accepting all local parts, as determined by the "random" - check, we don't need to waste time doing any further checking. */ + /* If accepted, we aren't going to do any further tests below. + Otherwise, cache a real negative response, and get back to the right + state to send RCPT. Unless there's some problem such as a dropped + connection, we expect to succeed, because the commands succeeded above. + However, some servers drop the connection after responding to an + invalid recipient, so on (any) error we drop and remake the connection. + + XXX could we add another flag to the context, and have the common + code emit the RSET too? Even pipelined after the RCPT... + Then the main-verify call could use it if there's to be a subsequent + postmaster-verify. + The sync_responses() would need to be taught about it and we'd + need another return code filtering out to here. + + Remember when we last did a random test + */ - if (new_domain_record.random_result != ccache_accept && done) - { - /* Get the rcpt_include_affixes flag from the transport if there is one, - but assume FALSE if there is not. */ + new_domain_record.random_stamp = time(NULL); - uschar * rcpt = transport_rcpt_address(addr, - addr->transport ? addr->transport->rcpt_include_affixes : FALSE); + /* Re-setup for main verify, or for the error message when failing */ + addr->address = main_address; + addr->transport_return = PENDING_DEFER; + sx.first_addr = sx.sync_addr = addr; + sx.ok = FALSE; + sx.send_rset = TRUE; + sx.completed_addr = FALSE; + } + else + done = TRUE; -#ifdef SUPPORT_I18N - /*XXX should the conversion be moved into transport_rcpt_address() ? */ - if ( testflag(addr, af_utf8_downcvt) - && !(rcpt = string_address_utf8_to_alabel(rcpt, NULL)) - ) - { - errno = ERRNO_EXPANDFAIL; - *failure_ptr = US"recipient"; - done = FALSE; - } - else -#endif + /* Main verify. If the host is accepting all local parts, as determined + by the "random" check, we don't need to waste time doing any further + checking. */ - done = - smtp_write_command(&sx.outblock, FALSE, "RCPT TO:<%.1000s>\r\n", - rcpt) >= 0 && - smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), - '2', callout); + if (done) + { + done = FALSE; + switch(smtp_write_mail_and_rcpt_cmds(&sx, &yield)) + { + case 0: switch(addr->transport_return) /* ok so far */ + { + case PENDING_OK: done = TRUE; + new_address_record.result = ccache_accept; + break; + case FAIL: done = TRUE; + yield = FAIL; + *failure_ptr = US"recipient"; + new_address_record.result = ccache_reject; + break; + default: break; + } + break; + + case -1: /* MAIL response error */ + *failure_ptr = US"mail"; + if (errno == 0 && sx.buffer[0] == '5') + { + setflag(addr, af_verify_nsfail); + if (from_address[0] == 0) + new_domain_record.result = ccache_reject_mfnull; + } + break; + /* non-MAIL read i/o error */ + /* non-MAIL response timeout */ + /* internal error; channel still usable */ + default: break; /* transmit failed */ + } + } - if (done) - new_address_record.result = ccache_accept; - else if (errno == 0 && responsebuffer[0] == '5') - { - *failure_ptr = US"recipient"; - new_address_record.result = ccache_reject; - } + addr->auth_sndr = client_authenticated_sender; - /* Do postmaster check if requested; if a full check is required, we - check for RCPT TO: (no domain) in accordance with RFC 821. */ + deliver_host = deliver_host_address = NULL; + deliver_domain = save_deliver_domain; - if (done && pm_mailfrom) - { - /* Could possibly shift before main verify, just above, and be ok - for cutthrough. But no way to handle a subsequent rcpt, so just - refuse any */ - cancel_cutthrough_connection("postmaster verify"); - HDEBUG(D_acl|D_v) debug_printf("Cutthrough cancelled by presence of postmaster verify\n"); - - done = - smtp_write_command(&sx.outblock, FALSE, "RSET\r\n") >= 0 && - smtp_read_response(&sx.inblock, responsebuffer, - sizeof(responsebuffer), '2', callout) && - - smtp_write_command(&sx.outblock, FALSE, - "MAIL FROM:<%s>\r\n", pm_mailfrom) >= 0 && - smtp_read_response(&sx.inblock, responsebuffer, - sizeof(responsebuffer), '2', callout) && - - /* First try using the current domain */ - - (( - smtp_write_command(&sx.outblock, FALSE, - "RCPT TO:\r\n", rcpt_domain) >= 0 && - smtp_read_response(&sx.inblock, responsebuffer, - sizeof(responsebuffer), '2', callout) - ) - - || - - /* If that doesn't work, and a full check is requested, - try without the domain. */ - - ( - (options & vopt_callout_fullpm) != 0 && - smtp_write_command(&sx.outblock, FALSE, - "RCPT TO:\r\n") >= 0 && - smtp_read_response(&sx.inblock, responsebuffer, - sizeof(responsebuffer), '2', callout) - )); - - /* Sort out the cache record */ - - new_domain_record.postmaster_stamp = time(NULL); - - if (done) - new_domain_record.postmaster_result = ccache_accept; - else if (errno == 0 && responsebuffer[0] == '5') - { - *failure_ptr = US"postmaster"; - setflag(addr, af_verify_pmfail); - new_domain_record.postmaster_result = ccache_reject; - } - } - } /* Random not accepted */ - } /* MAIL FROM: accepted */ + /* Do postmaster check if requested; if a full check is required, we + check for RCPT TO: (no domain) in accordance with RFC 821. */ + if (done && pm_mailfrom) + { + /* Could possibly shift before main verify, just above, and be ok + for cutthrough. But no way to handle a subsequent rcpt, so just + refuse any */ + cancel_cutthrough_connection("postmaster verify"); + HDEBUG(D_acl|D_v) debug_printf("Cutthrough cancelled by presence of postmaster verify\n"); + + done = smtp_write_command(&sx.outblock, FALSE, "RSET\r\n") >= 0 + && smtp_read_response(&sx.inblock, sx.buffer, + sizeof(sx.buffer), '2', callout); + + if (done) + { + uschar * main_address = addr->address; + + /*XXX oops, affixes */ + addr->address = string_sprintf("postmaster@%.1000s", addr->domain); + addr->transport_return = PENDING_DEFER; + + sx.from_addr = pm_mailfrom; + sx.first_addr = sx.sync_addr = addr; + sx.ok = FALSE; + sx.send_rset = TRUE; + sx.completed_addr = FALSE; + + if( smtp_write_mail_and_rcpt_cmds(&sx, &yield) == 0 + && addr->transport_return == PENDING_OK + ) + done = TRUE; + else + done = (options & vopt_callout_fullpm) != 0 + && smtp_write_command(&sx.outblock, FALSE, + "RCPT TO:\r\n") >= 0 + && smtp_read_response(&sx.inblock, sx.buffer, + sizeof(sx.buffer), '2', callout); + + /* Sort out the cache record */ + + new_domain_record.postmaster_stamp = time(NULL); + + if (done) + new_domain_record.postmaster_result = ccache_accept; + else if (errno == 0 && sx.buffer[0] == '5') + { + *failure_ptr = US"postmaster"; + setflag(addr, af_verify_pmfail); + new_domain_record.postmaster_result = ccache_reject; + } + + addr->address = main_address; + } + } /* For any failure of the main check, other than a negative response, we just close the connection and carry on. We can identify a negative response by the fact that errno is zero. For I/O errors it will be non-zero @@ -986,7 +936,7 @@ tls_retry_connection: is not to be widely broadcast. */ no_conn: - if (!done) switch(errno) + switch(errno) { case ETIMEDOUT: HDEBUG(D_verify) debug_printf("SMTP timeout\n"); @@ -999,8 +949,7 @@ no_conn: extern int acl_where; /* src/acl.c */ errno = 0; addr->message = string_sprintf( - "response to \"EHLO\" from %s [%s] did not include SMTPUTF8", - host->name, host->address); + "response to \"EHLO\" did not include SMTPUTF8"); addr->user_message = acl_where == ACL_WHERE_RCPT ? US"533 no support for internationalised mailbox name" : US"550 mailbox unavailable"; @@ -1014,21 +963,25 @@ no_conn: break; case 0: - if (*responsebuffer == 0) Ustrcpy(responsebuffer, US"connection dropped"); + if (*sx.buffer == 0) Ustrcpy(sx.buffer, US"connection dropped"); - addr->message = - string_sprintf("response to \"%s\" from %s [%s] was: %s", - big_buffer, host->name, host->address, - string_printing(responsebuffer)); + /*XXX test here is ugly; seem to have a split of responsibility for + building this message. Need to reationalise. Where is it done + before here, and when not? + Not == 5xx resp to MAIL on main-verify + */ + if (!addr->message) addr->message = + string_sprintf("response to \"%s\" was: %s", + big_buffer, string_printing(sx.buffer)); addr->user_message = options & vopt_is_recipient - ? string_sprintf("Callout verification failed:\n%s", responsebuffer) + ? string_sprintf("Callout verification failed:\n%s", sx.buffer) : string_sprintf("Called: %s\nSent: %s\nResponse: %s", - host->address, big_buffer, responsebuffer); + host->address, big_buffer, sx.buffer); /* Hard rejection ends the process */ - if (responsebuffer[0] == '5') /* Address rejected */ + if (sx.buffer[0] == '5') /* Address rejected */ { yield = FAIL; done = TRUE; @@ -1081,7 +1034,7 @@ no_conn: (void) smtp_write_command(&sx.outblock, FALSE, "QUIT\r\n"); /* Wait a short time for response, and discard it */ - smtp_read_response(&sx.inblock, responsebuffer, sizeof(responsebuffer), + smtp_read_response(&sx.inblock, sx.buffer, sizeof(sx.buffer), '2', 1); } @@ -1099,6 +1052,9 @@ no_conn: } } + if (!done || yield != OK) + addr->message = string_sprintf("%s [%s] : %s", host->name, host->address, + addr->message); } /* Loop through all hosts, while !done */ } diff --git a/test/log/0227 b/test/log/0227 index e2a0ce295..f1e64701c 100644 --- a/test/log/0227 +++ b/test/log/0227 @@ -1,21 +1,21 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Unknown user +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Unknown user 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 450 Temporary error 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 Error for <> +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 Error for <> 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550-Multiline error for <>\n550 Here's the second line +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550-Multiline error for <>\n550 Here's the second line 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Recipient not liked -1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550-Recipient not liked on two lines\n550 Here's the second +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Recipient not liked +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550-Recipient not liked on two lines\n550 Here's the second 1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= temporarily rejected RCPT : Could not complete recipient verify callout 1999-03-02 09:44:33 10HmaX-0005vi-00 H=[V4NET.0.0.4] U=root F= rejected after DATA: there is no valid sender in any header line 1999-03-02 09:44:33 10HmaY-0005vi-00 H=[V4NET.0.0.4] U=root F= rejected after DATA: there is no valid sender in any header line 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= rejected RCPT : relay not permitted -1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Don't like postmaster +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Don't like postmaster 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Recipient not liked -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] Remote host closed connection in response to initial connection +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Recipient not liked +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Remote host closed connection in response to initial connection 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout diff --git a/test/log/0365 b/test/log/0365 index 1a8164f63..14e9903e6 100644 --- a/test/log/0365 +++ b/test/log/0365 @@ -1,18 +1,18 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER F=<> rejected after DATA: '>' missing at end of address: failing address in "From:" header is: rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmaZ-0005vi-00 U=CALLER F= rejected after DATA 1999-03-02 09:44:33 10HmbA-0005vi-00 U=CALLER F=<> rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message 1999-03-02 09:44:33 10HmbB-0005vi-00 U=CALLER F=<> rejected after DATA: '>' missing at end of address: failing address in "From:" header is: rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmbD-0005vi-00 U=CALLER F= rejected after DATA 1999-03-02 09:44:33 10HmbE-0005vi-00 U=CALLER F=<> rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message diff --git a/test/log/0376 b/test/log/0376 index 3a380eb8c..0e2f661ac 100644 --- a/test/log/0376 +++ b/test/log/0376 @@ -1,18 +1,22 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 REJECTED +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 REJECTED 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 REJECT MAIL FROM +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 REJECT MAIL FROM 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (mail): Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (mail): Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NOT OK +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NOT OK 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO: 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmaX-0005vi-00 <= ok7@otherhost53 H=[V4NET.0.0.7] U=root P=smtp S=sss 1999-03-02 09:44:33 10HmaY-0005vi-00 <= ok7@otherhost53 H=[V4NET.0.0.8] U=root P=smtp S=sss diff --git a/test/log/0398 b/test/log/0398 index c197da0d1..d4dcf2d63 100644 --- a/test/log/0398 +++ b/test/log/0398 @@ -1,10 +1,10 @@ -1999-03-02 09:44:33 U=CALLER Warning: Sender verify failed: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Unknown +1999-03-02 09:44:33 U=CALLER Warning: Sender verify failed: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Unknown 1999-03-02 09:44:33 U=CALLER Warning: some other warning 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@test.ex U=CALLER P=local-smtp S=sss 1999-03-02 09:44:33 10HmaX-0005vi-00 => x R=r1 T=t1 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Unknown +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Unknown 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER Warning: Sender verify failed: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Unknown +1999-03-02 09:44:33 U=CALLER Warning: Sender verify failed: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Unknown 1999-03-02 09:44:33 U=CALLER Warning: Sender verify failed 1999-03-02 09:44:33 U=CALLER Warning: some other warning diff --git a/test/log/0413 b/test/log/0413 index d4eed0011..8f04162d2 100644 --- a/test/log/0413 +++ b/test/log/0413 @@ -1,6 +1,6 @@ -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] : SMTP error from remote mail server after RCPT TO:: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout diff --git a/test/log/0462 b/test/log/0462 index ec4952f98..d0a04dacb 100644 --- a/test/log/0462 +++ b/test/log/0462 @@ -1,5 +1,5 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed diff --git a/test/log/0473 b/test/log/0473 index 8a7593ade..acca9c9ed 100644 --- a/test/log/0473 +++ b/test/log/0473 @@ -1,10 +1,10 @@ -1999-03-02 09:44:33 U=CALLER F= rejected RCPT r3@other.ex: response to "MAIL FROM:" from 127.0.0.1 [127.0.0.1] was: 550 NOTOK -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 U=CALLER F= rejected RCPT r3@other.ex: 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:" was: 550 NOTOK +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Previous (cached) callout verification failure -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed 1999-03-02 09:44:33 U=CALLER sender verify fail for 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] SMTP timeout after initial connection +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO: +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after initial connection diff --git a/test/log/0538 b/test/log/0538 index 8b63bdb9b..827372c14 100644 --- a/test/log/0538 +++ b/test/log/0538 @@ -1,4 +1,4 @@ -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 I'm misconfigured +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 I'm misconfigured 1999-03-02 09:44:33 U=CALLER rejected MAIL : Sender verify failed 1999-03-02 09:44:33 U=CALLER sender verify fail for 1999-03-02 09:44:33 U=CALLER rejected MAIL : Sender verify failed diff --git a/test/log/4204 b/test/log/4204 index 859ff859e..bfd09c9e0 100644 --- a/test/log/4204 +++ b/test/log/4204 @@ -4,8 +4,8 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= 세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com U=CALLER P=utf8local-esmtp S=sss for userR@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => userr@test.ex F=<세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com> R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 diff --git a/test/log/4206 b/test/log/4206 index 6fe0bbf41..7fd5f73c7 100644 --- a/test/log/4206 +++ b/test/log/4206 @@ -4,9 +4,9 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= userW@test.ex U=CALLER P=utf8local-esmtp S=sss for user.ഇരട്ടിമധുരം@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => user.ഇരട്ടിമധുരം@test.ex F= R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/log/4214 b/test/log/4214 index 9b3394bfd..df902db45 100644 --- a/test/log/4214 +++ b/test/log/4214 @@ -4,8 +4,8 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= 세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com U=CALLER P=utf8local-esmtp S=sss for userR@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => userr@test.ex F=<세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com> R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 diff --git a/test/log/4216 b/test/log/4216 index d753ff657..511a74365 100644 --- a/test/log/4216 +++ b/test/log/4216 @@ -4,9 +4,9 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= userW@test.ex U=CALLER P=utf8local-esmtp S=sss for user.ഇരട്ടിമധുരം@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => user.ഇരട്ടിമധുരം@test.ex F= R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/log/4224 b/test/log/4224 index 5d6d6ef10..d53c397a9 100644 --- a/test/log/4224 +++ b/test/log/4224 @@ -4,8 +4,8 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= 세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com U=CALLER P=utf8local-esmtp S=sss for userR@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => userr@test.ex F=<세계의모든사람들이한국어를이해한다면얼마나좋을까@russian.почемужеонинеговорятпорусски.com> R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 diff --git a/test/log/4226 b/test/log/4226 index 56b087d93..71deed543 100644 --- a/test/log/4226 +++ b/test/log/4226 @@ -4,9 +4,9 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= userW@test.ex U=CALLER P=utf8local-esmtp S=sss for user.ഇരട്ടിമധുരം@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => user.ഇരട്ടിമധുരം@test.ex F= R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/log/5401 b/test/log/5401 index dc4027b47..553b7ab75 100644 --- a/test/log/5401 +++ b/test/log/5401 @@ -1,8 +1,8 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 >> userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 No mate -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Not that one +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 No mate +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Not that one 1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss 1999-03-02 09:44:33 10HmaY-0005vi-00 => userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed diff --git a/test/log/5405 b/test/log/5405 index a3d2dd452..901add1c3 100644 --- a/test/log/5405 +++ b/test/log/5405 @@ -20,4 +20,4 @@ 1999-03-02 09:44:33 10HmbD-0005vi-00 >> userh@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" 1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userh@domain.com 1999-03-02 09:44:33 10HmbD-0005vi-00 Completed -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 not right now +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 450 not right now diff --git a/test/rejectlog/0227 b/test/rejectlog/0227 index 33121f92a..8f5c0ad15 100644 --- a/test/rejectlog/0227 +++ b/test/rejectlog/0227 @@ -1,13 +1,13 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Unknown user +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Unknown user 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 450 Temporary error 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 Error for <> +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 Error for <> 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550-Multiline error for <>\n550 Here's the second line +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550-Multiline error for <>\n550 Here's the second line 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Recipient not liked -1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550-Recipient not liked on two lines\n550 Here's the second +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Recipient not liked +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550-Recipient not liked on two lines\n550 Here's the second 1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= temporarily rejected RCPT : Could not complete recipient verify callout 1999-03-02 09:44:33 10HmaX-0005vi-00 H=[V4NET.0.0.4] U=root F= rejected after DATA: there is no valid sender in any header line Envelope-from: @@ -28,10 +28,10 @@ P Received: from [V4NET.0.0.4] (ident=root) for z@remote.domain; Tue, 2 Mar 1999 09:44:33 +0000 F From: abcd@x.y.z 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= rejected RCPT : relay not permitted -1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Don't like postmaster +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Don't like postmaster 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Recipient not liked -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] Remote host closed connection in response to initial connection +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Recipient not liked +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Remote host closed connection in response to initial connection 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout diff --git a/test/rejectlog/0365 b/test/rejectlog/0365 index c5985666b..f6953da47 100644 --- a/test/rejectlog/0365 +++ b/test/rejectlog/0365 @@ -16,7 +16,7 @@ P Received: from CALLER by the.local.host.name with local-smtp (Exim x.yz) F From: bad@domain I Message-Id: Date: Tue, 2 Mar 1999 09:44:33 +0000 -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmaZ-0005vi-00 U=CALLER F= rejected after DATA Envelope-from: @@ -37,15 +37,15 @@ P Received: from CALLER by the.local.host.name with local-smtp (Exim x.yz) F From: I Message-Id: Date: Tue, 2 Mar 1999 09:44:33 +0000 -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message 1999-03-02 09:44:33 10HmbB-0005vi-00 U=CALLER F=<> rejected after DATA: '>' missing at end of address: failing address in "From:" header is: rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete sender verify callout 1999-03-02 09:44:33 10HmbD-0005vi-00 U=CALLER F= rejected after DATA 1999-03-02 09:44:33 10HmbE-0005vi-00 U=CALLER F=<> rejected after DATA: there is no valid sender in any header line -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error 1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT : failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : defer message diff --git a/test/rejectlog/0376 b/test/rejectlog/0376 index 753f33ee6..47ad1638d 100644 --- a/test/rejectlog/0376 +++ b/test/rejectlog/0376 @@ -1,16 +1,20 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 REJECTED +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 REJECTED 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 REJECT MAIL FROM +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 REJECT MAIL FROM 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (mail): Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (mail): Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NOT OK +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NOT OK 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO: 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= temporarily rejected RCPT : Could not complete sender verify callout diff --git a/test/rejectlog/0398 b/test/rejectlog/0398 index 24d045854..8db437966 100644 --- a/test/rejectlog/0398 +++ b/test/rejectlog/0398 @@ -1,2 +1,2 @@ -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Unknown +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Unknown 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed diff --git a/test/rejectlog/0413 b/test/rejectlog/0413 index d4eed0011..8f04162d2 100644 --- a/test/rejectlog/0413 +++ b/test/rejectlog/0413 @@ -1,6 +1,6 @@ -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] : SMTP error from remote mail server after RCPT TO:: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error +1999-03-02 09:44:33 U=CALLER sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL : Could not complete sender verify callout diff --git a/test/rejectlog/0462 b/test/rejectlog/0462 index ec4952f98..d0a04dacb 100644 --- a/test/rejectlog/0462 +++ b/test/rejectlog/0462 @@ -1,5 +1,5 @@ -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed diff --git a/test/rejectlog/0473 b/test/rejectlog/0473 index 8a7593ade..acca9c9ed 100644 --- a/test/rejectlog/0473 +++ b/test/rejectlog/0473 @@ -1,10 +1,10 @@ -1999-03-02 09:44:33 U=CALLER F= rejected RCPT r3@other.ex: response to "MAIL FROM:" from 127.0.0.1 [127.0.0.1] was: 550 NOTOK -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 U=CALLER F= rejected RCPT r3@other.ex: 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:" was: 550 NOTOK +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r4@other.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Previous (cached) callout verification failure -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed 1999-03-02 09:44:33 U=CALLER sender verify fail for 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] SMTP timeout after initial connection +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO: +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after initial connection diff --git a/test/rejectlog/0538 b/test/rejectlog/0538 index 8b63bdb9b..827372c14 100644 --- a/test/rejectlog/0538 +++ b/test/rejectlog/0538 @@ -1,4 +1,4 @@ -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 I'm misconfigured +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 I'm misconfigured 1999-03-02 09:44:33 U=CALLER rejected MAIL : Sender verify failed 1999-03-02 09:44:33 U=CALLER sender verify fail for 1999-03-02 09:44:33 U=CALLER rejected MAIL : Sender verify failed diff --git a/test/rejectlog/4204 b/test/rejectlog/4204 index 1ecd9cf88..b9df3d146 100644 --- a/test/rejectlog/4204 +++ b/test/rejectlog/4204 @@ -1,5 +1,5 @@ -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 H=localhost (the.local.host.name) [127.0.0.1] F=<> rejected RCPT : relay not permitted diff --git a/test/rejectlog/4206 b/test/rejectlog/4206 index 331f0c3ce..b1ff2c6d9 100644 --- a/test/rejectlog/4206 +++ b/test/rejectlog/4206 @@ -1,6 +1,6 @@ -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/rejectlog/4214 b/test/rejectlog/4214 index d2d6046c0..b7613eb45 100644 --- a/test/rejectlog/4214 +++ b/test/rejectlog/4214 @@ -1,5 +1,5 @@ -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 H=localhost (the.local.host.name) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F=<> rejected RCPT : relay not permitted diff --git a/test/rejectlog/4216 b/test/rejectlog/4216 index 9e78c422a..b100cfaca 100644 --- a/test/rejectlog/4216 +++ b/test/rejectlog/4216 @@ -1,6 +1,6 @@ -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/rejectlog/4224 b/test/rejectlog/4224 index 793a3ad55..05de432a4 100644 --- a/test/rejectlog/4224 +++ b/test/rejectlog/4224 @@ -1,5 +1,5 @@ -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 ******** SERVER ******** 1999-03-02 09:44:33 H=localhost (the.local.host.name) [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no F=<> rejected RCPT : relay not permitted diff --git a/test/rejectlog/4226 b/test/rejectlog/4226 index 77c0b5980..6030c623d 100644 --- a/test/rejectlog/4226 +++ b/test/rejectlog/4226 @@ -1,6 +1,6 @@ -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for : response to "EHLO" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : Sender verify failed ******** SERVER ******** diff --git a/test/rejectlog/5401 b/test/rejectlog/5401 index abcc5c6a6..efe5d0519 100644 --- a/test/rejectlog/5401 +++ b/test/rejectlog/5401 @@ -1,2 +1,2 @@ -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 No mate -1999-03-02 09:44:33 U=CALLER F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Not that one +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 No mate +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Not that one diff --git a/test/rejectlog/5405 b/test/rejectlog/5405 index fc215f576..a822a1000 100644 --- a/test/rejectlog/5405 +++ b/test/rejectlog/5405 @@ -1,2 +1,2 @@ 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 not right now +1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 450 not right now diff --git a/test/scripts/0000-Basic/0376 b/test/scripts/0000-Basic/0376 index 6a819a6ae..88eec49f5 100644 --- a/test/scripts/0000-Basic/0376 +++ b/test/scripts/0000-Basic/0376 @@ -135,7 +135,7 @@ EHLO 250 OK MAIL FROM 250 OK -RCPT TO +RCPT TO: 250 OK -RCPT TO +RCPT TO: 250 OK -RCPT TO +RCPT TO: 250 OK RSET 250 OK -MAIL FROM +MAIL FROM:<> 250 OK -RCPT TO +RCPT TO: 250 OK QUIT 250 OK diff --git a/test/stderr/0227 b/test/stderr/0227 index 7fa279d38..6a8ee1f7e 100644 --- a/test/stderr/0227 +++ b/test/stderr/0227 @@ -31,7 +31,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 250 OK SMTP(close)>> LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Unknown user + H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Unknown user LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed LOG: smtp_connection MAIN @@ -50,7 +50,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 250 OK SMTP(close)>> LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 450 Temporary error LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout LOG: smtp_connection MAIN @@ -67,7 +67,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 250 OK SMTP(close)>> LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 Error for <> + H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 Error for <> LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed LOG: smtp_connection MAIN @@ -85,7 +85,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 250 OK SMTP(close)>> LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550-Multiline error for <>\n550 Here's the second line + H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550-Multiline error for <>\n550 Here's the second line LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed LOG: smtp_connection MAIN @@ -104,7 +104,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 250 OK SMTP(close)>> LOG: MAIN REJECT - H=[V4NET.0.0.3] U=root F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Recipient not liked + H=[V4NET.0.0.3] U=root F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Recipient not liked LOG: smtp_connection MAIN SMTP connection from root closed by QUIT LOG: smtp_connection MAIN @@ -122,7 +122,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 250 OK SMTP(close)>> LOG: MAIN REJECT - H=[V4NET.0.0.3] U=root F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550-Recipient not liked on two lines\n550 Here's the second + H=[V4NET.0.0.3] U=root F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550-Recipient not liked on two lines\n550 Here's the second LOG: smtp_connection MAIN SMTP connection from root closed by QUIT LOG: smtp_connection MAIN @@ -212,7 +212,7 @@ Cutthrough cancelled by presence of postmaster verify SMTP<< 250 OK SMTP(close)>> LOG: MAIN REJECT - H=[V4NET.0.0.5] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Don't like postmaster + H=[V4NET.0.0.5] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Don't like postmaster LOG: MAIN REJECT H=[V4NET.0.0.5] U=root F= rejected RCPT : Sender verify failed LOG: smtp_connection MAIN @@ -225,7 +225,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 250- wotcher 250-SIZE 250 OK - SMTP>> MAIL FROM:<> + SMTP>> MAIL FROM:<> SIZE=ssss SMTP<< 250 OK SMTP>> RCPT TO: SMTP<< 250 OK @@ -248,7 +248,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP<< 250 OK SMTP(close)>> LOG: MAIN REJECT - H=[V4NET.0.0.3] U=root F= rejected RCPT : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Recipient not liked + H=[V4NET.0.0.3] U=root F= rejected RCPT : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Recipient not liked LOG: smtp_connection MAIN SMTP connection from root closed by QUIT LOG: smtp_connection MAIN @@ -256,7 +256,7 @@ LOG: smtp_connection MAIN Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP(close)>> LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] Remote host closed connection in response to initial connection + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Remote host closed connection in response to initial connection LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout LOG: smtp_connection MAIN @@ -265,7 +265,7 @@ LOG: smtp_connection MAIN SMTP connection from root Connecting to 127.0.0.1 [127.0.0.1]:1224 ... failed: Connection refused LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout LOG: smtp_connection MAIN diff --git a/test/stderr/0376 b/test/stderr/0376 index 4ad0556b9..bcddefdfa 100644 --- a/test/stderr/0376 +++ b/test/stderr/0376 @@ -63,7 +63,7 @@ interface=NULL port=1224 Connecting to 127.0.0.1 [127.0.0.1]:1224 ... failed: Connection refused connect: Connection refused LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] could not connect: Connection refused + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused created log directory TESTSUITE/spool/log LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout @@ -99,7 +99,7 @@ wrote callout cache domain record for localhost: result=1 postmaster=0 random=0 wrote negative callout cache address record for bad@localhost LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 REJECTED + H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 REJECTED LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed LOG: smtp_connection MAIN @@ -152,7 +152,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected wrote callout cache domain record for localhost: result=3 postmaster=0 random=0 LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify fail for : response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 REJECT MAIL FROM + H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 REJECT MAIL FROM LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= rejected RCPT : (mail): Sender verify failed LOG: smtp_connection MAIN @@ -214,7 +214,7 @@ wrote callout cache domain record for otherhost: result=1 postmaster=2 random=0 wrote positive callout cache address record for ok@otherhost LOG: MAIN REJECT - H=[V4NET.0.0.2] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NOT OK + H=[V4NET.0.0.2] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NOT OK LOG: MAIN REJECT H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed LOG: smtp_connection MAIN @@ -323,6 +323,10 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP(close)>> wrote callout cache domain record for otherhost3: result=1 postmaster=0 random=1 +LOG: MAIN REJECT + H=[V4NET.0.0.3] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK +LOG: MAIN REJECT + H=[V4NET.0.0.3] U=root F= temporarily rejected RCPT : Could not complete sender verify callout LOG: smtp_connection MAIN SMTP connection from root closed by QUIT >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> @@ -369,6 +373,10 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP(close)>> wrote callout cache domain record for otherhost4: result=1 postmaster=0 random=1 +LOG: MAIN REJECT + H=[V4NET.0.0.4] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK +LOG: MAIN REJECT + H=[V4NET.0.0.4] U=root F= temporarily rejected RCPT : Could not complete sender verify callout LOG: smtp_connection MAIN SMTP connection from root closed by QUIT >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> @@ -653,7 +661,7 @@ SMTP timeout wrote callout cache domain record for otherhost51: result=1 postmaster=0 random=0 LOG: MAIN REJECT - H=[V4NET.0.0.5] U=root sender verify defer for : Could not complete sender verify callout + H=[V4NET.0.0.5] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO: LOG: MAIN REJECT H=[V4NET.0.0.5] U=root F= temporarily rejected RCPT : Could not complete sender verify callout LOG: smtp_connection MAIN diff --git a/test/stderr/0398 b/test/stderr/0398 index cb1d4e58b..b975ad05a 100644 --- a/test/stderr/0398 +++ b/test/stderr/0398 @@ -163,7 +163,7 @@ closed hints database and lockfile l_message: $acl_verify_message warn: condition test succeeded in ACL "rcpt" LOG: MAIN - U=CALLER Warning: Sender verify failed: response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 Unknown + U=CALLER Warning: Sender verify failed: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 Unknown processing "accept" check senders = qq@remote address match test: subject=qq@remote pattern=qq@remote diff --git a/test/stderr/0432 b/test/stderr/0432 index 561e816b2..6ac5a0428 100644 --- a/test/stderr/0432 +++ b/test/stderr/0432 @@ -313,5 +313,5 @@ MUNGED: ::1 will be omitted in what follows >>> SMTP timeout >>> ----------- end verify ------------ >>> accept: condition test deferred in ACL "mail" -LOG: H=[1.2.3.4] sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] SMTP timeout after EHLO myhost.test.ex +LOG: H=[1.2.3.4] sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after EHLO myhost.test.ex LOG: H=[1.2.3.4] temporarily rejected MAIL : Could not complete sender verify callout diff --git a/test/stderr/0462 b/test/stderr/0462 index 3db191cd9..072503e91 100644 --- a/test/stderr/0462 +++ b/test/stderr/0462 @@ -34,7 +34,7 @@ wrote callout cache domain record for localhost: result=1 postmaster=2 random=0 wrote positive callout cache address record for Ok@localhost LOG: MAIN REJECT - H=[V4NET.0.0.1] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO + H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO created log directory TESTSUITE/spool/log LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F= rejected RCPT : Sender verify failed @@ -78,7 +78,7 @@ wrote callout cache domain record for elsewhere: result=1 postmaster=0 random=0 wrote negative callout cache address record for NOTok@elsewhere LOG: MAIN REJECT - H=[V4NET.0.0.2] U=root sender verify fail for : response to "RCPT TO:" from 127.0.0.1 [127.0.0.1] was: 550 NO + H=[V4NET.0.0.2] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NO LOG: MAIN REJECT H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed LOG: smtp_connection MAIN diff --git a/test/stderr/0473 b/test/stderr/0473 index 048762f95..f1b03b8e2 100644 --- a/test/stderr/0473 +++ b/test/stderr/0473 @@ -24,7 +24,7 @@ SMTP timeout wrote callout cache domain record for two.test.ex: result=1 postmaster=0 random=0 LOG: MAIN REJECT - U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout + U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO: LOG: smtp_connection MAIN SMTP connection from CALLER closed by QUIT >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> @@ -46,7 +46,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP(close)>> SMTP timeout LOG: MAIN REJECT - U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] SMTP timeout after initial connection + U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after initial connection LOG: smtp_connection MAIN SMTP connection from CALLER closed by QUIT >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/5410 b/test/stderr/5410 index 2efd8419c..acfc011cc 100644 --- a/test/stderr/5410 +++ b/test/stderr/5410 @@ -120,10 +120,9 @@ using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM: SIZE=ssss -cmd buf flush ddd bytes - SMTP<< 250 OK SMTP>> RCPT TO: cmd buf flush ddd bytes + SMTP<< 250 OK SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ @@ -335,10 +334,9 @@ using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM: SIZE=ssss -cmd buf flush ddd bytes - SMTP<< 250 OK SMTP>> RCPT TO: cmd buf flush ddd bytes + SMTP<< 250 OK SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ @@ -550,10 +548,9 @@ using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM: SIZE=ssss -cmd buf flush ddd bytes - SMTP<< 250 OK SMTP>> RCPT TO: cmd buf flush ddd bytes + SMTP<< 250 OK SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ diff --git a/test/stderr/5420 b/test/stderr/5420 index eb3f1a9d2..ff032e986 100644 --- a/test/stderr/5420 +++ b/test/stderr/5420 @@ -119,10 +119,9 @@ using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM: SIZE=ssss -cmd buf flush ddd bytes - SMTP<< 250 OK SMTP>> RCPT TO: cmd buf flush ddd bytes + SMTP<< 250 OK SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ @@ -334,10 +333,9 @@ using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM: SIZE=ssss -cmd buf flush ddd bytes - SMTP<< 250 OK SMTP>> RCPT TO: cmd buf flush ddd bytes + SMTP<< 250 OK SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ @@ -549,10 +547,9 @@ using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM: SIZE=ssss -cmd buf flush ddd bytes - SMTP<< 250 OK SMTP>> RCPT TO: cmd buf flush ddd bytes + SMTP<< 250 OK SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ diff --git a/test/stderr/5840 b/test/stderr/5840 index b588681d3..e4cf15c51 100644 --- a/test/stderr/5840 +++ b/test/stderr/5840 @@ -54,10 +54,9 @@ MUNGED: ::1 will be omitted in what follows >>> ip4.ip4.ip4.ip4 in hosts_avoid_pipelining? no (option unset) >>> ip4.ip4.ip4.ip4 in hosts_require_auth? no (option unset) >>> SMTP>> MAIL FROM:<> SIZE=ssss ->>> cmd buf flush 24 bytes ->>> SMTP<< 250 OK >>> SMTP>> RCPT TO: ->>> cmd buf flush 38 bytes +>>> cmd buf flush 62 bytes +>>> SMTP<< 250 OK >>> SMTP<< 250 Accepted >>> SMTP>> QUIT >>> cmd buf flush 6 bytes diff --git a/test/stdout/0227 b/test/stdout/0227 index d63f14e90..ea8520ef1 100644 --- a/test/stdout/0227 +++ b/test/stdout/0227 @@ -251,7 +251,7 @@ EHLO myhost.test.ex 250- wotcher 250-SIZE 250 OK -MAIL FROM:<> +MAIL FROM:<> SIZE=ssss 250 OK RCPT TO: 250 OK diff --git a/test/stdout/0365 b/test/stdout/0365 index f05930041..cdceac47e 100644 --- a/test/stdout/0365 +++ b/test/stdout/0365 @@ -40,7 +40,7 @@ 550-Rejected after DATA: could not verify "From:" header address 550 bad@domain: Unrouteable address 250 OK -451-Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] could not connect: Network Error +451-Could not complete sender verify callout: V4NET.0.0.0 [V4NET.0.0.0] : could not connect: Network Error 451-Could not complete sender verify callout for . 451-The mail server(s) for the domain may be temporarily unreachable, or 451-they may be permanently unreachable from this server. In the latter case, diff --git a/test/stdout/0376 b/test/stdout/0376 index a0af2cb92..8c2b9685c 100644 --- a/test/stdout/0376 +++ b/test/stdout/0376 @@ -78,7 +78,7 @@ 221 myhost.test.ex closing connection 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 250 OK -250 Accepted +451 Could not complete sender verify callout 221 myhost.test.ex closing connection 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 250 OK @@ -86,7 +86,7 @@ 221 myhost.test.ex closing connection 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 250 OK -250 Accepted +451 Could not complete sender verify callout 221 myhost.test.ex closing connection 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 250 OK diff --git a/test/stdout/0473 b/test/stdout/0473 index 59ed36d6a..6199bf9bc 100644 --- a/test/stdout/0473 +++ b/test/stdout/0473 @@ -92,6 +92,7 @@ 250 Accepted 221 the.local.host.name closing connection +++++++++++++++++++++++++++ +07-Mar-2000 12:21:52 other.ex callout=accept postmaster=unknown random=unknown 07-Mar-2000 12:21:52 r1@test.ex callout=accept 07-Mar-2000 12:21:52 r1@test.ex/ callout=accept 07-Mar-2000 12:21:52 r1@test.ex/ callout=accept @@ -110,6 +111,7 @@ 250 Accepted 221 the.local.host.name closing connection +++++++++++++++++++++++++++ +07-Mar-2000 12:21:52 other.ex callout=accept postmaster=unknown random=unknown 07-Mar-2000 12:21:52 r12@three.test.ex callout=accept 07-Mar-2000 12:21:52 r1@test.ex callout=accept 07-Mar-2000 12:21:52 r1@test.ex/ callout=accept @@ -251,7 +253,7 @@ EHLO the.local.host.name 250 OK MAIL FROM:<> 250 OK -RCPT TO: +RCPT TO: 250 OK QUIT 250 OK -- cgit v1.2.3 From 902fbd6974bac4abf70a4c567534669a86ff763e Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 14 Jan 2017 17:34:57 +0000 Subject: Testcases for pipelined callout --- doc/doc-txt/ChangeLog | 4 + src/src/verify.c | 37 +- test/confs/0578 | 1 + test/log/0578 | 22 ++ test/rejectlog/0578 | 20 + test/scripts/0000-Basic/0578 | 483 +++++++++++++++++++++++ test/stderr/0578 | 896 +++++++++++++++++++++++++++++++++++++++++++ test/stdout/0578 | 482 +++++++++++++++++++++++ 8 files changed, 1928 insertions(+), 17 deletions(-) create mode 120000 test/confs/0578 create mode 100644 test/log/0578 create mode 100644 test/rejectlog/0578 create mode 100644 test/scripts/0000-Basic/0578 create mode 100644 test/stderr/0578 create mode 100644 test/stdout/0578 (limited to 'test') diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index f501eb433..50309b1f1 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -32,6 +32,10 @@ JH/05 Bug 2017: Fix DKIM verification in -bh test mode. The data feed into the dkim code may be unix-mode line endings rather than smtp wire-format CRLF, so prepend a CR to any bare LF. +JH/06 Rationalise the coding for callout smtp conversations and transport ones. + As a side-benfit, callouts can now use PIPELINING hence fewer round-trips. + + Exim version 4.88 ----------------- diff --git a/src/src/verify.c b/src/src/verify.c index f263060be..6fef314fc 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -761,6 +761,23 @@ tls_retry_connection: addr->address = string_sprintf("%s@%.1000s", random_local_part, rcpt_domain); done = FALSE; + + /* If accepted, we aren't going to do any further tests below. + Otherwise, cache a real negative response, and get back to the right + state to send RCPT. Unless there's some problem such as a dropped + connection, we expect to succeed, because the commands succeeded above. + However, some servers drop the connection after responding to an + invalid recipient, so on (any) error we drop and remake the connection. + XXX We don't care about that for postmaster_full. Should we? + + XXX could we add another flag to the context, and have the common + code emit the RSET too? Even pipelined after the RCPT... + Then the main-verify call could use it if there's to be a subsequent + postmaster-verify. + The sync_responses() would need to be taught about it and we'd + need another return code filtering out to here. + */ + if (smtp_write_mail_and_rcpt_cmds(&sx, &yield) == 0) switch(addr->transport_return) { @@ -771,7 +788,8 @@ tls_retry_connection: new_domain_record.random_result = ccache_reject; /* Between each check, issue RSET, because some servers accept only - one recipient after MAIL FROM:<>. */ + one recipient after MAIL FROM:<>. + XXX We don't care about that for postmaster_full. Should we? */ if ((done = smtp_write_command(&sx.outblock, FALSE, "RSET\r\n") >= 0 && @@ -795,22 +813,7 @@ tls_retry_connection: goto tls_retry_connection; } - /* If accepted, we aren't going to do any further tests below. - Otherwise, cache a real negative response, and get back to the right - state to send RCPT. Unless there's some problem such as a dropped - connection, we expect to succeed, because the commands succeeded above. - However, some servers drop the connection after responding to an - invalid recipient, so on (any) error we drop and remake the connection. - - XXX could we add another flag to the context, and have the common - code emit the RSET too? Even pipelined after the RCPT... - Then the main-verify call could use it if there's to be a subsequent - postmaster-verify. - The sync_responses() would need to be taught about it and we'd - need another return code filtering out to here. - - Remember when we last did a random test - */ + /* Remember when we last did a random test */ new_domain_record.random_stamp = time(NULL); diff --git a/test/confs/0578 b/test/confs/0578 new file mode 120000 index 000000000..84e7471cf --- /dev/null +++ b/test/confs/0578 @@ -0,0 +1 @@ +0376 \ No newline at end of file diff --git a/test/log/0578 b/test/log/0578 new file mode 100644 index 000000000..7c38e638c --- /dev/null +++ b/test/log/0578 @@ -0,0 +1,22 @@ +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 REJECTED rcpt +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 REJECT mail from +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (mail): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (mail): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NOT OK rcpt postmaster +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK accepting that random recipient +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO: +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +1999-03-02 09:44:33 10HmaX-0005vi-00 <= ok7@otherhost53 H=[V4NET.0.0.7] U=root P=smtp S=sss +1999-03-02 09:44:33 10HmaY-0005vi-00 <= ok7@otherhost53 H=[V4NET.0.0.8] U=root P=smtp S=sss diff --git a/test/rejectlog/0578 b/test/rejectlog/0578 new file mode 100644 index 000000000..db94a4d6e --- /dev/null +++ b/test/rejectlog/0578 @@ -0,0 +1,20 @@ +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 REJECTED rcpt +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 REJECT mail from +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (mail): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F= rejected RCPT : (mail): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NOT OK rcpt postmaster +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK accepting that random recipient +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO: +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F= temporarily rejected RCPT : Could not complete sender verify callout diff --git a/test/scripts/0000-Basic/0578 b/test/scripts/0000-Basic/0578 new file mode 100644 index 000000000..4267b0cea --- /dev/null +++ b/test/scripts/0000-Basic/0578 @@ -0,0 +1,483 @@ +# callout verification pipelining +need_ipv4 +# +# basic sender verify +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO +250 OK mail sender +250 OK recipient +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.1 +MAIL FROM: +RCPT TO: +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.1 +MAIL FROM: +RCPT TO: +QUIT +**** +# Wait for the record to time out and try again +sleep 2 +# Should want to connect, but fail +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.1 +MAIL FROM: +RCPT TO: +QUIT +**** +# Test unsuccessful caching +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO +250 OK sender +550 REJECTED rcpt +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.1 +MAIL FROM: +RCPT TO: +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.1 +MAIL FROM: +RCPT TO: +QUIT +**** +# Test caching of rejection of MAIL FROM:<> +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO +550 REJECT mail from +530 BAD SEQUENCE no sender accepted for rcpt +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.1 +MAIL FROM: +RCPT TO: +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.1 +MAIL FROM: +RCPT TO: +QUIT +**** +# Test caching of rejection of postmaster +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO +250 OK sender +250 OK rcpt +RSET +250 OK reset +MAIL FROM:<> +RCPT TO: +250 OK sender +550 NOT OK rcpt postmaster +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.2 +MAIL FROM: +RCPT TO: +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.2 +MAIL FROM: +RCPT TO: +QUIT +**** +# Test caching of accepting of postmaster +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO +250 OK +250 OK +RSET +250 OK +MAIL FROM +RCPT TO: +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.2 +MAIL FROM: +RCPT TO: +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.2 +MAIL FROM: +RCPT TO: +QUIT +**** +# Test caching of accepting a random address +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO: +RCPT TO: +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.3 +MAIL FROM: +RCPT TO: +QUIT +**** +# Test caching of accepting a random address and postmaster +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO: +RCPT TO: +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.4 +MAIL FROM: +RCPT TO: +QUIT +**** +# Test caching of rejecting a random address and postmaster +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +RCPT TO: +250 OK +250 OK +RSET +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.4 +MAIL FROM: +RCPT TO: +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.4 +MAIL FROM: +RCPT TO: +QUIT +**** +# Test caching of accepting of postmaster when another +# address has to be tested +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO +250 OK +250 OK +RSET +250 OK +MAIL FROM +RCPT TO +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.2 +MAIL FROM: +RCPT TO: +QUIT +**** +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.2 +MAIL FROM: +RCPT TO: +QUIT +**** +# Test caching of rejecting a random address +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO +250 OK +550 NOT OK +RSET +250 OK +MAIL FROM +RCPT TO +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.3 +MAIL FROM: +RCPT TO: +QUIT +**** +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO: +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.3 +MAIL FROM: +RCPT TO: +QUIT +**** +# Wait a bit for the record to expire and then try again +sleep 2 +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +RCPT TO: +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -DPEX=1s -d-all+verify -v -bs -oMa V4NET.0.0.3 +MAIL FROM: +RCPT TO: +QUIT +**** +# Timeout on the RCPT for random +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO +250 OK +*sleep 2 +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.5 +MAIL FROM: +RCPT TO: +QUIT +**** +# Postmaster_sender set non-empty +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO +250 OK +250 OK +RSET +250 OK +MAIL FROM: +RCPT TO: +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.6 +MAIL FROM: +RCPT TO: +QUIT +**** +# Header_sender sender set non-empty +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM: +RCPT TO: +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -odq -v -bs -oMa V4NET.0.0.7 +MAIL FROM: +RCPT TO: +DATA +Reply-To: abcd@x.y.z +. +QUIT +**** +# Timeout on RCPT for header_sender (defer_ok test) +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO +250 OK +*sleep 2 +**** +sudo exim -d-all+verify -odq -v -bs -oMa V4NET.0.0.8 +MAIL FROM: +RCPT TO: +DATA +Reply-To: abcd@x.y.z +. +QUIT +**** +# Test full postmaster check +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO +250 OK +250 OK +RSET +250 OK +MAIL FROM +RCPT TO: +250 OK +550 NOT OK +RCPT TO: +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.9 +MAIL FROM: +RCPT TO: +QUIT +**** +# Test postmaster_mailfrom with random +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO +250 OK +550 RANDOM IS BAD +RSET +250 OK +MAIL FROM +RCPT TO +250 OK +250 OK +RSET +250 OK +MAIL FROM: +RCPT TO: +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.10 +MAIL FROM: +RCPT TO: +QUIT +**** +no_msglog_check diff --git a/test/stderr/0578 b/test/stderr/0578 new file mode 100644 index 000000000..74581fd9c --- /dev/null +++ b/test/stderr/0578 @@ -0,0 +1,896 @@ +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@localhost +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@localhost +Attempting full verification using callout +callout cache: no domain record found for localhost +callout cache: no address record found for ok@localhost +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK mail sender + SMTP<< 250 OK recipient + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for localhost: + result=1 postmaster=0 random=0 +wrote positive callout cache address record for ok@localhost +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@localhost +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@localhost +Attempting full verification using callout +callout cache: found domain record for localhost +callout cache: found address record for ok@localhost +callout cache: address record is positive +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@localhost +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@localhost +Attempting full verification using callout +callout cache: found domain record for localhost +callout cache: address record expired for ok@localhost +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... failed: Connection refused +connect: Connection refused +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : could not connect: Connection refused +created log directory TESTSUITE/spool/log +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying bad@localhost +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering bad@localhost +Attempting full verification using callout +callout cache: found domain record for localhost +callout cache: no address record found for bad@localhost +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK sender + SMTP<< 550 REJECTED rcpt + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for localhost: + result=1 postmaster=0 random=0 +wrote negative callout cache address record for bad@localhost +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 REJECTED rcpt +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying bad@localhost +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering bad@localhost +Attempting full verification using callout +callout cache: found domain record for localhost +callout cache: found address record for bad@localhost +callout cache: address record is negative +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root sender verify fail for +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root F= rejected RCPT : (recipient): Sender verify failed +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@localhost +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@localhost +Attempting full verification using callout +callout cache: found domain record for localhost +callout cache: address record expired for ok@localhost +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 550 REJECT mail from + SMTP<< 530 BAD SEQUENCE no sender accepted for rcpt + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for localhost: + result=3 postmaster=0 random=0 +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<>" was: 550 REJECT mail from +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root F= rejected RCPT : (mail): Sender verify failed +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@localhost +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@localhost +Attempting full verification using callout +callout cache: found domain record for localhost +callout cache: domain gave initial rejection, or does not accept HELO or MAIL FROM:<> +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root sender verify fail for +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root F= rejected RCPT : (mail): Sender verify failed +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost +Attempting full verification using callout +callout cache: no domain record found for otherhost +callout cache: no address record found for ok@otherhost +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK sender + SMTP<< 250 OK rcpt +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK reset + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK sender + SMTP<< 550 NOT OK rcpt postmaster + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost: + result=1 postmaster=2 random=0 +wrote positive callout cache address record for ok@otherhost +LOG: MAIN REJECT + H=[V4NET.0.0.2] U=root sender verify fail for : 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 550 NOT OK rcpt postmaster +LOG: MAIN REJECT + H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost +Attempting full verification using callout +callout cache: found domain record for otherhost +callout cache: domain does not accept RCPT TO: +LOG: MAIN REJECT + H=[V4NET.0.0.2] U=root sender verify fail for +LOG: MAIN REJECT + H=[V4NET.0.0.2] U=root F= rejected RCPT : Sender verify failed +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost2 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost2 +Attempting full verification using callout +callout cache: no domain record found for otherhost2 +callout cache: no address record found for ok@otherhost2 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost2: + result=1 postmaster=1 random=0 +wrote positive callout cache address record for ok@otherhost2 +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost2 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost2 +Attempting full verification using callout +callout cache: found domain record for otherhost2 +callout cache: domain accepts RCPT TO: +callout cache: found address record for ok@otherhost2 +callout cache: address record is positive +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost3 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost3 +Attempting full verification using callout +callout cache: no domain record found for otherhost3 +callout cache: no address record found for ok@otherhost3 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK accepting that random recipient + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost3: + result=1 postmaster=0 random=1 +LOG: MAIN REJECT + H=[V4NET.0.0.3] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK accepting that random recipient +LOG: MAIN REJECT + H=[V4NET.0.0.3] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying otherok@otherhost3 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering otherok@otherhost3 +Attempting full verification using callout +callout cache: found domain record for otherhost3 +callout cache: domain accepts random addresses +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost4 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost4 +Attempting full verification using callout +callout cache: no domain record found for otherhost4 +callout cache: no address record found for ok@otherhost4 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost4: + result=1 postmaster=0 random=1 +LOG: MAIN REJECT + H=[V4NET.0.0.4] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:" was: 250 OK +LOG: MAIN REJECT + H=[V4NET.0.0.4] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost4 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost4 +Attempting full verification using callout +callout cache: found domain record for otherhost4 +callout cache: domain accepts random addresses +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost41 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost41 +Attempting full verification using callout +callout cache: no domain record found for otherhost41 +callout cache: no address record found for ok@otherhost41 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 550 NOT OK + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost41: + result=1 postmaster=1 random=2 +wrote positive callout cache address record for ok@otherhost41 +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost41 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost41 +Attempting full verification using callout +callout cache: found domain record for otherhost41 +callout cache: domain rejects random addresses +callout cache: domain accepts RCPT TO: +callout cache: found address record for ok@otherhost41 +callout cache: address record is positive +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost21 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost21 +Attempting full verification using callout +callout cache: no domain record found for otherhost21 +callout cache: no address record found for ok@otherhost21 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost21: + result=1 postmaster=1 random=0 +wrote positive callout cache address record for ok@otherhost21 +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok2@otherhost21 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok2@otherhost21 +Attempting full verification using callout +callout cache: found domain record for otherhost21 +callout cache: domain accepts RCPT TO: +callout cache: no address record found for ok2@otherhost21 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost21: + result=1 postmaster=1 random=0 +wrote positive callout cache address record for ok2@otherhost21 +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost31 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost31 +Attempting full verification using callout +callout cache: no domain record found for otherhost31 +callout cache: no address record found for ok@otherhost31 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 550 NOT OK + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost31: + result=1 postmaster=0 random=2 +wrote positive callout cache address record for ok@otherhost31 +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying okok@otherhost31 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering okok@otherhost31 +Attempting full verification using callout +callout cache: found domain record for otherhost31 +callout cache: domain rejects random addresses +callout cache: no address record found for okok@otherhost31 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost31: + result=1 postmaster=0 random=2 +wrote positive callout cache address record for okok@otherhost31 +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying okokok@otherhost31 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering okokok@otherhost31 +Attempting full verification using callout +callout cache: domain record expired for otherhost31 +callout cache: no address record found for okokok@otherhost31 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 550 NOT OK + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost31: + result=1 postmaster=0 random=2 +wrote positive callout cache address record for okokok@otherhost31 +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying okok@otherhost51 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering okok@otherhost51 +Attempting full verification using callout +callout cache: no domain record found for otherhost51 +callout cache: no address record found for okok@otherhost51 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK +SMTP timeout + SMTP(close)>> +wrote callout cache domain record for otherhost51: + result=1 postmaster=0 random=0 +LOG: MAIN REJECT + H=[V4NET.0.0.5] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO: +LOG: MAIN REJECT + H=[V4NET.0.0.5] U=root F= temporarily rejected RCPT : Could not complete sender verify callout +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying okokok@otherhost52 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering okokok@otherhost52 +Attempting full verification using callout +callout cache: no domain record found for otherhost52 +callout cache: no address record found for okokok@otherhost52 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM: + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost52: + result=1 postmaster=1 random=0 +wrote positive callout cache address record for okokok@otherhost52 +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +verifying Reply-To: header address abcd@x.y.z +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying abcd@x.y.z +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering abcd@x.y.z +Attempting full verification using callout +callout cache: no domain record found for x.y.z +callout cache: no address record found for abcd@x.y.z/ +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM: + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for x.y.z: + result=1 postmaster=0 random=0 +wrote positive callout cache address record for abcd@x.y.z/ +LOG: MAIN + <= ok7@otherhost53 H=[V4NET.0.0.7] U=root P=smtp S=sss +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +verifying Reply-To: header address abcd@x.y.z +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying abcd@x.y.z +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering abcd@x.y.z +Attempting full verification using callout +callout cache: found domain record for x.y.z +callout cache: no address record found for abcd@x.y.z +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK +SMTP timeout + SMTP(close)>> +wrote callout cache domain record for x.y.z: + result=1 postmaster=0 random=0 +LOG: MAIN + <= ok7@otherhost53 H=[V4NET.0.0.8] U=root P=smtp S=sss +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying ok@otherhost9 +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering ok@otherhost9 +Attempting full verification using callout +callout cache: no domain record found for otherhost9 +callout cache: no address record found for ok@otherhost9 +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 550 NOT OK + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for otherhost9: + result=1 postmaster=1 random=0 +wrote positive callout cache address record for ok@otherhost9 +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +LOG: smtp_connection MAIN + SMTP connection from root +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Verifying z@test.ex +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Considering z@test.ex +Attempting full verification using callout +callout cache: no domain record found for test.ex +callout cache: no address record found for z@test.ex/ +interface=NULL port=1224 +Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected + SMTP<< 220 Server ready + SMTP>> EHLO myhost.test.ex + SMTP<< 250-Yeah mate + 250-PIPELINING + 250 OK + SMTP>> MAIL FROM: + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 550 RANDOM IS BAD + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM: + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM: + SMTP>> RCPT TO: + SMTP<< 250 OK + SMTP<< 250 OK + SMTP>> QUIT + SMTP<< 250 OK + SMTP(close)>> +wrote callout cache domain record for test.ex: + result=1 postmaster=1 random=2 +wrote positive callout cache address record for z@test.ex/ +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stdout/0578 b/test/stdout/0578 new file mode 100644 index 000000000..40b265041 --- /dev/null +++ b/test/stdout/0578 @@ -0,0 +1,482 @@ +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +451 Could not complete sender verify callout +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +550-Verification failed for +550-Called: 127.0.0.1 +550-Sent: RCPT TO: +550-Response: 550 REJECTED rcpt +550 Sender verify failed +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +550-Verification failed for +550-Previous (cached) callout verification failure +550 Sender verify failed +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +550-Callback setup failed while verifying +550-Called: 127.0.0.1 +550-Sent: MAIL FROM:<> +550-Response: 550 REJECT mail from +550-The initial connection, or a HELO or MAIL FROM:<> command was +550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards +550-RFC requirements, and stops you from receiving standard bounce +550-messages. This host does not accept mail from domains whose servers +550-refuse bounces. +550 Sender verify failed +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +550-Callback setup failed while verifying +550-(result of an earlier callout reused). +550-The initial connection, or a HELO or MAIL FROM:<> command was +550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards +550-RFC requirements, and stops you from receiving standard bounce +550-messages. This host does not accept mail from domains whose servers +550-refuse bounces. +550 Sender verify failed +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +550-Postmaster verification failed while checking +550-Called: 127.0.0.1 +550-Sent: RCPT TO: +550-Response: 550 NOT OK rcpt postmaster +550-Several RFCs state that you are required to have a postmaster +550-mailbox for each mail domain. This host does not accept mail +550-from domains whose servers reject the postmaster address. +550 Sender verify failed +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +550-Postmaster verification failed while checking +550-(result of earlier verification reused). +550-Several RFCs state that you are required to have a postmaster +550-mailbox for each mail domain. This host does not accept mail +550-from domains whose servers reject the postmaster address. +550 Sender verify failed +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +451 Could not complete sender verify callout +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +451 Could not complete sender verify callout +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +451 Could not complete sender verify callout +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +354 Enter message, ending with "." on a line by itself +250 OK id=10HmaX-0005vi-00 +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +354 Enter message, ending with "." on a line by itself +250 OK id=10HmaY-0005vi-00 +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +221 myhost.test.ex closing connection + +******** SERVER ******** +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK mail sender +250 OK recipient +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK sender +550 REJECTED rcpt +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +550 REJECT mail from +530 BAD SEQUENCE no sender accepted for rcpt +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK sender +250 OK rcpt +RSET +250 OK reset +MAIL FROM:<> +RCPT TO: +250 OK sender +550 NOT OK rcpt postmaster +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +RSET +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK accepting that random recipient +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +550 NOT OK +RSET +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +RSET +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +RSET +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +550 NOT OK +RSET +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +550 NOT OK +RSET +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +*sleep 2 +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +RSET +250 OK +MAIL FROM: +RCPT TO: +250 OK +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM: +RCPT TO: +250 OK +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +*sleep 2 +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +250 OK +RSET +250 OK +MAIL FROM:<> +RCPT TO: +250 OK +550 NOT OK +RCPT TO: +250 OK +QUIT +250 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO myhost.test.ex +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM: +RCPT TO: +250 OK +550 RANDOM IS BAD +RSET +250 OK +MAIL FROM: +RCPT TO: +250 OK +250 OK +RSET +250 OK +MAIL FROM: +RCPT TO: +250 OK +250 OK +QUIT +250 OK +End of script -- cgit v1.2.3