From: Jeremy Harris Date: Thu, 27 Jun 2024 14:27:12 +0000 (+0100) Subject: Pass back more info from transport to delivery process X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/f3ee1d51e03bdbe50a12385a7ff1098684edcaa2 Pass back more info from transport to delivery process --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 6d50f1bb4..f1aeab52e 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -6,9 +6,9 @@ Since version 4.98 ------------------ JH/01 Use fewer forks & execs for sending many messages to a single host. - By passing back the next message-id from the transport to the delivery - process, we can loop there. A two-phase queue run will benefit, - particularly for mailinglist and smarthost cases. + By passing back more info from the transport to the delivery process, + we can loop there. A two-phase queue run will benefit, particularly for + mailinglist and smarthost cases. JH/02 Add transaction support for hintsdbs. The sole initial provider is sqlite, and is used for the wait-transport and retry DBs. Transactions diff --git a/src/src/deliver.c b/src/src/deliver.c index 4e6624bc7..b828f8094 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -791,7 +791,7 @@ g = string_append(g, 3, US" [", h->address, US"]"); if (LOGGING(outgoing_port)) g = string_fmt_append(g, ":%d", h->port); -if (continue_sequence > 1) /*XXX this is wrong for a dropped proxyconn. Would have to pass back from transport */ +if (testflag(addr, af_cont_conn)) g = string_catn(g, US"*", 1); #ifdef SUPPORT_SOCKS @@ -1588,12 +1588,6 @@ if (addr->return_file >= 0 && addr->return_filename) (void)close(addr->return_file); } -/* Check if the transport notifed continue-conn status explicitly, and -update our knowlege. */ - -if (testflag(addr, af_new_conn)) continue_sequence = 1; -else if (testflag(addr, af_cont_conn)) continue_sequence++; - /* The success case happens only after delivery by a transport. */ if (result == OK) @@ -3319,6 +3313,9 @@ int fd = p->fd; uschar *msg = p->msg; BOOL done = p->done; +continue_hostname = NULL; +continue_transport = NULL; + /* Loop through all items, reading from the pipe when necessary. The pipe used to be non-blocking. But I do not see a reason for using non-blocking I/O here, as the preceding poll() tells us, if data is available for reading. @@ -3668,6 +3665,11 @@ while (!done) } else ptr++; + continue_flags = 0; + if (testflag(addr, af_cert_verified)) continue_flags |= CTF_CV; + if (testflag(addr, af_dane_verified)) continue_flags |= CTF_DV; + if (testflag(addr, af_tls_resume)) continue_flags |= CTF_TR; + /* Finished with this address */ addr = addr->next; @@ -3685,9 +3687,10 @@ while (!done) /* Z0 marks the logical end of the data. It is followed by '0' if continue_transport was NULL at the end of transporting, otherwise '1'. - We need to know when it becomes NULL during a delivery down a passed SMTP - channel so that we don't try to pass anything more down it. Of course, for - most normal messages it will remain NULL all the time. + Those are now for historical reasons only; we always clear the continued + channel info, and then set it explicitly if the transport indicates it + is still open, because it could differ for each transport we are running in + parallel. Z1 is a suggested message_id to handle next, used during a continued-transport sequence. */ @@ -3695,24 +3698,68 @@ while (!done) case 'Z': switch (*subid) { - case '0': - if (*ptr == '0') - { - continue_transport = NULL; - continue_hostname = NULL; - } + case '0': /* End marker */ done = TRUE; DEBUG(D_deliver) debug_printf("Z0%c item read\n", *ptr); break; - case '1': - if (continue_hostname) - { - Ustrncpy(continue_next_id, ptr, MESSAGE_ID_LENGTH); - continue_sequence++; - } - DEBUG(D_deliver) debug_printf("continue_next_id: %s%s\n", - continue_next_id, continue_hostname ? "" : " (ignored)"); + case '1': /* Suggested continuation message */ + Ustrncpy(continue_next_id, ptr, MESSAGE_ID_LENGTH); + continue_sequence = atoi(CS ptr + MESSAGE_ID_LENGTH + 1); + DEBUG(D_deliver) debug_printf("continue_next_id: %s seq %d\n", + continue_next_id, continue_sequence); + break; + case '2': /* Continued transport, host & addr */ + { + int recvd_fd; + + DEBUG(D_any) if (Ustrcmp(process_purpose, "continued-delivery") != 0) + debug_printf("%s becomes continued-delivery\n", process_purpose); + process_purpose = US"continued-delivery"; + continue_transport = string_copy(ptr); while (*ptr++) ; + continue_hostname = string_copy(ptr); while (*ptr++) ; + continue_host_address = string_copy(ptr); while (*ptr++) ; + continue_sequence = atoi(CS ptr); + + dup2((recvd_fd = recv_fd_from_sock(fd)), 0); + close(recvd_fd); + + DEBUG(D_deliver) + debug_printf("continue: tpt '%s' host '%s' addr '%s' seq %d\n", + continue_transport, continue_hostname, + continue_host_address, continue_sequence); + break; + } + case '3': /* Continued conn info */ + smtp_peer_options = ptr[0]; + f.smtp_authenticated = ptr[1] & 1; + break; +#ifndef DISABLE_TLS + case '4': /* Continued TLS info */ + continue_proxy_cipher = string_copy(ptr); + break; + case '5': /* Continued DANE info */ + case '6': /* Continued TLS info */ +# ifdef SUPPORT_DANE + continue_proxy_dane = *subid == '5'; +# endif + continue_proxy_sni = *ptr ? string_copy(ptr) : NULL; + break; +#endif +#ifndef DISABLE_ESMTP_LIMITS + case '7': /* Continued peer limits */ + sscanf(CS ptr, "%u %u %u", + &continue_limit_mail, &continue_limit_rcpt, + &continue_limit_rcptdom); + break; +#endif +#ifdef SUPPORT_SOCKS + case '8': /* Continued proxy info */ + proxy_local_address = string_copy(ptr); while (*ptr++) ; + proxy_local_port = atoi(CS ptr); while (*ptr++) ; + proxy_external_address = string_copy(ptr); while (*ptr++) ; + proxy_external_port = atoi(CS ptr); break; +#endif } break; @@ -4340,6 +4387,7 @@ So look out for the place it gets used. transport splitting further by max_rcp. So we potentially lose some parallellism. */ + GET_OPTION("max_rcpt"); address_count_max = mua_wrapper || Ustrchr(tp->max_addresses, '$') ? UNLIMITED_ADDRS : expand_max_rcpt(tp->max_addresses); @@ -4387,8 +4435,9 @@ So look out for the place it gets used. && address_count_max < remote_delivery_count/remote_max_parallel ) { - int new_max = remote_delivery_count/remote_max_parallel; - int message_max = tp->connection_max_messages; + int new_max = remote_delivery_count/remote_max_parallel, message_max; + GET_OPTION("connection_max_messages"); + message_max = tp->connection_max_messages; if (connection_max_messages >= 0) message_max = connection_max_messages; message_max -= continue_sequence - 1; if (message_max > 0 && new_max > address_count_max * message_max) @@ -4481,10 +4530,8 @@ nonmatch domains /* Compute the return path, expanding a new one if required. The old one must be set first, as it might be referred to in the expansion. */ - if(addr->prop.errors_address) - return_path = addr->prop.errors_address; - else - return_path = sender_address; + return_path = addr->prop.errors_address + ? addr->prop.errors_address : sender_address; GET_OPTION("return_path"); if (tp->return_path) @@ -4610,19 +4657,30 @@ nonmatch domains continue; } + } - /* Set a flag indicating whether there are further addresses that list - the continued host. This tells the transport to leave the channel open, - but not to pass it to another delivery process. We'd like to do that - for non-continue_transport cases too but the knowlege of which host is - connected to is too hard to manage. Perhaps we need a finer-grain - interface to the transport. */ + /* Once we hit the max number of parallel transports set a flag indicating + whether there are further addresses that list the same host. This tells the + transport to leave the channel open for us. */ +/*XXX maybe we should *count* possible further's, and set continue_more if +parmax * tpt-max is exceeded? */ - for (next = addr_remote; next && !f.continue_more; next = next->next) - for (host_item * h = next->host_list; h; h = h->next) - if (Ustrcmp(h->name, continue_hostname) == 0) - { f.continue_more = TRUE; break; } + if (parcount+1 >= remote_max_parallel) + { + host_item * h1 = addr->host_list; + if (h1) + { + const uschar * name = continue_hostname ? continue_hostname : h1->name; + for (next = addr_remote; next && !f.continue_more; next = next->next) + for (host_item * h = next->host_list; h; h = h->next) + if (Ustrcmp(h->name, name) == 0) + { f.continue_more = TRUE; break; } + } } + else DEBUG(D_deliver) + debug_printf( + "not reached parallelism limit (%d/%d) so not setting continue_more\n", + parcount+1, remote_max_parallel); /* The transports set up the process info themselves as they may connect to more than one remote machine. They also have to set up the filter @@ -4635,13 +4693,16 @@ nonmatch domains fails, it is probably because the value of remote_max_parallel is so large that too many file descriptors for pipes have been created. Arrange to wait for a process to finish, and then try again. If we still can't - create a pipe when all processes have finished, break the retry loop. */ + create a pipe when all processes have finished, break the retry loop. + Use socketpair() rather than pipe() so we can pass an fd back from the + transport process. + */ while (!pipe_done) { - if (pipe(pfd) == 0) pipe_done = TRUE; - else if (parcount > 0) parmax = parcount; - else break; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, pfd) == 0) pipe_done = TRUE; + else if (parcount > 0) parmax = parcount; + else break; /* We need to make the reading end of the pipe non-blocking. There are two different options for this. Exim is cunningly (I hope!) coded so @@ -4714,15 +4775,16 @@ Could take the initial continued-tpt hit, and then do the next-id thing? do_remote_deliveries par_reduce par_wait par_read_pipe */ -if (continue_transport && !exim_lockfile_needed()) - if (!continue_wait_db) - { - continue_wait_db = dbfn_open_multi( - string_sprintf("wait-%.200s", continue_transport), - O_RDWR, - (open_db *) store_get(sizeof(open_db), GET_UNTAINTED)); - continue_next_id[0] = '\0'; - } + /*XXX what about firsttime? */ + if (continue_transport && !exim_lockfile_needed()) + if (!continue_wait_db) + { + continue_wait_db = dbfn_open_multi( + string_sprintf("wait-%.200s", continue_transport), + O_RDWR, + (open_db *) store_get(sizeof(open_db), GET_UNTAINTED)); + continue_next_id[0] = '\0'; + } if ((pid = exim_fork(US"transport")) == 0) { @@ -4843,20 +4905,21 @@ if (continue_transport && !exim_lockfile_needed()) /* Information about what happened to each address. Four item types are used: an optional 'X' item first, for TLS information, then an optional "C" item for any client-auth info followed by 'R' items for any retry settings, - and finally an 'A' item for the remaining data. */ + and finally an 'A' item for the remaining data. The actual recipient address + is not sent but is implicit in the address-chain being handled. */ for(; addr; addr = addr->next) { - uschar *ptr; + uschar * ptr; - /* The certificate verification status goes into the flags */ + /* The certificate verification status goes into the flags, in A0 */ if (tls_out.certificate_verified) setflag(addr, af_cert_verified); #ifdef SUPPORT_DANE if (tls_out.dane_verified) setflag(addr, af_dane_verified); #endif -# ifndef DISABLE_TLS_RESUME +#ifndef DISABLE_TLS_RESUME if (tls_out.resumption & RESUME_USED) setflag(addr, af_tls_resume); -# endif +#endif /* Use an X item only if there's something to send */ #ifndef DISABLE_TLS @@ -5016,7 +5079,13 @@ if (continue_transport && !exim_lockfile_needed()) #endif /* The rest of the information goes in an 'A0' item. */ - +#ifdef notdef + DEBUG(D_deliver) + debug_printf("%s %s for MAIL\n", + addr->special_action == '=' ? "initial RCPT" + : addr->special_action == '-' ? "additional RCPT" : "?", + addr->address); +#endif sprintf(CS big_buffer, "%c%c", addr->transport_return, addr->special_action); ptr = big_buffer + 2; memcpy(ptr, &addr->basic_errno, sizeof(addr->basic_errno)); @@ -5056,16 +5125,73 @@ if (continue_transport && !exim_lockfile_needed()) if (LOGGING(incoming_interface) && sending_ip_address) #endif { - uschar * ptr; - ptr = big_buffer + sprintf(CS big_buffer, "%.128s", sending_ip_address) + 1; + uschar * ptr = big_buffer + + sprintf(CS big_buffer, "%.128s", sending_ip_address) + 1; ptr += sprintf(CS ptr, "%d", sending_port) + 1; rmt_dlv_checked_write(fd, 'I', '0', big_buffer, ptr - big_buffer); } -/*XXX new code*/ - /* Continuation message-id */ + /* Continuation message-id, if a continuation is for that reason, + and the next sequence number (MAIL FROM count) for the connection. */ + if (*continue_next_id) - rmt_dlv_checked_write(fd, 'Z', '1', continue_next_id, MESSAGE_ID_LENGTH); + rmt_dlv_checked_write(fd, 'Z', '1', big_buffer, + sprintf(CS big_buffer, "%.*s %u", + MESSAGE_ID_LENGTH, continue_next_id, continue_sequence+1) + 1); + + /* Connection details, only on the first suggested continuation for + wait-db ones, but for all continue-more ones (though any after the + delivery proc has the info are pointless). */ + + if (continue_hostname) + { + { + uschar * ptr = big_buffer; + ptr += sprintf(CS ptr, "%.128s", continue_transport) + 1; + ptr += sprintf(CS ptr, "%.128s", continue_hostname) + 1; + ptr += sprintf(CS ptr, "%.128s", continue_host_address) + 1; + ptr += sprintf(CS ptr, "%u", continue_sequence+1) + 1; + rmt_dlv_checked_write(fd, 'Z', '2', big_buffer, ptr - big_buffer); + send_fd_over_socket(fd, continue_fd); + } + + big_buffer[0] = smtp_peer_options; + big_buffer[1] = f.smtp_authenticated ? 1 : 0; + rmt_dlv_checked_write(fd, 'Z', '3', big_buffer, 2); + + if (tls_out.active.sock >= 0 || continue_proxy_cipher) + rmt_dlv_checked_write(fd, 'Z', '4', big_buffer, + sprintf(CS big_buffer, "%.128s", continue_proxy_cipher) + 1); + + if (tls_out.sni) + rmt_dlv_checked_write(fd, 'Z', +#ifdef SUPPORT_DANE + tls_out.dane_verified ? '5' : '6', +#else + '6', +#endif + tls_out.sni, Ustrlen(tls_out.sni)+1); + +#ifndef DISABLE_ESMTP_LIMITS + if (continue_limit_mail || continue_limit_rcpt || continue_limit_rcptdom) + rmt_dlv_checked_write(fd, 'Z', '7', big_buffer, + sprintf(CS big_buffer, "%u %u %u", + continue_limit_mail, continue_limit_rcpt, + continue_limit_rcptdom) + 1); +#endif + +#ifdef SUPPORT_SOCKS + if (proxy_session) + { + uschar * ptr = big_buffer; + ptr += sprintf(CS ptr, "%.128s", proxy_local_address) + 1; + ptr += sprintf(CS ptr, "%u", proxy_local_port) + 1; + ptr += sprintf(CS ptr, "%.128s", proxy_external_address) + 1; + ptr += sprintf(CS ptr, "%u", proxy_external_port) + 1; + rmt_dlv_checked_write(fd, 'Z', '8', big_buffer, ptr - big_buffer); + } +#endif + } /* Add termination flag, close the pipe, and that's it. The character after "Z0" indicates whether continue_transport is now NULL or not. @@ -5331,6 +5457,7 @@ if (continue_transport) if (Ustrcmp(t->name, continue_transport) == 0) { if (t->info->closedown) (t->info->closedown)(t); + continue_transport = NULL; break; } return DELIVER_NOT_ATTEMPTED; @@ -7064,10 +7191,7 @@ else if (system_filter && process_recipients != RECIP_FAIL_TIMEOUT) transport_instance *tp; for (tp = transports; tp; tp = tp->next) if (Ustrcmp(tp->name, tpname) == 0) - { - p->transport = tp; - break; - } + { p->transport = tp; break; } if (!tp) p->message = string_sprintf("failed to find \"%s\" transport " "for system filter delivery", tpname); diff --git a/src/src/exim.c b/src/src/exim.c index 8111a4489..cca02de5e 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -289,7 +289,8 @@ if (US info->si_addr < US 4096) else log_write(0, LOG_MAIN|LOG_PANIC, "SIGSEGV (maybe attempt to write to immutable memory)"); if (process_info_len > 0) - log_write(0, LOG_MAIN|LOG_PANIC, "SIGSEGV (%.*s)", process_info_len, process_info); + log_write(0, LOG_MAIN|LOG_PANIC, "SIGSEGV (%s: %.*s)", + process_purpose, process_info_len, process_info); stackdump(); signal(SIGSEGV, SIG_DFL); kill(getpid(), sig); diff --git a/src/src/functions.h b/src/src/functions.h index cdf97f8bd..afb6fd46f 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -444,6 +444,7 @@ extern BOOL receive_check_set_sender(const uschar *); extern BOOL receive_msg(BOOL); extern int_eximarith_t receive_statvfs(BOOL, int *); extern void receive_swallow_smtp(void); +extern int recv_fd_from_sock(int); #ifdef WITH_CONTENT_SCAN extern int regex(const uschar **, BOOL); extern void regex_vars_clear(void); @@ -497,6 +498,7 @@ extern int search_findtype_partial(const uschar *, int *, const uschar **, i int *, const uschar **); extern void *search_open(const uschar *, int, int, uid_t *, gid_t *); extern void search_tidyup(void); +extern BOOL send_fd_over_socket(int, int); extern uschar *sender_helo_verified_boolstr(void); extern void set_process_info(const char *, ...) PRINTF_FUNCTION(1,2); extern void sha1_end(hctx *, const uschar *, int, uschar *); @@ -633,11 +635,6 @@ extern uschar *transport_current_name(void); extern void transport_do_pass_socket(const uschar *, const uschar *, const uschar *, uschar *, int); extern void transport_init(void); -extern BOOL transport_pass_socket(const uschar *, const uschar *, const uschar *, uschar *, int -#ifndef DISABLE_ESMTP_LIMITS - , unsigned, unsigned, unsigned -#endif - ); extern const uschar *transport_rcpt_address(address_item *, BOOL); extern BOOL transport_set_up_command(const uschar ***, const uschar *, unsigned, int, address_item *, const uschar *, uschar **); @@ -1404,6 +1401,19 @@ return poll(&p, 1, tmo_millisec); /******************************************************************************/ /* Client-side smtp log string, for debug */ +static inline void +smtp_debug_cmd_log_init(void) +{ +# ifndef DISABLE_CLIENT_CMD_LOG +int old_pool = store_pool; +store_pool = POOL_PERM; +client_cmd_log = string_get_tainted(56, GET_TAINTED); +*client_cmd_log->s = '\0'; +store_pool = old_pool; +# endif +} + + static inline void smtp_debug_cmd(const uschar * buf, int mode) { @@ -1412,31 +1422,46 @@ HDEBUG(D_transport|D_acl|D_v) debug_printf_indent(" SMTP%c> %s\n", # ifndef DISABLE_CLIENT_CMD_LOG { - int len = Ustrcspn(buf, " \n"); - int old_pool = store_pool; + int len = Ustrcspn(buf, " \n"), old_pool = store_pool; store_pool = POOL_PERM; /* Main pool ACL allocations eg. callouts get released */ client_cmd_log = string_append_listele_n(client_cmd_log, ':', buf, MIN(len, 8)); if (mode == SCMD_BUFFER) - { client_cmd_log = string_catn(client_cmd_log, US"|", 1); - (void) string_from_gstring(client_cmd_log); - } else if (mode == SCMD_MORE) - { client_cmd_log = string_catn(client_cmd_log, US"+", 1); - (void) string_from_gstring(client_cmd_log); - } store_pool = old_pool; } # endif } +/* This might be called both due to callout and then from delivery. +Use memory that will not be released between those phases. +*/ +static inline void +smtp_debug_resp(const uschar * buf) +{ +# ifndef DISABLE_CLIENT_CMD_LOG +int old_pool = store_pool; +store_pool = POOL_PERM; +client_cmd_log = string_append_listele_n(client_cmd_log, ':', buf, + buf[3] == '-' ? 4 : 3); +store_pool = old_pool; +# endif +} + + static inline void smtp_debug_cmd_report(void) { # ifndef DISABLE_CLIENT_CMD_LOG -debug_printf("cmdlog: '%s'\n", client_cmd_log ? client_cmd_log->s : US"(unset)"); +if (client_cmd_log && *client_cmd_log->s) + { + debug_printf("cmdlog: '%Y'\n", client_cmd_log); + gstring_reset(client_cmd_log); + } +else + debug_printf("cmdlog: (unset)\n"); # endif } diff --git a/src/src/globals.c b/src/src/globals.c index 492d631ac..0f7f5a217 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -741,22 +741,24 @@ uid_t config_uid = 0; uint64_t connection_id = 0L; int connection_max_messages= -1; +unsigned continue_flags = 0; +#ifndef DISABLE_ESMTP_LIMITS +unsigned continue_limit_mail = 0; +unsigned continue_limit_rcpt = 0; +unsigned continue_limit_rcptdom= 0; +int continue_fd = -1; uschar *continue_proxy_cipher = NULL; BOOL continue_proxy_dane = FALSE; uschar *continue_proxy_sni = NULL; -uschar *continue_hostname = NULL; -uschar *continue_host_address = NULL; +const uschar *continue_hostname = NULL; +const uschar *continue_host_address = NULL; uschar continue_next_id[MESSAGE_ID_LENGTH +1] = {[0]='\0'}; int continue_sequence = 1; uschar *continue_transport = NULL; #ifndef COMPILE_UTILITY -open_db *continue_wait_db = NULL; open_db *continue_retry_db = NULL; +open_db *continue_wait_db = NULL; #endif -#ifndef DISABLE_ESMTP_LIMITS -unsigned continue_limit_mail = 0; -unsigned continue_limit_rcpt = 0; -unsigned continue_limit_rcptdom= 0; #endif uschar *csa_status = NULL; diff --git a/src/src/globals.h b/src/src/globals.h index 1f08d78e9..05c39109e 100644 --- a/src/src/globals.h +++ b/src/src/globals.h @@ -445,22 +445,24 @@ extern const uschar *config_main_filelist; /* List of possible config files */ extern uschar *config_main_filename; /* File name actually used */ extern uschar *config_main_directory; /* Directory where the main config file was found */ extern uid_t config_uid; /* Additional owner */ +extern unsigned continue_flags; /* TLS-related info for connection */ +#ifndef DISABLE_ESMTP_LIMITS +extern unsigned continue_limit_mail; /* Peer advertised limit */ +extern unsigned continue_limit_rcpt; +extern unsigned continue_limit_rcptdom; +#endif +extern int continue_fd; /* Connection for continuation */ extern uschar *continue_proxy_cipher; /* TLS cipher for proxied continued delivery */ extern BOOL continue_proxy_dane; /* proxied conn is DANE */ extern uschar *continue_proxy_sni; /* proxied conn SNI */ -extern uschar *continue_hostname; /* Host for continued delivery */ -extern uschar *continue_host_address; /* IP address for ditto */ +extern const uschar *continue_hostname; /* Host for continued delivery */ +extern const uschar *continue_host_address; /* IP address for ditto */ extern uschar continue_next_id[]; /* Next message_id from hintsdb */ extern int continue_sequence; /* Sequence num for continued delivery */ extern uschar *continue_transport; /* Transport for continued delivery */ #ifndef COMPILE_UTILITY -extern open_db *continue_wait_db; /* Hintsdb for wait-transport */ extern open_db *continue_retry_db; /* Hintsdb for retries */ -#endif -#ifndef DISABLE_ESMTP_LIMITS -extern unsigned continue_limit_mail; /* Peer advertised limit */ -extern unsigned continue_limit_rcpt; -extern unsigned continue_limit_rcptdom; +extern open_db *continue_wait_db; /* Hintsdb for wait-transport */ #endif diff --git a/src/src/hintsdb/hints_sqlite.h b/src/src/hintsdb/hints_sqlite.h index 69f9c43c1..da3bc2bff 100644 --- a/src/src/hintsdb/hints_sqlite.h +++ b/src/src/hintsdb/hints_sqlite.h @@ -137,7 +137,8 @@ return ret; # undef FMT } -/**/ +/* Note that we return claiming a duplicate record for any error. +It seem not uncommon to get a "database is locked" error. */ # define EXIM_DBPUTB_OK 0 # define EXIM_DBPUTB_DUP (-1) @@ -172,8 +173,10 @@ res = sqlite3_exec(dbp, CS qry, NULL, NULL, NULL); /* fprintf(stderr, "exim_s_dbp res %d\n", res); */ # endif +# ifdef COMPILE_UTILITY if (res != SQLITE_OK) fprintf(stderr, "sqlite3_exec: %s\n", sqlite3_errmsg(dbp)); +# endif return res == SQLITE_OK ? EXIM_DBPUTB_OK : EXIM_DBPUTB_DUP; # undef FMT diff --git a/src/src/log.c b/src/src/log.c index f12721cf5..2e97660a0 100644 --- a/src/src/log.c +++ b/src/src/log.c @@ -308,8 +308,8 @@ Send fd over socketpair. Return: true iff good. */ -static BOOL -log_send_fd(const int sock, const int fd) +BOOL +send_fd_over_socket(const int sock, const int fd) { struct msghdr msg; union { @@ -343,8 +343,8 @@ return n == 1; Return fd passed over socketpair, or -1 on error. */ -static int -log_recv_fd(const int sock) +int +recv_fd_from_sock(const int sock) { struct msghdr msg; union { @@ -415,7 +415,7 @@ else if (euid == root_uid) || getgid() != exim_gid || getegid() != exim_gid || (fd = log_open_already_exim(name)) < 0 - || !log_send_fd(sock[1], fd) + || !send_fd_over_socket(sock[1], fd) ) _exit(EXIT_FAILURE); (void)close(sock[1]); _exit(EXIT_SUCCESS); @@ -424,7 +424,7 @@ else if (euid == root_uid) (void)close(sock[1]); if (pid > 0) { - fd = log_recv_fd(sock[0]); + fd = recv_fd_from_sock(sock[0]); while (waitpid(pid, NULL, 0) == -1 && errno == EINTR); } (void)close(sock[0]); diff --git a/src/src/macros.h b/src/src/macros.h index 1a619b951..3ccbe3353 100644 --- a/src/src/macros.h +++ b/src/src/macros.h @@ -1189,6 +1189,11 @@ typedef unsigned mcs_flags; #define SR_FINAL TRUE #define SR_NOT_FINAL FALSE +/* Flags for continued-TLS-connection */ +#define CTF_CV BIT(0) +#define CTF_DV BIT(1) +#define CTF_TR BIT(2) + /* Return codes for smtp_write_mail_and_rcpt_cmds() */ typedef enum { sw_mrc_ok, /* good, rcpt results in addr->transport_return (PENDING_OK, DEFER, FAIL) */ diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c index cfc96c13c..1ff93b9e4 100644 --- a/src/src/smtp_out.c +++ b/src/src/smtp_out.c @@ -553,10 +553,10 @@ Returns: TRUE if OK, FALSE on error, with errno set static BOOL flush_buffer(smtp_outblock * outblock, int mode) { -int rc; -int n = outblock->ptr - outblock->buffer; +int n = outblock->ptr - outblock->buffer, rc; BOOL more = mode == SCMD_MORE; client_conn_ctx * cctx; +const uschar * where; HDEBUG(D_transport|D_acl) debug_printf_indent("cmd buf flush %d bytes%s\n", n, more ? " (more expected)" : ""); @@ -569,6 +569,7 @@ if (!(cctx = outblock->cctx)) } #ifndef DISABLE_TLS +where = US"tls_write"; if (cctx->tls_ctx) /*XXX have seen a null cctx here, rvfy sending QUIT, hence check above */ rc = tls_write(cctx->tls_ctx, outblock->buffer, n, more); else @@ -584,6 +585,7 @@ else requirement: TFO with data can, in rare cases, replay the data to the receiver. */ + where = US"smtp_connect"; if ( (cctx->sock = smtp_connect(outblock->conn_args, &early_data)) < 0) return FALSE; @@ -592,6 +594,7 @@ else } else { + where = US"send"; rc = send(cctx->sock, outblock->buffer, n, #ifdef MSG_MORE more ? MSG_MORE : 0 @@ -606,6 +609,7 @@ else This is despite NODELAY being active. https://bugzilla.redhat.com/show_bug.cgi?id=1803806 */ + where = US"cork"; if (!more) setsockopt(cctx->sock, IPPROTO_TCP, TCP_CORK, &off, sizeof(off)); #endif @@ -614,7 +618,8 @@ else if (rc <= 0) { - HDEBUG(D_transport|D_acl) debug_printf_indent("send failed: %s\n", strerror(errno)); + HDEBUG(D_transport|D_acl) debug_printf_indent("%s (fd %d) failed: %s\n", + where, cctx->sock, strerror(errno)); return FALSE; } @@ -625,22 +630,6 @@ return TRUE; -/* This might be called both due to callout and then from delivery. -Use memory that will not be released between those phases. -*/ -static void -smtp_debug_resp(const uschar * buf) -{ -#ifndef DISABLE_CLIENT_CMD_LOG -int old_pool = store_pool; -store_pool = POOL_PERM; -client_cmd_log = string_append_listele_n(client_cmd_log, ':', buf, - buf[3] == ' ' ? 3 : 4); -store_pool = old_pool; -#endif -} - - /************************************************* * Write SMTP command * *************************************************/ diff --git a/src/src/transport.c b/src/src/transport.c index c5565062b..327d09cff 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -2052,107 +2052,6 @@ _exit(errno); /* Note: must be _exit(), NOT exit() */ -/* Fork a new exim process to deliver the message, and do a re-exec, both to -get a clean delivery process, and to regain root privilege in cases where it -has been given away. - -Arguments: - transport_name to pass to the new process - hostname ditto - hostaddress ditto - id the new message to process - socket_fd the connected socket - -Returns: FALSE if fork fails; TRUE otherwise -*/ - -BOOL -transport_pass_socket(const uschar *transport_name, const uschar *hostname, - const uschar *hostaddress, uschar *id, int socket_fd -#ifndef DISABLE_ESMTP_LIMITS - , unsigned peer_limit_mail, unsigned peer_limit_rcpt, unsigned peer_limit_rcptdom -#endif - ) -{ -pid_t pid; -int status; - -DEBUG(D_transport) debug_printf("transport_pass_socket entered\n"); - -/*XXX we'd prefer this never happens, by not calling here for this -case (instead, passing back the next-id. But in case it does... */ -if (continue_wait_db) - { dbfn_close_multi(continue_wait_db); continue_wait_db = NULL; } -if (continue_retry_db) - { dbfn_close_multi(continue_retry_db); continue_retry_db = NULL; } - -#ifndef DISABLE_ESMTP_LIMITS -continue_limit_mail = peer_limit_mail; -continue_limit_rcpt = peer_limit_rcpt; -continue_limit_rcptdom = peer_limit_rcptdom; -#endif - -if ((pid = exim_fork(US"continued-transport")) == 0) - { - /* If we are running in the test harness, wait for a bit to allow the - previous process time to finish, write the log, etc., so that the output is - always in the same order for automatic comparison. */ - /* The double-fork goes back at least as far as 0.53 (June 1996). As of - 2024 I'm unclear why it is needed, especially given the following exec. - I suppose it means that the parent [caller of transport_pass_socket()] - [ that would be the "transport" proc ] - has no direct extant child procs, from this operation. Does it wait - for children? Not obviously so far, and a quick test has is working - apparently ok with a single fork. Further: The "transport" proc goes - on to only send results back up the pipe to its parent, the "delivery" - proc. It'd be kinda nice to swap the sequence around: send the results back, - omit the forking entrely, and exec the new transport. But the code - it all in the wrong place (the pipe-write in deliver.c and here we're - down in the transport). Perhaps we could pass the suggested next - msgid back up the pipe? - - How would this interact with the existing TLS proxy process? - Probably the way continue_more does at present. That feature is - for the case where a single message has more (recip) addrs than - can be handled in a single call to the transport. The continue-more - flag is set; the transport avoids doing a continue-transport fork/exec, - closes TLS and passes back to the deliver proc and exits. The deliver proc - makes a further call to the transport. An RSET is sent on the conn; - and the still-open conn is left for the deliver proc to make another - call to the transport with it open. That only works because it was - originally a continued-conn, also, so the deliver proc has the conn. - - So if already a continued-conn, could pass back the next-message-id - rather than doing a further continued-conn - but we'd have to re-establish - TLS. - [ Which is a pity, and should also be worked on. ] - We do not need to pass the wait-tpt hintsdb handle across an exec-for- - continued-conn because the deliver proc can know what tpt will be used, - so the name is predictable and it cam open it. May as well do that for - any remote tpt, and skip the open/close code in the tpt. Perhaps local - tpts also for consistency. But... only for transaction-capable DB providers - (and we will be assuming they are sequential-fork-safe). - - Architecture. The transport is a separate proc so that it can - - go badly wrong and die, being monitored from a safer parent - - manipulate privs, to deliver to local files. But here, we're smtp - and don't to that! - */ - - testharness_pause_ms(500); - transport_do_pass_socket(transport_name, hostname, hostaddress, - id, socket_fd); - /*NOTREACHED*/ - } - -if (pid > 0) - return TRUE; - -DEBUG(D_transport) debug_printf("transport_pass_socket failed to fork: %s\n", - strerror(errno)); -return FALSE; -} - - /* Enforce all args untainted, for consistency with a router-sourced pipe command, where (because the whole line is passed as one to the tpt) a diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 172ee3445..5d50715d6 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -465,6 +465,10 @@ for (address_item * addr = addrlist; addr; addr = addr->next) if (host) { addr->host_used = host; + if (continue_sequence > 1) + { clearflag(addr, af_new_conn); setflag(addr, af_cont_conn); } + else + { clearflag(addr, af_cont_conn); setflag(addr, af_new_conn); } #ifdef EXPERIMENTAL_DSN_INFO if (smtp_greeting) {uschar * s = Ustrchr(smtp_greeting, '\n'); if (s) *s = '\0';} @@ -823,17 +827,17 @@ if (regex_match(regex_LIMITS, sx->buffer, -1, &match)) if (strncmpic(s, US"MAILMAX=", 8) == 0) { - sx->peer_limit_mail = atoi(CS (s += 8)); + continue_limit_mail = sx->peer_limit_mail = atoi(CS (s += 8)); while (isdigit(*s)) s++; } else if (strncmpic(s, US"RCPTMAX=", 8) == 0) { - sx->peer_limit_rcpt = atoi(CS (s += 8)); + continue_limit_rcpt = sx->peer_limit_rcpt = atoi(CS (s += 8)); while (isdigit(*s)) s++; } else if (strncmpic(s, US"RCPTDOMAINMAX=", 14) == 0) { - sx->peer_limit_rcptdom = atoi(CS (s += 14)); + continue_limit_rcptdom = sx->peer_limit_rcptdom = atoi(CS (s += 14)); while (isdigit(*s)) s++; } else @@ -1277,6 +1281,10 @@ if (sx->pending_MAIL) { while (addr->transport_return != PENDING_DEFER) addr = addr->next; addr->host_used = sx->conn_args.host; + if (continue_sequence > 1) + { clearflag(addr, af_new_conn); setflag(addr, af_cont_conn); } + else + { clearflag(addr, af_cont_conn); setflag(addr, af_new_conn); } addr = addr->next; } return RESP_MAIL_OR_DATA_ERROR; @@ -1297,6 +1305,10 @@ while (count-- > 0) /* The address was accepted */ addr->host_used = sx->conn_args.host; + if (continue_sequence > 1) + { clearflag(addr, af_new_conn); setflag(addr, af_cont_conn); } + else + { clearflag(addr, af_cont_conn); setflag(addr, af_new_conn); } DEBUG(D_transport) debug_printf("%s expect rcpt for %s\n", __FUNCTION__, addr->address); if (smtp_read_response(sx, sx->buffer, sizeof(sx->buffer), @@ -2248,16 +2260,22 @@ if (continue_hostname && continue_proxy_cipher) else { DEBUG(D_transport) - debug_printf("Closing proxied-TLS connection due to SNI mismatch\n"); +# ifdef SUPPORT_DANE + if (continue_proxy_dane != sx->conn_args.dane) + debug_printf( + "Closing proxied-TLS connection due to dane requirement mismatch\n"); + else +# endif + debug_printf("Closing proxied-TLS connection (SNI '%s') " + "due to SNI mismatch (transport requirement '%s')\n", + continue_proxy_sni, sni); smtp_debug_cmd(US"QUIT", 0); write(0, "QUIT\r\n", 6); close(0); continue_hostname = continue_proxy_cipher = NULL; f.continue_more = FALSE; - continue_sequence = 1; /* Unfortunately, this process cannot affect success log - which is done by delivery proc. Would have to pass this - back through reporting pipe. */ + continue_sequence = 1; /* Ensure proper logging of non-cont-conn */ } } #endif /*!DISABLE_TLS*/ @@ -2268,13 +2286,8 @@ specially so they can be identified for retries. */ if (!continue_hostname) { - if (sx->verify) - HDEBUG(D_verify) debug_printf("interface=%s port=%d\n", sx->conn_args.interface, sx->port); - - /* Arrange to report to calling process this is a new connection */ - - clearflag(sx->first_addr, af_cont_conn); - setflag(sx->first_addr, af_new_conn); + if (sx->verify) HDEBUG(D_verify) + debug_printf("interface=%s port=%d\n", sx->conn_args.interface, sx->port); /* Get the actual port the connection will use, into sx->conn_args.host */ @@ -2314,9 +2327,7 @@ if (!continue_hostname) sx->peer_limit_mail = sx->peer_limit_rcpt = sx->peer_limit_rcptdom = #endif sx->avoid_option = sx->peer_offered = smtp_peer_options = 0; -#ifndef DISABLE_CLIENT_CMD_LOG - client_cmd_log = NULL; -#endif + smtp_debug_cmd_log_init(); #ifndef DISABLE_PIPE_CONNECT if ( verify_check_given_host(CUSS &ob->hosts_pipe_connect, @@ -2538,7 +2549,8 @@ goto SEND_QUIT; if ( (ob->hosts_require_auth || ob->hosts_try_auth) && f.smtp_in_early_pipe_no_auth) { - DEBUG(D_transport) debug_printf("may need to auth, so pipeline no further\n"); + DEBUG(D_transport) + debug_printf("may need to auth, so pipeline no further\n"); if (smtp_write_command(sx, SCMD_FLUSH, NULL) < 0) goto SEND_FAILED; if (sync_responses(sx, 2, 0) != RESP_NOERROR) @@ -2629,7 +2641,8 @@ goto SEND_QUIT; if ( (sx->peer_offered & (OPTION_PIPE | OPTION_EARLY_PIPE)) == (OPTION_PIPE | OPTION_EARLY_PIPE)) { - DEBUG(D_transport) debug_printf("PIPECONNECT usable in future for this IP\n"); + DEBUG(D_transport) + debug_printf("PIPECONNECT usable in future for this IP\n"); sx->ehlo_resp.cleartext_auths = study_ehlo_auths(sx); write_ehlo_cache_entry(sx); } @@ -2650,17 +2663,15 @@ goto SEND_QUIT; } } -/* For continuing deliveries down the same channel, having re-exec'd the socket +/* For continuing deliveries down the same channel, the socket is the standard input; for a socket held open from verify it is recorded in the cutthrough context block. Either way we don't need to redo EHLO here (but may need to do so for TLS - see below). -Set up the pointer to where subsequent commands will be left, for -error messages. Note that smtp_peer_options will have been -set from the command line if they were set in the process that passed the -connection on. */ +Set up the pointer "smtp_command" to where subsequent commands will be left, +for error messages. Other stuff was set up for us by the delivery process. */ /*XXX continue case needs to propagate DSN_INFO, prob. in deliver.c -as the continue goes via transport_pass_socket() and doublefork and exec. +as the continue goes via pass-fd to the delivery process. It does not wait. Unclear how we keep separate host's responses separate - we could match up by host ip+port as a bodge. */ @@ -2675,10 +2686,10 @@ else { sx->cctx.sock = 0; /* stdin */ sx->cctx.tls_ctx = NULL; - smtp_port_for_connect(sx->conn_args.host, sx->port); /* Record the port that was used */ + smtp_port_for_connect(sx->conn_args.host, sx->port); /* Record the port that was used */ } - sx->inblock.cctx = sx->outblock.cctx = &sx->cctx; smtp_command = big_buffer; + sx->inblock.cctx = sx->outblock.cctx = &sx->cctx; sx->peer_offered = smtp_peer_options; #ifndef DISABLE_ESMTP_LIMITS /* Limits passed by cmdline over exec. */ @@ -2700,6 +2711,14 @@ else sx->pipelining_used = pipelining_active = !!(smtp_peer_options & OPTION_PIPE); HDEBUG(D_transport) debug_printf("continued connection, %s TLS\n", continue_proxy_cipher ? "proxied" : "verify conn with"); + + tls_out.certificate_verified = !!(continue_flags & CTF_CV); +#ifdef SUPPORT_DANE + tls_out.dane_verified = !!(continue_flags & CTF_DV); +#endif +#ifndef DISABLE_TLS_RESUME + if (continue_flags & CTF_TR) tls_out.resumption |= RESUME_USED; +#endif return OK; } HDEBUG(D_transport) debug_printf("continued connection, no TLS\n"); @@ -3283,7 +3302,6 @@ sx->cctx.sock = -1; (void) event_raise(sx->conn_args.tblock->event_action, US"tcp:close", NULL, NULL); #endif -smtp_debug_cmd_report(); continue_transport = NULL; continue_hostname = NULL; return yield; @@ -3659,6 +3677,7 @@ struct pollfd p[2] = {{.fd = tls_out.active.sock, .events = POLLIN}, int rc, i; BOOL send_tls_shutdown = TRUE; +acl_level++; close(pfd[1]); if ((rc = exim_fork(US"tls-proxy"))) _exit(rc < 0 ? EXIT_FAILURE : EXIT_SUCCESS); @@ -3709,9 +3728,12 @@ do for (int nbytes = 0; rc - nbytes > 0; nbytes += i) if ((i = write(pfd[0], buf + nbytes, rc - nbytes)) < 0) goto done; - /* Handle outbound data. We cannot combine payload and the TLS-close - due to the limitations of the (pipe) channel feeding us. Maybe use a unix-domain - socket? */ + /* Handle outbound data. We cannot yet combine payload and the TLS-close + due to the limitations of the (pipe) channel feeding us. Could we use + a poll/POLLRDHUP? Would that need an extra poll call after every read + (likely not worth it), or (best case) could we get POLLIN+POLLRDHUP for + the final data blob? */ + if (p[1].revents & POLLIN) if ((rc = read(pfd[0], buf, bsize)) <= 0) { @@ -3808,7 +3830,7 @@ BOOL mail_limit = FALSE; #ifdef SUPPORT_DANE BOOL dane_held; #endif -BOOL tcw_done = FALSE, tcw = FALSE, passback_tcw = FALSE; +BOOL tcw_done = FALSE, tcw = FALSE, passback_conn = FALSE; *message_defer = FALSE; continue_next_id[0] = '\0'; @@ -4372,6 +4394,10 @@ else addr->delivery_time = delivery_time; addr->special_action = flag; addr->message = conf; + if (continue_sequence > 1) + { clearflag(addr, af_new_conn); setflag(addr, af_cont_conn); } + else + { clearflag(addr, af_cont_conn); setflag(addr, af_new_conn); } if (tcp_out_fastopen) { @@ -4657,9 +4683,9 @@ message (indicated by first_addr being non-NULL) we want to carry on with the rest of them. Also, it is desirable to send more than one message down the SMTP connection if there are several waiting, provided we haven't already sent so many as to hit the configured limit. The function transport_check_waiting looks -for a waiting message and returns its id. Then transport_pass_socket tries to -set up a continued delivery by passing the socket on to another process. The -variable send_rset is FALSE if a message has just been successfully transferred. +for a waiting message and returns its id. We pass it back to the delivery +process via the reporting pipe. The variable send_rset is FALSE if a message has +just been successfully transferred. If we are already sending down a continued channel, there may be further addresses not yet delivered that are aimed at the same host, but which have not @@ -4695,8 +4721,9 @@ if (sx->completed_addr && sx->ok && sx->send_quit) /* We will close the smtp session and connection, and clear continue_hostname. Then if there are further addrs for the message we will loop to the top of this function and make a fresh connection. Any further - message found in the wait-tpt hintsdb would then do a transport_pass_socket - to get the connection fd back to the delivery process. */ + message found in the wait-tpt hintsdb would then do a pass-fd over the + transport reporting pipe to get the connection fd back to the delivery + process. */ } else #endif @@ -4749,8 +4776,7 @@ if (sx->completed_addr && sx->ok && sx->send_quit) #ifndef DISABLE_TLS int pfd[2]; #endif - int socket_fd = sx->cctx.sock; - + continue_fd = sx->cctx.sock; if (sx->first_addr) /* More addresses still to be sent */ { /* for this message */ #ifndef DISABLE_ESMTP_LIMITS @@ -4760,8 +4786,6 @@ if (sx->completed_addr && sx->ok && sx->send_quit) a->transport_return = PENDING_DEFER; #endif continue_sequence++; /* for consistency */ - clearflag(sx->first_addr, af_new_conn); - setflag(sx->first_addr, af_cont_conn); /* Causes * in logging */ pipelining_active = sx->pipelining_used; /* was cleared at DATA */ goto SEND_MESSAGE; } @@ -4769,121 +4793,109 @@ if (sx->completed_addr && sx->ok && sx->send_quit) /* If there is a next-message-id from the wait-transport hintsdb, pretend caller said it has further message for us. Note that we lose the TLS session (below), and that our caller will pass back the id to - the delivery process. If not, remember to later cancel the - next-message-id so that the transport-caller code (in deliver.c) does - not report it back up the pipe to the delivery process. - XXX It would be feasible to also report the other continue_* with the - _id - taking out the exec for the first continued-transport. But the - actual conn, and it's fd, is a problem. Maybe replace the transport - pipe with a unix-domain socket? */ - - if (!f.continue_more && continue_hostname && *continue_next_id) - f.continue_more = passback_tcw = TRUE; - - /* Unless caller said it already has more messages listed for this host, - pass the connection on to a new Exim process (below, the call to - transport_pass_socket). If the caller has more ready, just return with - the connection still open. */ + the delivery process. */ + + if (f.continue_more) + { + passback_conn = TRUE; + continue_next_id[0] = '\0'; + } + else if (*continue_next_id) + passback_conn = f.continue_more = TRUE; #ifndef DISABLE_TLS + /* If we will be returning with the connection still open and have a TLS + endpoint, shut down TLS if we must, or if this is a first-time passback + fork a proxy process with the TLS state. */ + if (tls_out.active.sock >= 0) - if ( f.continue_more - || verify_check_given_host(CUSS &ob->hosts_noproxy_tls, host) == OK) + { + if ( (continue_hostname || passback_conn) + && verify_check_given_host(CUSS &ob->hosts_noproxy_tls, host) == OK + ) { - /* Before passing the socket on, or returning to caller with it still - open, we must shut down TLS. Not all MTAs allow for the continuation - of the SMTP session when TLS is shut down. We test for this by sending - a new EHLO. If we don't get a good response, we don't attempt to pass - the socket on. + /* Not all MTAs allow for the continuation of the SMTP session when + TLS is shut down. We test for this by sending a new EHLO. If we + don't get a good response, we don't attempt to pass the socket on. NB: TLS close is *required* per RFC 9266 when tls-exporter info has been used, which we do under TLSv1.3 for the gsasl SCRAM*PLUS methods. - But we were always doing it anyway. */ - - tls_close(sx->cctx.tls_ctx, - sx->send_tlsclose ? TLS_SHUTDOWN_WAIT : TLS_SHUTDOWN_WONLY); - sx->send_tlsclose = FALSE; - sx->cctx.tls_ctx = NULL; - tls_out.active.sock = -1; - smtp_peer_options = smtp_peer_options_wrap; - sx->ok = !sx->smtps - && smtp_write_command(sx, SCMD_FLUSH, "EHLO %s\r\n", sx->helo_data) - >= 0 - && smtp_read_response(sx, sx->buffer, sizeof(sx->buffer), - '2', ob->command_timeout); - - if (sx->ok && f.continue_more) - goto TIDYUP; /* More addresses for another run */ + XXX TODO */ + + tls_close(sx->cctx.tls_ctx, + sx->send_tlsclose ? TLS_SHUTDOWN_WAIT : TLS_SHUTDOWN_WONLY); + sx->send_tlsclose = FALSE; + sx->cctx.tls_ctx = NULL; + tls_out.active.sock = -1; + smtp_peer_options = smtp_peer_options_wrap; + sx->ok = !sx->smtps + && smtp_write_command(sx, SCMD_FLUSH, "EHLO %s\r\n",sx->helo_data) + >= 0 + && smtp_read_response(sx, sx->buffer, sizeof(sx->buffer), + '2', ob->command_timeout); } - else + else if (passback_conn) { /* Set up a pipe for proxying TLS for the new transport process */ smtp_peer_options |= OPTION_TLS; if ((sx->ok = socketpair(AF_UNIX, SOCK_STREAM, 0, pfd) == 0)) - socket_fd = pfd[1]; - else - set_errno(sx->first_addr, errno, US"internal allocation problem", - DEFER, FALSE, host, -# ifdef EXPERIMENTAL_DSN_INFO - sx->smtp_greeting, sx->helo_response, -# endif - &sx->delivery_start); - } - else -#endif - if (f.continue_more) - goto TIDYUP; /* More addresses for another run */ - - /* If the socket is successfully passed, we mustn't send QUIT (or - indeed anything!) from here. */ - - /*XXX DSN_INFO: assume likely to do new HELO; but for greet we'll want to - propagate it from the initial - */ - if (sx->ok && transport_pass_socket(tblock->name, host->name, - host->address, continue_next_id, socket_fd -#ifndef DISABLE_ESMTP_LIMITS - , sx->peer_limit_mail, sx->peer_limit_rcpt, sx->peer_limit_rcptdom -#endif - )) - { - sx->send_quit = FALSE; - - /* We have passed the client socket to a fresh transport process. - If TLS is still active, we need to proxy it for the transport we - just passed the baton to. Fork a child to to do it, and return to - get logging done asap. Which way to place the work makes assumptions - about post-fork prioritisation which may not hold on all platforms. */ -#ifndef DISABLE_TLS - if (tls_out.active.sock >= 0) - { - int pid = exim_fork(US"tls-proxy-interproc"); - if (pid == 0) /* child; fork again to disconnect totally */ { - /* does not return */ - smtp_proxy_tls(sx->cctx.tls_ctx, sx->buffer, sizeof(sx->buffer), pfd, - ob->command_timeout, host->name); - } + int pid = exim_fork(US"tls-proxy-interproc"); + if (pid == 0) /* child; fork again to disconnect totally */ + { + /* does not return */ + smtp_proxy_tls(sx->cctx.tls_ctx, sx->buffer, sizeof(sx->buffer), + pfd, ob->command_timeout, host->name); + } + + if (pid < 0) + log_write(0, LOG_PANIC_DIE, "fork failed"); - if (pid > 0) /* parent */ - { close(pfd[0]); + continue_fd = pfd[1]; /* tidy the inter-proc to disconn the proxy proc */ waitpid(pid, NULL, 0); tls_close(sx->cctx.tls_ctx, TLS_NO_SHUTDOWN); sx->cctx.tls_ctx = NULL; (void)close(sx->cctx.sock); sx->cctx.sock = -1; - continue_transport = continue_hostname = NULL; - goto TIDYUP; + + continue_proxy_cipher = tls_out.cipher; + continue_proxy_sni = tls_out.sni; +# ifdef SUPPORT_DANE + continue_proxy_dane = tls_out.sni && tls_out.dane_verified; +# endif } - log_write(0, LOG_PANIC_DIE, "fork failed"); + else + set_errno(sx->first_addr, errno, US"internal allocation problem", + DEFER, FALSE, host, +# ifdef EXPERIMENTAL_DSN_INFO + sx->smtp_greeting, sx->helo_response, +# endif + &sx->delivery_start); } -#endif } +#endif /*DISABLE_TLS*/ + + /* If a connection re-use is possible, arrange to pass back all the info + about it so that further forks of the delivery process see it. */ + + if (passback_conn) + { + continue_transport = transport_name; + continue_hostname = host->name; + continue_host_address = host->address; + } + else + continue_hostname = NULL; + + if (sx->ok && f.continue_more) /* More addresses for another run; */ + goto TIDYUP; /* skip the channel closedown */ } - /* If RSET failed and there are addresses left, they get deferred. */ + /* If RSET failed and there are addresses left, they get deferred. + Do not pass back a next-id or conn info. */ + else set_errno(sx->first_addr, errno, msg, DEFER, FALSE, host, #ifdef EXPERIMENTAL_DSN_INFO @@ -4987,7 +4999,7 @@ HDEBUG(D_transport|D_acl|D_v) debug_printf_indent(" SMTP(close)>>\n"); (void)close(sx->cctx.sock); sx->cctx.sock = -1; continue_hostname = NULL; -smtp_debug_cmd_report(); +continue_next_id[0] = '\0'; #ifndef DISABLE_EVENT (void) event_raise(tblock->event_action, US"tcp:close", NULL, NULL); @@ -5007,8 +5019,6 @@ if (dane_held) to get the domain string for SNI */ sx->first_addr = a; - clearflag(a, af_cont_conn); - setflag(a, af_new_conn); /* clear * from logging */ DEBUG(D_transport) debug_printf("DANE: go-around for %s\n", a->domain); } } @@ -5021,18 +5031,16 @@ if (dane_held) if (mail_limit && sx->first_addr) { /* Reset the sequence count since we closed the connection. This is flagged - on the pipe back to the delivery process so that a non-continued-conn delivery - is logged. */ + on the pipe back to the delivery process so that it can reset it's count. + Also set flags on the addr so that a non-continued-conn delivery is logged. */ continue_sequence = 1; /* for consistency */ - clearflag(sx->first_addr, af_cont_conn); - setflag(sx->first_addr, af_new_conn); /* clear * from logging */ goto REPEAT_CONN; /* open a fresh connection */ } #endif OUT: - if (!passback_tcw) continue_next_id[0] = '\0'; + smtp_debug_cmd_report(); return yield; TIDYUP: @@ -5527,7 +5535,7 @@ retry_non_continued: result of the lookup. Set expired FALSE, to save the outer loop executing twice. */ - if (continue_hostname) + if (continue_sequence > 1) if ( Ustrcmp(continue_hostname, host->name) != 0 || Ustrcmp(continue_host_address, host->address) != 0 ) @@ -5972,7 +5980,7 @@ retry_non_continued: case when we were trying to deliver down an existing channel and failed. Don't try any other hosts in this case. */ - if (continue_hostname) break; + if (continue_sequence > 1) break; /* If the whole delivery, or some individual addresses, were deferred and there are more hosts that could be tried, do not count this host towards @@ -6023,7 +6031,7 @@ retry_non_continued: for routing that changes from run to run, or big multi-IP sites with round-robin DNS. */ - if (continue_hostname && !continue_host_tried) + if (continue_sequence > 1 && !continue_host_tried) { int fd = cutthrough.cctx.sock >= 0 ? cutthrough.cctx.sock : 0; @@ -6047,6 +6055,7 @@ retry_non_continued: (void) close(fd); cutthrough.cctx.sock = -1; continue_hostname = NULL; + continue_sequence = 1; goto retry_non_continued; } diff --git a/src/src/verify.c b/src/src/verify.c index b1e5d6802..ab56ed374 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -714,6 +714,8 @@ tls_retry_connection: #endif if (yield != OK) { + smtp_debug_cmd_report(); /*XXX we seem to exit without what should + be a common call to this. How? */ errno = addr->basic_errno; /* For certain errors we want specifically to log the transport name, diff --git a/test/log/0128 b/test/log/0128 index a267f684d..467ce6984 100644 --- a/test/log/0128 +++ b/test/log/0128 @@ -1,2 +1,2 @@ 1999-03-02 09:44:33 10HmaX-000000005vi-0000 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmaX-000000005vi-0000 == userx@test.ex R=reply T=reply defer (EEE): Is a directory: Failed to open sqlite3 file TESTSUITE/spool when sending message from reply transport: Is a directory +1999-03-02 09:44:33 10HmaX-000000005vi-0000 == userx@test.ex R=reply T=reply defer (EEE): Is a directory: Failed to open hintsdb file TESTSUITE/spool when sending message from reply transport: Is a directory diff --git a/test/log/0209 b/test/log/0209 index bc157826b..f62938e97 100644 --- a/test/log/0209 +++ b/test/log/0209 @@ -3,7 +3,7 @@ 1999-03-02 09:44:33 10HmaY-000000005vi-0000 <= CALLER@test.ex U=CALLER P=local S=sss 1999-03-02 09:44:33 10HmaY-000000005vi-0000 == userz@domain1 R=others T=smtp defer (0): SMTP delivery explicitly queued 1999-03-02 09:44:33 Start queue run: pid=p1234 -1999-03-02 09:44:33 10HmaX-000000005vi-0000 == userz@domain1 R=others T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 450 Temporary error +1999-03-02 09:44:33 10HmaX-000000005vi-0000 == userz@domain1 R=others T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 450 Temporary error 1 1999-03-02 09:44:33 10HmaY-000000005vi-0000 == userz@domain1 routing defer (-52): retry time not reached 1999-03-02 09:44:33 End queue run: pid=p1234 1999-03-02 09:44:33 10HmaX-000000005vi-0000 removed by CALLER @@ -17,10 +17,10 @@ 1999-03-02 09:44:33 10HmbA-000000005vi-0000 == userx@domain1 R=others T=smtp defer (0): SMTP delivery explicitly queued 1999-03-02 09:44:33 10HmbA-000000005vi-0000 == usery@domain1 R=others T=smtp defer (0): SMTP delivery explicitly queued 1999-03-02 09:44:33 Start queue run: pid=p1235 -1999-03-02 09:44:33 10HmaZ-000000005vi-0000 == userx@domain1 R=others T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 450 Temporary error +1999-03-02 09:44:33 10HmaZ-000000005vi-0000 == userx@domain1 R=others T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 450 Temporary error 2 1999-03-02 09:44:33 10HmaZ-000000005vi-0000 => usery@domain1 R=others T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" 1999-03-02 09:44:33 10HmbA-000000005vi-0000 == userx@domain1 routing defer (-52): retry time not reached -1999-03-02 09:44:33 10HmbA-000000005vi-0000 == usery@domain1 R=others T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]*: SMTP error from remote mail server after RCPT TO:: 450 Temporary error +1999-03-02 09:44:33 10HmbA-000000005vi-0000 == usery@domain1 R=others T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]*: SMTP error from remote mail server after RCPT TO:: 450 Temporary error 3 1999-03-02 09:44:33 10HmbA-000000005vi-0000 == userx@domain1 routing defer (-52): retry time not reached 1999-03-02 09:44:33 10HmbA-000000005vi-0000 == usery@domain1 routing defer (-52): retry time not reached 1999-03-02 09:44:33 End queue run: pid=p1235 diff --git a/test/log/1157 b/test/log/1157 index 83e829684..206d2dd04 100644 --- a/test/log/1157 +++ b/test/log/1157 @@ -4,9 +4,9 @@ 1999-03-02 09:44:33 Start queue run: pid=p1234 -qqf 1999-03-02 09:44:33 10HmaX-000000005vi-0000 => userx@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbA-000000005vi-0000" 1999-03-02 09:44:33 10HmaX-000000005vi-0000 Completed -1999-03-02 09:44:33 10HmaY-000000005vi-0000 => usery@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbB-000000005vi-0000" +1999-03-02 09:44:33 10HmaY-000000005vi-0000 => usery@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbB-000000005vi-0000" 1999-03-02 09:44:33 10HmaY-000000005vi-0000 Completed -1999-03-02 09:44:33 10HmaZ-000000005vi-0000 => userz@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbC-000000005vi-0000" +1999-03-02 09:44:33 10HmaZ-000000005vi-0000 => userz@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbC-000000005vi-0000" 1999-03-02 09:44:33 10HmaZ-000000005vi-0000 Completed 1999-03-02 09:44:33 End queue run: pid=p1234 -qqf 1999-03-02 09:44:33 10HmbD-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for usera@test.ex @@ -15,9 +15,9 @@ 1999-03-02 09:44:33 Start queue run: pid=p1235 -qqf 1999-03-02 09:44:33 10HmbD-000000005vi-0000 => usera@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbG-000000005vi-0000" 1999-03-02 09:44:33 10HmbD-000000005vi-0000 Completed -1999-03-02 09:44:33 10HmbE-000000005vi-0000 => userb@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbH-000000005vi-0000" +1999-03-02 09:44:33 10HmbE-000000005vi-0000 => userb@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbH-000000005vi-0000" 1999-03-02 09:44:33 10HmbE-000000005vi-0000 Completed -1999-03-02 09:44:33 10HmbF-000000005vi-0000 => userc@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbI-000000005vi-0000" +1999-03-02 09:44:33 10HmbF-000000005vi-0000 => userc@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbI-000000005vi-0000" 1999-03-02 09:44:33 10HmbF-000000005vi-0000 Completed 1999-03-02 09:44:33 End queue run: pid=p1235 -qqf 1999-03-02 09:44:33 10HmbJ-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for user_p@test.ex diff --git a/test/log/1163 b/test/log/1163 index f1041ddf1..518d649b3 100644 --- a/test/log/1163 +++ b/test/log/1163 @@ -3,13 +3,13 @@ 1999-03-02 09:44:33 10HmaZ-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for userz0@test.ex userz1@test.ex 1999-03-02 09:44:33 Start queue run: pid=p1234 -qqf 1999-03-02 09:44:33 10HmaX-000000005vi-0000 => userx0@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbA-000000005vi-0000" -1999-03-02 09:44:33 10HmaX-000000005vi-0000 => userx1@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbB-000000005vi-0000" +1999-03-02 09:44:33 10HmaX-000000005vi-0000 => userx1@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbB-000000005vi-0000" 1999-03-02 09:44:33 10HmaX-000000005vi-0000 Completed -1999-03-02 09:44:33 10HmaY-000000005vi-0000 => usery0@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbC-000000005vi-0000" -1999-03-02 09:44:33 10HmaY-000000005vi-0000 => usery1@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbD-000000005vi-0000" +1999-03-02 09:44:33 10HmaY-000000005vi-0000 => usery0@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbC-000000005vi-0000" +1999-03-02 09:44:33 10HmaY-000000005vi-0000 => usery1@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbD-000000005vi-0000" 1999-03-02 09:44:33 10HmaY-000000005vi-0000 Completed -1999-03-02 09:44:33 10HmaZ-000000005vi-0000 => userz0@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbE-000000005vi-0000" -1999-03-02 09:44:33 10HmaZ-000000005vi-0000 => userz1@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbF-000000005vi-0000" +1999-03-02 09:44:33 10HmaZ-000000005vi-0000 => userz0@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbE-000000005vi-0000" +1999-03-02 09:44:33 10HmaZ-000000005vi-0000 => userz1@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbF-000000005vi-0000" 1999-03-02 09:44:33 10HmaZ-000000005vi-0000 Completed 1999-03-02 09:44:33 End queue run: pid=p1234 -qqf @@ -17,14 +17,12 @@ 1999-03-02 09:44:33 exim x.yz daemon started: pid=p1235, no queue runs, listening for SMTP on port PORT_D 1999-03-02 09:44:33 SMTP connection from [127.0.0.1]:1111 (TCP/IP connection count = 1) 1999-03-02 09:44:33 10HmbA-000000005vi-0000 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1]:1111 P=esmtps X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no S=sss id=E10HmaX-000000005vi-0000@myhost.test.ex for userx0@test.ex -1999-03-02 09:44:33 SMTP connection from [127.0.0.1]:1112 (TCP/IP connection count = 2) -1999-03-02 09:44:33 10HmbB-000000005vi-0000 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1]:1112 P=esmtps X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no S=sss id=E10HmaX-000000005vi-0000@myhost.test.ex for userx1@test.ex +1999-03-02 09:44:33 10HmbB-000000005vi-0000 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1]:1111 P=esmtps X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no S=sss id=E10HmaX-000000005vi-0000@myhost.test.ex for userx1@test.ex 1999-03-02 09:44:33 10HmbC-000000005vi-0000 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1]:1111 P=esmtps X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no S=sss id=E10HmaY-000000005vi-0000@myhost.test.ex for usery0@test.ex 1999-03-02 09:44:33 10HmbD-000000005vi-0000 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1]:1111 P=esmtps X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no S=sss id=E10HmaY-000000005vi-0000@myhost.test.ex for usery1@test.ex +1999-03-02 09:44:33 10HmbE-000000005vi-0000 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1]:1111 P=esmtps X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no S=sss id=E10HmaZ-000000005vi-0000@myhost.test.ex for userz0@test.ex +1999-03-02 09:44:33 10HmbF-000000005vi-0000 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1]:1111 P=esmtps X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no S=sss id=E10HmaZ-000000005vi-0000@myhost.test.ex for userz1@test.ex 1999-03-02 09:44:33 SMTP connection from localhost (myhost.test.ex) [127.0.0.1]:1111 D=qqs closed by QUIT -1999-03-02 09:44:33 10HmbE-000000005vi-0000 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1]:1112 P=esmtps X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no S=sss id=E10HmaZ-000000005vi-0000@myhost.test.ex for userz0@test.ex -1999-03-02 09:44:33 10HmbF-000000005vi-0000 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1]:1112 P=esmtps X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no S=sss id=E10HmaZ-000000005vi-0000@myhost.test.ex for userz1@test.ex -1999-03-02 09:44:33 SMTP connection from localhost (myhost.test.ex) [127.0.0.1]:1112 D=qqs closed by QUIT 1999-03-02 09:44:33 Start queue run: pid=p1236 -qf 1999-03-02 09:44:33 10HmbA-000000005vi-0000 => userx0 R=server T=local_delivery 1999-03-02 09:44:33 10HmbA-000000005vi-0000 Completed diff --git a/test/log/1165 b/test/log/1165 index cd66fb6be..db38b6dd8 100644 --- a/test/log/1165 +++ b/test/log/1165 @@ -8,7 +8,7 @@ 2017-07-30 18:51:05.712 Start queue run: pid=p1237 -qq 2017-07-30 18:51:05.712 10HmaZ-000000005vi-0000 => first-user@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbB-000000005vi-0000" 2017-07-30 18:51:05.712 10HmaZ-000000005vi-0000 Completed -2017-07-30 18:51:05.712 10HmbA-000000005vi-0000 => second-user@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbC-000000005vi-0000" +2017-07-30 18:51:05.712 10HmbA-000000005vi-0000 => second-user@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbC-000000005vi-0000" 2017-07-30 18:51:05.712 10HmbA-000000005vi-0000 Completed 2017-07-30 18:51:05.712 End queue run: pid=p1237 -qq diff --git a/test/log/3461 b/test/log/3461 index b4b4b9638..ccfabbb86 100644 --- a/test/log/3461 +++ b/test/log/3461 @@ -3,7 +3,7 @@ 1999-03-02 09:44:33 Start queue run: pid=p1234 -qqf 1999-03-02 09:44:33 10HmaX-000000005vi-0000 => userx@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes DN="/C=UK/O=The Exim Maintainers/OU=Test Suite/CN=Phil Pennock" A=plain C="250 OK id=10HmaZ-000000005vi-0000" 1999-03-02 09:44:33 10HmaX-000000005vi-0000 Completed -1999-03-02 09:44:33 10HmaY-000000005vi-0000 => userx@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbA-000000005vi-0000" +1999-03-02 09:44:33 10HmaY-000000005vi-0000 => userx@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbA-000000005vi-0000" 1999-03-02 09:44:33 10HmaY-000000005vi-0000 Completed 1999-03-02 09:44:33 End queue run: pid=p1234 -qqf 1999-03-02 09:44:33 Start queue run: pid=p1235 -qqf diff --git a/test/log/3462 b/test/log/3462 index e1832e974..cc6abb620 100644 --- a/test/log/3462 +++ b/test/log/3462 @@ -3,7 +3,7 @@ 1999-03-02 09:44:33 Start queue run: pid=p1234 -qqf 1999-03-02 09:44:33 10HmaX-000000005vi-0000 => userx@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes DN="/C=UK/O=The Exim Maintainers/OU=Test Suite/CN=Phil Pennock" A=plain C="250 OK id=10HmaZ-000000005vi-0000" 1999-03-02 09:44:33 10HmaX-000000005vi-0000 Completed -1999-03-02 09:44:33 10HmaY-000000005vi-0000 => userx@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbA-000000005vi-0000" +1999-03-02 09:44:33 10HmaY-000000005vi-0000 => userx@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbA-000000005vi-0000" 1999-03-02 09:44:33 10HmaY-000000005vi-0000 Completed 1999-03-02 09:44:33 End queue run: pid=p1234 -qqf diff --git a/test/log/4713 b/test/log/4713 index 10a3926b9..3a611d929 100644 --- a/test/log/4713 +++ b/test/log/4713 @@ -3,9 +3,9 @@ 1999-03-02 09:44:33 10HmaX-000000005vi-0000 -> b@b.test.ex R=send_to_server T=to_server H=127.0.0.1 [127.0.0.1] C="250 message received" 1999-03-02 09:44:33 10HmaX-000000005vi-0000 Completed 1999-03-02 09:44:33 10HmaY-000000005vi-0000 <= CALLER@the.local.host.name U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmaY-000000005vi-0000 => a@a.test.ex R=send_to_server T=to_server H=127.0.0.1 [127.0.0.1] C="250 message received" -1999-03-02 09:44:33 10HmaY-000000005vi-0000 => b@b.test.ex R=send_to_server T=to_server H=127.0.0.1 [127.0.0.1]* C="250 second message received" -1999-03-02 09:44:33 10HmaY-000000005vi-0000 => c@c.test.ex R=send_to_server T=to_server H=127.0.0.1 [127.0.0.1]* C="250 third message received" -1999-03-02 09:44:33 10HmaY-000000005vi-0000 -> a2@a.test.ex R=send_to_server T=to_server H=127.0.0.1 [127.0.0.1]* C="250 message received" +1999-03-02 09:44:33 10HmaY-000000005vi-0000 => a1@a.test.ex R=send_to_server T=to_server H=127.0.0.1 [127.0.0.1] C="250 message received" +1999-03-02 09:44:33 10HmaY-000000005vi-0000 => b1@b.test.ex R=send_to_server T=to_server H=127.0.0.1 [127.0.0.1]* C="250 second message received" +1999-03-02 09:44:33 10HmaY-000000005vi-0000 => c1@c.test.ex R=send_to_server T=to_server H=127.0.0.1 [127.0.0.1]* C="250 third message received" +1999-03-02 09:44:33 10HmaY-000000005vi-0000 -> a2@a.test.ex R=send_to_server T=to_server H=127.0.0.1 [127.0.0.1] C="250 message received" 1999-03-02 09:44:33 10HmaY-000000005vi-0000 -> b2@b.test.ex R=send_to_server T=to_server H=127.0.0.1 [127.0.0.1]* C="250 second message received" 1999-03-02 09:44:33 10HmaY-000000005vi-0000 Completed diff --git a/test/log/5801 b/test/log/5801 index 2532b05d4..b0fac35b5 100644 --- a/test/log/5801 +++ b/test/log/5801 @@ -18,7 +18,7 @@ 1999-03-02 09:44:33 Start queue run: pid=p1235 -qq 1999-03-02 09:44:33 10HmbG-000000005vi-0000 => t20@mxdane512ee.test.ex R=client T=send_to_server H=dane512ee.test.ex [ip4.ip4.ip4.ip4] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=dane C="250 OK id=10HmbI-000000005vi-0000" 1999-03-02 09:44:33 10HmbG-000000005vi-0000 Completed -1999-03-02 09:44:33 10HmbH-000000005vi-0000 => t21@mxdane512ee1.test.ex R=client T=send_to_server H=dane512ee.test.ex [ip4.ip4.ip4.ip4]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbJ-000000005vi-0000" +1999-03-02 09:44:33 10HmbH-000000005vi-0000 => t21@mxdane512ee1.test.ex R=client T=send_to_server H=dane512ee.test.ex [ip4.ip4.ip4.ip4]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=dane C="250 OK id=10HmbJ-000000005vi-0000" 1999-03-02 09:44:33 10HmbH-000000005vi-0000 Completed 1999-03-02 09:44:33 End queue run: pid=p1235 -qq 1999-03-02 09:44:33 10HmbK-000000005vi-0000 <= CALLER@myhost.test.ex U=CALLER P=local S=sss for t30@mxdane512ee.test.ex diff --git a/test/mail/1163.userx1 b/test/mail/1163.userx1 index 8bdb29085..e357c3df8 100644 --- a/test/mail/1163.userx1 +++ b/test/mail/1163.userx1 @@ -1,5 +1,5 @@ From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999 -Received: from localhost ([127.0.0.1]:1112 helo=myhost.test.ex) +Received: from localhost ([127.0.0.1]:1111 helo=myhost.test.ex) by myhost.test.ex with esmtps (TLS1.x:ke-RSA-AES256-SHAnnn:xxx) (Exim x.yz) (envelope-from ) diff --git a/test/mail/1163.userz0 b/test/mail/1163.userz0 index c6f9774fa..ec17137bf 100644 --- a/test/mail/1163.userz0 +++ b/test/mail/1163.userz0 @@ -1,5 +1,5 @@ From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999 -Received: from localhost ([127.0.0.1]:1112 helo=myhost.test.ex) +Received: from localhost ([127.0.0.1]:1111 helo=myhost.test.ex) by myhost.test.ex with esmtps (TLS1.x:ke-RSA-AES256-SHAnnn:xxx) (Exim x.yz) (envelope-from ) diff --git a/test/mail/1163.userz1 b/test/mail/1163.userz1 index 13aced9ac..6cc7007cb 100644 --- a/test/mail/1163.userz1 +++ b/test/mail/1163.userz1 @@ -1,5 +1,5 @@ From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999 -Received: from localhost ([127.0.0.1]:1112 helo=myhost.test.ex) +Received: from localhost ([127.0.0.1]:1111 helo=myhost.test.ex) by myhost.test.ex with esmtps (TLS1.x:ke-RSA-AES256-SHAnnn:xxx) (Exim x.yz) (envelope-from ) diff --git a/test/msglog/0128.10HmaX-000000005vi-0000 b/test/msglog/0128.10HmaX-000000005vi-0000 index 4687b60df..e4107932a 100644 --- a/test/msglog/0128.10HmaX-000000005vi-0000 +++ b/test/msglog/0128.10HmaX-000000005vi-0000 @@ -1,2 +1,2 @@ 1999-03-02 09:44:33 Received from CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 userx@test.ex R=reply T=reply defer (EEE): Is a directory: Failed to open sqlite3 file TESTSUITE/spool when sending message from reply transport: Is a directory +1999-03-02 09:44:33 userx@test.ex R=reply T=reply defer (EEE): Is a directory: Failed to open hintsdb file TESTSUITE/spool when sending message from reply transport: Is a directory diff --git a/test/scripts/0000-Basic/0209 b/test/scripts/0000-Basic/0209 index 30401c89c..7497110d6 100644 --- a/test/scripts/0000-Basic/0209 +++ b/test/scripts/0000-Basic/0209 @@ -15,7 +15,7 @@ EHLO MAIL FROM: 250 Sender OK RCPT TO: -450 Temporary error +450 Temporary error 1 QUIT 250 OK **** @@ -37,7 +37,7 @@ EHLO MAIL FROM: 250 Sender OK RCPT TO: -450 Temporary error +450 Temporary error 2 RCPT TO: 250 OK DATA @@ -47,7 +47,7 @@ DATA MAIL FROM: 250 Sender OK RCPT TO: -450 Temporary error +450 Temporary error 3 QUIT 250 OK **** diff --git a/test/scripts/4710-esmtp-limits/4713 b/test/scripts/4710-esmtp-limits/4713 index 6003f2729..8b6e67701 100644 --- a/test/scripts/4710-esmtp-limits/4713 +++ b/test/scripts/4710-esmtp-limits/4713 @@ -22,7 +22,7 @@ QUIT exim -odi a@a.test.ex b@b.test.ex **** # -# RCPTDOMAINMAX Limit advertised, second domain temp-rejected +# RCPTDOMAINMAX Limit advertised, exim transport treats as 1 # Client should immediate-retry further MAIL transactions for remaining rcpts server PORT_D 220 Hi there @@ -31,7 +31,7 @@ EHLO 250 LIMITS MAILMAX=10 RCPTDOMAINMAX=100 MAIL FROM 250 mail cmd good -RCPT TO: +RCPT TO: 250 rcpt cmd 1 good RCPT TO: 250 rcpt cmd 2 good @@ -41,7 +41,7 @@ DATA 250 message received MAIL FROM 250 second mail cmd good -RCPT TO: +RCPT TO: 250 rcpt cmd 1 good RCPT TO 250 rcpt cmd 2 good @@ -51,7 +51,7 @@ DATA 250 second message received MAIL FROM 250 third mail cmd good -RCPT TO: +RCPT TO: 250 rcpt cmd 1 good DATA 352 go ahead @@ -60,5 +60,5 @@ DATA QUIT 220 bye **** -exim -odi a@a.test.ex b@b.test.ex c@c.test.ex a2@a.test.ex b2@b.test.ex +exim -odi a1@a.test.ex b1@b.test.ex c1@c.test.ex a2@a.test.ex b2@b.test.ex **** diff --git a/test/stderr/0218 b/test/stderr/0218 index 74109282a..49afcdcc9 100644 --- a/test/stderr/0218 +++ b/test/stderr/0218 @@ -45,20 +45,13 @@ connected SMTP>> (writing message) SMTP>> . SMTP<< 250 OK - SMTP(close)>> cmdlog: '220:EHLO:250-:MAIL|:RCPT|:DATA:250:250:351:.:250' >>>>>>>>>>>>>>>> Exim pid=p1241 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +qrun-delivery becomes continued-delivery LOG: MAIN => a@test.ex F= R=client T=send_to_server H=127.0.0.1 [127.0.0.1] L C="250 OK" LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1242 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> -Exim version x.yz .... -Hints DB: -configuration file is TESTSUITE/test-config -trusted user -admin user -dropping to exim gid; retaining priv uid delivering 10HmaY-000000005vi-0000 (queue run pid p1234) test.ex in ""? no (end of list) CALLER@test.ex in senders? no (end of list) @@ -78,12 +71,12 @@ T: send_to_server (ACL) SMTP<< 250 OK SMTP(close)>> cmdlog: 'MAIL|:RCPT|:DATA:250:250:351:.:QUIT+:250:250' ->>>>>>>>>>>>>>>> Exim pid=p1244 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1242 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN => b@test.ex F= R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* L C="250 OK" LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1243 (continued-transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1243 (continued-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: queue_run MAIN End queue run: pid=p1234 -qq >>>>>>>>>>>>>>>> Exim pid=p1234 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> @@ -102,15 +95,15 @@ test.ex in ""? no (end of list) CALLER@test.ex in senders? no (end of list) R: client (ACL) T: send_to_server (ACL) ->>>>>>>>>>>>>>>> Exim pid=p1245 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1246 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1244 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1245 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> delivering 10HmbA-000000005vi-0000 (queue run pid p1235) test.ex in ""? no (end of list) CALLER@test.ex in senders? no (end of list) R: client (ACL) T: send_to_server (ACL) ->>>>>>>>>>>>>>>> Exim pid=p1247 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1248 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1246 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1247 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> queue_run phase 2 start queue running combined directories looking in TESTSUITE/spool//input @@ -136,7 +129,7 @@ connected SMTP<< 250 OK SMTP(close)>> cmdlog: '220:EHLO:250-:MAIL|:RCPT|:DATA:550:503:503:QUIT+:250' ->>>>>>>>>>>>>>>> Exim pid=p1249 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1248 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN ** a@test.ex F= R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 550 NO Exim version x.yz .... @@ -146,10 +139,10 @@ trusted user admin user LOG: MAIN <= <> R=10HmaZ-000000005vi-0000 U=EXIMUSER P=local S=sss ->>>>>>>>>>>>>>>> Exim pid=p1250 (bounce-message) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1249 (bounce-message) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1251 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1250 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> delivering 10HmbA-000000005vi-0000 (queue run pid p1235) test.ex in ""? no (end of list) CALLER@test.ex in senders? no (end of list) @@ -157,12 +150,13 @@ R: client (ACL) T: send_to_server (ACL) Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused ->>>>>>>>>>>>>>>> Exim pid=p1252 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1251 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN == b@test.ex R=client T=send_to_server defer (dd): Connection refused ->>>>>>>>>>>>>>>> Exim pid=p1253 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1252 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: queue_run MAIN End queue run: pid=p1235 -qq >>>>>>>>>>>>>>>> Exim pid=p1235 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> @@ -178,8 +172,8 @@ test.ex in ""? no (end of list) CALLER@test.ex in senders? no (end of list) R: client (ACL) T: send_to_server (ACL) ->>>>>>>>>>>>>>>> Exim pid=p1254 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1255 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1253 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1254 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> delivering 10HmbB-000000005vi-0000 (queue run pid p1236) R: bounce (ACL) LOG: MAIN @@ -188,14 +182,14 @@ LOG: MAIN CALLER@test.ex: error ignored LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1256 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1255 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> delivering 10HmbC-000000005vi-0000 (queue run pid p1236) test.ex in ""? no (end of list) CALLER@test.ex in senders? no (end of list) R: client (ACL) T: send_to_server (ACL) ->>>>>>>>>>>>>>>> Exim pid=p1257 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1258 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1256 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1257 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> delivering 10HmbA-000000005vi-0000 (queue run pid p1236) test.ex in ""? no (end of list) CALLER@test.ex in senders? no (end of list) @@ -215,9 +209,9 @@ connected SMTP<< 503 Unexpected DATA SMTP>> RSET SMTP<< 250 OK - SMTP(close)>> cmdlog: '220:EHLO:250-:MAIL|:RCPT|:DATA:250:550:503:RSET:250' ->>>>>>>>>>>>>>>> Exim pid=p1259 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1258 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +qrun-delivery becomes continued-delivery LOG: MAIN ** b@test.ex F= R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 Unknown Exim version x.yz .... @@ -227,16 +221,9 @@ trusted user admin user LOG: MAIN <= <> R=10HmbA-000000005vi-0000 U=EXIMUSER P=local S=sss ->>>>>>>>>>>>>>>> Exim pid=p1260 (bounce-message) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1259 (bounce-message) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1261 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> -Exim version x.yz .... -Hints DB: -configuration file is TESTSUITE/test-config -trusted user -admin user -dropping to exim gid; retaining priv uid delivering 10HmbC-000000005vi-0000 (queue run pid p1236) test.ex in ""? no (end of list) CALLER@test.ex in senders? no (end of list) @@ -256,12 +243,12 @@ T: send_to_server (ACL) SMTP<< 250 OK SMTP(close)>> cmdlog: 'MAIL|:RCPT|:DATA:250:250:351:.:QUIT+:250:250' ->>>>>>>>>>>>>>>> Exim pid=p1263 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1260 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN => c@test.ex F= R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* L C="250 OK" LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1262 (continued-transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1261 (continued-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: queue_run MAIN End queue run: pid=p1236 -qqf >>>>>>>>>>>>>>>> Exim pid=p1236 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/0227 b/test/stderr/0227 index 87667b9f1..f7b427c81 100644 --- a/test/stderr/0227 +++ b/test/stderr/0227 @@ -126,6 +126,7 @@ LOG: MAIN bind of [1.1.1.1]:1111 failed unable to bind outgoing SMTP call to 1.1.1.1: Netwk addr not available failed: Netwk addr not available +cmdlog: (unset) LOG: MAIN PANIC recipient verify defer (making calloout connection): T=smtp Netwk addr not available LOG: MAIN REJECT @@ -196,8 +197,10 @@ LOG: smtp_connection MAIN SMTP connection from root Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) Connecting to ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN REJECT H=(test) [V4NET.0.0.3] U=root F= temporarily rejected RCPT : Could not complete recipient verify callout LOG: smtp_connection MAIN @@ -407,7 +410,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... connected SMTP(closed)<< SMTP(close)>> -cmdlog: '(unset)' +cmdlog: (unset) LOG: MAIN REJECT H=(test) [V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Remote host closed connection in response to initial connection LOG: MAIN REJECT @@ -418,6 +421,7 @@ LOG: smtp_connection MAIN SMTP connection from root Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN REJECT H=(test) [V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused LOG: MAIN REJECT diff --git a/test/stderr/0276 b/test/stderr/0276 index d19af1f2f..a7b990231 100644 --- a/test/stderr/0276 +++ b/test/stderr/0276 @@ -26,6 +26,7 @@ LOG: MAIN delivering 10HmaY-000000005vi-0000 Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused LOG: MAIN @@ -65,6 +66,7 @@ LOG: MAIN delivering 10HmbA-000000005vi-0000 Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused LOG: MAIN diff --git a/test/stderr/0332 b/test/stderr/0332 index 70dc4bddb..54cd5d8d2 100644 --- a/test/stderr/0332 +++ b/test/stderr/0332 @@ -34,17 +34,11 @@ After routing: Deferred addresses: cmdlog: '220:EHLO:250-:MAIL|:RCPT|:DATA:250:250:354:.:250' >>>>>>>>>>>>>>>> Exim pid=p1235 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +qrun-delivery becomes continued-delivery LOG: MAIN => ok@no.delay R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 OK" LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1236 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> -Exim version x.yz .... -Hints DB: -configuration file is TESTSUITE/test-config -trusted user -admin user -dropping to exim gid; retaining priv uid >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering: delay@test.again.dns unique = delay@test.again.dns @@ -62,7 +56,6 @@ checking domains calling r1 router r1 router called for ok@no.delay domain = no.delay -set transport t1 queued for t1 transport: local_part = ok domain = no.delay errors_to=NULL @@ -79,10 +72,10 @@ After routing: Deferred addresses: delay@test.again.dns cmdlog: 'MAIL|:RCPT|:DATA:250:250:354:.:250:QUIT+:250' ->>>>>>>>>>>>>>>> Exim pid=p1238 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1236 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN => ok@no.delay R=r1 T=t1 H=127.0.0.1 [127.0.0.1]* C="250 OK" ->>>>>>>>>>>>>>>> Exim pid=p1237 (continued-transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1237 (continued-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering: delay@test.again.dns unique = delay@test.again.dns @@ -95,7 +88,7 @@ After routing: Failed addresses: Deferred addresses: delay@test.again.dns ->>>>>>>>>>>>>>>> Exim pid=p1239 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1238 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: queue_run MAIN End queue run: pid=p1234 >>>>>>>>>>>>>>>> Exim pid=p1234 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/0333 b/test/stderr/0333 index 8a7d6dd42..44f2f123b 100644 --- a/test/stderr/0333 +++ b/test/stderr/0333 @@ -32,17 +32,11 @@ After routing: Deferred addresses: cmdlog: '220:EHLO:250-:MAIL|:RCPT|:DATA:250:250:354:.:250' >>>>>>>>>>>>>>>> Exim pid=p1235 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +fresh-exec becomes continued-delivery LOG: MAIN => ok@no.delay R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 OK" LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1234 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> -Exim version x.yz .... -Hints DB: -configuration file is TESTSUITE/test-config -trusted user -admin user -dropping to exim gid; retaining priv uid >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Considering: delay@test.again.dns unique = delay@test.again.dns @@ -60,7 +54,6 @@ checking domains calling r1 router r1 router called for ok@no.delay domain = no.delay -set transport t1 queued for t1 transport: local_part = ok domain = no.delay errors_to=NULL @@ -77,7 +70,7 @@ After routing: Deferred addresses: delay@test.again.dns cmdlog: 'MAIL|:RCPT|:DATA:250:250:354:.:250:QUIT+:250' ->>>>>>>>>>>>>>>> Exim pid=p1237 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1236 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN => ok@no.delay R=r1 T=t1 H=127.0.0.1 [127.0.0.1]* C="250 OK" ->>>>>>>>>>>>>>>> Exim pid=p1236 (continued-transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1234 (continued-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/0374 b/test/stderr/0374 index 3c8f9d6d8..44d28d827 100644 --- a/test/stderr/0374 +++ b/test/stderr/0374 @@ -383,15 +383,15 @@ transport error EPIPE ignored >>>>>>>>>>>>>>>> Exim pid=p1245 (delivery-local) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN == c1@myhost.test.ex R=ut3 T=ut3 defer (0): Child process of ut3 transport returned 127 (could mean unable to exec or command does not exist) from command: /non/existent/file -cmdlog: '220' +cmdlog: '220:EHLO:220:MAIL:250:RCPT:250:DATA:334:.:250:QUIT+:250' >>>>>>>>>>>>>>>> Exim pid=p1246 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN => d1@myhost.test.ex R=ut4 T=ut4 H=127.0.0.1 [127.0.0.1] C="250 OK" -cmdlog: '220' +cmdlog: '220:EHLO:220:MAIL:250:RCPT:450:QUIT+:250' >>>>>>>>>>>>>>>> Exim pid=p1247 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN == d2@myhost.test.ex R=ut4 T=ut4 defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 450 soft error -cmdlog: '220' +cmdlog: '220:EHLO:220:MAIL:250:RCPT:550:QUIT+:250' >>>>>>>>>>>>>>>> Exim pid=p1248 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN ** d3@myhost.test.ex R=ut4 T=ut4 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 hard error diff --git a/test/stderr/0375 b/test/stderr/0375 index e6a7b9402..323cfe7f0 100644 --- a/test/stderr/0375 +++ b/test/stderr/0375 @@ -876,37 +876,37 @@ transport error EPIPE ignored LOG: MAIN == c1@myhost.test.ex R=ut3 T=ut3 defer (0): Child process of ut3 transport returned 127 (could mean unable to exec or command does not exist) from command: /non/existent/file log writing disabled -cmdlog: '220' +cmdlog: '220:EHLO:220:MAIL:250:RCPT:250:DATA:334:.:250:QUIT+:250' >>>>>>>>>>>>>>>> Exim pid=p1250 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN => d1@myhost.test.ex P=<> R=ut4 T=ut4 H=127.0.0.1 [127.0.0.1] C="250 OK" log writing disabled -cmdlog: '220' +cmdlog: '220:EHLO:220:MAIL:250:RCPT:450:QUIT+:250' >>>>>>>>>>>>>>>> Exim pid=p1251 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN == d2@myhost.test.ex R=ut4 T=ut4 defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 450 soft error log writing disabled -cmdlog: '220' +cmdlog: '220:EHLO:220:MAIL:250:RCPT:550:QUIT+:250' >>>>>>>>>>>>>>>> Exim pid=p1252 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN ** d3@myhost.test.ex P=<> R=ut4 T=ut4 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 hard error log writing disabled -cmdlog: '220' +cmdlog: '220:EHLO:220:MAIL:250:RCPT:550:QUIT+:250' >>>>>>>>>>>>>>>> Exim pid=p1253 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN ** e1@myhost.test.ex P=<> R=ut5 T=ut5 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 hard error log writing disabled -cmdlog: '220' +cmdlog: '220:EHLO:220:MAIL:250:RCPT:250:DATA:334:.:250:QUIT+:250' >>>>>>>>>>>>>>>> Exim pid=p1254 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN => f1@myhost.test.ex P= R=ut6 T=ut6 H=127.0.0.1 [127.0.0.1] C="250 OK" log writing disabled -cmdlog: '220' +cmdlog: '220:EHLO:220:MAIL:250:RCPT:450:QUIT+:250' >>>>>>>>>>>>>>>> Exim pid=p1255 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN == f2@myhost.test.ex R=ut6 T=ut6 defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 450 soft error log writing disabled -cmdlog: '220' +cmdlog: '220:EHLO:220:MAIL:250:RCPT:550:QUIT+:250' >>>>>>>>>>>>>>>> Exim pid=p1256 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN ** f3@myhost.test.ex P= R=ut6 T=ut6 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 hard error diff --git a/test/stderr/0376 b/test/stderr/0376 index 9ef0c67a3..ef36704af 100644 --- a/test/stderr/0376 +++ b/test/stderr/0376 @@ -86,6 +86,7 @@ callout cache: address record expired for ok@localhost interface=NULL port=PORT_S Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN REJECT H=(test) [V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused created log directory TESTSUITE/spool/log diff --git a/test/stderr/0388 b/test/stderr/0388 index cd2772feb..85f5c9666 100644 --- a/test/stderr/0388 +++ b/test/stderr/0388 @@ -126,6 +126,7 @@ set_process_info: pppp delivering 10HmaX-000000005vi-0000 to V4NET.0.0.0 [V4NET. Connecting to V4NET.0.0.0 [V4NET.0.0.0]:PORT_S ... V4NET.0.0.0 in hosts_try_fastopen? failed: Network Error +cmdlog: (unset) LOG: MAIN H=V4NET.0.0.0 [V4NET.0.0.0] Network Error set_process_info: pppp delivering 10HmaX-000000005vi-0000: just tried V4NET.0.0.0 [V4NET.0.0.0]:PORT_S for x@y: result DEFER diff --git a/test/stderr/0450 b/test/stderr/0450 index 095135bbf..75b2e88ff 100644 --- a/test/stderr/0450 +++ b/test/stderr/0450 @@ -22,6 +22,7 @@ checking retry status of 127.0.0.1 delivering 10HmaX-000000005vi-0000 to 127.0.0.1 [127.0.0.1] (userx@test.ex) Connecting to 127.0.0.1 [127.0.0.1]:PORT_D ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused added retry item for T:[127.0.0.1]:127.0.0.1:PORT_D: errno=dd more_errno=dd,A flags=2 @@ -54,6 +55,7 @@ no message retry record delivering 10HmaX-000000005vi-0000 to 127.0.0.1 [127.0.0.1] (userx@test.ex) Connecting to 127.0.0.1 [127.0.0.1]:PORT_D2 ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused added retry item for T:[127.0.0.1]:127.0.0.1:PORT_D2: errno=dd more_errno=dd,A flags=2 diff --git a/test/stderr/0473 b/test/stderr/0473 index 3639713ec..177edbd52 100644 --- a/test/stderr/0473 +++ b/test/stderr/0473 @@ -53,7 +53,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... connected SMTP(Connection timed out)<< SMTP(close)>> -cmdlog: '(unset)' +cmdlog: (unset) SMTP timeout LOG: MAIN REJECT U=CALLER F= temporarily rejected RCPT r11@two.test.ex: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP timeout after initial connection diff --git a/test/stderr/0476 b/test/stderr/0476 index ee229ff93..e83c006cb 100644 --- a/test/stderr/0476 +++ b/test/stderr/0476 @@ -92,6 +92,7 @@ delivering 10HmaZ-000000005vi-0000 to 127.0.0.1 [127.0.0.1] (CALLER@the.local.ho set_process_info: pppp delivering 10HmaZ-000000005vi-0000 to 127.0.0.1 [127.0.0.1]:PORT_S (CALLER@the.local.host.name) Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused set_process_info: pppp delivering 10HmaZ-000000005vi-0000: just tried 127.0.0.1 [127.0.0.1]:PORT_S for CALLER@the.local.host.name: result DEFER diff --git a/test/stderr/0512 b/test/stderr/0512 index f3979815b..e7fe36f86 100644 --- a/test/stderr/0512 +++ b/test/stderr/0512 @@ -20,6 +20,7 @@ delivering 10HmaX-000000005vi-0000 to 127.0.0.1 [127.0.0.1] (userx@myhost.test.e hosts_max_try limit reached with this host Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused added retry item for T:[127.0.0.1]:127.0.0.1:PORT_S: errno=dd more_errno=dd,A flags=2 @@ -33,6 +34,7 @@ delivering 10HmaX-000000005vi-0000 to 127.0.0.1 [127.0.0.1] (userx@myhost.test.e hosts_max_try limit reached with this host Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused added retry item for T:[127.0.0.1]:127.0.0.1:PORT_S: errno=dd more_errno=dd,A flags=2 @@ -46,6 +48,7 @@ delivering 10HmaX-000000005vi-0000 to 127.0.0.1 [127.0.0.1] (userx@myhost.test.e hosts_max_try limit reached with this host Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused added retry item for T:[127.0.0.1]:127.0.0.1:PORT_S: errno=dd more_errno=dd,A flags=2 @@ -59,6 +62,7 @@ delivering 10HmaX-000000005vi-0000 to 127.0.0.1 [127.0.0.1] (userx@myhost.test.e hosts_max_try limit reached with this host Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused added retry item for T:[127.0.0.1]:127.0.0.1:PORT_S: errno=dd more_errno=dd,A flags=2 @@ -121,6 +125,7 @@ delivering 10HmaZ-000000005vi-0000 to 127.0.0.1 [127.0.0.1] (userx@myhost.test.e hosts_max_try limit reached with this host Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused added retry item for T:[127.0.0.1]:127.0.0.1:PORT_S: errno=dd more_errno=dd,A flags=2 @@ -134,6 +139,7 @@ delivering 10HmaZ-000000005vi-0000 to 127.0.0.1 [127.0.0.1] (userx@myhost.test.e hosts_max_try limit reached with this host Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN H=127.0.0.1 [127.0.0.1] Connection refused added retry item for T:[127.0.0.1]:127.0.0.1:PORT_S: errno=dd more_errno=dd,A flags=2 diff --git a/test/stderr/0544 b/test/stderr/0544 index 1f7e29bd4..091834313 100644 --- a/test/stderr/0544 +++ b/test/stderr/0544 @@ -368,6 +368,7 @@ try option set try option transport try option unseen try option multi_domain +try option max_rcpt try option multi_domain try option max_parallel try option return_path diff --git a/test/stderr/0578 b/test/stderr/0578 index 67739d428..4d86ebd9e 100644 --- a/test/stderr/0578 +++ b/test/stderr/0578 @@ -88,6 +88,7 @@ callout cache: address record expired for ok@localhost interface=NULL port=PORT_S Connecting to 127.0.0.1 [127.0.0.1]:PORT_S ... failed: Connection refused +cmdlog: (unset) LOG: MAIN REJECT H=(test) [V4NET.0.0.1] U=root sender verify defer for : Could not complete sender verify callout: 127.0.0.1 [127.0.0.1] : Connection refused created log directory TESTSUITE/spool/log diff --git a/test/stderr/1157 b/test/stderr/1157 index c87a34c53..95adc3960 100644 --- a/test/stderr/1157 +++ b/test/stderr/1157 @@ -45,18 +45,13 @@ cmd buf flush ddd bytes SMTP>> . SMTP<< 250 OK id=10HmbA-000000005vi-0000 127.0.0.1 in hosts_noproxy_tls? no (end of list) +cmdlog: '220:EHLO:250-:STARTTLS:220:EHLO:250-:MAIL|:RCPT|:DATA:250:250:354:.:250' >>>>>>>>>>>>>>>> Exim pid=p1248 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +qrun-delivery becomes continued-delivery LOG: MAIN => userx@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbA-000000005vi-0000" LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1249 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> -Exim version x.yz .... -Hints DB: -configuration file is TESTSUITE/test-config -trusted user -admin user -dropping to exim gid; retaining priv uid SMTP|> MAIL FROM: SIZE=ssss SMTP|> RCPT TO: SMTP>> DATA @@ -66,9 +61,10 @@ cmd buf flush ddd bytes SMTP<< 354 Enter message, ending with "." on a line by itself SMTP>> . SMTP<< 250 OK id=10HmbB-000000005vi-0000 ->>>>>>>>>>>>>>>> Exim pid=p1251 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +cmdlog: 'MAIL|:RCPT|:DATA:250:250:354:.:250' +>>>>>>>>>>>>>>>> Exim pid=p1249 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN - => usery@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbB-000000005vi-0000" + => usery@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbB-000000005vi-0000" LOG: MAIN Completed SMTP|> MAIL FROM: SIZE=ssss @@ -82,18 +78,18 @@ cmd buf flush ddd bytes SMTP+> QUIT cmd buf flush ddd bytes (more expected) SMTP(shutdown)>> - SMTP(TLS shutdown)>> + SMTP(TLS shutdown)>> SMTP<< 250 OK id=10HmbC-000000005vi-0000 SMTP<< 221 myhost.test.ex closing connection SMTP(close)>> cmdlog: 'MAIL|:RCPT|:DATA:250:250:354:.:QUIT+:250:221' ->>>>>>>>>>>>>>>> Exim pid=p1252 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1250 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN - => userz@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbC-000000005vi-0000" + => userz@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbC-000000005vi-0000" LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1250 (continued-transport) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1253 (tls-proxy) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1251 (continued-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1252 (tls-proxy) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: queue_run MAIN End queue run: pid=p1234 -qqf >>>>>>>>>>>>>>>> Exim pid=p1234 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> @@ -104,12 +100,12 @@ admin user dropping to exim gid; retaining priv uid LOG: queue_run MAIN Start queue run: pid=p1235 -qqf ->>>>>>>>>>>>>>>> Exim pid=p1254 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1255 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1256 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1257 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1258 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1259 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1253 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1254 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1255 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1256 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1257 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1258 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> Connecting to 127.0.0.1 [127.0.0.1]:PORT_D ... connected SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 @@ -144,18 +140,13 @@ cmd buf flush ddd bytes SMTP>> . SMTP<< 250 OK id=10HmbG-000000005vi-0000 127.0.0.1 in hosts_noproxy_tls? no (end of list) ->>>>>>>>>>>>>>>> Exim pid=p1260 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +cmdlog: '220:EHLO:250-:STARTTLS:220:EHLO:250-:MAIL|:RCPT|:DATA:250:250:354:.:250' +>>>>>>>>>>>>>>>> Exim pid=p1259 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +qrun-delivery becomes continued-delivery LOG: MAIN => usera@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbG-000000005vi-0000" LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1261 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> -Exim version x.yz .... -Hints DB: -configuration file is TESTSUITE/test-config -trusted user -admin user -dropping to exim gid; retaining priv uid SMTP|> MAIL FROM: SIZE=ssss SMTP|> RCPT TO: SMTP>> DATA @@ -165,9 +156,10 @@ cmd buf flush ddd bytes SMTP<< 354 Enter message, ending with "." on a line by itself SMTP>> . SMTP<< 250 OK id=10HmbH-000000005vi-0000 ->>>>>>>>>>>>>>>> Exim pid=p1263 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +cmdlog: 'MAIL|:RCPT|:DATA:250:250:354:.:250' +>>>>>>>>>>>>>>>> Exim pid=p1260 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN - => userb@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbH-000000005vi-0000" + => userb@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbH-000000005vi-0000" LOG: MAIN Completed SMTP|> MAIL FROM: SIZE=ssss @@ -181,18 +173,18 @@ cmd buf flush ddd bytes SMTP+> QUIT cmd buf flush ddd bytes (more expected) SMTP(shutdown)>> - SMTP(TLS shutdown)>> + SMTP(TLS shutdown)>> SMTP<< 250 OK id=10HmbI-000000005vi-0000 SMTP<< 221 myhost.test.ex closing connection SMTP(close)>> cmdlog: 'MAIL|:RCPT|:DATA:250:250:354:.:QUIT+:250:221' ->>>>>>>>>>>>>>>> Exim pid=p1264 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1261 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN - => userc@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no C="250 OK id=10HmbI-000000005vi-0000" + => userc@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbI-000000005vi-0000" LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1262 (continued-transport) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1265 (tls-proxy) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1262 (continued-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1263 (tls-proxy) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: queue_run MAIN End queue run: pid=p1235 -qqf >>>>>>>>>>>>>>>> Exim pid=p1235 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> @@ -203,12 +195,12 @@ admin user dropping to exim gid; retaining priv uid LOG: queue_run MAIN Start queue run: pid=p1236 -qqf +>>>>>>>>>>>>>>>> Exim pid=p1264 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1265 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Exim pid=p1266 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Exim pid=p1267 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Exim pid=p1268 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Exim pid=p1269 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1270 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> Exim pid=p1271 (qrun-p1-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> Connecting to 127.0.0.1 [127.0.0.1]:PORT_D ... connected SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 @@ -251,20 +243,13 @@ cmd buf flush ddd bytes 250-PIPELINING 250-STARTTLS 250 HELP - SMTP(close)>> cmdlog: '220:EHLO:250-:STARTTLS:220:EHLO:250-:MAIL|:RCPT|:DATA:250:250:354:.:250:EHLO:250-' ->>>>>>>>>>>>>>>> Exim pid=p1272 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1270 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +qrun-delivery becomes continued-delivery LOG: MAIN => user_p@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbM-000000005vi-0000" LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1273 (qrun-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> -Exim version x.yz .... -Hints DB: -configuration file is TESTSUITE/test-config -trusted user -admin user -dropping to exim gid; retaining priv uid SMTP>> STARTTLS cmd buf flush ddd bytes SMTP<< 220 TLS go ahead @@ -295,7 +280,8 @@ cmd buf flush ddd bytes 250-PIPELINING 250-STARTTLS 250 HELP ->>>>>>>>>>>>>>>> Exim pid=p1275 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +cmdlog: 'STARTTLS:220:EHLO:250-:MAIL|:RCPT|:DATA:250:250:354:.:250:EHLO:250-' +>>>>>>>>>>>>>>>> Exim pid=p1271 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN => user_q@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbN-000000005vi-0000" LOG: MAIN @@ -326,12 +312,12 @@ cmd buf flush ddd bytes SMTP<< 221 myhost.test.ex closing connection SMTP(close)>> cmdlog: 'STARTTLS:220:EHLO:250-:MAIL|:RCPT|:DATA:250:250:354:.:QUIT:250:221' ->>>>>>>>>>>>>>>> Exim pid=p1276 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1272 (transport) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN => user_r@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes C="250 OK id=10HmbO-000000005vi-0000" LOG: MAIN Completed ->>>>>>>>>>>>>>>> Exim pid=p1274 (continued-transport) terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=p1273 (continued-delivery) terminating with rc=0 >>>>>>>>>>>>>>>> LOG: queue_run MAIN End queue run: pid=p1236 -qqf >>>>>>>>>>>>>>>> Exim pid=p1236 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/2035 b/test/stderr/2035 index 920205672..a08e1a4a7 100644 --- a/test/stderr/2035 +++ b/test/stderr/2035 @@ -72,7 +72,7 @@ ok=1 send_quit=1 send_rset=0 continue_more=0 yield=0 first_address is NULL SMTP+> QUIT cmd buf flush ddd bytes (more expected) SMTP(shutdown)>> - SMTP(TLS shutdown)>> + SMTP(TLS shutdown)>> SMTP<< 221 myhost.test.ex closing connection SMTP(close)>> cmdlog: 'DATA:354:.:250:QUIT+:221' diff --git a/test/stderr/2135 b/test/stderr/2135 index 920205672..a08e1a4a7 100644 --- a/test/stderr/2135 +++ b/test/stderr/2135 @@ -72,7 +72,7 @@ ok=1 send_quit=1 send_rset=0 continue_more=0 yield=0 first_address is NULL SMTP+> QUIT cmd buf flush ddd bytes (more expected) SMTP(shutdown)>> - SMTP(TLS shutdown)>> + SMTP(TLS shutdown)>> SMTP<< 221 myhost.test.ex closing connection SMTP(close)>> cmdlog: 'DATA:354:.:250:QUIT+:221' diff --git a/test/stdout/0209 b/test/stdout/0209 index 53c173ed8..99d15bd45 100644 --- a/test/stdout/0209 +++ b/test/stdout/0209 @@ -11,7 +11,7 @@ EHLO the.local.host.name MAIL FROM: 250 Sender OK RCPT TO: -450 Temporary error +450 Temporary error 1 QUIT 250 OK End of script @@ -24,7 +24,7 @@ EHLO the.local.host.name MAIL FROM: 250 Sender OK RCPT TO: -450 Temporary error +450 Temporary error 2 RCPT TO: 250 OK DATA @@ -43,7 +43,7 @@ Test message 1 MAIL FROM: 250 Sender OK RCPT TO: -450 Temporary error +450 Temporary error 3 QUIT 250 OK End of script diff --git a/test/stdout/0543 b/test/stdout/0543 index d51549ac9..c53cb62ad 100644 --- a/test/stdout/0543 +++ b/test/stdout/0543 @@ -1,5 +1,5 @@ +++++++++++++++++++++++++++ -** Failed to open hintsdb TESTSUITE/spool/db/wait-smtp for reading: No such file or directory +** Failed to open hintsdb TESTSUITE/spool/db/wait-smtp: No such file or directory ******** SERVER ******** Listening on port 1224 ... diff --git a/test/stdout/4713 b/test/stdout/4713 index 08e08e323..44353b600 100644 --- a/test/stdout/4713 +++ b/test/stdout/4713 @@ -35,7 +35,7 @@ EHLO the.local.host.name 250 LIMITS MAILMAX=10 RCPTDOMAINMAX=100 MAIL FROM: 250 mail cmd good -RCPT TO: +RCPT TO: 250 rcpt cmd 1 good RCPT TO: 250 rcpt cmd 2 good @@ -53,7 +53,7 @@ Date: Tue, 2 Mar 1999 09:44:33 +0000 250 message received MAIL FROM: 250 second mail cmd good -RCPT TO: +RCPT TO: 250 rcpt cmd 1 good RCPT TO: 250 rcpt cmd 2 good @@ -71,7 +71,7 @@ Date: Tue, 2 Mar 1999 09:44:33 +0000 250 second message received MAIL FROM: 250 third mail cmd good -RCPT TO: +RCPT TO: 250 rcpt cmd 1 good DATA 352 go ahead