diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2017-01-21 22:30:00 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2017-01-21 22:30:00 +0000 |
commit | adc426215052297d694fcc08786e87a140171e76 (patch) | |
tree | 30d6ca95f657e1139bac6e35e1d320a69b13709b | |
parent | b895f4b20b25f81cd6f94be75881d3328df03892 (diff) | |
parent | 902fbd6974bac4abf70a4c567534669a86ff763e (diff) |
Merge branch 'callout_smtp_tpt_merge'
73 files changed, 3717 insertions, 1927 deletions
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/OS/Makefile-Base b/src/OS/Makefile-Base index da5778d12..7ba7b0474 100644 --- a/src/OS/Makefile-Base +++ b/src/OS/Makefile-Base @@ -645,7 +645,7 @@ tls.o: $(HDRS) tls.c \ tod.o: $(HDRS) tod.c transport.o: $(HDRS) transport.c tree.o: $(HDRS) tree.c -verify.o: $(HDRS) verify.c +verify.o: $(HDRS) transports/smtp.h verify.c dkim.o: $(HDRS) pdkim/pdkim.h dkim.c # Dependencies for WITH_CONTENT_SCAN modules diff --git a/src/src/dns.c b/src/src/dns.c index bc9d89502..815a978e9 100644 --- a/src/src/dns.c +++ b/src/src/dns.c @@ -349,8 +349,8 @@ trace = trace; if (reset != RESET_NEXT) { - TRACE debug_printf("%s: reset\n", __FUNCTION__); dnss->rrcount = ntohs(h->qdcount); + TRACE debug_printf("%s: reset (Q rrcount %d)\n", __FUNCTION__, dnss->rrcount); dnss->aptr = dnsa->answer + sizeof(HEADER); /* Skip over questions; failure to expand the name just gives up */ @@ -369,6 +369,7 @@ if (reset != RESET_NEXT) /* Get the number of answer records. */ dnss->rrcount = ntohs(h->ancount); + TRACE debug_printf("%s: reset (A rrcount %d)\n", __FUNCTION__, dnss->rrcount); /* Skip over answers if we want to look at the authority section. Also skip the NS records (i.e. authority section) if wanting to look at the additional @@ -378,6 +379,7 @@ if (reset != RESET_NEXT) { TRACE debug_printf("%s: additional\n", __FUNCTION__); dnss->rrcount += ntohs(h->nscount); + TRACE debug_printf("%s: reset (NS rrcount %d)\n", __FUNCTION__, dnss->rrcount); } if (reset == RESET_AUTHORITY || reset == RESET_ADDITIONAL) @@ -400,6 +402,8 @@ if (reset != RESET_NEXT) } dnss->rrcount = reset == RESET_AUTHORITY ? ntohs(h->nscount) : ntohs(h->arcount); + TRACE debug_printf("%s: reset (%s rrcount %d)\n", __FUNCTION__, + reset == RESET_AUTHORITY ? "NS" : "AR", dnss->rrcount); } TRACE debug_printf("%s: %d RRs to read\n", __FUNCTION__, dnss->rrcount); } @@ -443,8 +447,8 @@ for convenience so that the scans can use nice-looking for loops. */ return &dnss->srr; null_return: - TRACE debug_printf("%s: terminate (%d RRs left). Last op: %s\n", - __FUNCTION__, dnss->rrcount, trace); + TRACE debug_printf("%s: terminate (%d RRs left). Last op: %s; errno %d %s\n", + __FUNCTION__, dnss->rrcount, trace, errno, strerror(errno)); dnss->rrcount = 0; return NULL; } @@ -727,7 +731,7 @@ if (check_dns_names_pattern[0] != 0 && type != T_PTR && type != T_TXT) } if (pcre_exec(regex_check_dns_names, NULL, CCS checkname, Ustrlen(checkname), - 0, PCRE_EOPT, ovector, sizeof(ovector)/sizeof(int)) < 0) + 0, PCRE_EOPT, ovector, nelem(ovector)) < 0) { DEBUG(D_dns) debug_printf("DNS name syntax check failed: %s (%s)\n", name, @@ -756,14 +760,14 @@ if ((type == T_A || type == T_AAAA) && string_is_ip_address(name, NULL) != 0) domains, and interfaces to a fake nameserver for certain special zones. */ dnsa->answerlen = running_in_test_harness - ? fakens_search(name, type, dnsa->answer, MAXPACKET) - : res_search(CCS name, C_IN, type, dnsa->answer, MAXPACKET); + ? fakens_search(name, type, dnsa->answer, sizeof(dnsa->answer)) + : res_search(CCS name, C_IN, type, dnsa->answer, sizeof(dnsa->answer)); -if (dnsa->answerlen > MAXPACKET) +if (dnsa->answerlen > (int) sizeof(dnsa->answer)) { DEBUG(D_dns) debug_printf("DNS lookup of %s (%s) resulted in overlong packet (size %d), truncating to %d.\n", - name, dns_text_type(type), dnsa->answerlen, MAXPACKET); - dnsa->answerlen = MAXPACKET; + name, dns_text_type(type), dnsa->answerlen, sizeof(dnsa->answer)); + dnsa->answerlen = sizeof(dnsa->answer); } if (dnsa->answerlen < 0) switch (h_errno) 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/lookups/dnsdb.c b/src/src/lookups/dnsdb.c index d2ae0aefc..c4b5b53ec 100644 --- a/src/src/lookups/dnsdb.c +++ b/src/src/lookups/dnsdb.c @@ -261,17 +261,15 @@ if ((equals = Ustrchr(keystring, '=')) != NULL) while (tend > keystring && isspace(tend[-1])) tend--; len = tend - keystring; - for (i = 0; i < sizeof(type_names)/sizeof(uschar *); i++) - { + for (i = 0; i < nelem(type_names); i++) if (len == Ustrlen(type_names[i]) && strncmpic(keystring, US type_names[i], len) == 0) { type = type_values[i]; break; } - } - if (i >= sizeof(type_names)/sizeof(uschar *)) + if (i >= nelem(type_names)) { *errmsg = US"unsupported DNS record type"; return DEFER; 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/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 870827170..95bee582d 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); @@ -519,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 string_sprintf("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; @@ -610,7 +581,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); @@ -744,21 +715,11 @@ subsequent general error, it will get reset accordingly. If not, it will get converted to OK at the end. Arguments: - addrlist the complete address list - include_affixes TRUE if affixes include in RCPT - sync_addr ptr to the ptr of the one to start scanning at (updated) - host the host we are connected to + sx smtp connection context count the number of responses to read - address_retry_ - include_sender true if 4xx retry is to include the sender it its key - pending_MAIL true if the first response is for MAIL pending_DATA 0 if last command sent was not DATA +1 if previously had a good recipient -1 if not previously had a good recipient - inblock incoming SMTP block - timeout timeout value - buffer buffer for reading response - buffsize size of buffer Returns: 3 if at least one address had 2xx and one had 5xx 2 if at least one address had 5xx but none had 2xx @@ -770,39 +731,38 @@ Returns: 3 if at least one address had 2xx and one had 5xx */ static int -sync_responses(address_item *addrlist, BOOL include_affixes, - address_item **sync_addr, host_item *host, int count, - BOOL address_retry_include_sender, BOOL pending_MAIL, - int pending_DATA, smtp_inblock *inblock, int timeout, uschar *buffer, - int buffsize) +sync_responses(smtp_context * sx, int count, int pending_DATA) { -address_item *addr = *sync_addr; +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 command in big_buffer for error message use, and flush any further pending responses before returning, except after I/O errors and timeouts. */ -if (pending_MAIL) +if (sx->pending_MAIL) { count--; - if (!smtp_read_response(inblock, buffer, buffsize, '2', 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! */ - if (errno == 0 && buffer[0] != 0) + if (errno == 0 && sx->buffer[0] != 0) { uschar flushbuffer[4096]; int save_errno = 0; - if (buffer[0] == '4') + if (sx->buffer[0] == '4') { save_errno = ERRNO_MAIL4XX; - addr->more_errno |= ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; + addr->more_errno |= ((sx->buffer[1] - '0')*10 + sx->buffer[2] - '0') << 8; } while (count-- > 0) { - if (!smtp_read_response(inblock, flushbuffer, sizeof(flushbuffer), - '2', timeout) + if (!smtp_read_response(&sx->inblock, flushbuffer, sizeof(flushbuffer), + '2', ob->command_timeout) && (errno != 0 || flushbuffer[0] == 0)) break; } @@ -813,7 +773,7 @@ if (pending_MAIL) while (count-- > 0) /* Mark any pending addrs with the host used */ { while (addr->transport_return != PENDING_DEFER) addr = addr->next; - addr->host_used = host; + addr->host_used = sx->host; addr = addr->next; } return -3; @@ -831,9 +791,10 @@ while (count-- > 0) while (addr->transport_return != PENDING_DEFER) addr = addr->next; /* The address was accepted */ - addr->host_used = host; + addr->host_used = sx->host; - if (smtp_read_response(inblock, buffer, buffsize, '2', timeout)) + if (smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), + '2', ob->command_timeout)) { yield |= 1; addr->transport_return = PENDING_OK; @@ -856,8 +817,8 @@ while (count-- > 0) else if (errno == ETIMEDOUT) { uschar *message = string_sprintf("SMTP timeout after RCPT TO:<%s>", - transport_rcpt_address(addr, include_affixes)); - set_errno_nohost(addrlist, ETIMEDOUT, message, DEFER, FALSE); + 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; return -1; @@ -868,10 +829,10 @@ while (count-- > 0) big_buffer for which we are checking the response, so the error message makes sense. */ - else if (errno != 0 || buffer[0] == 0) + else if (errno != 0 || sx->buffer[0] == 0) { string_format(big_buffer, big_buffer_size, "RCPT TO:<%s>", - transport_rcpt_address(addr, include_affixes)); + transport_rcpt_address(addr, sx->tblock->rcpt_include_affixes)); return -2; } @@ -881,14 +842,15 @@ while (count-- > 0) { addr->message = string_sprintf("SMTP error from remote mail server after RCPT TO:<%s>: " - "%s", transport_rcpt_address(addr, include_affixes), - string_printing(buffer)); + "%s", transport_rcpt_address(addr, sx->tblock->rcpt_include_affixes), + string_printing(sx->buffer)); setflag(addr, af_pass_message); - msglog_line(host, addr->message); + if (!sx->verify) + msglog_line(sx->host, addr->message); /* The response was 5xx */ - if (buffer[0] == '5') + if (sx->buffer[0] == '5') { addr->transport_return = FAIL; yield |= 2; @@ -900,40 +862,42 @@ while (count-- > 0) { addr->transport_return = DEFER; addr->basic_errno = ERRNO_RCPT4XX; - addr->more_errno |= ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; + 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 (host->next) - log_write(0, LOG_MAIN, "H=%s [%s]: %s", host->name, 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 (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 */ @@ -941,27 +905,28 @@ 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) *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(inblock, buffer, buffsize, '3', timeout)) + !smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), + '3', ob->command_timeout)) { int code; uschar *msg; BOOL pass_message; if (pending_DATA > 0 || (yield & 1) != 0) { - if (errno == 0 && buffer[0] == '4') + if (errno == 0 && sx->buffer[0] == '4') { errno = ERRNO_DATA4XX; - addrlist->more_errno |= ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; + sx->first_addr->more_errno |= ((sx->buffer[1] - '0')*10 + sx->buffer[2] - '0') << 8; } return -3; } - (void)check_response(host, &errno, 0, buffer, &code, &msg, &pass_message); + (void)check_response(sx->host, &errno, 0, sx->buffer, &code, &msg, &pass_message); DEBUG(D_transport) debug_printf("%s\nerror for DATA ignored: pipelining " "is in use and there were no good recipients\n", msg); } @@ -1247,9 +1212,10 @@ typedef struct smtp_compare_s struct transport_instance *tblock; } smtp_compare_t; -/* -Create a unique string that identifies this message, it is based on -sender_address, helo_data and tls_certificate if enabled. */ + +/* Create a unique string that identifies this message, it is based on +sender_address, helo_data and tls_certificate if enabled. +*/ static uschar * smtp_local_identity(uschar * sender, struct transport_instance * tblock) @@ -1318,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) @@ -1383,16 +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; - /* 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; @@ -1400,13 +1367,13 @@ 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) @@ -1414,202 +1381,129 @@ if (flags & tc_reap_prev && prev_cmd_count > 0) DEBUG(D_transport) debug_printf("look for %d responses" " for previous pipelined cmds\n", prev_cmd_count); - switch(sync_responses(tctx->first_addr, tctx->tblock->rcpt_include_affixes, - tctx->sync_addr, tctx->host, prev_cmd_count, - ob->address_retry_include_sender, - tctx->pending_MAIL, 0, - tctx->inblock, - ob->command_timeout, - buffer, DELIVER_BUFFER_SIZE)) + 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 */ } 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, buffer, DELIVER_BUFFER_SIZE, '2', + if (!smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), '2', ob->command_timeout)) { - if (errno == 0 && buffer[0] == '4') + if (errno == 0 && sx->buffer[0] == '4') { errno = ERRNO_DATA4XX; /*XXX does this actually get used? */ - tctx->first_addr->more_errno |= - ((buffer[1] - '0')*10 + 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; } /************************************************* -* Deliver address list to given host * +* Make connection for given message * *************************************************/ -/* If continue_hostname is not null, we get here only when continuing to -deliver down an existing channel. The channel was passed as the standard -input. TLS is never active on a passed channel; the previous process always -closes it down before passing the connection on. - -Otherwise, we have to make a connection to the remote host, and do the -initial protocol exchange. - -When running as an MUA wrapper, if the sender or any recipient is rejected, -temporarily or permanently, we force failure for all recipients. - +/* Arguments: - addrlist chain of potential addresses to deliver; only those whose - transport_return field is set to PENDING_DEFER are currently - being processed; others should be skipped - they have either - been delivered to an earlier host or IP address, or been - failed by one of them. - host host to deliver to - host_af AF_INET or AF_INET6 - port default TCP/IP port to use, in host byte order - interface interface to bind to, or NULL - tblock transport instance block - message_defer 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. + ctx connection context suppress_tls if TRUE, don't attempt a TLS connection - this is set for a second attempt after TLS initialization fails Returns: OK - the connection was made and the delivery attempted; - the result for each address is in its data block. + fd is set in the conn context, tls_out set up. DEFER - the connection could not be made, or something failed while setting up the SMTP session, or there was a non-message-specific error, such as a timeout. - ERROR - a filter command is specified for this transport, - and there was a problem setting it up; OR helo_data - or add_headers or authenticated_sender is specified - for this transport, and the string failed to expand + ERROR - helo_data or add_headers or authenticated_sender is + specified for this transport, and the string failed + to expand */ - -static int -smtp_deliver(address_item *addrlist, host_item *host, int host_af, int port, - uschar *interface, transport_instance *tblock, - BOOL *message_defer, BOOL suppress_tls) +int +smtp_setup_conn(smtp_context * sx, BOOL suppress_tls) { -address_item *addr; -address_item *sync_addr; -address_item *first_addr = addrlist; -int yield = OK; -int address_count; -int save_errno; -int rc; -time_t start_delivery_time = time(NULL); -smtp_transport_options_block *ob = - (smtp_transport_options_block *)(tblock->options_block); -struct lflags { - 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 -} lflags; - -BOOL pass_message = FALSE; -BOOL completed_address = FALSE; -uschar peer_offered = 0; #if defined(SUPPORT_TLS) && defined(EXPERIMENTAL_DANE) dns_answer tlsa_dnsa; #endif -smtp_inblock inblock; -smtp_outblock outblock; -int max_rcpt = tblock->max_addresses; -uschar *igquotstr = US""; - -#ifdef EXPERIMENTAL_DSN_INFO -uschar *smtp_greeting = NULL; -uschar *helo_response = NULL; -#endif -uschar *helo_data = NULL; +BOOL pass_message = FALSE; -uschar *message = NULL; -uschar new_message_id[MESSAGE_ID_LENGTH + 1]; -uschar *p; -uschar buffer[DELIVER_BUFFER_SIZE]; -uschar inbuffer[4096]; -uschar outbuffer[4096]; +uschar * message = NULL; +int save_errno; +int yield = OK; +int rc; -suppress_tls = suppress_tls; /* stop compiler warning when no TLS support */ +sx->ob = (smtp_transport_options_block *) sx->tblock->options_block; -lflags.lmtp = strcmpic(ob->protocol, US"lmtp") == 0; -lflags.smtps = strcmpic(ob->protocol, US"smtps") == 0; -lflags.ok = FALSE; -lflags.send_rset = TRUE; -lflags.send_quit = TRUE; -lflags.setting_up = TRUE; -lflags.esmtp = TRUE; -lflags.esmtp_sent = FALSE; +sx->lmtp = strcmpic(sx->ob->protocol, US"lmtp") == 0; +sx->smtps = strcmpic(sx->ob->protocol, US"smtps") == 0; +sx->ok = FALSE; +sx->send_rset = TRUE; +sx->send_quit = TRUE; +sx->setting_up = TRUE; +sx->esmtp = TRUE; +sx->esmtp_sent = FALSE; #ifdef SUPPORT_I18N -lflags.utf8_needed = FALSE; +sx->utf8_needed = FALSE; #endif -lflags.dsn_all_lasthop = TRUE; +sx->dsn_all_lasthop = TRUE; #if defined(SUPPORT_TLS) && defined(EXPERIMENTAL_DANE) -lflags.dane = FALSE; -lflags.dane_required = verify_check_given_host(&ob->hosts_require_dane, host) == OK; +sx->dane = FALSE; +sx->dane_required = verify_check_given_host(&sx->ob->hosts_require_dane, sx->host) == OK; +#endif + +if ((sx->max_rcpt = sx->tblock->max_addresses) == 0) sx->max_rcpt = 999999; +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"; -buffer[0] = '\0'; -if (max_rcpt == 0) max_rcpt = 999999; +sx->buffer[0] = '\0'; /* Set up the buffer for reading SMTP response packets. */ -inblock.buffer = inbuffer; -inblock.buffersize = sizeof(inbuffer); -inblock.ptr = inbuffer; -inblock.ptrend = inbuffer; +sx->inblock.buffer = sx->inbuffer; +sx->inblock.buffersize = sizeof(sx->inbuffer); +sx->inblock.ptr = sx->inbuffer; +sx->inblock.ptrend = sx->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; +sx->outblock.buffer = sx->outbuffer; +sx->outblock.buffersize = sizeof(sx->outbuffer); +sx->outblock.ptr = sx->outbuffer; +sx->outblock.cmd_count = 0; +sx->outblock.authenticating = FALSE; /* Reset the parameters of a TLS session. */ @@ -1625,14 +1519,15 @@ 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); #ifndef SUPPORT_TLS -if (lflags.smtps) +if (sx->smtps) { - set_errno_nohost(addrlist, ERRNO_TLSFAILURE, US"TLS support not available", + set_errno_nohost(sx->addrlist, ERRNO_TLSFAILURE, US"TLS support not available", DEFER, FALSE); return ERROR; } @@ -1644,14 +1539,29 @@ specially so they can be identified for retries. */ if (continue_hostname == NULL) { + if (sx->verify) + HDEBUG(D_verify) debug_printf("interface=%s port=%d\n", sx->interface, sx->port); + /* This puts port into host->port */ - inblock.sock = outblock.sock = - smtp_connect(host, host_af, port, interface, ob->connect_timeout, tblock); + sx->inblock.sock = sx->outblock.sock = + smtp_connect(sx->host, sx->host_af, sx->port, sx->interface, + sx->ob->connect_timeout, sx->tblock); - if (inblock.sock < 0) + if (sx->inblock.sock < 0) { - set_errno_nohost(addrlist, errno == ETIMEDOUT ? ERRNO_CONNECTTIMEOUT : errno, - NULL, DEFER, FALSE); + uschar * msg = NULL; + int save_errno = errno; + 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, + sx->verify ? string_sprintf("could not connect: %s", msg) + : NULL, + DEFER, FALSE); + sx->send_quit = FALSE; return DEFER; } @@ -1660,32 +1570,32 @@ if (continue_hostname == NULL) tls_out.dane_verified = FALSE; tls_out.tlsa_usage = 0; - if (host->dnssec == DS_YES) + if (sx->host->dnssec == DS_YES) { - if( lflags.dane_required - || verify_check_given_host(&ob->hosts_try_dane, host) == OK + if( sx->dane_required + || verify_check_given_host(&sx->ob->hosts_try_dane, sx->host) == OK ) - switch (rc = tlsa_lookup(host, &tlsa_dnsa, lflags.dane_required)) + switch (rc = tlsa_lookup(sx->host, &tlsa_dnsa, sx->dane_required)) { - case OK: lflags.dane = TRUE; break; + case OK: sx->dane = TRUE; break; case FAIL_FORCED: break; - default: set_errno_nohost(addrlist, ERRNO_DNSDEFER, + default: set_errno_nohost(sx->addrlist, ERRNO_DNSDEFER, string_sprintf("DANE error: tlsa lookup %s", rc == DEFER ? "DEFER" : "FAIL"), rc, FALSE); return rc; } } - else if (lflags.dane_required) + else if (sx->dane_required) { - set_errno_nohost(addrlist, ERRNO_DNSDEFER, - string_sprintf("DANE error: %s lookup not DNSSEC", host->name), + set_errno_nohost(sx->addrlist, ERRNO_DNSDEFER, + string_sprintf("DANE error: %s lookup not DNSSEC", sx->host->name), FAIL, FALSE); return FAIL; } - if (lflags.dane) - ob->tls_tempfail_tryclear = FALSE; + if (sx->dane) + sx->ob->tls_tempfail_tryclear = FALSE; } #endif /*DANE*/ @@ -1693,18 +1603,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. */ - helo_data = expand_string(ob->helo_data); + if (sx->helo_data) + if (!(sx->helo_data = expand_string(sx->helo_data))) + 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); + #ifdef SUPPORT_I18N - if (helo_data) + if (sx->helo_data) { - uschar * errstr = NULL; - if ((helo_data = string_domain_utf8_to_alabel(helo_data, &errstr)), errstr) - { - errstr = string_sprintf("failed to expand helo_data: %s", errstr); - set_errno_nohost(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 (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); + else + sx->helo_data = NULL; } #endif @@ -1712,29 +1630,29 @@ if (continue_hostname == NULL) is nevertheless a reasonably clean way of programming this kind of logic, where you want to escape on any error. */ - if (!lflags.smtps) + if (!sx->smtps) { BOOL good_response; #ifdef TCP_QUICKACK - (void) setsockopt(inblock.sock, IPPROTO_TCP, TCP_QUICKACK, US &off, sizeof(off)); + (void) setsockopt(sx->inblock.sock, IPPROTO_TCP, TCP_QUICKACK, US &off, sizeof(off)); #endif - good_response = smtp_read_response(&inblock, buffer, sizeof(buffer), - '2', ob->command_timeout); + good_response = smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), + '2', sx->ob->command_timeout); #ifdef EXPERIMENTAL_DSN_INFO - smtp_greeting = string_copy(buffer); + sx->smtp_greeting = string_copy(sx->buffer); #endif if (!good_response) goto RESPONSE_FAILED; #ifndef DISABLE_EVENT { uschar * s; - lookup_dnssec_authenticated = host->dnssec==DS_YES ? US"yes" - : host->dnssec==DS_NO ? US"no" : NULL; - s = event_raise(tblock->event_action, US"smtp:connect", buffer); + lookup_dnssec_authenticated = sx->host->dnssec==DS_YES ? US"yes" + : sx->host->dnssec==DS_NO ? US"no" : NULL; + s = event_raise(sx->tblock->event_action, US"smtp:connect", sx->buffer); if (s) { - set_errno_nohost(addrlist, ERRNO_EXPANDFAIL, + set_errno_nohost(sx->addrlist, ERRNO_EXPANDFAIL, string_sprintf("deferred by smtp:connect event expansion: %s", s), DEFER, FALSE); yield = DEFER; @@ -1746,18 +1664,18 @@ if (continue_hostname == NULL) /* Now check if the helo_data expansion went well, and sign off cleanly if it didn't. */ - if (!helo_data) + if (!sx->helo_data) { - uschar *message = string_sprintf("failed to expand helo_data: %s", + message = string_sprintf("failed to expand helo_data: %s", expand_string_message); - set_errno_nohost(addrlist, ERRNO_EXPANDFAIL, message, DEFER, FALSE); + set_errno_nohost(sx->addrlist, ERRNO_EXPANDFAIL, message, DEFER, FALSE); yield = DEFER; goto SEND_QUIT; } } /** Debugging without sending a message -addrlist->transport_return = DEFER; +sx->addrlist->transport_return = DEFER; goto SEND_QUIT; **/ @@ -1791,96 +1709,95 @@ goto SEND_QUIT; mailers use upper case for some reason (the RFC is quite clear about case independence) so, for peace of mind, I gave in. */ - lflags.esmtp = verify_check_given_host(&ob->hosts_avoid_esmtp, host) != OK; + sx->esmtp = verify_check_given_host(&sx->ob->hosts_avoid_esmtp, sx->host) != OK; /* Alas; be careful, since this goto is not an error-out, so conceivably we might set data between here and the target which we assume to exist and be usable. I can see this coming back to bite us. */ #ifdef SUPPORT_TLS - if (lflags.smtps) + if (sx->smtps) { smtp_peer_options |= PEER_OFFERED_TLS; suppress_tls = FALSE; - ob->tls_tempfail_tryclear = FALSE; + sx->ob->tls_tempfail_tryclear = FALSE; smtp_command = US"SSL-on-connect"; goto TLS_NEGOTIATE; } #endif - if (lflags.esmtp) + if (sx->esmtp) { - if (smtp_write_command(&outblock, FALSE, "%s %s\r\n", - lflags.lmtp ? "LHLO" : "EHLO", helo_data) < 0) + if (smtp_write_command(&sx->outblock, FALSE, "%s %s\r\n", + sx->lmtp ? "LHLO" : "EHLO", sx->helo_data) < 0) goto SEND_FAILED; - lflags.esmtp_sent = TRUE; - if (!smtp_read_response(&inblock, buffer, sizeof(buffer), '2', - ob->command_timeout)) + sx->esmtp_sent = TRUE; + if (!smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), '2', + sx->ob->command_timeout)) { - if (errno != 0 || buffer[0] == 0 || lflags.lmtp) + if (errno != 0 || sx->buffer[0] == 0 || sx->lmtp) { #ifdef EXPERIMENTAL_DSN_INFO - helo_response = string_copy(buffer); + sx->helo_response = string_copy(sx->buffer); #endif goto RESPONSE_FAILED; } - lflags.esmtp = FALSE; + sx->esmtp = FALSE; } #ifdef EXPERIMENTAL_DSN_INFO - helo_response = string_copy(buffer); + sx->helo_response = string_copy(sx->buffer); #endif } else DEBUG(D_transport) debug_printf("not sending EHLO (host matches hosts_avoid_esmtp)\n"); - if (!lflags.esmtp) + if (!sx->esmtp) { BOOL good_response; - int n = sizeof(buffer); - uschar * rsp = buffer; + int n = sizeof(sx->buffer); + uschar * rsp = sx->buffer; - if (lflags.esmtp_sent && (n = Ustrlen(buffer)) < sizeof(buffer)/2) - { rsp = buffer + n + 1; n = sizeof(buffer) - n; } + if (sx->esmtp_sent && (n = Ustrlen(sx->buffer)) < sizeof(sx->buffer)/2) + { rsp = sx->buffer + n + 1; n = sizeof(sx->buffer) - n; } - if (smtp_write_command(&outblock, FALSE, "HELO %s\r\n", helo_data) < 0) + if (smtp_write_command(&sx->outblock, FALSE, "HELO %s\r\n", sx->helo_data) < 0) goto SEND_FAILED; - good_response = smtp_read_response(&inblock, rsp, n, - '2', ob->command_timeout); + good_response = smtp_read_response(&sx->inblock, rsp, n, + '2', sx->ob->command_timeout); #ifdef EXPERIMENTAL_DSN_INFO - helo_response = string_copy(rsp); + sx->helo_response = string_copy(rsp); #endif if (!good_response) { /* Handle special logging for a closed connection after HELO when had previously sent EHLO */ - if (rsp != buffer && rsp[0] == 0 && (errno == 0 || errno == ECONNRESET)) + if (rsp != sx->buffer && rsp[0] == 0 && (errno == 0 || errno == ECONNRESET)) { - message = NULL; - lflags.send_quit = FALSE; + sx->send_quit = FALSE; save_errno = ERRNO_SMTPCLOSED; message = string_sprintf("Remote host closed connection " "in response to %s (EHLO response was: %s)", - smtp_command, buffer); + smtp_command, sx->buffer); goto FAILED; } - Ustrncpy(buffer, rsp, sizeof(buffer)/2); + Ustrncpy(sx->buffer, rsp, sizeof(sx->buffer)/2); goto RESPONSE_FAILED; } } - peer_offered = smtp_peer_options = 0; + sx->peer_offered = smtp_peer_options = 0; - if (lflags.esmtp || lflags.lmtp) + if (sx->esmtp || sx->lmtp) { - peer_offered = ehlo_response(buffer, Ustrlen(buffer), + sx->peer_offered = ehlo_response(sx->buffer, PEER_OFFERED_TLS /* others checked later */ ); /* Set tls_offered if the response to EHLO specifies support for STARTTLS. */ #ifdef SUPPORT_TLS - smtp_peer_options |= peer_offered & PEER_OFFERED_TLS; + smtp_peer_options |= sx->peer_offered & PEER_OFFERED_TLS; #endif } } @@ -1899,9 +1816,10 @@ separate - we could match up by host ip+port as a bodge. */ else { - inblock.sock = outblock.sock = fileno(stdin); + sx->inblock.sock = sx->outblock.sock = fileno(stdin); smtp_command = big_buffer; - host->port = port; /* Record the port that was used */ + 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 @@ -1915,10 +1833,13 @@ for error analysis. */ #ifdef SUPPORT_TLS if ( smtp_peer_options & PEER_OFFERED_TLS && !suppress_tls - && verify_check_given_host(&ob->hosts_avoid_tls, host) != OK) + && verify_check_given_host(&sx->ob->hosts_avoid_tls, sx->host) != OK + && ( !sx->verify + || verify_check_given_host(&sx->ob->hosts_verify_avoid_tls, sx->host) != OK + ) ) { uschar buffer2[4096]; - if (smtp_write_command(&outblock, FALSE, "STARTTLS\r\n") < 0) + if (smtp_write_command(&sx->outblock, FALSE, "STARTTLS\r\n") < 0) goto SEND_FAILED; /* If there is an I/O error, transmission of this message is deferred. If @@ -1928,15 +1849,15 @@ if ( smtp_peer_options & PEER_OFFERED_TLS 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 (!smtp_read_response(&inblock, buffer2, sizeof(buffer2), '2', - ob->command_timeout)) + if (!smtp_read_response(&sx->inblock, buffer2, sizeof(buffer2), '2', + sx->ob->command_timeout)) { if ( errno != 0 || buffer2[0] == 0 - || (buffer2[0] == '4' && !ob->tls_tempfail_tryclear) + || (buffer2[0] == '4' && !sx->ob->tls_tempfail_tryclear) ) { - Ustrncpy(buffer, buffer2, sizeof(buffer)); + Ustrncpy(sx->buffer, buffer2, sizeof(sx->buffer)); goto RESPONSE_FAILED; } } @@ -1946,9 +1867,10 @@ if ( smtp_peer_options & PEER_OFFERED_TLS else TLS_NEGOTIATE: { - int rc = tls_client_start(inblock.sock, host, addrlist, tblock + address_item * addr; + int rc = tls_client_start(sx->inblock.sock, sx->host, sx->addrlist, sx->tblock # ifdef EXPERIMENTAL_DANE - , lflags.dane ? &tlsa_dnsa : NULL + , sx->dane ? &tlsa_dnsa : NULL # endif ); @@ -1959,21 +1881,21 @@ if ( smtp_peer_options & PEER_OFFERED_TLS if (rc != OK) { # ifdef EXPERIMENTAL_DANE - if (lflags.dane) log_write(0, LOG_MAIN, + if (sx->dane) log_write(0, LOG_MAIN, "DANE attempt failed; no TLS connection to %s [%s]", - host->name, host->address); + sx->host->name, sx->host->address); # endif save_errno = ERRNO_TLSFAILURE; message = US"failure while setting up TLS session"; - lflags.send_quit = FALSE; + sx->send_quit = FALSE; goto TLS_FAILED; } /* TLS session is set up */ smtp_peer_options_wrap = smtp_peer_options; - for (addr = addrlist; addr; addr = addr->next) + for (addr = sx->addrlist; addr; addr = addr->next) if (addr->transport_return == PENDING_DEFER) { addr->cipher = tls_out.cipher; @@ -2000,31 +1922,27 @@ if (tls_out.active >= 0) char *greeting_cmd; BOOL good_response; - if (helo_data == NULL) + if (!sx->helo_data && !(sx->helo_data = expand_string(sx->ob->helo_data))) { - helo_data = expand_string(ob->helo_data); - if (helo_data == NULL) - { - uschar *message = string_sprintf("failed to expand helo_data: %s", - expand_string_message); - set_errno_nohost(addrlist, ERRNO_EXPANDFAIL, message, DEFER, FALSE); - yield = DEFER; - goto SEND_QUIT; - } + uschar *message = string_sprintf("failed to expand helo_data: %s", + expand_string_message); + set_errno_nohost(sx->addrlist, ERRNO_EXPANDFAIL, message, DEFER, FALSE); + yield = DEFER; + goto SEND_QUIT; } /* For SMTPS we need to wait for the initial OK response. */ - if (lflags.smtps) + if (sx->smtps) { - good_response = smtp_read_response(&inblock, buffer, sizeof(buffer), - '2', ob->command_timeout); + good_response = smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), + '2', sx->ob->command_timeout); #ifdef EXPERIMENTAL_DSN_INFO - smtp_greeting = string_copy(buffer); + sx->smtp_greeting = string_copy(sx->buffer); #endif if (!good_response) goto RESPONSE_FAILED; } - if (lflags.esmtp) + if (sx->esmtp) greeting_cmd = "EHLO"; else { @@ -2033,13 +1951,13 @@ if (tls_out.active >= 0) debug_printf("not sending EHLO (host matches hosts_avoid_esmtp)\n"); } - if (smtp_write_command(&outblock, FALSE, "%s %s\r\n", - lflags.lmtp ? "LHLO" : greeting_cmd, helo_data) < 0) + if (smtp_write_command(&sx->outblock, FALSE, "%s %s\r\n", + sx->lmtp ? "LHLO" : greeting_cmd, sx->helo_data) < 0) goto SEND_FAILED; - good_response = smtp_read_response(&inblock, buffer, sizeof(buffer), - '2', ob->command_timeout); + good_response = smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), + '2', sx->ob->command_timeout); #ifdef EXPERIMENTAL_DSN_INFO - helo_response = string_copy(buffer); + sx->helo_response = string_copy(sx->buffer); #endif if (!good_response) goto RESPONSE_FAILED; smtp_peer_options = 0; @@ -2048,11 +1966,11 @@ if (tls_out.active >= 0) /* If the host is required to use a secure channel, ensure that we have one. */ -else if ( lflags.smtps +else if ( sx->smtps # ifdef EXPERIMENTAL_DANE - || lflags.dane + || sx->dane # endif - || verify_check_given_host(&ob->hosts_require_tls, host) == OK + || verify_check_given_host(&sx->ob->hosts_require_tls, sx->host) == OK ) { save_errno = ERRNO_TLSREQUIRED; @@ -2074,72 +1992,72 @@ if (continue_hostname == NULL #endif ) { - if (lflags.esmtp || lflags.lmtp) + if (sx->esmtp || sx->lmtp) { - peer_offered = ehlo_response(buffer, Ustrlen(buffer), - 0 /* no TLS */ - | (lflags.lmtp && ob->lmtp_ignore_quota ? PEER_OFFERED_IGNQ : 0) - | PEER_OFFERED_CHUNKING - | PEER_OFFERED_PRDR + sx->peer_offered = ehlo_response(sx->buffer, + 0 /* no TLS */ + | (sx->lmtp && sx->ob->lmtp_ignore_quota ? PEER_OFFERED_IGNQ : 0) + | PEER_OFFERED_CHUNKING + | PEER_OFFERED_PRDR #ifdef SUPPORT_I18N - | (addrlist->prop.utf8_msg ? PEER_OFFERED_UTF8 : 0) - /*XXX if we hand peercaps on to continued-conn processes, - must not depend on this addr */ + | (sx->addrlist->prop.utf8_msg ? PEER_OFFERED_UTF8 : 0) + /*XXX if we hand peercaps on to continued-conn processes, + must not depend on this addr */ #endif - | PEER_OFFERED_DSN - | PEER_OFFERED_PIPE - | (ob->size_addition >= 0 ? PEER_OFFERED_SIZE : 0) + | PEER_OFFERED_DSN + | PEER_OFFERED_PIPE + | (sx->ob->size_addition >= 0 ? PEER_OFFERED_SIZE : 0) ); /* Set for IGNOREQUOTA if the response to LHLO specifies support and the lmtp_ignore_quota option was set. */ - igquotstr = peer_offered & PEER_OFFERED_IGNQ ? US" IGNOREQUOTA" : US""; + sx->igquotstr = sx->peer_offered & PEER_OFFERED_IGNQ ? US" IGNOREQUOTA" : US""; /* If the response to EHLO specified support for the SIZE parameter, note this, provided size_addition is non-negative. */ - smtp_peer_options |= peer_offered & PEER_OFFERED_SIZE; + smtp_peer_options |= sx->peer_offered & PEER_OFFERED_SIZE; /* Note whether the server supports PIPELINING. If hosts_avoid_esmtp matched the current host, esmtp will be false, so PIPELINING can never be used. If the current host matches hosts_avoid_pipelining, don't do it. */ - if ( peer_offered & PEER_OFFERED_PIPE - && verify_check_given_host(&ob->hosts_avoid_pipelining, host) != OK) + if ( sx->peer_offered & PEER_OFFERED_PIPE + && verify_check_given_host(&sx->ob->hosts_avoid_pipelining, sx->host) != OK) smtp_peer_options |= PEER_OFFERED_PIPE; DEBUG(D_transport) debug_printf("%susing PIPELINING\n", smtp_peer_options & PEER_OFFERED_PIPE ? "" : "not "); - if ( peer_offered & PEER_OFFERED_CHUNKING - && verify_check_given_host(&ob->hosts_try_chunking, host) != OK) - peer_offered &= ~PEER_OFFERED_CHUNKING; + if ( sx->peer_offered & PEER_OFFERED_CHUNKING + && verify_check_given_host(&sx->ob->hosts_try_chunking, sx->host) != OK) + sx->peer_offered &= ~PEER_OFFERED_CHUNKING; - if (peer_offered & PEER_OFFERED_CHUNKING) + if (sx->peer_offered & PEER_OFFERED_CHUNKING) {DEBUG(D_transport) debug_printf("CHUNKING usable\n");} #ifndef DISABLE_PRDR - if ( peer_offered & PEER_OFFERED_PRDR - && verify_check_given_host(&ob->hosts_try_prdr, host) != OK) - peer_offered &= ~PEER_OFFERED_PRDR; + if ( sx->peer_offered & PEER_OFFERED_PRDR + && verify_check_given_host(&sx->ob->hosts_try_prdr, sx->host) != OK) + sx->peer_offered &= ~PEER_OFFERED_PRDR; - if (peer_offered & PEER_OFFERED_PRDR) + if (sx->peer_offered & PEER_OFFERED_PRDR) {DEBUG(D_transport) debug_printf("PRDR usable\n");} #endif /* Note if the server supports DSN */ - smtp_peer_options |= peer_offered & PEER_OFFERED_DSN; + smtp_peer_options |= sx->peer_offered & PEER_OFFERED_DSN; DEBUG(D_transport) debug_printf("%susing DSN\n", - peer_offered & PEER_OFFERED_DSN ? "" : "not "); + sx->peer_offered & PEER_OFFERED_DSN ? "" : "not "); /* Note if the response to EHLO specifies support for the AUTH extension. If it has, check that this host is one we want to authenticate to, and do the business. The host name and address must be available when the authenticator's client driver is running. */ - switch (yield = smtp_auth(buffer, sizeof(buffer), addrlist, host, - ob, lflags.esmtp, &inblock, &outblock)) + switch (yield = smtp_auth(sx->buffer, sizeof(sx->buffer), sx->addrlist, sx->host, + sx->ob, sx->esmtp, &sx->inblock, &sx->outblock)) { default: goto SEND_QUIT; case OK: break; @@ -2153,103 +2071,168 @@ pipelining_active = !!(smtp_peer_options & PEER_OFFERED_PIPE); /* The setting up of the SMTP call is now complete. Any subsequent errors are message-specific. */ -lflags.setting_up = FALSE; +sx->setting_up = FALSE; #ifdef SUPPORT_I18N -if (addrlist->prop.utf8_msg) +if (sx->addrlist->prop.utf8_msg) { - lflags.utf8_needed = !addrlist->prop.utf8_downcvt - && !addrlist->prop.utf8_downcvt_maybe; - DEBUG(D_transport) if (!lflags.utf8_needed) + sx->utf8_needed = !sx->addrlist->prop.utf8_downcvt + && !sx->addrlist->prop.utf8_downcvt_maybe; + DEBUG(D_transport) if (!sx->utf8_needed) debug_printf("utf8: %s downconvert\n", - addrlist->prop.utf8_downcvt ? "mandatory" : "optional"); + sx->addrlist->prop.utf8_downcvt ? "mandatory" : "optional"); } /* If this is an international message we need the host to speak SMTPUTF8 */ -if (lflags.utf8_needed && !(peer_offered & PEER_OFFERED_UTF8)) +if (sx->utf8_needed && !(sx->peer_offered & PEER_OFFERED_UTF8)) { errno = ERRNO_UTF8_FWD; goto RESPONSE_FAILED; } #endif -/* 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. */ +return OK; -if (tblock->filter_command != NULL) - { - BOOL rc; - uschar fbuf[64]; - sprintf(CS fbuf, "%.50s transport", tblock->name); - rc = transport_set_up_command(&transport_filter_argv, tblock->filter_command, - TRUE, DEFER, addrlist, fbuf, NULL); - transport_filter_timeout = tblock->filter_timeout; - /* On failure, copy the error to all addresses, abandon the SMTP call, and - yield ERROR. */ + { + int code; + uschar * set_message; - if (!rc) + RESPONSE_FAILED: { - set_errno_nohost(addrlist->next, addrlist->basic_errno, addrlist->message, DEFER, - FALSE); - yield = ERROR; - goto SEND_QUIT; + save_errno = errno; + message = NULL; + sx->send_quit = check_response(sx->host, &save_errno, sx->addrlist->more_errno, + sx->buffer, &code, &message, &pass_message); + goto FAILED; } - if ( transport_filter_argv - && *transport_filter_argv - && **transport_filter_argv - && peer_offered & PEER_OFFERED_CHUNKING - ) + SEND_FAILED: { - peer_offered &= ~PEER_OFFERED_CHUNKING; - DEBUG(D_transport) debug_printf("CHUNKING not usable due to transport filter\n"); + save_errno = errno; + code = '4'; + message = US string_sprintf("send() to %s [%s] failed: %s", + sx->host->name, sx->host->address, strerror(save_errno)); + sx->send_quit = FALSE; + goto FAILED; } + + /* This label is jumped to directly when a TLS negotiation has failed, + or was not done for a host for which it is required. Values will be set + in message and save_errno, and setting_up will always be true. Treat as + a temporary error. */ + +#ifdef SUPPORT_TLS + TLS_FAILED: + code = '4'; +#endif + + /* The failure happened while setting up the call; see if the failure was + a 5xx response (this will either be on connection, or following HELO - a 5xx + after EHLO causes it to try HELO). If so, fail all addresses, as this host is + never going to accept them. For other errors during setting up (timeouts or + whatever), defer all addresses, and yield DEFER, so that the host is not + tried again for a while. */ + + FAILED: + sx->ok = FALSE; /* For when reached by GOTO */ + set_message = message; + + yield = code == '5' +#ifdef SUPPORT_I18N + || errno == ERRNO_UTF8_FWD +#endif + ? FAIL : DEFER; + + set_errno(sx->addrlist, save_errno, set_message, yield, pass_message, sx->host +#ifdef EXPERIMENTAL_DSN_INFO + , sx->smtp_greeting, sx->helo_response +#endif + ); } -/* For messages that have more than the maximum number of envelope recipients, -we want to send several transactions down the same SMTP connection. (See -comments in deliver.c as to how this reconciles, heuristically, with -remote_max_parallel.) This optimization was added to Exim after the following -code was already working. The simplest way to put it in without disturbing the -code was to use a goto to jump back to this point when there is another -transaction to handle. */ +SEND_QUIT: -SEND_MESSAGE: -sync_addr = first_addr; -address_count = 0; -lflags.ok = FALSE; -lflags.send_rset = TRUE; -completed_address = FALSE; +if (sx->send_quit) + (void)smtp_write_command(&sx->outblock, FALSE, "QUIT\r\n"); + +#ifdef SUPPORT_TLS +tls_close(FALSE, TRUE); +#endif + +/* Close the socket, and return the appropriate value, first setting +works because the NULL setting is passed back to the calling process, and +remote_max_parallel is forced to 1 when delivering over an existing connection, + +If all went well and continue_more is set, we shouldn't actually get here if +there are further addresses, as the return above will be taken. However, +writing RSET might have failed, or there may be other addresses whose hosts are +specified in the transports, and therefore not visible at top level, in which +case continue_more won't get set. */ + +HDEBUG(D_transport|D_acl|D_v) debug_printf(" SMTP(close)>>\n"); +if (sx->send_quit) + { + shutdown(sx->outblock.sock, SHUT_WR); + 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); +#endif + +continue_transport = NULL; +continue_hostname = NULL; +return yield; +} -/* Initiate a message transfer. If we know the receiving MTA supports the SIZE -qualification, send it, adding something to the message size to allow for -imprecision and things that get added en route. Exim keeps the number of lines + + +/* Create the string of options that will be appended to the MAIL FROM: +in the connection context buffer */ + +static int +build_mailcmd_options(smtp_context * sx, address_item * addrlist) +{ +uschar * p = sx->buffer; +address_item * addr; +int address_count; + +*p = 0; + +/* If we know the receiving MTA supports the SIZE qualification, +send it, adding something to the message size to allow for imprecision +and things that get added en route. Exim keeps the number of lines in a message, so we can give an accurate value for the original message, but we need some additional to handle added headers. (Double "." characters don't get included in the count.) */ -p = buffer; -*p = 0; - -if (peer_offered & PEER_OFFERED_SIZE) +if (sx->peer_offered & PEER_OFFERED_SIZE) { - sprintf(CS p, " SIZE=%d", message_size+message_linecount+ob->size_addition); + sprintf(CS p, " SIZE=%d", message_size+message_linecount+sx->ob->size_addition); while (*p) p++; } #ifndef DISABLE_PRDR -lflags.prdr_active = FALSE; -if (peer_offered & PEER_OFFERED_PRDR) - for (addr = first_addr; addr; addr = addr->next) +/* If it supports Per-Recipient Data Reponses, and we have omre than one recipient, +request that */ + +sx->prdr_active = FALSE; +if (sx->peer_offered & PEER_OFFERED_PRDR) + for (addr = addrlist; addr; addr = addr->next) if (addr->transport_return == PENDING_DEFER) { for (addr = addr->next; addr; addr = addr->next) if (addr->transport_return == PENDING_DEFER) { /* at least two recipients to send */ - lflags.prdr_active = TRUE; + sx->prdr_active = TRUE; sprintf(CS p, " PRDR"); p += 5; break; } @@ -2258,27 +2241,32 @@ if (peer_offered & PEER_OFFERED_PRDR) #endif #ifdef SUPPORT_I18N -if ( addrlist->prop.utf8_msg +/* If it supports internationalised messages, and this meesage need that, +request it */ + +if ( sx->peer_offered & PEER_OFFERED_UTF8 + && addrlist->prop.utf8_msg && !addrlist->prop.utf8_downcvt - && peer_offered & PEER_OFFERED_UTF8 ) - sprintf(CS p, " SMTPUTF8"), p += 9; + Ustrcpy(p, " SMTPUTF8"), p += 9; #endif -/* check if all addresses have lasthop flag */ -/* do not send RET and ENVID if true */ -for (lflags.dsn_all_lasthop = TRUE, addr = first_addr; - address_count < max_rcpt && addr != NULL; - addr = addr->next) - if ((addr->dsn_flags & rf_dsnlasthop) != 1) +/* check if all addresses have DSN-lasthop flag; do not send RET and ENVID if so */ +for (sx->dsn_all_lasthop = TRUE, addr = addrlist, address_count = 0; + addr && address_count < sx->max_rcpt; + addr = addr->next) if (addr->transport_return == PENDING_DEFER) + { + address_count++; + if (!(addr->dsn_flags & rf_dsnlasthop)) { - lflags.dsn_all_lasthop = FALSE; + sx->dsn_all_lasthop = FALSE; break; } + } /* Add any DSN flags to the mail command */ -if (peer_offered & PEER_OFFERED_DSN && !lflags.dsn_all_lasthop) +if (sx->peer_offered & PEER_OFFERED_DSN && !sx->dsn_all_lasthop) { if (dsn_ret == dsn_ret_hdrs) { Ustrcpy(p, " RET=HDRS"); p += 9; } @@ -2287,7 +2275,7 @@ if (peer_offered & PEER_OFFERED_DSN && !lflags.dsn_all_lasthop) if (dsn_envid) { - string_format(p, sizeof(buffer) - (p-buffer), " ENVID=%s", dsn_envid); + string_format(p, sizeof(sx->buffer) - (p-sx->buffer), " ENVID=%s", dsn_envid); while (*p) p++; } } @@ -2299,10 +2287,71 @@ Other expansion failures are serious. An empty result is ignored, but there is otherwise no check - this feature is expected to be used with LMTP and other cases where non-standard addresses (e.g. without domains) might be required. */ -if (smtp_mail_auth_str(p, sizeof(buffer) - (p-buffer), addrlist, ob)) +if (smtp_mail_auth_str(p, sizeof(sx->buffer) - (p-sx->buffer), addrlist, sx->ob)) + return ERROR; + +return OK; +} + + +static void +build_rcptcmd_options(smtp_context * sx, const address_item * addr) +{ +uschar * p = sx->buffer; +*p = 0; + +/* Add any DSN flags to the rcpt command */ + +if (sx->peer_offered & PEER_OFFERED_DSN && !(addr->dsn_flags & rf_dsnlasthop)) { - yield = ERROR; - goto SEND_QUIT; + if (addr->dsn_flags & rf_dsnflags) + { + int i; + BOOL first = TRUE; + + Ustrcpy(p, " NOTIFY="); + while (*p) p++; + for (i = 0; i < nelem(rf_list); i++) if (addr->dsn_flags & rf_list[i]) + { + if (!first) *p++ = ','; + first = FALSE; + Ustrcpy(p, rf_names[i]); + while (*p) p++; + } + } + + if (addr->dsn_orcpt) + { + string_format(p, sizeof(sx->buffer) - (p-sx->buffer), " ORCPT=%s", + addr->dsn_orcpt); + while (*p) p++; + } + } +} + + + +/* +Return: + 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 +smtp_write_mail_and_rcpt_cmds(smtp_context * sx, int * yield) +{ +address_item * addr; +int address_count; +int rc; + +if (build_mailcmd_options(sx, sx->first_addr) != OK) + { + *yield = ERROR; + return -4; } /* From here until we send the DATA command, we can make use of PIPELINING @@ -2311,10 +2360,10 @@ at any point, for when the buffer fills up, so we write it totally generally. When PIPELINING is off, each command written reports that it has flushed the buffer. */ -lflags.pending_MAIL = TRUE; /* The block starts with MAIL */ +sx->pending_MAIL = TRUE; /* The block starts with MAIL */ { - uschar * s = return_path; + uschar * s = sx->from_addr; #ifdef SUPPORT_I18N uschar * errstr = NULL; @@ -2322,22 +2371,22 @@ lflags.pending_MAIL = TRUE; /* The block starts with MAIL */ for the to-addresses (done below), and also (ugly) for re-doing when building the delivery log line. */ - if ( addrlist->prop.utf8_msg - && (addrlist->prop.utf8_downcvt || !(peer_offered & PEER_OFFERED_UTF8)) + if ( sx->addrlist->prop.utf8_msg + && (sx->addrlist->prop.utf8_downcvt || !(sx->peer_offered & PEER_OFFERED_UTF8)) ) { - if (s = string_address_utf8_to_alabel(return_path, &errstr), errstr) + if (s = string_address_utf8_to_alabel(s, &errstr), errstr) { - set_errno_nohost(addrlist, ERRNO_EXPANDFAIL, errstr, DEFER, FALSE); - yield = ERROR; - goto SEND_QUIT; + set_errno_nohost(sx->addrlist, ERRNO_EXPANDFAIL, errstr, DEFER, FALSE); + *yield = ERROR; + return -4; } - setflag(addrlist, af_utf8_downcvt); + setflag(sx->addrlist, af_utf8_downcvt); } #endif - rc = smtp_write_command(&outblock, pipelining_active, - "MAIL FROM:<%s>%s\r\n", s, buffer); + rc = smtp_write_command(&sx->outblock, pipelining_active, + "MAIL FROM:<%s>%s\r\n", s, sx->buffer); } mail_command = string_copy(big_buffer); /* Save for later error message */ @@ -2345,127 +2394,247 @@ mail_command = string_copy(big_buffer); /* Save for later error message */ switch(rc) { case -1: /* Transmission error */ - goto SEND_FAILED; + return -5; - case +1: /* Block was sent */ - if (!smtp_read_response(&inblock, buffer, sizeof(buffer), '2', - ob->command_timeout)) + case +1: /* Cmd was sent */ + if (!smtp_read_response(&sx->inblock, sx->buffer, sizeof(sx->buffer), '2', + sx->ob->command_timeout)) { - if (errno == 0 && buffer[0] == '4') + if (errno == 0 && sx->buffer[0] == '4') { errno = ERRNO_MAIL4XX; - addrlist->more_errno |= ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; + sx->addrlist->more_errno |= ((sx->buffer[1] - '0')*10 + sx->buffer[2] - '0') << 8; } - goto RESPONSE_FAILED; + return -1; } - lflags.pending_MAIL = FALSE; + sx->pending_MAIL = FALSE; break; + + /* otherwise zero: command queued for pipeline */ } /* Pass over all the relevant recipient addresses for this host, which are the ones that have status PENDING_DEFER. If we are using PIPELINING, we can send several before we have to read the responses for those seen so far. This checking is done by a subroutine because it also needs to be done at the end. -Send only up to max_rcpt addresses at a time, leaving first_addr pointing to +Send only up to max_rcpt addresses at a time, leaving next_addr pointing to the next one if not all are sent. 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 (addr = first_addr; - addr && address_count < max_rcpt; - addr = addr->next) - if (addr->transport_return == PENDING_DEFER) +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; + addr = addr->next) if (addr->transport_return == PENDING_DEFER) { int count; BOOL no_flush; uschar * rcpt_addr; - addr->dsn_aware = peer_offered & PEER_OFFERED_DSN + addr->dsn_aware = sx->peer_offered & PEER_OFFERED_DSN ? 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); - /* Add any DSN flags to the rcpt command and add to the sent string */ - - p = buffer; - *p = 0; - - if (peer_offered & PEER_OFFERED_DSN && !(addr->dsn_flags & rf_dsnlasthop)) - { - if (addr->dsn_flags & rf_dsnflags) - { - int i; - BOOL first = TRUE; - Ustrcpy(p, " NOTIFY="); - while (*p) p++; - for (i = 0; i < 4; i++) - if ((addr->dsn_flags & rf_list[i]) != 0) - { - if (!first) *p++ = ','; - first = FALSE; - Ustrcpy(p, rf_names[i]); - while (*p) p++; - } - } - - if (addr->dsn_orcpt) - { - string_format(p, sizeof(buffer) - (p-buffer), " ORCPT=%s", - addr->dsn_orcpt); - while (*p) p++; - } - } + build_rcptcmd_options(sx, addr); /* Now send the RCPT command, and process outstanding responses when necessary. After a timeout on RCPT, we just end the function, leaving the yield as OK, because this error can often mean that there is a problem with just one address, so we don't want to delay the host. */ - rcpt_addr = transport_rcpt_address(addr, tblock->rcpt_include_affixes); + rcpt_addr = transport_rcpt_address(addr, sx->tblock->rcpt_include_affixes); #ifdef SUPPORT_I18N - if ( testflag(addrlist, af_utf8_downcvt) + if ( testflag(sx->addrlist, af_utf8_downcvt) && !(rcpt_addr = string_address_utf8_to_alabel(rcpt_addr, NULL)) ) { /*XXX could we use a per-address errstr here? Not fail the whole send? */ errno = ERRNO_EXPANDFAIL; - goto SEND_FAILED; + return -5; /*XXX too harsh? */ } #endif - count = smtp_write_command(&outblock, no_flush, "RCPT TO:<%s>%s%s\r\n", - rcpt_addr, igquotstr, buffer); + count = smtp_write_command(&sx->outblock, no_flush, "RCPT TO:<%s>%s%s\r\n", + rcpt_addr, sx->igquotstr, sx->buffer); - if (count < 0) goto SEND_FAILED; + if (count < 0) return -5; if (count > 0) { - switch(sync_responses(first_addr, tblock->rcpt_include_affixes, - &sync_addr, host, count, ob->address_retry_include_sender, - lflags.pending_MAIL, 0, &inblock, ob->command_timeout, buffer, - sizeof(buffer))) + switch(sync_responses(sx, count, 0)) { - case 3: lflags.ok = TRUE; /* 2xx & 5xx => OK & progress made */ - case 2: completed_address = TRUE; /* 5xx (only) => progress made */ - break; - - case 1: lflags.ok = TRUE; /* 2xx (only) => OK, but if LMTP, */ - if (!lflags.lmtp) completed_address = TRUE; /* can't tell about progress yet */ - case 0: /* No 2xx or 5xx, but no probs */ - break; - - case -1: goto END_OFF; /* Timeout on RCPT */ - default: goto RESPONSE_FAILED; /* I/O error, or any MAIL error */ + case 3: sx->ok = TRUE; /* 2xx & 5xx => OK & progress made */ + case 2: sx->completed_addr = TRUE; /* 5xx (only) => progress made */ + break; + + case 1: sx->ok = TRUE; /* 2xx (only) => OK, but if LMTP, */ + if (!sx->lmtp) /* can't tell about progress yet */ + sx->completed_addr = TRUE; + case 0: /* No 2xx or 5xx, but no probs */ + break; + + case -1: return -3; /* Timeout on RCPT */ + case -2: return -2; /* non-MAIL read i/o error */ + default: return -1; /* any MAIL error */ } - lflags.pending_MAIL = FALSE; /* Dealt with MAIL */ + sx->pending_MAIL = FALSE; /* Dealt with MAIL */ } } /* Loop for next address */ +sx->next_addr = addr; +return 0; +} + + +/************************************************* +* Deliver address list to given host * +*************************************************/ + +/* If continue_hostname is not null, we get here only when continuing to +deliver down an existing channel. The channel was passed as the standard +input. TLS is never active on a passed channel; the previous process always +closes it down before passing the connection on. + +Otherwise, we have to make a connection to the remote host, and do the +initial protocol exchange. + +When running as an MUA wrapper, if the sender or any recipient is rejected, +temporarily or permanently, we force failure for all recipients. + +Arguments: + addrlist chain of potential addresses to deliver; only those whose + transport_return field is set to PENDING_DEFER are currently + being processed; others should be skipped - they have either + been delivered to an earlier host or IP address, or been + failed by one of them. + host host to deliver to + host_af AF_INET or AF_INET6 + port default TCP/IP port to use, in host byte order + interface interface to bind to, or NULL + tblock transport instance block + message_defer 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 + +Returns: OK - the connection was made and the delivery attempted; + the result for each address is in its data block. + DEFER - the connection could not be made, or something failed + while setting up the SMTP session, or there was a + non-message-specific error, such as a timeout. + ERROR - a filter command is specified for this transport, + and there was a problem setting it up; OR helo_data + or add_headers or authenticated_sender is specified + for this transport, and the string failed to expand +*/ + +static int +smtp_deliver(address_item *addrlist, host_item *host, int host_af, int port, + uschar *interface, transport_instance *tblock, + BOOL *message_defer, BOOL suppress_tls) +{ +address_item *addr; +int yield = OK; +int save_errno; +int rc; +time_t start_delivery_time = time(NULL); + +BOOL pass_message = FALSE; +uschar *message = NULL; +uschar new_message_id[MESSAGE_ID_LENGTH + 1]; +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; +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)) != 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) + { + BOOL rc; + uschar fbuf[64]; + sprintf(CS fbuf, "%.50s transport", tblock->name); + rc = transport_set_up_command(&transport_filter_argv, tblock->filter_command, + TRUE, DEFER, addrlist, fbuf, NULL); + transport_filter_timeout = tblock->filter_timeout; + + /* On failure, copy the error to all addresses, abandon the SMTP call, and + yield ERROR. */ + + if (!rc) + { + set_errno_nohost(addrlist->next, addrlist->basic_errno, addrlist->message, DEFER, + FALSE); + yield = ERROR; + goto SEND_QUIT; + } + + if ( transport_filter_argv + && *transport_filter_argv + && **transport_filter_argv + && sx.peer_offered & PEER_OFFERED_CHUNKING + ) + { + sx.peer_offered &= ~PEER_OFFERED_CHUNKING; + DEBUG(D_transport) debug_printf("CHUNKING not usable due to transport filter\n"); + } + } + + +/* For messages that have more than the maximum number of envelope recipients, +we want to send several transactions down the same SMTP connection. (See +comments in deliver.c as to how this reconciles, heuristically, with +remote_max_parallel.) This optimization was added to Exim after the following +code was already working. The simplest way to put it in without disturbing the +code was to use a goto to jump back to this point when there is another +transaction to handle. */ + +SEND_MESSAGE: +sx.from_addr = return_path; +sx.first_addr = sx.sync_addr = addrlist; +sx.ok = FALSE; +sx.send_rset = TRUE; +sx.completed_addr = FALSE; + + +/* Initiate a message transfer. */ + +switch(smtp_write_mail_and_rcpt_cmds(&sx, &yield)) + { + 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 permanently or temporarily. We should have flushed and synced after the last RCPT. */ @@ -2473,13 +2642,13 @@ RCPT. */ if (mua_wrapper) { address_item *badaddr; - for (badaddr = first_addr; badaddr; badaddr = badaddr->next) + for (badaddr = sx.first_addr; badaddr; badaddr = badaddr->next) if (badaddr->transport_return != PENDING_OK) { /*XXX could we find a better errno than 0 here? */ set_errno_nohost(addrlist, 0, badaddr->message, FAIL, testflag(badaddr, af_pass_message)); - lflags.ok = FALSE; + sx.ok = FALSE; break; } } @@ -2492,22 +2661,20 @@ are pipelining. The responses are all handled by sync_responses(). If using CHUNKING, do not send a BDAT until we know how big a chunk we want to send is. */ -if ( !(peer_offered & PEER_OFFERED_CHUNKING) - && (lflags.ok || (pipelining_active && !mua_wrapper))) +if ( !(sx.peer_offered & PEER_OFFERED_CHUNKING) + && (sx.ok || (pipelining_active && !mua_wrapper))) { - int count = smtp_write_command(&outblock, FALSE, "DATA\r\n"); + int count = smtp_write_command(&sx.outblock, FALSE, "DATA\r\n"); if (count < 0) goto SEND_FAILED; - switch(sync_responses(first_addr, tblock->rcpt_include_affixes, &sync_addr, - host, count, ob->address_retry_include_sender, lflags.pending_MAIL, - lflags.ok ? +1 : -1, &inblock, ob->command_timeout, buffer, sizeof(buffer))) + switch(sync_responses(&sx, count, sx.ok ? +1 : -1)) { - case 3: lflags.ok = TRUE; /* 2xx & 5xx => OK & progress made */ - case 2: completed_address = TRUE; /* 5xx (only) => progress made */ + case 3: sx.ok = TRUE; /* 2xx & 5xx => OK & progress made */ + case 2: sx.completed_addr = TRUE; /* 5xx (only) => progress made */ break; - case 1: lflags.ok = TRUE; /* 2xx (only) => OK, but if LMTP, */ - if (!lflags.lmtp) completed_address = TRUE; /* can't tell about progress yet */ + case 1: sx.ok = TRUE; /* 2xx (only) => OK, but if LMTP, */ + if (!sx.lmtp) sx.completed_addr = TRUE; /* can't tell about progress yet */ case 0: break; /* No 2xx or 5xx, but no probs */ case -1: goto END_OFF; /* Timeout on RCPT */ @@ -2524,12 +2691,12 @@ for handling the SMTP dot-handling protocol, flagging to apply to headers as well as body. Set the appropriate timeout value to be used for each chunk. (Haven't been able to make it work using select() for writing yet.) */ -if (!(peer_offered & PEER_OFFERED_CHUNKING) && !lflags.ok) +if (!(sx.peer_offered & PEER_OFFERED_CHUNKING) && !sx.ok) { /* Save the first address of the next batch. */ - first_addr = addr; + sx.first_addr = sx.next_addr; - lflags.ok = TRUE; + sx.ok = TRUE; } else { @@ -2550,48 +2717,41 @@ else of responses. The callback needs a whole bunch of state so set up a transport-context structure to be passed around. */ - if (peer_offered & PEER_OFFERED_CHUNKING) + if (sx.peer_offered & PEER_OFFERED_CHUNKING) { tctx.check_string = tctx.escape_string = NULL; tctx.options |= topt_use_bdat; tctx.chunk_cb = smtp_chunk_cmd_callback; - tctx.inblock = &inblock; - tctx.outblock = &outblock; - tctx.host = host; - tctx.first_addr = first_addr; - tctx.sync_addr = &sync_addr; - tctx.pending_MAIL = lflags.pending_MAIL; - tctx.pending_BDAT = FALSE; - tctx.good_RCPT = lflags.ok; - tctx.completed_address = &completed_address; - tctx.cmd_count = 0; - tctx.buffer = buffer; + sx.pending_BDAT = FALSE; + sx.good_RCPT = sx.ok; + sx.cmd_count = 0; + tctx.smtp_context = &sx; } else tctx.options |= topt_end_dot; /* Save the first address of the next batch. */ - first_addr = addr; + sx.first_addr = sx.next_addr; /* Responses from CHUNKING commands go in buffer. Otherwise, there has not been a response. */ - buffer[0] = 0; + sx.buffer[0] = 0; sigalrm_seen = FALSE; - transport_write_timeout = ob->data_timeout; + transport_write_timeout = sx.ob->data_timeout; smtp_command = US"sending data block"; /* For error messages */ DEBUG(D_transport|D_v) - if (peer_offered & PEER_OFFERED_CHUNKING) + if (sx.peer_offered & PEER_OFFERED_CHUNKING) debug_printf(" will write message using CHUNKING\n"); else debug_printf(" SMTP>> writing message and terminating \".\"\n"); transport_count = 0; #ifndef DISABLE_DKIM - lflags.ok = dkim_transport_write_message(inblock.sock, &tctx, &ob->dkim); + sx.ok = dkim_transport_write_message(sx.inblock.sock, &tctx, &sx.ob->dkim); #else - lflags.ok = transport_write_message(inblock.sock, &tctx, 0); + sx.ok = transport_write_message(sx.inblock.sock, &tctx, 0); #endif /* transport_write_message() uses write() because it is called from other @@ -2605,7 +2765,7 @@ else or the failure of a transport filter or the expansion of added headers. Or, when CHUNKING, it can be a protocol-detected failure. */ - if (!lflags.ok) + if (!sx.ok) goto RESPONSE_FAILED; /* We used to send the terminating "." explicitly here, but because of @@ -2616,20 +2776,17 @@ else smtp_command = US"end of data"; - if (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(first_addr, tblock->rcpt_include_affixes, &sync_addr, - host, tctx.cmd_count-1, ob->address_retry_include_sender, - lflags.pending_MAIL, 0, - &inblock, ob->command_timeout, buffer, sizeof(buffer))) + switch(sync_responses(&sx, sx.cmd_count-1, 0)) { - case 3: lflags.ok = TRUE; /* 2xx & 5xx => OK & progress made */ - case 2: completed_address = TRUE; /* 5xx (only) => progress made */ + case 3: sx.ok = TRUE; /* 2xx & 5xx => OK & progress made */ + case 2: sx.completed_addr = TRUE; /* 5xx (only) => progress made */ break; - case 1: lflags.ok = TRUE; /* 2xx (only) => OK, but if LMTP, */ - if (!lflags.lmtp) completed_address = TRUE; /* can't tell about progress yet */ + case 1: sx.ok = TRUE; /* 2xx (only) => OK, but if LMTP, */ + if (!sx.lmtp) sx.completed_addr = TRUE; /* can't tell about progress yet */ case 0: break; /* No 2xx or 5xx, but no probs */ case -1: goto END_OFF; /* Timeout on RCPT */ @@ -2642,18 +2799,18 @@ else * followed by the individual responses, before going on with * the overall response. If we don't get the warning then deal * with per non-PRDR. */ - if(lflags.prdr_active) + if(sx.prdr_active) { - lflags.ok = smtp_read_response(&inblock, buffer, sizeof(buffer), '3', - ob->final_timeout); - if (!lflags.ok && errno == 0) switch(buffer[0]) + sx.ok = smtp_read_response(&sx.inblock, sx.buffer, sizeof(sx.buffer), '3', + sx.ob->final_timeout); + if (!sx.ok && errno == 0) switch(sx.buffer[0]) { - case '2': lflags.prdr_active = FALSE; - lflags.ok = TRUE; + case '2': sx.prdr_active = FALSE; + sx.ok = TRUE; break; case '4': errno = ERRNO_DATA4XX; addrlist->more_errno |= - ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; + ((sx.buffer[1] - '0')*10 + sx.buffer[2] - '0') << 8; break; } } @@ -2663,14 +2820,14 @@ else /* For non-PRDR SMTP, we now read a single response that applies to the whole message. If it is OK, then all the addresses have been delivered. */ - if (!lflags.lmtp) + if (!sx.lmtp) { - lflags.ok = smtp_read_response(&inblock, buffer, sizeof(buffer), '2', - ob->final_timeout); - if (!lflags.ok && errno == 0 && buffer[0] == '4') + sx.ok = smtp_read_response(&sx.inblock, sx.buffer, sizeof(sx.buffer), '2', + sx.ob->final_timeout); + if (!sx.ok && errno == 0 && sx.buffer[0] == '4') { errno = ERRNO_DATA4XX; - addrlist->more_errno |= ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; + addrlist->more_errno |= ((sx.buffer[1] - '0')*10 + sx.buffer[2] - '0') << 8; } } @@ -2686,14 +2843,14 @@ else software before the spool gets updated. Also record the final SMTP confirmation if needed (for SMTP only). */ - if (lflags.ok) + if (sx.ok) { int flag = '='; int delivery_time = (int)(time(NULL) - start_delivery_time); int len; uschar *conf = NULL; - lflags.send_rset = FALSE; + sx.send_rset = FALSE; pipelining_active = FALSE; /* Set up confirmation if needed - applies only to SMTP */ @@ -2702,18 +2859,18 @@ else #ifdef DISABLE_EVENT LOGGING(smtp_confirmation) && #endif - !lflags.lmtp + !sx.lmtp ) { - const uschar *s = string_printing(buffer); + const uschar *s = string_printing(sx.buffer); /* deconst cast ok here as string_printing was checked to have alloc'n'copied */ - conf = (s == buffer)? (uschar *)string_copy(s) : US s; + conf = (s == sx.buffer)? (uschar *)string_copy(s) : US s; } /* Process all transported addresses - for LMTP or PRDR, read a status for each one. */ - for (addr = addrlist; addr != first_addr; addr = addr->next) + for (addr = addrlist; addr != sx.first_addr; addr = addr->next) { if (addr->transport_return != PENDING_OK) continue; @@ -2723,43 +2880,43 @@ else it doesn't get tried again too soon. */ #ifndef DISABLE_PRDR - if (lflags.lmtp || lflags.prdr_active) + if (sx.lmtp || sx.prdr_active) #else - if (lflags.lmtp) + if (sx.lmtp) #endif { - if (!smtp_read_response(&inblock, buffer, sizeof(buffer), '2', - ob->final_timeout)) + if (!smtp_read_response(&sx.inblock, sx.buffer, sizeof(sx.buffer), '2', + sx.ob->final_timeout)) { - if (errno != 0 || buffer[0] == 0) goto RESPONSE_FAILED; + if (errno != 0 || sx.buffer[0] == 0) goto RESPONSE_FAILED; addr->message = string_sprintf( #ifndef DISABLE_PRDR - "%s error after %s: %s", lflags.prdr_active ? "PRDR":"LMTP", + "%s error after %s: %s", sx.prdr_active ? "PRDR":"LMTP", #else "LMTP error after %s: %s", #endif - data_command, string_printing(buffer)); + data_command, string_printing(sx.buffer)); setflag(addr, af_pass_message); /* Allow message to go to user */ - if (buffer[0] == '5') + if (sx.buffer[0] == '5') addr->transport_return = FAIL; else { errno = ERRNO_DATA4XX; - addr->more_errno |= ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; + addr->more_errno |= ((sx.buffer[1] - '0')*10 + sx.buffer[2] - '0') << 8; addr->transport_return = DEFER; #ifndef DISABLE_PRDR - if (!lflags.prdr_active) + if (!sx.prdr_active) #endif retry_add_item(addr, addr->address_retry_key, 0); } continue; } - completed_address = TRUE; /* NOW we can set this flag */ + sx.completed_addr = TRUE; /* NOW we can set this flag */ if (LOGGING(smtp_confirmation)) { - const uschar *s = string_printing(buffer); + const uschar *s = string_printing(sx.buffer); /* deconst cast ok here as string_printing was checked to have alloc'n'copied */ - conf = (s == buffer)? (uschar *)string_copy(s) : US s; + conf = (s == sx.buffer) ? US string_copy(s) : US s; } } @@ -2772,13 +2929,13 @@ else addr->special_action = flag; addr->message = conf; #ifndef DISABLE_PRDR - if (lflags.prdr_active) addr->flags |= af_prdr_used; + if (sx.prdr_active) addr->flags |= af_prdr_used; #endif - if (peer_offered & PEER_OFFERED_CHUNKING) addr->flags |= af_chunking_used; + if (sx.peer_offered & PEER_OFFERED_CHUNKING) addr->flags |= af_chunking_used; flag = '-'; #ifndef DISABLE_PRDR - if (!lflags.prdr_active) + if (!sx.prdr_active) #endif { /* Update the journal. For homonymic addresses, use the base address plus @@ -2787,55 +2944,55 @@ else write error, as it may prove possible to update the spool file later. */ if (testflag(addr, af_homonym)) - sprintf(CS buffer, "%.500s/%s\n", addr->unique + 3, tblock->name); + sprintf(CS sx.buffer, "%.500s/%s\n", addr->unique + 3, tblock->name); else - sprintf(CS buffer, "%.500s\n", addr->unique); + sprintf(CS sx.buffer, "%.500s\n", addr->unique); - DEBUG(D_deliver) debug_printf("journalling %s\n", buffer); - len = Ustrlen(CS buffer); - if (write(journal_fd, buffer, len) != len) + DEBUG(D_deliver) debug_printf("journalling %s\n", sx.buffer); + len = Ustrlen(CS sx.buffer); + if (write(journal_fd, sx.buffer, len) != len) log_write(0, LOG_MAIN|LOG_PANIC, "failed to write journal for " - "%s: %s", buffer, strerror(errno)); + "%s: %s", sx.buffer, strerror(errno)); } } #ifndef DISABLE_PRDR - if (lflags.prdr_active) + if (sx.prdr_active) { /* PRDR - get the final, overall response. For any non-success upgrade all the address statuses. */ - lflags.ok = smtp_read_response(&inblock, buffer, sizeof(buffer), '2', - ob->final_timeout); - if (!lflags.ok) + sx.ok = smtp_read_response(&sx.inblock, sx.buffer, sizeof(sx.buffer), '2', + sx.ob->final_timeout); + if (!sx.ok) { - if(errno == 0 && buffer[0] == '4') + if(errno == 0 && sx.buffer[0] == '4') { errno = ERRNO_DATA4XX; - addrlist->more_errno |= ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; + addrlist->more_errno |= ((sx.buffer[1] - '0')*10 + sx.buffer[2] - '0') << 8; } - for (addr = addrlist; addr != first_addr; addr = addr->next) - if (buffer[0] == '5' || addr->transport_return == OK) + for (addr = addrlist; addr != sx.first_addr; addr = addr->next) + if (sx.buffer[0] == '5' || addr->transport_return == OK) addr->transport_return = PENDING_OK; /* allow set_errno action */ goto RESPONSE_FAILED; } /* Update the journal, or setup retry. */ - for (addr = addrlist; addr != first_addr; addr = addr->next) + for (addr = addrlist; addr != sx.first_addr; addr = addr->next) if (addr->transport_return == OK) - { - if (testflag(addr, af_homonym)) - sprintf(CS buffer, "%.500s/%s\n", addr->unique + 3, tblock->name); - else - sprintf(CS buffer, "%.500s\n", addr->unique); - - DEBUG(D_deliver) debug_printf("journalling(PRDR) %s\n", buffer); - len = Ustrlen(CS buffer); - if (write(journal_fd, buffer, len) != len) - log_write(0, LOG_MAIN|LOG_PANIC, "failed to write journal for " - "%s: %s", buffer, strerror(errno)); - } - else if (addr->transport_return == DEFER) - retry_add_item(addr, addr->address_retry_key, -2); + { + if (testflag(addr, af_homonym)) + sprintf(CS sx.buffer, "%.500s/%s\n", addr->unique + 3, tblock->name); + else + sprintf(CS sx.buffer, "%.500s\n", addr->unique); + + DEBUG(D_deliver) debug_printf("journalling(PRDR) %s\n", sx.buffer); + len = Ustrlen(CS sx.buffer); + if (write(journal_fd, sx.buffer, len) != len) + log_write(0, LOG_MAIN|LOG_PANIC, "failed to write journal for " + "%s: %s", sx.buffer, strerror(errno)); + } + else if (addr->transport_return == DEFER) + retry_add_item(addr, addr->address_retry_key, -2); } #endif @@ -2856,7 +3013,7 @@ assumed if errno == 0 and there is no text in the buffer. If control reaches here during the setting up phase (i.e. before MAIL FROM) then always defer, as the problem is not related to this specific message. */ -if (!lflags.ok) +if (!sx.ok) { int code, set_rc; uschar * set_message; @@ -2865,8 +3022,8 @@ if (!lflags.ok) { save_errno = errno; message = NULL; - lflags.send_quit = check_response(host, &save_errno, addrlist->more_errno, - buffer, &code, &message, &pass_message); + sx.send_quit = check_response(host, &save_errno, addrlist->more_errno, + sx.buffer, &code, &message, &pass_message); goto FAILED; } @@ -2876,36 +3033,16 @@ if (!lflags.ok) code = '4'; message = US string_sprintf("send() to %s [%s] failed: %s", host->name, host->address, strerror(save_errno)); - lflags.send_quit = FALSE; + sx.send_quit = FALSE; goto FAILED; } - /* This label is jumped to directly when a TLS negotiation has failed, - or was not done for a host for which it is required. Values will be set - in message and save_errno, and setting_up will always be true. Treat as - a temporary error. */ - -#ifdef SUPPORT_TLS - TLS_FAILED: - code = '4'; -#endif - - /* If the failure happened while setting up the call, see if the failure was - a 5xx response (this will either be on connection, or following HELO - a 5xx - after EHLO causes it to try HELO). If so, fail all addresses, as this host is - never going to accept them. For other errors during setting up (timeouts or - whatever), defer all addresses, and yield DEFER, so that the host is not - tried again for a while. */ - FAILED: - lflags.ok = FALSE; /* For when reached by GOTO */ - set_message = message; + { + BOOL message_error; - if (lflags.setting_up) - if (code == '5') - set_rc = FAIL; - else - yield = set_rc = DEFER; + sx.ok = FALSE; /* For when reached by GOTO */ + set_message = message; /* We want to handle timeouts after MAIL or "." and loss of connection after "." specially. They can indicate a problem with the sender address or with @@ -2913,17 +3050,8 @@ if (!lflags.ok) cases are treated in the same way as a 4xx response. This next bit of code does the classification. */ - else - { - BOOL message_error; - switch(save_errno) { -#ifdef SUPPORT_I18N - case ERRNO_UTF8_FWD: - code = '5'; - /*FALLTHROUGH*/ -#endif case 0: case ERRNO_MAIL4XX: case ERRNO_DATA4XX: @@ -2996,7 +3124,7 @@ if (!lflags.ok) set_errno(addrlist, save_errno, set_message, set_rc, pass_message, host #ifdef EXPERIMENTAL_DSN_INFO - , smtp_greeting, helo_response + , sx.smtp_greeting, sx.helo_response #endif ); } @@ -3032,10 +3160,10 @@ hosts_nopass_tls. */ DEBUG(D_transport) debug_printf("ok=%d send_quit=%d send_rset=%d continue_more=%d " - "yield=%d first_address is %sNULL\n", lflags.ok, lflags.send_quit, - lflags.send_rset, continue_more, yield, first_addr ? "not " : ""); + "yield=%d first_address is %sNULL\n", sx.ok, sx.send_quit, + sx.send_rset, continue_more, yield, sx.first_addr ? "not " : ""); -if (completed_address && lflags.ok && lflags.send_quit) +if (sx.completed_addr && sx.ok && sx.send_quit) { BOOL more; smtp_compare_t t_compare; @@ -3043,10 +3171,10 @@ if (completed_address && lflags.ok && lflags.send_quit) t_compare.tblock = tblock; t_compare.current_sender_address = sender_address; - if ( first_addr != NULL + if ( sx.first_addr != NULL || continue_more || ( ( tls_out.active < 0 - || verify_check_given_host(&ob->hosts_nopass_tls, host) != OK + || verify_check_given_host(&sx.ob->hosts_nopass_tls, host) != OK ) && transport_check_waiting(tblock->name, host->name, @@ -3057,33 +3185,31 @@ if (completed_address && lflags.ok && lflags.send_quit) uschar *msg; BOOL pass_message; - if (lflags.send_rset) - { - if (! (lflags.ok = smtp_write_command(&outblock, FALSE, "RSET\r\n") >= 0)) + if (sx.send_rset) + if (! (sx.ok = smtp_write_command(&sx.outblock, FALSE, "RSET\r\n") >= 0)) { msg = US string_sprintf("send() to %s [%s] failed: %s", host->name, host->address, strerror(save_errno)); - lflags.send_quit = FALSE; + sx.send_quit = FALSE; } - else if (! (lflags.ok = smtp_read_response(&inblock, buffer, - sizeof(buffer), '2', ob->command_timeout))) + else if (! (sx.ok = smtp_read_response(&sx.inblock, sx.buffer, + sizeof(sx.buffer), '2', sx.ob->command_timeout))) { int code; - lflags.send_quit = check_response(host, &errno, 0, buffer, &code, &msg, + sx.send_quit = check_response(host, &errno, 0, sx.buffer, &code, &msg, &pass_message); - if (!lflags.send_quit) + if (!sx.send_quit) { DEBUG(D_transport) debug_printf("H=%s [%s] %s\n", host->name, host->address, msg); } } - } /* Either RSET was not needed, or it succeeded */ - if (lflags.ok) + if (sx.ok) { - if (first_addr != NULL) /* More addresses still to be sent */ + if (sx.first_addr != NULL) /* More addresses still to be sent */ { /* in this run of the transport */ continue_sequence++; /* Causes * in logging */ goto SEND_MESSAGE; @@ -3100,12 +3226,11 @@ if (completed_address && lflags.ok && lflags.send_quit) { tls_close(FALSE, TRUE); smtp_peer_options = smtp_peer_options_wrap; - if (lflags.smtps) - lflags.ok = FALSE; - else - lflags.ok = smtp_write_command(&outblock,FALSE,"EHLO %s\r\n",helo_data) >= 0 && - smtp_read_response(&inblock, buffer, sizeof(buffer), '2', - ob->command_timeout); + sx.ok = !sx.smtps + && smtp_write_command(&sx.outblock, FALSE, + "EHLO %s\r\n", sx.helo_data) >= 0 + && smtp_read_response(&sx.inblock, sx.buffer, sizeof(sx.buffer), + '2', sx.ob->command_timeout); } #endif @@ -3115,16 +3240,16 @@ if (completed_address && lflags.ok && lflags.send_quit) /*XXX DSN_INFO: assume likely to do new HELO; but for greet we'll want to propagate it from the initial */ - if (lflags.ok && transport_pass_socket(tblock->name, host->name, - host->address, new_message_id, inblock.sock)) - lflags.send_quit = FALSE; + if (sx.ok && transport_pass_socket(tblock->name, host->name, + host->address, new_message_id, sx.inblock.sock)) + sx.send_quit = FALSE; } /* If RSET failed and there are addresses left, they get deferred. */ - else set_errno(first_addr, errno, msg, DEFER, FALSE, host + else set_errno(sx.first_addr, errno, msg, DEFER, FALSE, host #ifdef EXPERIMENTAL_DSN_INFO - , smtp_greeting, helo_response + , sx.smtp_greeting, sx.helo_response #endif ); } @@ -3149,7 +3274,7 @@ This change is being made on 31-Jul-98. After over a year of trouble-free operation, the old commented-out code was removed on 17-Sep-99. */ SEND_QUIT: -if (lflags.send_quit) (void)smtp_write_command(&outblock, FALSE, "QUIT\r\n"); +if (sx.send_quit) (void)smtp_write_command(&sx.outblock, FALSE, "QUIT\r\n"); END_OFF: @@ -3168,14 +3293,14 @@ specified in the transports, and therefore not visible at top level, in which case continue_more won't get set. */ HDEBUG(D_transport|D_acl|D_v) debug_printf(" SMTP(close)>>\n"); -if (lflags.send_quit) +if (sx.send_quit) { - shutdown(outblock.sock, SHUT_WR); - if (fcntl(inblock.sock, F_SETFL, O_NONBLOCK) == 0) - for (rc = 16; read(inblock.sock, inbuffer, sizeof(inbuffer)) > 0 && rc > 0;) + shutdown(sx.outblock.sock, SHUT_WR); + 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 */ } -(void)close(inblock.sock); +(void)close(sx.inblock.sock); #ifndef DISABLE_EVENT (void) event_raise(tblock->event_action, US"tcp:close", NULL); @@ -3210,7 +3335,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..d89537b40 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,69 @@ typedef struct { #endif } smtp_transport_options_block; +/* smtp connect context */ +typedef struct { + uschar * from_addr; + address_item * addrlist; + host_item * host; + int host_af; + int port; + uschar * interface; + + BOOL verify:1; + BOOL lmtp:1; + BOOL smtps:1; + BOOL ok:1; + BOOL setting_up:1; + BOOL esmtp:1; + BOOL esmtp_sent: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 + 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; + uschar * helo_data; +#ifdef EXPERIMENTAL_DSN_INFO + uschar * smtp_greeting; + uschar * helo_response; +#endif + + address_item * first_addr; + address_item * next_addr; + address_item * sync_addr; + + 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); +extern int smtp_write_mail_and_rcpt_cmds(smtp_context *, int *); + + /* 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..6fef314fc 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -119,98 +119,21 @@ return cache_record; -/************************************************* -* Do callout verification for an address * -*************************************************/ - -/* This function is called from verify_address() when the address has routed to -a host list, and a callout has been requested. Callouts are expensive; that is -why a cache is used to improve the efficiency. - -Arguments: - addr the address that's been routed - host_list the list of hosts to try - tf the transport feedback block +/* Check the callout cache. +Options * pm_mailfrom may be modified by cache partial results. - ifstring "interface" option from transport, or NULL - portstring "port" option from transport, or NULL - protocolstring "protocol" option from transport, or NULL - callout the per-command callout timeout - callout_overall the overall callout timeout (if < 0 use 4*callout) - callout_connect the callout connection timeout (if < 0 use callout) - options the verification options - these bits are used: - vopt_is_recipient => this is a recipient address - vopt_callout_no_cache => don't use callout cache - vopt_callout_fullpm => if postmaster check, do full one - vopt_callout_random => do the "random" thing - vopt_callout_recipsender => use real sender for recipient - vopt_callout_recippmaster => use postmaster for recipient - se_mailfrom MAIL FROM address for sender verify; NULL => "" - pm_mailfrom if non-NULL, do the postmaster check with this sender - -Returns: OK/FAIL/DEFER +Return: TRUE if result found */ -static int -do_callout(address_item *addr, host_item *host_list, transport_feedback *tf, - int callout, int callout_overall, int callout_connect, int options, - uschar *se_mailfrom, uschar *pm_mailfrom) +static BOOL +cached_callout_lookup(address_item * addr, uschar * address_key, + uschar * from_address, int * opt_ptr, uschar ** pm_ptr, + int * yield, uschar ** failure_ptr, + dbdata_callout_cache * new_domain_record, int * old_domain_res) { -int yield = OK; -int old_domain_cache_result = ccache_accept; -BOOL done = FALSE; -uschar *address_key; -uschar *from_address; -uschar *random_local_part = NULL; -const uschar *save_deliver_domain = deliver_domain; -uschar **failure_ptr = options & vopt_is_recipient - ? &recipient_verify_failure : &sender_verify_failure; +int options = *opt_ptr; open_db dbblock; open_db *dbm_file = NULL; -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; -new_domain_record.random_result = ccache_unknown; - -memset(&new_address_record, 0, sizeof(new_address_record)); - -/* For a recipient callout, the key used for the address cache record must -include the sender address if we are using the real sender in the callout, -because that may influence the result of the callout. */ - -address_key = addr->address; -from_address = US""; - -if (options & vopt_is_recipient) - { - if (options & vopt_callout_recipsender) - { - address_key = string_sprintf("%s/<%s>", addr->address, sender_address); - from_address = sender_address; - if (cutthrough.delivery) options |= vopt_callout_no_cache; - } - else if (options & vopt_callout_recippmaster) - { - address_key = string_sprintf("%s/<postmaster@%s>", addr->address, - qualify_domain_sender); - from_address = string_sprintf("postmaster@%s", qualify_domain_sender); - } - } - -/* For a sender callout, we must adjust the key if the mailfrom address is not -empty. */ - -else - { - from_address = (se_mailfrom == NULL)? US"" : se_mailfrom; - if (from_address[0] != 0) - address_key = string_sprintf("%s/<%s>", addr->address, from_address); - } /* Open the callout cache database, it it exists, for reading only at this stage, unless caching has been disabled. */ @@ -219,21 +142,19 @@ if (options & vopt_callout_no_cache) { HDEBUG(D_verify) debug_printf("callout cache: disabled by no_cache\n"); } -else if ((dbm_file = dbfn_open(US"callout", O_RDWR, &dbblock, FALSE)) == NULL) +else if (!(dbm_file = dbfn_open(US"callout", O_RDWR, &dbblock, FALSE))) { HDEBUG(D_verify) debug_printf("callout cache: not available\n"); } - -/* If a cache database is available see if we can avoid the need to do an -actual callout by making use of previously-obtained data. */ - -if (dbm_file) +else { - dbdata_callout_cache_address *cache_address_record; - dbdata_callout_cache *cache_record = get_callout_cache_record(dbm_file, - addr->domain, US"domain", - callout_cache_domain_positive_expire, - callout_cache_domain_negative_expire); + /* If a cache database is available see if we can avoid the need to do an + actual callout by making use of previously-obtained data. */ + + dbdata_callout_cache_address * cache_address_record; + dbdata_callout_cache * cache_record = get_callout_cache_record(dbm_file, + addr->domain, US"domain", + callout_cache_domain_positive_expire, callout_cache_domain_negative_expire); /* If an unexpired cache record was found for this domain, see if the callout process can be short-circuited. */ @@ -248,20 +169,21 @@ if (dbm_file) not to disturb the cached domain value if this whole verification succeeds (we don't want it turning into "accept"). */ - old_domain_cache_result = cache_record->result; + *old_domain_res = cache_record->result; - if (cache_record->result == ccache_reject || - (*from_address == 0 && cache_record->result == ccache_reject_mfnull)) + if ( cache_record->result == ccache_reject + || *from_address == 0 && cache_record->result == ccache_reject_mfnull) { setflag(addr, af_verify_nsfail); HDEBUG(D_verify) - debug_printf("callout cache: domain gave initial rejection, or " - "does not accept HELO or MAIL FROM:<>\n"); + debug_printf("callout cache: domain gave initial rejection, or " + "does not accept HELO or MAIL FROM:<>\n"); setflag(addr, af_verify_nsfail); addr->user_message = US"(result of an earlier callout reused)."; - yield = FAIL; + *yield = FAIL; *failure_ptr = US"mail"; - goto END_CALLOUT; + dbfn_close(dbm_file); + return TRUE; } /* If a previous check on a "random" local part was accepted, we assume @@ -276,21 +198,23 @@ if (dbm_file) case ccache_accept: HDEBUG(D_verify) debug_printf("callout cache: domain accepts random addresses\n"); - goto END_CALLOUT; /* Default yield is OK */ + dbfn_close(dbm_file); + return TRUE; /* Default yield is OK */ case ccache_reject: HDEBUG(D_verify) debug_printf("callout cache: domain rejects random addresses\n"); - options &= ~vopt_callout_random; - new_domain_record.random_result = ccache_reject; - new_domain_record.random_stamp = cache_record->random_stamp; + *opt_ptr = options & ~vopt_callout_random; + new_domain_record->random_result = ccache_reject; + new_domain_record->random_stamp = cache_record->random_stamp; break; default: HDEBUG(D_verify) debug_printf("callout cache: need to check random address handling " "(not cached or cache expired)\n"); - goto END_CACHE; + dbfn_close(dbm_file); + return FALSE; } /* If a postmaster check is requested, but there was a previous failure, @@ -298,27 +222,29 @@ if (dbm_file) but has not been done before, we are going to have to do a callout, so skip remaining cache processing. */ - if (pm_mailfrom) + if (*pm_ptr) { if (cache_record->postmaster_result == ccache_reject) - { - setflag(addr, af_verify_pmfail); - HDEBUG(D_verify) - debug_printf("callout cache: domain does not accept " - "RCPT TO:<postmaster@domain>\n"); - yield = FAIL; - *failure_ptr = US"postmaster"; - setflag(addr, af_verify_pmfail); - addr->user_message = US"(result of earlier verification reused)."; - goto END_CALLOUT; - } + { + setflag(addr, af_verify_pmfail); + HDEBUG(D_verify) + debug_printf("callout cache: domain does not accept " + "RCPT TO:<postmaster@domain>\n"); + *yield = FAIL; + *failure_ptr = US"postmaster"; + setflag(addr, af_verify_pmfail); + addr->user_message = US"(result of earlier verification reused)."; + dbfn_close(dbm_file); + return TRUE; + } if (cache_record->postmaster_result == ccache_unknown) - { - HDEBUG(D_verify) - debug_printf("callout cache: need to check RCPT " - "TO:<postmaster@domain> (not cached or cache expired)\n"); - goto END_CACHE; - } + { + HDEBUG(D_verify) + debug_printf("callout cache: need to check RCPT " + "TO:<postmaster@domain> (not cached or cache expired)\n"); + dbfn_close(dbm_file); + return FALSE; + } /* If cache says OK, set pm_mailfrom NULL to prevent a redundant postmaster check if the address itself has to be checked. Also ensure @@ -326,10 +252,10 @@ if (dbm_file) */ HDEBUG(D_verify) debug_printf("callout cache: domain accepts RCPT " - "TO:<postmaster@domain>\n"); - pm_mailfrom = NULL; - new_domain_record.postmaster_result = ccache_accept; - new_domain_record.postmaster_stamp = cache_record->postmaster_stamp; + "TO:<postmaster@domain>\n"); + *pm_ptr = NULL; + new_domain_record->postmaster_result = ccache_accept; + new_domain_record->postmaster_stamp = cache_record->postmaster_stamp; } } @@ -338,37 +264,300 @@ if (dbm_file) sender address if we are doing a recipient callout with a non-empty sender). */ - cache_address_record = (dbdata_callout_cache_address *) - get_callout_cache_record(dbm_file, - address_key, US"address", - callout_cache_positive_expire, - callout_cache_negative_expire); + if (!(cache_address_record = (dbdata_callout_cache_address *) + get_callout_cache_record(dbm_file, address_key, US"address", + callout_cache_positive_expire, callout_cache_negative_expire))) + { + dbfn_close(dbm_file); + return FALSE; + } - if (cache_address_record) + if (cache_address_record->result == ccache_accept) { - if (cache_address_record->result == ccache_accept) - { - HDEBUG(D_verify) - debug_printf("callout cache: address record is positive\n"); - } - else - { - HDEBUG(D_verify) - debug_printf("callout cache: address record is negative\n"); - addr->user_message = US"Previous (cached) callout verification failure"; - *failure_ptr = US"recipient"; - yield = FAIL; - } - goto END_CALLOUT; + HDEBUG(D_verify) + debug_printf("callout cache: address record is positive\n"); + } + else + { + HDEBUG(D_verify) + debug_printf("callout cache: address record is negative\n"); + addr->user_message = US"Previous (cached) callout verification failure"; + *failure_ptr = US"recipient"; + *yield = FAIL; } /* Close the cache database while we actually do the callout for real. */ - END_CACHE: dbfn_close(dbm_file); - dbm_file = NULL; + return TRUE; + } +return FALSE; +} + + +/* Write results to callout cache +*/ +static void +cache_callout_write(dbdata_callout_cache * dom_rec, const uschar * domain, + int done, dbdata_callout_cache_address * addr_rec, uschar * address_key) +{ +open_db dbblock; +open_db *dbm_file = NULL; + +/* If we get here with done == TRUE, a successful callout happened, and yield +will be set OK or FAIL according to the response to the RCPT command. +Otherwise, we looped through the hosts but couldn't complete the business. +However, there may be domain-specific information to cache in both cases. + +The value of the result field in the new_domain record is ccache_unknown if +there was an error before or with MAIL FROM:, and errno was not zero, +implying some kind of I/O error. We don't want to write the cache in that case. +Otherwise the value is ccache_accept, ccache_reject, or ccache_reject_mfnull. */ + +if (dom_rec->result != ccache_unknown) + if (!(dbm_file = dbfn_open(US"callout", O_RDWR|O_CREAT, &dbblock, FALSE))) + { + HDEBUG(D_verify) debug_printf("callout cache: not available\n"); + } + else + { + (void)dbfn_write(dbm_file, domain, dom_rec, + (int)sizeof(dbdata_callout_cache)); + HDEBUG(D_verify) debug_printf("wrote callout cache domain record for %s:\n" + " result=%d postmaster=%d random=%d\n", + domain, + dom_rec->result, + dom_rec->postmaster_result, + dom_rec->random_result); + } + +/* If a definite result was obtained for the callout, cache it unless caching +is disabled. */ + +if (done && addr_rec->result != ccache_unknown) + { + if (!dbm_file) + dbm_file = dbfn_open(US"callout", O_RDWR|O_CREAT, &dbblock, FALSE); + if (!dbm_file) + { + HDEBUG(D_verify) debug_printf("no callout cache available\n"); + } + else + { + (void)dbfn_write(dbm_file, address_key, addr_rec, + (int)sizeof(dbdata_callout_cache_address)); + HDEBUG(D_verify) debug_printf("wrote %s callout cache address record for %s\n", + addr_rec->result == ccache_accept ? "positive" : "negative", + address_key); + } } +if (dbm_file) dbfn_close(dbm_file); +} + + +/* Cutthrough-multi. If the existing cached cutthrough connection matches +the one we would make for a subsequent recipient, use it. Send the RCPT TO +and check the result, nonpipelined as it may be wanted immediately for +recipient-verification. + +It seems simpler to deal with this case separately from the main callout loop. +We will need to remember it has sent, or not, so that rcpt-acl tail code +can do it there for the non-rcpt-verify case. For this we keep an addresscount. + +Return: TRUE for a definitive result for the recipient +*/ +static int +cutthrough_multi(address_item * addr, host_item * host_list, + transport_feedback * tf, int * yield) +{ +BOOL done = FALSE; +host_item * host; + +if (addr->transport == cutthrough.addr.transport) + for (host = host_list; host; host = host->next) + if (Ustrcmp(host->address, cutthrough.host.address) == 0) + { + int host_af; + uschar *interface = NULL; /* Outgoing interface to use; NULL => any */ + int port = 25; + + deliver_host = host->name; + deliver_host_address = host->address; + deliver_host_port = host->port; + deliver_domain = addr->domain; + transport_name = addr->transport->name; + + host_af = (Ustrchr(host->address, ':') == NULL)? AF_INET:AF_INET6; + + if (!smtp_get_interface(tf->interface, host_af, addr, &interface, + US"callout") || + !smtp_get_port(tf->port, addr, &port, US"callout")) + log_write(0, LOG_MAIN|LOG_PANIC, "<%s>: %s", addr->address, + addr->message); + + if ( ( interface == cutthrough.interface + || ( interface + && cutthrough.interface + && Ustrcmp(interface, cutthrough.interface) == 0 + ) ) + && port == cutthrough.host.port + ) + { + uschar * resp = NULL; + + /* Match! Send the RCPT TO, set done from the response */ + done = + smtp_write_command(&ctblock, FALSE, "RCPT TO:<%.1000s>\r\n", + transport_rcpt_address(addr, + addr->transport->rcpt_include_affixes)) >= 0 && + cutthrough_response('2', &resp, CUTTHROUGH_DATA_TIMEOUT) == '2'; + + /* This would go horribly wrong if a callout fail was ignored by ACL. + We punt by abandoning cutthrough on a reject, like the + first-rcpt does. */ + + if (done) + { + address_item * na = store_get(sizeof(address_item)); + *na = cutthrough.addr; + cutthrough.addr = *addr; + cutthrough.addr.host_used = &cutthrough.host; + cutthrough.addr.next = na; + + cutthrough.nrcpt++; + } + else + { + cancel_cutthrough_connection("recipient rejected"); + if (!resp || errno == ETIMEDOUT) + { + HDEBUG(D_verify) debug_printf("SMTP timeout\n"); + } + else if (errno == 0) + { + if (*resp == 0) + Ustrcpy(resp, US"connection dropped"); + + addr->message = + string_sprintf("response to \"%s\" was: %s", + big_buffer, string_printing(resp)); + + addr->user_message = + string_sprintf("Callout verification failed:\n%s", resp); + + /* Hard rejection ends the process */ + + if (resp[0] == '5') /* Address rejected */ + { + *yield = FAIL; + done = TRUE; + } + } + } + } + break; /* host_list */ + } +if (!done) + cancel_cutthrough_connection("incompatible connection"); +return done; +} + + +/************************************************* +* Do callout verification for an address * +*************************************************/ + +/* This function is called from verify_address() when the address has routed to +a host list, and a callout has been requested. Callouts are expensive; that is +why a cache is used to improve the efficiency. + +Arguments: + addr the address that's been routed + host_list the list of hosts to try + tf the transport feedback block + + ifstring "interface" option from transport, or NULL + portstring "port" option from transport, or NULL + protocolstring "protocol" option from transport, or NULL + callout the per-command callout timeout + callout_overall the overall callout timeout (if < 0 use 4*callout) + callout_connect the callout connection timeout (if < 0 use callout) + options the verification options - these bits are used: + vopt_is_recipient => this is a recipient address + vopt_callout_no_cache => don't use callout cache + vopt_callout_fullpm => if postmaster check, do full one + vopt_callout_random => do the "random" thing + vopt_callout_recipsender => use real sender for recipient + vopt_callout_recippmaster => use postmaster for recipient + se_mailfrom MAIL FROM address for sender verify; NULL => "" + pm_mailfrom if non-NULL, do the postmaster check with this sender + +Returns: OK/FAIL/DEFER +*/ + +static int +do_callout(address_item *addr, host_item *host_list, transport_feedback *tf, + int callout, int callout_overall, int callout_connect, int options, + uschar *se_mailfrom, uschar *pm_mailfrom) +{ +int yield = OK; +int old_domain_cache_result = ccache_accept; +BOOL done = FALSE; +uschar *address_key; +uschar *from_address; +uschar *random_local_part = NULL; +const uschar *save_deliver_domain = deliver_domain; +uschar **failure_ptr = options & vopt_is_recipient + ? &recipient_verify_failure : &sender_verify_failure; +dbdata_callout_cache new_domain_record; +dbdata_callout_cache_address new_address_record; +time_t callout_start_time; + +new_domain_record.result = ccache_unknown; +new_domain_record.postmaster_result = ccache_unknown; +new_domain_record.random_result = ccache_unknown; + +memset(&new_address_record, 0, sizeof(new_address_record)); + +/* For a recipient callout, the key used for the address cache record must +include the sender address if we are using the real sender in the callout, +because that may influence the result of the callout. */ + +if (options & vopt_is_recipient) + if (options & vopt_callout_recipsender) + { + from_address = sender_address; + address_key = string_sprintf("%s/<%s>", addr->address, sender_address); + if (cutthrough.delivery) options |= vopt_callout_no_cache; + } + else if (options & vopt_callout_recippmaster) + { + from_address = string_sprintf("postmaster@%s", qualify_domain_sender); + address_key = string_sprintf("%s/<postmaster@%s>", addr->address, + qualify_domain_sender); + } + else + { + from_address = US""; + address_key = addr->address; + } + +/* For a sender callout, we must adjust the key if the mailfrom address is not +empty. */ + +else + { + from_address = se_mailfrom ? se_mailfrom : US""; + address_key = *from_address + ? string_sprintf("%s/<%s>", addr->address, from_address) : addr->address; + } + +if (cached_callout_lookup(addr, address_key, from_address, + &options, &pm_mailfrom, &yield, failure_ptr, + &new_domain_record, &old_domain_cache_result)) + goto END_CALLOUT; + if (!addr->transport) { HDEBUG(D_verify) debug_printf("cannot callout via null transport\n"); @@ -380,6 +569,7 @@ else { smtp_transport_options_block *ob = (smtp_transport_options_block *)addr->transport->options_block; + host_item * host; /* The information wasn't available in the cache, so we have to do a real callout and save the result in the cache for next time, unless no_cache is set, @@ -387,7 +577,7 @@ else with a random local part, ensure that such a local part is available. If not, log the fact, but carry on without randomising. */ - if (options & vopt_callout_random && callout_random_local_part != NULL) + if (options & vopt_callout_random && callout_random_local_part) if (!(random_local_part = expand_string(callout_random_local_part))) log_write(0, LOG_MAIN|LOG_PANIC, "failed to expand " "callout_random_local_part: %s", expand_string_message); @@ -407,14 +597,13 @@ else if (smtp_out && !disable_callout_flush) mac_smtp_fflush(); + clearflag(addr, af_verify_pmfail); /* postmaster callout flag */ + clearflag(addr, af_verify_nsfail); /* null sender callout flag */ + /* cutthrough-multi: if a nonfirst rcpt has the same routing as the first, and we are holding a cutthrough conn open, we can just append the rcpt to that conn for verification purposes (and later delivery also). Simplest -coding means skipping this whole loop and doing the append separately. - -We will need to remember it has been appended so that rcpt-acl tail code -can do it there for the non-rcpt-verify case. For this we keep an addresscount. -*/ +coding means skipping this whole loop and doing the append separately. */ /* Can we re-use an open cutthrough connection? */ if ( cutthrough.fd >= 0 @@ -423,127 +612,17 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. && !random_local_part && !pm_mailfrom ) - { - if (addr->transport == cutthrough.addr.transport) - for (host = host_list; host; host = host->next) - if (Ustrcmp(host->address, cutthrough.host.address) == 0) - { - int host_af; - uschar *interface = NULL; /* Outgoing interface to use; NULL => any */ - int port = 25; - - deliver_host = host->name; - deliver_host_address = host->address; - deliver_host_port = host->port; - deliver_domain = addr->domain; - transport_name = addr->transport->name; - - host_af = (Ustrchr(host->address, ':') == NULL)? AF_INET:AF_INET6; - - if (!smtp_get_interface(tf->interface, host_af, addr, &interface, - US"callout") || - !smtp_get_port(tf->port, addr, &port, US"callout")) - log_write(0, LOG_MAIN|LOG_PANIC, "<%s>: %s", addr->address, - addr->message); - - if ( ( interface == cutthrough.interface - || ( interface - && cutthrough.interface - && Ustrcmp(interface, cutthrough.interface) == 0 - ) ) - && port == cutthrough.host.port - ) - { - uschar * resp = NULL; - - /* Match! Send the RCPT TO, append the addr, set done */ - done = - smtp_write_command(&ctblock, FALSE, "RCPT TO:<%.1000s>\r\n", - transport_rcpt_address(addr, - (addr->transport == NULL)? FALSE : - addr->transport->rcpt_include_affixes)) >= 0 && - cutthrough_response('2', &resp, CUTTHROUGH_DATA_TIMEOUT) == '2'; - - /* This would go horribly wrong if a callout fail was ignored by ACL. - We punt by abandoning cutthrough on a reject, like the - first-rcpt does. */ - - if (done) - { - address_item * na = store_get(sizeof(address_item)); - *na = cutthrough.addr; - cutthrough.addr = *addr; - cutthrough.addr.host_used = &cutthrough.host; - cutthrough.addr.next = na; - - cutthrough.nrcpt++; - } - else - { - cancel_cutthrough_connection("recipient rejected"); - if (!resp || errno == ETIMEDOUT) - { - HDEBUG(D_verify) debug_printf("SMTP timeout\n"); - } - else if (errno == 0) - { - if (*resp == 0) - Ustrcpy(resp, US"connection dropped"); + done = cutthrough_multi(addr, host_list, tf, &yield); - addr->message = - string_sprintf("response to \"%s\" from %s [%s] was: %s", - big_buffer, host->name, host->address, - string_printing(resp)); - - addr->user_message = - string_sprintf("Callout verification failed:\n%s", resp); - - /* Hard rejection ends the process */ - - if (resp[0] == '5') /* Address rejected */ - { - yield = FAIL; - done = TRUE; - } - } - } - } - break; - } - if (!done) - cancel_cutthrough_connection("incompatible connection"); - } - - /* Now make connections to the hosts and do real callouts. The list of hosts - is passed in as an argument. */ + /* If we did not use a cached connection, make connections to the hosts + and do real callouts. The list of hosts is passed in as an argument. */ 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]; - uschar responsebuffer[4096]; - uschar * size_str; - - clearflag(addr, af_verify_pmfail); /* postmaster callout flag */ - clearflag(addr, af_verify_nsfail); /* null sender callout flag */ - - /* Skip this host if we don't have an IP address for it. */ + smtp_context sx; if (!host->address) { @@ -562,7 +641,7 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. /* 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). @@ -583,436 +662,81 @@ 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; + sx.verify = TRUE; + +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)) == 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); + addr->transport_return = PENDING_DEFER; + yield = smtp_setup_conn(&sx, TRUE); + } + if (yield != OK) + { + 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; + /* Failure to accept HELO is cached; this blocks the whole domain for all + senders. I/O errors and defer responses are not cached. */ - if (host->dnssec == DS_YES) + if (yield == FAIL && (errno == 0 || errno == ERRNO_SMTPCLOSED)) { - 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; - -#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)) - { - 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 */ + /* If we needed to authenticate, smtp_setup_conn() did that. Copy + the AUTH info for logging */ - else done = smtp_auth(responsebuffer, sizeof(responsebuffer), - addr, host, ob, esmtp, &inblock, &outblock) == OK && + addr->authenticator = client_authenticator; + addr->auth_id = client_authenticated_id; - /* Copy AUTH info for logging */ - ( (addr->authenticator = client_authenticator), - (addr->auth_id = client_authenticated_id), + 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; - /* 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), - - /* Send the MAIL command */ - (smtp_write_command(&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, size_str) >= 0) - ) && + new_domain_record.result = + old_domain_cache_result == ccache_reject_mfnull + ? ccache_reject_mfnull : ccache_accept; - smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), - '2', callout); + /* Do the random local part check first. Temporarily replace the recipient + with the "random" value */ - deliver_host = deliver_host_address = NULL; - deliver_domain = save_deliver_domain; - - /* 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 @@ -1030,65 +754,49 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. } #endif - new_domain_record.result = - (old_domain_cache_result == ccache_reject_mfnull)? - ccache_reject_mfnull: ccache_accept; - - /* Do the random local part check first */ - - if (random_local_part != NULL) - { - uschar randombuffer[1024]; - BOOL random_ok = - smtp_write_command(&outblock, FALSE, - "RCPT TO:<%.1000s@%.1000s>\r\n", random_local_part, - rcpt_domain) >= 0 && - smtp_read_response(&inblock, randombuffer, - sizeof(randombuffer), '2', callout); - - /* Remember when we last did a random test */ - - new_domain_record.random_stamp = time(NULL); + /* 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 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; - done = - smtp_write_command(&outblock, FALSE, "RSET\r\n") >= 0 && - smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), - '2', callout) && + /* 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. + */ - smtp_write_command(&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(&inblock, responsebuffer, sizeof(responsebuffer), - '2', callout); + 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; + + /* Between each check, issue RSET, because some servers accept only + 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 && + 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; @@ -1096,114 +804,130 @@ 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); + 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. */ + /* 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(&outblock, FALSE, "RCPT TO:<%.1000s>\r\n", - rcpt) >= 0 && - smtp_read_response(&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:<postmaster> (no domain) in accordance with RFC 821. */ + deliver_host = deliver_host_address = NULL; + deliver_domain = save_deliver_domain; - if (done && pm_mailfrom != NULL) - { - /* 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(&outblock, FALSE, "RSET\r\n") >= 0 && - smtp_read_response(&inblock, responsebuffer, - sizeof(responsebuffer), '2', callout) && - - smtp_write_command(&outblock, FALSE, - "MAIL FROM:<%s>\r\n", pm_mailfrom) >= 0 && - smtp_read_response(&inblock, responsebuffer, - sizeof(responsebuffer), '2', callout) && - - /* First try using the current domain */ - - (( - smtp_write_command(&outblock, FALSE, - "RCPT TO:<postmaster@%.1000s>\r\n", rcpt_domain) >= 0 && - smtp_read_response(&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(&outblock, FALSE, - "RCPT TO:<postmaster>\r\n") >= 0 && - smtp_read_response(&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:<postmaster> (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:<postmaster>\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 @@ -1214,50 +938,58 @@ 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: + 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\" did not include SMTPUTF8"); + 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; - addr->message = - string_sprintf("response to \"%s\" from %s [%s] was: %s", - big_buffer, host->name, host->address, - string_printing(responsebuffer)); + case 0: + if (*sx.buffer == 0) Ustrcpy(sx.buffer, US"connection dropped"); - 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); + /*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)); - /* Hard rejection ends the process */ + addr->user_message = options & vopt_is_recipient + ? string_sprintf("Callout verification failed:\n%s", sx.buffer) + : string_sprintf("Called: %s\nSent: %s\nResponse: %s", + host->address, big_buffer, sx.buffer); - if (responsebuffer[0] == '5') /* Address rejected */ - { - yield = FAIL; - done = TRUE; - } - } + /* Hard rejection ends the process */ + + if (sx.buffer[0] == '5') /* Address rejected */ + { + yield = FAIL; + done = TRUE; + } + break; } /* End the SMTP conversation and close the connection. */ @@ -1274,12 +1006,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,96 +1032,56 @@ 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, sx.buffer, sizeof(sx.buffer), '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 + } } + if (!done || yield != OK) + addr->message = string_sprintf("%s [%s] : %s", host->name, host->address, + addr->message); } /* Loop through all hosts, while !done */ } /* If we get here with done == TRUE, a successful callout happened, and yield will be set OK or FAIL according to the response to the RCPT command. Otherwise, we looped through the hosts but couldn't complete the business. -However, there may be domain-specific information to cache in both cases. - -The value of the result field in the new_domain record is ccache_unknown if -there was an error before or with MAIL FROM:, and errno was not zero, -implying some kind of I/O error. We don't want to write the cache in that case. -Otherwise the value is ccache_accept, ccache_reject, or ccache_reject_mfnull. */ - -if ( !(options & vopt_callout_no_cache) - && new_domain_record.result != ccache_unknown) - { - if ((dbm_file = dbfn_open(US"callout", O_RDWR|O_CREAT, &dbblock, FALSE)) - == NULL) - { - HDEBUG(D_verify) debug_printf("callout cache: not available\n"); - } - else - { - (void)dbfn_write(dbm_file, addr->domain, &new_domain_record, - (int)sizeof(dbdata_callout_cache)); - HDEBUG(D_verify) debug_printf("wrote callout cache domain record for %s:\n" - " result=%d postmaster=%d random=%d\n", - addr->domain, - new_domain_record.result, - new_domain_record.postmaster_result, - new_domain_record.random_result); - } - } +However, there may be domain-specific information to cache in both cases. */ -/* If a definite result was obtained for the callout, cache it unless caching -is disabled. */ - -if (done) - { - if ( !(options & vopt_callout_no_cache) - && new_address_record.result != ccache_unknown) - { - if (!dbm_file) - dbm_file = dbfn_open(US"callout", O_RDWR|O_CREAT, &dbblock, FALSE); - if (!dbm_file) - { - HDEBUG(D_verify) debug_printf("no callout cache available\n"); - } - else - { - (void)dbfn_write(dbm_file, address_key, &new_address_record, - (int)sizeof(dbdata_callout_cache_address)); - HDEBUG(D_verify) debug_printf("wrote %s callout cache address record for %s\n", - new_address_record.result == ccache_accept ? "positive" : "negative", - address_key); - } - } - } /* done */ +if (!(options & vopt_callout_no_cache)) + cache_callout_write(&new_domain_record, addr->domain, + done, &new_address_record, address_key); /* Failure to connect to any host, or any response other than 2xx or 5xx is a temporary error. If there was only one host, and a response was received, leave it alone if supplying details. Otherwise, give a generic response. */ -else /* !done */ +if (!done) { uschar * dullmsg = string_sprintf("Could not complete %s verify callout", 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" @@ -1411,7 +1103,7 @@ else /* !done */ /* Come here from within the cache-reading code on fast-track exit. */ END_CALLOUT: -if (dbm_file) dbfn_close(dbm_file); +tls_modify_variables(&tls_in); return yield; } 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/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=<CALLER@test.ex> 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=<CALLER@test.ex> 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 <CALLER@test.ex> 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=<CALLER@test.ex> 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=<CALLER@test.ex> 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=<CALLER@test.ex> 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=<CALLER@test.ex> 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 <CALLER@test.ex> F=<> R=all T=local_delivery 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed diff --git a/test/log/0227 b/test/log/0227 index ca551b3c7..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 <bad@localhost>: response to "RCPT TO:<bad@localhost>" 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 <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 Unknown user 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for <uncheckable@localhost1>: response to "RCPT TO:<uncheckable@localhost1>" 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 <uncheckable@localhost1>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<uncheckable@localhost1>: 450 Temporary error 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<uncheckable@localhost1> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <uncheckable2@localhost1>: 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 <uncheckable2@localhost1>: 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=<uncheckable2@localhost1> rejected RCPT <z@test.ex>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <uncheckable@localhost1>: 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 <uncheckable@localhost1>: 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=<uncheckable@localhost1> rejected RCPT <z@test.ex>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: response to "RCPT TO:<z@remote.domain>" 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=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: response to "RCPT TO:<z@remote.domain>" 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=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@remote.domain>: 550 Recipient not liked +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@remote.domain>: 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=<uncheckable@localhost1> temporarily rejected RCPT <z@remote.domain>: Could not complete recipient verify callout 1999-03-02 09:44:33 10HmaX-0005vi-00 H=[V4NET.0.0.4] U=root F=<uncheckable@localhost1> 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=<uncheckable@localhost1> 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=<ok@localhost1> rejected RCPT <z@remote.domain>: relay not permitted -1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify fail for <ok@localhost1>: response to "RCPT TO:<postmaster@localhost1>" 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 <ok@localhost1>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@localhost1>: 550 Don't like postmaster 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F=<ok@localhost1> rejected RCPT <z@remote.domain>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F=<uncheckable@localhost1> rejected RCPT <z@remote.lmtp>: response to "RCPT TO:<z@remote.lmtp>" 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 <bad@localhost1>: 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.3] U=root F=<uncheckable@localhost1> rejected RCPT <z@remote.lmtp>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@remote.lmtp>: 550 Recipient not liked +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for <bad@localhost1>: 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=<bad@localhost1> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for <bad@localhost1>: 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 <bad@localhost1>: 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=<bad@localhost1> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout diff --git a/test/log/0365 b/test/log/0365 index 569e49dfd..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: <bad@syntax 1999-03-02 09:44:33 10HmaY-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 sender verify defer for <callout@x>: 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 <callout@x>: 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=<callout@x> temporarily rejected RCPT <x@y>: Could not complete sender verify callout 1999-03-02 09:44:33 10HmaZ-0005vi-00 U=CALLER F=<nosyntax@x> 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=<recipcallout@y> temporarily rejected RCPT <callout@y>: could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER F=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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 <cantverify.fail@y>: failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <cantverify.defer@y>: 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: <bad@syntax 1999-03-02 09:44:33 10HmbC-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 sender verify defer for <callout@x>: 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 <callout@x>: 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=<callout@x> temporarily rejected RCPT <x@y>: Could not complete sender verify callout 1999-03-02 09:44:33 10HmbD-0005vi-00 U=CALLER F=<nosyntax@x> 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=<recipcallout@y> temporarily rejected RCPT <callout@y>: could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER F=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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 <cantverify.fail@y>: failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <cantverify.defer@y>: defer message diff --git a/test/log/0376 b/test/log/0376 index c84cd2300..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 <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost>: response to "RCPT TO:<bad@localhost>" 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 <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 REJECTED 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: (recipient): Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost> 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: (recipient): Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> rejected RCPT <z@test.ex>: (mail): Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <ok@localhost> 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<ok@localhost> rejected RCPT <z@test.ex>: (mail): Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <ok@otherhost>: response to "RCPT TO:<postmaster@otherhost>" 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 <ok@otherhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@otherhost>: 550 NOT OK 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<ok@otherhost> rejected RCPT <z@test.ex>: Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <ok@otherhost> 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<ok@otherhost> rejected RCPT <z@test.ex>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for <okok@otherhost51>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root sender verify defer for <ok@otherhost3>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost3>" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F=<ok@otherhost3> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root sender verify defer for <ok@otherhost4>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost4>" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root F=<ok@otherhost4> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for <okok@otherhost51>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost51> 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F=<okok@otherhost51> temporarily rejected RCPT <z@test.ex>: 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:<x@remote>" 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:<x@remote>: 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 <x@local> 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 <z@remote>: response to "RCPT TO:<z@remote>" from 127.0.0.1 [127.0.0.1] was: 550 Unknown +1999-03-02 09:44:33 U=CALLER sender verify fail for <z@remote>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@remote>: 550 Unknown 1999-03-02 09:44:33 U=CALLER F=<z@remote> rejected RCPT <deny@local>: Sender verify failed -1999-03-02 09:44:33 U=CALLER Warning: Sender verify failed: response to "RCPT TO:<qq@remote>" 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:<qq@remote>: 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 1e587828d..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 <r1@domain1>: response to "RCPT TO:<r1@domain1>" 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 <r1@domain1>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<r1@domain1>: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL <r1@domain1>: Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for <r2@domain2>: response to "RCPT TO:<r2@domain2>" 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 <r2@domain2>: Could not complete sender verify callout: ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] : SMTP error from remote mail server after RCPT TO:<r2@domain2>: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL <r2@domain2>: Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for <r3@domain3>: response to "RCPT TO:<r3@domain3>" 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 <r3@domain3>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<r3@domain3>: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL <r3@domain3>: 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 <Ok@localhost>: response to "RCPT TO:<postmaster@localhost>" 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 <Ok@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@localhost>: 550 NO 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<Ok@localhost> rejected RCPT <checkpm@test.ex>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <NOTok@elsewhere>: response to "RCPT TO:<NOTok@elsewhere>" 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 <NOTok@elsewhere>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<NOTok@elsewhere>: 550 NO 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<NOTok@elsewhere> rejected RCPT <nocheckpm@test.ex>: Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<NOTok2@elsewhere> rejected RCPT <nocheckpm@test.ex>: Sender verify failed diff --git a/test/log/0473 b/test/log/0473 index c6e216931..acca9c9ed 100644 --- a/test/log/0473 +++ b/test/log/0473 @@ -1,10 +1,10 @@ -1999-03-02 09:44:33 U=CALLER F=<s3@other.ex> rejected RCPT r3@other.ex: response to "MAIL FROM:<s3@other.ex>" from 127.0.0.1 [127.0.0.1] was: 550 NOTOK -1999-03-02 09:44:33 U=CALLER F=<s4@other.ex> 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=<x9@test.ex> rejected RCPT <r9@test.ex>: response to "RCPT TO:<r9@test.ex>" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 U=CALLER F=<s3@other.ex> rejected RCPT r3@other.ex: 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<s3@other.ex>" was: 550 NOTOK +1999-03-02 09:44:33 U=CALLER F=<s4@other.ex> 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=<x9@test.ex> rejected RCPT <r9@test.ex>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<r9@test.ex>: 550 NO 1999-03-02 09:44:33 U=CALLER F=<x9@test.ex> rejected RCPT <r9@test.ex>: Previous (cached) callout verification failure -1999-03-02 09:44:33 U=CALLER sender verify fail for <x9@test.ex>: response to "RCPT TO:<x9@test.ex>" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 U=CALLER sender verify fail for <x9@test.ex>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<x9@test.ex>: 550 NO 1999-03-02 09:44:33 U=CALLER F=<x9@test.ex> rejected RCPT <r9@test.ex>: Sender verify failed 1999-03-02 09:44:33 U=CALLER sender verify fail for <x9@test.ex> 1999-03-02 09:44:33 U=CALLER F=<x9@test.ex> rejected RCPT <r9@test.ex>: Sender verify failed -1999-03-02 09:44:33 U=CALLER F=<x11@two.test.ex> temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout -1999-03-02 09:44:33 U=CALLER F=<x11@two.test.ex> temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout +1999-03-02 09:44:33 U=CALLER F=<x11@two.test.ex> 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:<r11@two.test.ex> +1999-03-02 09:44:33 U=CALLER F=<x11@two.test.ex> 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 <userx@broken.example>: 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 <userx@broken.example>: 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 <userx@broken.example>: Sender verify failed 1999-03-02 09:44:33 U=CALLER sender verify fail for <userx@broken.example> 1999-03-02 09:44:33 U=CALLER rejected MAIL <userx@broken.example>: Sender verify failed 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 REJECTED rcpt +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: (recipient): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost> +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: (recipient): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <ok@localhost>: 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=<ok@localhost> rejected RCPT <z@test.ex>: (mail): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <ok@localhost> +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<ok@localhost> rejected RCPT <z@test.ex>: (mail): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <ok@otherhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@otherhost>: 550 NOT OK rcpt postmaster +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<ok@otherhost> rejected RCPT <z@test.ex>: Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <ok@otherhost> +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<ok@otherhost> rejected RCPT <z@test.ex>: Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root sender verify defer for <ok@otherhost3>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost3>" was: 250 OK accepting that random recipient +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F=<ok@otherhost3> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root sender verify defer for <ok@otherhost4>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost4>" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root F=<ok@otherhost4> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for <okok@otherhost51>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost51> +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F=<okok@otherhost51> temporarily rejected RCPT <z@test.ex>: 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/4204 b/test/log/4204 index 0dd1f89a6..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 <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=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 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=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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 cab609f55..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=<userW@test.ex> 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 <userA@test.ex>: 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 <userA@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userA@test.ex> rejected RCPT <user.यष्टिमधु@test.ex>: Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for <userB.જેઠીમધ@test.ex>: 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 <userB.જેઠીમધ@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userB.જેઠીમધ@test.ex> rejected RCPT <user.ქართული@test.ex>: Sender verify failed ******** SERVER ******** diff --git a/test/log/4214 b/test/log/4214 index 97a89fd80..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 <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=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 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=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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 75941e1d3..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=<userW@test.ex> 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 <userA@test.ex>: 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 <userA@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userA@test.ex> rejected RCPT <user.यष्टिमधु@test.ex>: Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for <userB.જેઠીમધ@test.ex>: 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 <userB.જેઠીમધ@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userB.જેઠીમધ@test.ex> rejected RCPT <user.ქართული@test.ex>: Sender verify failed ******** SERVER ******** diff --git a/test/log/4224 b/test/log/4224 index d58181e24..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 <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=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 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=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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 d2e4a1c8d..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=<userW@test.ex> 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 <userA@test.ex>: 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 <userA@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userA@test.ex> rejected RCPT <user.यष्टिमधु@test.ex>: Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for <userB.જેઠીમધ@test.ex>: 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 <userB.જેઠીમધ@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userB.જેઠીમધ@test.ex> rejected RCPT <user.ქართული@test.ex>: 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=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: response to "RCPT TO:<no@domain.com>" from 127.0.0.1 [127.0.0.1] was: 550 No mate -1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: response to "RCPT TO:<no@domain.com>" from 127.0.0.1 [127.0.0.1] was: 550 Not that one +1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<no@domain.com>: 550 No mate +1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<no@domain.com>: 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 ae3ad767d..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=<CALLER@myhost.test.ex> temporarily rejected RCPT <useri@domain.com>: response to "RCPT TO:<useri@domain.com>" from 127.0.0.1 [127.0.0.1] was: 450 not right now +1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> temporarily rejected RCPT <useri@domain.com>: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<useri@domain.com>: 450 not right now 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/rejectlog/0227 b/test/rejectlog/0227 index 8b2a2a148..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 <bad@localhost>: response to "RCPT TO:<bad@localhost>" 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 <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 Unknown user 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for <uncheckable@localhost1>: response to "RCPT TO:<uncheckable@localhost1>" 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 <uncheckable@localhost1>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<uncheckable@localhost1>: 450 Temporary error 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<uncheckable@localhost1> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <uncheckable2@localhost1>: 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 <uncheckable2@localhost1>: 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=<uncheckable2@localhost1> rejected RCPT <z@test.ex>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <uncheckable@localhost1>: 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 <uncheckable@localhost1>: 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=<uncheckable@localhost1> rejected RCPT <z@test.ex>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: response to "RCPT TO:<z@remote.domain>" 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=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: response to "RCPT TO:<z@remote.domain>" 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=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@remote.domain>: 550 Recipient not liked +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@remote.domain>: 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=<uncheckable@localhost1> temporarily rejected RCPT <z@remote.domain>: Could not complete recipient verify callout 1999-03-02 09:44:33 10HmaX-0005vi-00 H=[V4NET.0.0.4] U=root F=<uncheckable@localhost1> rejected after DATA: there is no valid sender in any header line Envelope-from: <uncheckable@localhost1> @@ -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=<ok@localhost1> rejected RCPT <z@remote.domain>: relay not permitted -1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify fail for <ok@localhost1>: response to "RCPT TO:<postmaster@localhost1>" 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 <ok@localhost1>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@localhost1>: 550 Don't like postmaster 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F=<ok@localhost1> rejected RCPT <z@remote.domain>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F=<uncheckable@localhost1> rejected RCPT <z@remote.lmtp>: response to "RCPT TO:<z@remote.lmtp>" 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 <bad@localhost1>: 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.3] U=root F=<uncheckable@localhost1> rejected RCPT <z@remote.lmtp>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@remote.lmtp>: 550 Recipient not liked +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for <bad@localhost1>: 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=<bad@localhost1> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify defer for <bad@localhost1>: 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 <bad@localhost1>: 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=<bad@localhost1> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout diff --git a/test/rejectlog/0365 b/test/rejectlog/0365 index 5dbe6259a..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: <E10HmaY-0005vi-00@the.local.host.name> Date: Tue, 2 Mar 1999 09:44:33 +0000 -1999-03-02 09:44:33 U=CALLER sender verify defer for <callout@x>: 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 <callout@x>: 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=<callout@x> temporarily rejected RCPT <x@y>: Could not complete sender verify callout 1999-03-02 09:44:33 10HmaZ-0005vi-00 U=CALLER F=<nosyntax@x> rejected after DATA Envelope-from: <nosyntax@x> @@ -37,15 +37,15 @@ P Received: from CALLER by the.local.host.name with local-smtp (Exim x.yz) F From: <unverifiable@y> I Message-Id: <E10HmbA-0005vi-00@the.local.host.name> Date: Tue, 2 Mar 1999 09:44:33 +0000 -1999-03-02 09:44:33 U=CALLER F=<recipcallout@y> temporarily rejected RCPT <callout@y>: could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER F=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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 <cantverify.fail@y>: failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <cantverify.defer@y>: 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: <bad@syntax 1999-03-02 09:44:33 10HmbC-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 sender verify defer for <callout@x>: 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 <callout@x>: 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=<callout@x> temporarily rejected RCPT <x@y>: Could not complete sender verify callout 1999-03-02 09:44:33 10HmbD-0005vi-00 U=CALLER F=<nosyntax@x> 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=<recipcallout@y> temporarily rejected RCPT <callout@y>: could not connect to V4NET.0.0.0 [V4NET.0.0.0]: Network Error +1999-03-02 09:44:33 U=CALLER F=<recipcallout@y> temporarily rejected RCPT <callout@y>: 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 <cantverify.fail@y>: failure message 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <cantverify.defer@y>: defer message diff --git a/test/rejectlog/0376 b/test/rejectlog/0376 index 8cac4a1de..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 <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost>: response to "RCPT TO:<bad@localhost>" 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 <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 REJECTED 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: (recipient): Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost> 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: (recipient): Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> rejected RCPT <z@test.ex>: (mail): Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <ok@localhost> 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<ok@localhost> rejected RCPT <z@test.ex>: (mail): Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <ok@otherhost>: response to "RCPT TO:<postmaster@otherhost>" 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 <ok@otherhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@otherhost>: 550 NOT OK 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<ok@otherhost> rejected RCPT <z@test.ex>: Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <ok@otherhost> 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<ok@otherhost> rejected RCPT <z@test.ex>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for <okok@otherhost51>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root sender verify defer for <ok@otherhost3>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost3>" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F=<ok@otherhost3> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root sender verify defer for <ok@otherhost4>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost4>" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root F=<ok@otherhost4> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for <okok@otherhost51>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost51> 1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F=<okok@otherhost51> temporarily rejected RCPT <z@test.ex>: 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 <z@remote>: response to "RCPT TO:<z@remote>" from 127.0.0.1 [127.0.0.1] was: 550 Unknown +1999-03-02 09:44:33 U=CALLER sender verify fail for <z@remote>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@remote>: 550 Unknown 1999-03-02 09:44:33 U=CALLER F=<z@remote> rejected RCPT <deny@local>: Sender verify failed diff --git a/test/rejectlog/0413 b/test/rejectlog/0413 index 1e587828d..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 <r1@domain1>: response to "RCPT TO:<r1@domain1>" 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 <r1@domain1>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<r1@domain1>: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL <r1@domain1>: Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for <r2@domain2>: response to "RCPT TO:<r2@domain2>" 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 <r2@domain2>: Could not complete sender verify callout: ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] : SMTP error from remote mail server after RCPT TO:<r2@domain2>: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL <r2@domain2>: Could not complete sender verify callout -1999-03-02 09:44:33 U=CALLER sender verify defer for <r3@domain3>: response to "RCPT TO:<r3@domain3>" 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 <r3@domain3>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<r3@domain3>: 450 Temporary error 1999-03-02 09:44:33 U=CALLER temporarily rejected MAIL <r3@domain3>: 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 <Ok@localhost>: response to "RCPT TO:<postmaster@localhost>" 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 <Ok@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@localhost>: 550 NO 1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<Ok@localhost> rejected RCPT <checkpm@test.ex>: Sender verify failed -1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <NOTok@elsewhere>: response to "RCPT TO:<NOTok@elsewhere>" 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 <NOTok@elsewhere>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<NOTok@elsewhere>: 550 NO 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<NOTok@elsewhere> rejected RCPT <nocheckpm@test.ex>: Sender verify failed 1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<NOTok2@elsewhere> rejected RCPT <nocheckpm@test.ex>: Sender verify failed diff --git a/test/rejectlog/0473 b/test/rejectlog/0473 index c6e216931..acca9c9ed 100644 --- a/test/rejectlog/0473 +++ b/test/rejectlog/0473 @@ -1,10 +1,10 @@ -1999-03-02 09:44:33 U=CALLER F=<s3@other.ex> rejected RCPT r3@other.ex: response to "MAIL FROM:<s3@other.ex>" from 127.0.0.1 [127.0.0.1] was: 550 NOTOK -1999-03-02 09:44:33 U=CALLER F=<s4@other.ex> 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=<x9@test.ex> rejected RCPT <r9@test.ex>: response to "RCPT TO:<r9@test.ex>" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 U=CALLER F=<s3@other.ex> rejected RCPT r3@other.ex: 127.0.0.1 [127.0.0.1] : response to "MAIL FROM:<s3@other.ex>" was: 550 NOTOK +1999-03-02 09:44:33 U=CALLER F=<s4@other.ex> 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=<x9@test.ex> rejected RCPT <r9@test.ex>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<r9@test.ex>: 550 NO 1999-03-02 09:44:33 U=CALLER F=<x9@test.ex> rejected RCPT <r9@test.ex>: Previous (cached) callout verification failure -1999-03-02 09:44:33 U=CALLER sender verify fail for <x9@test.ex>: response to "RCPT TO:<x9@test.ex>" from 127.0.0.1 [127.0.0.1] was: 550 NO +1999-03-02 09:44:33 U=CALLER sender verify fail for <x9@test.ex>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<x9@test.ex>: 550 NO 1999-03-02 09:44:33 U=CALLER F=<x9@test.ex> rejected RCPT <r9@test.ex>: Sender verify failed 1999-03-02 09:44:33 U=CALLER sender verify fail for <x9@test.ex> 1999-03-02 09:44:33 U=CALLER F=<x9@test.ex> rejected RCPT <r9@test.ex>: Sender verify failed -1999-03-02 09:44:33 U=CALLER F=<x11@two.test.ex> temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout -1999-03-02 09:44:33 U=CALLER F=<x11@two.test.ex> temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout +1999-03-02 09:44:33 U=CALLER F=<x11@two.test.ex> 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:<r11@two.test.ex> +1999-03-02 09:44:33 U=CALLER F=<x11@two.test.ex> 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 <userx@broken.example>: 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 <userx@broken.example>: 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 <userx@broken.example>: Sender verify failed 1999-03-02 09:44:33 U=CALLER sender verify fail for <userx@broken.example> 1999-03-02 09:44:33 U=CALLER rejected MAIL <userx@broken.example>: Sender verify failed 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 REJECTED rcpt +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: (recipient): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost> +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: (recipient): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <ok@localhost>: 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=<ok@localhost> rejected RCPT <z@test.ex>: (mail): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root sender verify fail for <ok@localhost> +1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<ok@localhost> rejected RCPT <z@test.ex>: (mail): Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <ok@otherhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@otherhost>: 550 NOT OK rcpt postmaster +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<ok@otherhost> rejected RCPT <z@test.ex>: Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <ok@otherhost> +1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<ok@otherhost> rejected RCPT <z@test.ex>: Sender verify failed +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root sender verify defer for <ok@otherhost3>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost3>" was: 250 OK accepting that random recipient +1999-03-02 09:44:33 H=[V4NET.0.0.3] U=root F=<ok@otherhost3> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root sender verify defer for <ok@otherhost4>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost4>" was: 250 OK +1999-03-02 09:44:33 H=[V4NET.0.0.4] U=root F=<ok@otherhost4> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root sender verify defer for <okok@otherhost51>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost51> +1999-03-02 09:44:33 H=[V4NET.0.0.5] U=root F=<okok@otherhost51> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout diff --git a/test/rejectlog/4204 b/test/rejectlog/4204 index 555b43e40..b9df3d146 100644 --- a/test/rejectlog/4204 +++ b/test/rejectlog/4204 @@ -1,5 +1,5 @@ -1999-03-02 09:44:33 U=CALLER F=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 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=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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 <the.local.host.name-dddddddd-testing@test.ex>: relay not permitted diff --git a/test/rejectlog/4206 b/test/rejectlog/4206 index e2430e4b8..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 <userA@test.ex>: 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 <userA@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userA@test.ex> rejected RCPT <user.यष्टिमधु@test.ex>: Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for <userB.જેઠીમધ@test.ex>: 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 <userB.જેઠીમધ@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userB.જેઠીમધ@test.ex> rejected RCPT <user.ქართული@test.ex>: Sender verify failed ******** SERVER ******** diff --git a/test/rejectlog/4214 b/test/rejectlog/4214 index bf6cb2398..b7613eb45 100644 --- a/test/rejectlog/4214 +++ b/test/rejectlog/4214 @@ -1,5 +1,5 @@ -1999-03-02 09:44:33 U=CALLER F=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 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=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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 <the.local.host.name-dddddddd-testing@test.ex>: relay not permitted diff --git a/test/rejectlog/4216 b/test/rejectlog/4216 index e8d8f00f5..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 <userA@test.ex>: 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 <userA@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userA@test.ex> rejected RCPT <user.यष्टिमधु@test.ex>: Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for <userB.જેઠીમધ@test.ex>: 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 <userB.જેઠીમધ@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userB.જેઠીમધ@test.ex> rejected RCPT <user.ქართული@test.ex>: Sender verify failed ******** SERVER ******** diff --git a/test/rejectlog/4224 b/test/rejectlog/4224 index e36be9236..05de432a4 100644 --- a/test/rejectlog/4224 +++ b/test/rejectlog/4224 @@ -1,5 +1,5 @@ -1999-03-02 09:44:33 U=CALLER F=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 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=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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=<CALLER@spanish.PorquénopuedensimplementehablarenEspañol.local> rejected RCPT <userS@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 +1999-03-02 09:44:33 U=CALLER F=<CALLER@vietnamese.TạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@test.ex>: 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 <the.local.host.name-dddddddd-testing@test.ex>: relay not permitted diff --git a/test/rejectlog/4226 b/test/rejectlog/4226 index dd75f12fb..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 <userA@test.ex>: 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 <userA@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userA@test.ex> rejected RCPT <user.यष्टिमधु@test.ex>: Sender verify failed -1999-03-02 09:44:33 U=CALLER sender verify fail for <userB.જેઠીમધ@test.ex>: 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 <userB.જેઠીમધ@test.ex>: 127.0.0.1 [127.0.0.1] : response to "EHLO" did not include SMTPUTF8 1999-03-02 09:44:33 U=CALLER F=<userB.જેઠીમધ@test.ex> rejected RCPT <user.ქართული@test.ex>: 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=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: response to "RCPT TO:<no@domain.com>" from 127.0.0.1 [127.0.0.1] was: 550 No mate -1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: response to "RCPT TO:<no@domain.com>" from 127.0.0.1 [127.0.0.1] was: 550 Not that one +1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<no@domain.com>: 550 No mate +1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> rejected RCPT <no@domain.com>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<no@domain.com>: 550 Not that one diff --git a/test/rejectlog/5405 b/test/rejectlog/5405 index 7df2e1018..a822a1000 100644 --- a/test/rejectlog/5405 +++ b/test/rejectlog/5405 @@ -1,2 +1,2 @@ 1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> temporarily rejected RCPT <userd@domain.com> -1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> temporarily rejected RCPT <useri@domain.com>: response to "RCPT TO:<useri@domain.com>" from 127.0.0.1 [127.0.0.1] was: 450 not right now +1999-03-02 09:44:33 U=CALLER F=<CALLER@myhost.test.ex> temporarily rejected RCPT <useri@domain.com>: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<useri@domain.com>: 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/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/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:<myhost.test.ex- 250 OK QUIT 250 OK @@ -157,7 +157,7 @@ EHLO 250 OK MAIL FROM 250 OK -RCPT TO +RCPT TO:<myhost.test.ex- 250 OK QUIT 250 OK @@ -177,21 +177,21 @@ server PORT_S 220 Server ready EHLO 250 OK -MAIL FROM +MAIL FROM:<> 250 OK -RCPT TO +RCPT TO:<myhost.test.ex- 550 NOT OK RSET 250 OK -MAIL FROM +MAIL FROM:<> 250 OK -RCPT TO +RCPT TO:<ok@otherhost41> 250 OK RSET 250 OK -MAIL FROM +MAIL FROM:<> 250 OK -RCPT TO +RCPT TO:<postmaster@otherhost41> 250 OK QUIT 250 OK 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:<ok@localhost> +RCPT TO:<z@test.ex> +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.1 +MAIL FROM:<ok@localhost> +RCPT TO:<z@test.ex> +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:<ok@localhost> +RCPT TO:<z@test.ex> +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:<bad@localhost> +RCPT TO:<z@test.ex> +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.1 +MAIL FROM:<bad@localhost> +RCPT TO:<z@test.ex> +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:<ok@localhost> +RCPT TO:<z@test.ex> +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.1 +MAIL FROM:<ok@localhost> +RCPT TO:<z@test.ex> +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:<postmaster@otherhost> +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:<ok@otherhost> +RCPT TO:<z@test.ex> +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.2 +MAIL FROM:<ok@otherhost> +RCPT TO:<z@test.ex> +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:<postmaster@otherhost2> +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.2 +MAIL FROM:<ok@otherhost2> +RCPT TO:<z@test.ex> +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.2 +MAIL FROM:<ok@otherhost2> +RCPT TO:<z@test.ex> +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:<myhost.test.ex- +250 OK +250 OK accepting that random recipient +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.3 +MAIL FROM:<ok@otherhost3> +RCPT TO:<z@test.ex> +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.3 +MAIL FROM:<otherok@otherhost3> +RCPT TO:<z@test.ex> +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:<myhost.test.ex- +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.4 +MAIL FROM:<ok@otherhost4> +RCPT TO:<z@test.ex> +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.4 +MAIL FROM:<ok@otherhost4> +RCPT TO:<z@test.ex> +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:<myhost.test.ex- +250 OK +550 NOT OK +RSET +250 OK +MAIL FROM:<> +RCPT TO:<ok@otherhost41> +250 OK +250 OK +RSET +250 OK +MAIL FROM:<> +RCPT TO:<postmaster@otherhost41> +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.4 +MAIL FROM:<ok@otherhost41> +RCPT TO:<z@test.ex> +QUIT +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.4 +MAIL FROM:<ok@otherhost41> +RCPT TO:<z@test.ex> +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:<ok@otherhost21> +RCPT TO:<z@test.ex> +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:<ok2@otherhost21> +RCPT TO:<z@test.ex> +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:<ok@otherhost31> +RCPT TO:<z@test.ex> +QUIT +**** +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM +RCPT TO:<okok@otherhost31> +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.3 +MAIL FROM:<okok@otherhost31> +RCPT TO:<z@test.ex> +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:<myhost.test.ex- +250 OK +550 NOT OK +RSET +250 OK +MAIL FROM:<> +RCPT TO:<okokok@otherhost31> +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -DPEX=1s -d-all+verify -v -bs -oMa V4NET.0.0.3 +MAIL FROM:<okokok@otherhost31> +RCPT TO:<z@test.ex> +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:<okok@otherhost51> +RCPT TO:<z@test.ex> +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:<pmsend@a.domain> +RCPT TO:<postmaster@otherhost52> +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.6 +MAIL FROM:<okokok@otherhost52> +RCPT TO:<z@test.ex> +QUIT +**** +# Header_sender sender set non-empty +server PORT_S +220 Server ready +EHLO +250-Yeah mate +250-PIPELINING +250 OK +MAIL FROM:<somesender@a.domain> +RCPT TO:<abcd@x.y.z> +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -odq -v -bs -oMa V4NET.0.0.7 +MAIL FROM:<ok7@otherhost53> +RCPT TO:<z@test.ex> +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:<ok7@otherhost53> +RCPT TO:<z@test.ex> +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:<postmaster@otherhost9> +250 OK +550 NOT OK +RCPT TO:<postmaster> +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.9 +MAIL FROM:<ok@otherhost9> +RCPT TO:<z@test.ex> +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:<pmsend@b.domain> +RCPT TO:<postmaster@test.ex> +250 OK +250 OK +QUIT +250 OK +**** +sudo exim -d-all+verify -v -bs -oMa V4NET.0.0.10 +MAIL FROM:<ok@otherhost10> +RCPT TO:<z@test.ex> +QUIT +**** +no_msglog_check diff --git a/test/stderr/0227 b/test/stderr/0227 index d676f05a7..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 <bad@localhost>: response to "RCPT TO:<bad@localhost>" from 127.0.0.1 [127.0.0.1] was: 550 Unknown user + H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 Unknown user LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: 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 <uncheckable@localhost1>: response to "RCPT TO:<uncheckable@localhost1>" from 127.0.0.1 [127.0.0.1] was: 450 Temporary error + H=[V4NET.0.0.1] U=root sender verify defer for <uncheckable@localhost1>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<uncheckable@localhost1>: 450 Temporary error LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F=<uncheckable@localhost1> temporarily rejected RCPT <z@test.ex>: 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 <uncheckable2@localhost1>: 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 <uncheckable2@localhost1>: 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=<uncheckable2@localhost1> rejected RCPT <z@test.ex>: 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 <uncheckable@localhost1>: 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 <uncheckable@localhost1>: 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=<uncheckable@localhost1> rejected RCPT <z@test.ex>: 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=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: response to "RCPT TO:<z@remote.domain>" from 127.0.0.1 [127.0.0.1] was: 550 Recipient not liked + H=[V4NET.0.0.3] U=root F=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@remote.domain>: 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=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: response to "RCPT TO:<z@remote.domain>" 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=<uncheckable@localhost1> rejected RCPT <z@remote.domain>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@remote.domain>: 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 <ok@localhost1>: response to "RCPT TO:<postmaster@localhost1>" 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 <ok@localhost1>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@localhost1>: 550 Don't like postmaster LOG: MAIN REJECT H=[V4NET.0.0.5] U=root F=<ok@localhost1> rejected RCPT <z@remote.domain>: 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:<ok@localhost1> SMTP<< 250 OK @@ -248,16 +248,15 @@ 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=<uncheckable@localhost1> rejected RCPT <z@remote.lmtp>: response to "RCPT TO:<z@remote.lmtp>" from 127.0.0.1 [127.0.0.1] was: 550 Recipient not liked + H=[V4NET.0.0.3] U=root F=<uncheckable@localhost1> rejected RCPT <z@remote.lmtp>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<z@remote.lmtp>: 550 Recipient not liked LOG: smtp_connection MAIN SMTP connection from root closed by QUIT 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 <bad@localhost1>: 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 <bad@localhost1>: 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=<bad@localhost1> temporarily rejected RCPT <z@test.ex>: 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 <bad@localhost1>: 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 <bad@localhost1>: 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=<bad@localhost1> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout LOG: smtp_connection MAIN diff --git a/test/stderr/0376 b/test/stderr/0376 index 652477e75..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 <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@test.ex>: 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 <bad@localhost>: response to "RCPT TO:<bad@localhost>" from 127.0.0.1 [127.0.0.1] was: 550 REJECTED + H=[V4NET.0.0.1] U=root sender verify fail for <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 REJECTED LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: (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 <ok@localhost>: 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 <ok@localhost>: 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=<ok@localhost> rejected RCPT <z@test.ex>: (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 <ok@otherhost>: response to "RCPT TO:<postmaster@otherhost>" from 127.0.0.1 [127.0.0.1] was: 550 NOT OK + H=[V4NET.0.0.2] U=root sender verify fail for <ok@otherhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@otherhost>: 550 NOT OK LOG: MAIN REJECT H=[V4NET.0.0.2] U=root F=<ok@otherhost> rejected RCPT <z@test.ex>: 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 <ok@otherhost3>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost3>" was: 250 OK +LOG: MAIN REJECT + H=[V4NET.0.0.3] U=root F=<ok@otherhost3> temporarily rejected RCPT <z@test.ex>: 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 <ok@otherhost4>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost4>" was: 250 OK +LOG: MAIN REJECT + H=[V4NET.0.0.4] U=root F=<ok@otherhost4> temporarily rejected RCPT <z@test.ex>: 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 <okok@otherhost51>: Could not complete sender verify callout + H=[V4NET.0.0.5] U=root sender verify defer for <okok@otherhost51>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost51> LOG: MAIN REJECT H=[V4NET.0.0.5] U=root F=<okok@otherhost51> temporarily rejected RCPT <z@test.ex>: Could not complete sender verify callout LOG: smtp_connection MAIN diff --git a/test/stderr/0398 b/test/stderr/0398 index 7489a19a1..b975ad05a 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 @@ -161,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:<qq@remote>" 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:<qq@remote>: 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 f819fb0b2..6ac5a0428 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 <p1@q>: Could not complete sender verify callout +LOG: H=[1.2.3.4] sender verify defer for <p1@q>: 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 <p1@q>: 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 <Ok@localhost>: response to "RCPT TO:<postmaster@localhost>" from 127.0.0.1 [127.0.0.1] was: 550 NO + H=[V4NET.0.0.1] U=root sender verify fail for <Ok@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@localhost>: 550 NO created log directory TESTSUITE/spool/log LOG: MAIN REJECT H=[V4NET.0.0.1] U=root F=<Ok@localhost> rejected RCPT <checkpm@test.ex>: 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 <NOTok@elsewhere>: response to "RCPT TO:<NOTok@elsewhere>" from 127.0.0.1 [127.0.0.1] was: 550 NO + H=[V4NET.0.0.2] U=root sender verify fail for <NOTok@elsewhere>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<NOTok@elsewhere>: 550 NO LOG: MAIN REJECT H=[V4NET.0.0.2] U=root F=<NOTok@elsewhere> rejected RCPT <nocheckpm@test.ex>: Sender verify failed LOG: smtp_connection MAIN diff --git a/test/stderr/0473 b/test/stderr/0473 index ed7bc5359..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=<x11@two.test.ex> temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout + U=CALLER F=<x11@two.test.ex> 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:<r11@two.test.ex> LOG: smtp_connection MAIN SMTP connection from CALLER closed by QUIT >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> @@ -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=<x11@two.test.ex> temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout + U=CALLER F=<x11@two.test.ex> 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/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:<ok@localhost> + 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 <ok@localhost>: 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=<ok@localhost> temporarily rejected RCPT <z@test.ex>: 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:<bad@localhost> + 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 <bad@localhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<bad@localhost>: 550 REJECTED rcpt +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: (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 <bad@localhost> +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root F=<bad@localhost> rejected RCPT <z@test.ex>: (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:<ok@localhost> + 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 <ok@localhost>: 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=<ok@localhost> rejected RCPT <z@test.ex>: (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 <ok@localhost> +LOG: MAIN REJECT + H=[V4NET.0.0.1] U=root F=<ok@localhost> rejected RCPT <z@test.ex>: (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:<ok@otherhost> + 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:<postmaster@otherhost> + 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 <ok@otherhost>: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<postmaster@otherhost>: 550 NOT OK rcpt postmaster +LOG: MAIN REJECT + H=[V4NET.0.0.2] U=root F=<ok@otherhost> rejected RCPT <z@test.ex>: 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:<postmaster@domain> +LOG: MAIN REJECT + H=[V4NET.0.0.2] U=root sender verify fail for <ok@otherhost> +LOG: MAIN REJECT + H=[V4NET.0.0.2] U=root F=<ok@otherhost> rejected RCPT <z@test.ex>: 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:<ok@otherhost2> + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO:<postmaster@otherhost2> + 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:<postmaster@domain> +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:<myhost.test.ex-dddddddd-testing@otherhost3> + 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 <ok@otherhost3>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost3>" was: 250 OK accepting that random recipient +LOG: MAIN REJECT + H=[V4NET.0.0.3] U=root F=<ok@otherhost3> temporarily rejected RCPT <z@test.ex>: 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:<myhost.test.ex-dddddddd-testing@otherhost4> + 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 <ok@otherhost4>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : response to "RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost4>" was: 250 OK +LOG: MAIN REJECT + H=[V4NET.0.0.4] U=root F=<ok@otherhost4> temporarily rejected RCPT <z@test.ex>: 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:<myhost.test.ex-dddddddd-testing@otherhost41> + SMTP<< 250 OK + SMTP<< 550 NOT OK + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO:<ok@otherhost41> + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO:<postmaster@otherhost41> + 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:<postmaster@domain> +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:<ok@otherhost21> + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO:<postmaster@otherhost21> + 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:<postmaster@domain> +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:<ok2@otherhost21> + 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:<myhost.test.ex-dddddddd-testing@otherhost31> + SMTP<< 250 OK + SMTP<< 550 NOT OK + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO:<ok@otherhost31> + 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:<okok@otherhost31> + 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:<myhost.test.ex-dddddddd-testing@otherhost31> + SMTP<< 250 OK + SMTP<< 550 NOT OK + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO:<okokok@otherhost31> + 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:<myhost.test.ex-dddddddd-testing@otherhost51> + 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 <okok@otherhost51>: Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after RCPT TO:<myhost.test.ex-dddddddd-testing@otherhost51> +LOG: MAIN REJECT + H=[V4NET.0.0.5] U=root F=<okok@otherhost51> temporarily rejected RCPT <z@test.ex>: 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:<okokok@otherhost52> + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<pmsend@a.domain> + SMTP>> RCPT TO:<postmaster@otherhost52> + 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/<somesender@a.domain> +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:<somesender@a.domain> + SMTP>> RCPT TO:<abcd@x.y.z> + 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/<somesender@a.domain> +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:<abcd@x.y.z> + 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:<ok@otherhost9> + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<> + SMTP>> RCPT TO:<postmaster@otherhost9> + SMTP<< 250 OK + SMTP<< 550 NOT OK + SMTP>> RCPT TO:<postmaster> + 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/<postmaster@myhost.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:<postmaster@myhost.test.ex> + SMTP>> RCPT TO:<myhost.test.ex-dddddddd-testing@test.ex> + SMTP<< 250 OK + SMTP<< 550 RANDOM IS BAD + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<postmaster@myhost.test.ex> + SMTP>> RCPT TO:<z@test.ex> + SMTP<< 250 OK + SMTP<< 250 OK +Cutthrough cancelled by presence of postmaster verify + SMTP>> RSET + SMTP<< 250 OK + SMTP>> MAIL FROM:<pmsend@b.domain> + SMTP>> RCPT TO:<postmaster@test.ex> + 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/<postmaster@myhost.test.ex> +LOG: smtp_connection MAIN + SMTP connection from root closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/5410 b/test/stderr/5410 index cb1b31b72..acfc011cc 100644 --- a/test/stderr/5410 +++ b/test/stderr/5410 @@ -115,12 +115,14 @@ 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:<CALLER@myhost.test.ex> -cmd buf flush ddd bytes - SMTP<< 250 OK + SMTP>> MAIL FROM:<CALLER@myhost.test.ex> SIZE=ssss SMTP>> RCPT TO:<userx@domain.com> cmd buf flush ddd bytes + SMTP<< 250 OK SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ @@ -327,12 +329,14 @@ 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:<CALLER@myhost.test.ex> -cmd buf flush ddd bytes - SMTP<< 250 OK + SMTP>> MAIL FROM:<CALLER@myhost.test.ex> SIZE=ssss SMTP>> RCPT TO:<usery@domain.com> cmd buf flush ddd bytes + SMTP<< 250 OK SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ @@ -539,12 +543,14 @@ 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:<CALLER@myhost.test.ex> -cmd buf flush ddd bytes - SMTP<< 250 OK + SMTP>> MAIL FROM:<CALLER@myhost.test.ex> SIZE=ssss SMTP>> RCPT TO:<usery@domain.com> 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 8ccf0fd6c..ff032e986 100644 --- a/test/stderr/5420 +++ b/test/stderr/5420 @@ -114,12 +114,14 @@ 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:<CALLER@myhost.test.ex> -cmd buf flush ddd bytes - SMTP<< 250 OK + SMTP>> MAIL FROM:<CALLER@myhost.test.ex> SIZE=ssss SMTP>> RCPT TO:<userx@domain.com> cmd buf flush ddd bytes + SMTP<< 250 OK SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ @@ -326,12 +328,14 @@ 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:<CALLER@myhost.test.ex> -cmd buf flush ddd bytes - SMTP<< 250 OK + SMTP>> MAIL FROM:<CALLER@myhost.test.ex> SIZE=ssss SMTP>> RCPT TO:<usery@domain.com> cmd buf flush ddd bytes + SMTP<< 250 OK SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ @@ -538,12 +542,14 @@ 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:<CALLER@myhost.test.ex> -cmd buf flush ddd bytes - SMTP<< 250 OK + SMTP>> MAIL FROM:<CALLER@myhost.test.ex> SIZE=ssss SMTP>> RCPT TO:<usery@domain.com> 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 97fdca69d..e4cf15c51 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,12 +51,12 @@ 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<< 250 OK +>>> SMTP>> MAIL FROM:<> SIZE=ssss >>> SMTP>> RCPT TO:<rcptuser@dane256ee.test.ex> ->>> 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/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 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:<ok@localhost1> 250 OK diff --git a/test/stdout/0365 b/test/stdout/0365 index 0d6e07977..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 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 <callout@x>.
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/<postmaster@the.local.host.name> callout=accept 07-Mar-2000 12:21:52 r1@test.ex/<s1@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/<postmaster@the.local.host.name> callout=accept @@ -251,7 +253,7 @@ EHLO the.local.host.name 250 OK MAIL FROM:<> 250 OK -RCPT TO:<r12@three.test.ex> +RCPT TO:<the.local.host.name--testing@three.test.ex> 250 OK QUIT 250 OK 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 <bad@localhost>
+550-Called: 127.0.0.1
+550-Sent: RCPT TO:<bad@localhost>
+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 <bad@localhost>
+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 <ok@localhost>
+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 <ok@localhost>
+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 <ok@otherhost>
+550-Called: 127.0.0.1
+550-Sent: RCPT TO:<postmaster@otherhost>
+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 <ok@otherhost>
+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:<ok@localhost> +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:<bad@localhost> +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:<ok@localhost> +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:<ok@otherhost> +250 OK sender +250 OK rcpt +RSET +250 OK reset +MAIL FROM:<> +RCPT TO:<postmaster@otherhost> +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:<ok@otherhost2> +250 OK +250 OK +RSET +250 OK +MAIL FROM:<> +RCPT TO:<postmaster@otherhost2> +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:<myhost.test.ex-dddddddd-testing@otherhost3> +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:<myhost.test.ex-dddddddd-testing@otherhost4> +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:<myhost.test.ex-dddddddd-testing@otherhost41> +250 OK +550 NOT OK +RSET +250 OK +MAIL FROM:<> +RCPT TO:<ok@otherhost41> +250 OK +250 OK +RSET +250 OK +MAIL FROM:<> +RCPT TO:<postmaster@otherhost41> +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:<ok@otherhost21> +250 OK +250 OK +RSET +250 OK +MAIL FROM:<> +RCPT TO:<postmaster@otherhost21> +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:<ok2@otherhost21> +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:<myhost.test.ex-dddddddd-testing@otherhost31> +250 OK +550 NOT OK +RSET +250 OK +MAIL FROM:<> +RCPT TO:<ok@otherhost31> +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:<okok@otherhost31> +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:<myhost.test.ex-dddddddd-testing@otherhost31> +250 OK +550 NOT OK +RSET +250 OK +MAIL FROM:<> +RCPT TO:<okokok@otherhost31> +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:<myhost.test.ex-dddddddd-testing@otherhost51> +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:<okokok@otherhost52> +250 OK +250 OK +RSET +250 OK +MAIL FROM:<pmsend@a.domain> +RCPT TO:<postmaster@otherhost52> +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:<somesender@a.domain> +RCPT TO:<abcd@x.y.z> +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:<abcd@x.y.z> +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:<ok@otherhost9> +250 OK +250 OK +RSET +250 OK +MAIL FROM:<> +RCPT TO:<postmaster@otherhost9> +250 OK +550 NOT OK +RCPT TO:<postmaster> +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:<postmaster@myhost.test.ex> +RCPT TO:<myhost.test.ex-dddddddd-testing@test.ex> +250 OK +550 RANDOM IS BAD +RSET +250 OK +MAIL FROM:<postmaster@myhost.test.ex> +RCPT TO:<z@test.ex> +250 OK +250 OK +RSET +250 OK +MAIL FROM:<pmsend@b.domain> +RCPT TO:<postmaster@test.ex> +250 OK +250 OK +QUIT +250 OK +End of script 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 <userA@test.ex>
-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 <userA@test.ex>
+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 <userB.જેઠીમધ@test.ex>
-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 <userB.જેઠીમધ@test.ex>
+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 <userA@test.ex>
-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 <userA@test.ex>
+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 <userB.જેઠીમધ@test.ex>
-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 <userB.જેઠીમધ@test.ex>
+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 <userA@test.ex>
-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 <userA@test.ex>
+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 <userB.જેઠીમધ@test.ex>
-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 <userB.જેઠીમધ@test.ex>
+550-533 no support for internationalised mailbox name
550 Sender verify failed
221 the.local.host.name closing connection
|