From 90bd3832bc0ff090ac5e37dfc66b30cabb9cfc1a Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 16 Feb 2024 23:16:29 +0000 Subject: [PATCH] Debug: option access for expansion --- src/src/daemon.c | 9 +- src/src/deliver.c | 162 ++++++++++++++---------- src/src/dkim.c | 8 ++ src/src/dkim_transport.c | 1 + src/src/exim.c | 36 ++++-- src/src/expand.c | 12 +- src/src/macros.h | 4 + src/src/moan.c | 11 +- src/src/receive.c | 145 +++++++++++---------- src/src/route.c | 55 ++++---- src/src/routers/dnslookup.c | 17 +-- src/src/routers/iplookup.c | 19 ++- src/src/routers/manualroute.c | 5 +- src/src/routers/queryprogram.c | 1 + src/src/routers/redirect.c | 23 +++- src/src/routers/rf_expand_data.c | 2 +- src/src/routers/rf_get_errors_address.c | 9 +- src/src/routers/rf_get_transport.c | 1 + src/src/smtp_in.c | 44 +++++-- src/src/smtp_out.c | 1 + src/src/spf.c | 11 +- src/src/transports/appendfile.c | 79 +++++++----- src/src/transports/autoreply.c | 25 ++-- src/src/transports/pipe.c | 17 ++- src/src/transports/queuefile.c | 1 + src/src/transports/smtp.c | 27 ++-- src/src/transports/smtp_socks.c | 1 + src/src/verify.c | 10 +- test/stderr/0002 | 12 ++ test/stderr/0092 | 13 ++ test/stderr/0402 | 89 +++++++++++++ test/stderr/0544 | 41 ++++++ test/stderr/0620 | 24 ++++ test/stderr/0628 | 8 ++ test/stderr/0632 | 36 ++++++ test/stderr/3000 | 3 + test/stderr/5410 | 93 +++++++++++++- test/stderr/5420 | 123 +++++++++++++++++- 38 files changed, 889 insertions(+), 289 deletions(-) diff --git a/src/src/daemon.c b/src/src/daemon.c index 704ede24e..3c63c6368 100644 --- a/src/src/daemon.c +++ b/src/src/daemon.c @@ -298,9 +298,10 @@ to provide host-specific limits according to $sender_host address, but because this is in the daemon mainline, only fast expansions (such as inline address checks) should be used. The documentation is full of warnings. */ +GET_OPTION("smtp_accept_max_per_host"); if (smtp_accept_max_per_host) { - uschar *expanded = expand_string(smtp_accept_max_per_host); + uschar * expanded = expand_string(smtp_accept_max_per_host); if (!expanded) { if (!f.expand_string_forcedfail) @@ -434,6 +435,7 @@ if (pid == 0) likely what it depends on.) */ smtp_active_hostname = primary_hostname; + GET_OPTION("smtp_active_hostname"); if (raw_active_hostname) { uschar * nah = expand_string(raw_active_hostname); @@ -1165,6 +1167,7 @@ return offsetof(struct sockaddr_un, sun_path) ssize_t daemon_notifier_sockname(struct sockaddr_un * sup) { +GET_OPTION("notifier_socket"); #ifdef EXIM_HAVE_ABSTRACT_UNIX_SOCKETS sup->sun_path[0] = 0; /* Abstract local socket addr - Linux-specific? */ return offsetof(struct sockaddr_un, sun_path) + 1 @@ -1709,12 +1712,13 @@ time_t last_connection_time = (time_t)0; int local_queue_run_max = 0; if (is_multiple_qrun()) - + { /* Nuber of runner-tracking structs needed: If the option queue_run_max has no expandable elements then it is the overall maximum; else we assume it depends on the queue name, and add them up to get the maximum. Evaluate both that and the individual limits. */ + GET_OPTION("queue_run_max"); if (Ustrchr(queue_run_max, '$') != NULL) { for (qrunner * q = qrunners; q; q = q->next) @@ -1731,6 +1735,7 @@ if (is_multiple_qrun()) for (qrunner * q = qrunners; q; q = q->next) q->run_max = local_queue_run_max; } + } process_purpose = US"daemon"; diff --git a/src/src/deliver.c b/src/src/deliver.c index 2cef3d731..70f44535f 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -1858,8 +1858,9 @@ if (tp->gid_set) } else if (tp->expand_gid) { + GET_OPTION("group"); if (!route_find_expanded_group(tp->expand_gid, tp->name, US"transport", gidp, - &(addr->message))) + &addr->message)) { common_error(FALSE, addr, ERRNO_GIDFAIL, NULL); return FALSE; @@ -1885,6 +1886,7 @@ it does not provide a passwd value from which a gid can be taken. */ else if (tp->expand_uid) { struct passwd *pw; + GET_OPTION("user"); if (!route_find_expanded_user(tp->expand_uid, tp->name, US"transport", &pw, uidp, &(addr->message))) { @@ -1988,6 +1990,7 @@ check_message_size(transport_instance *tp, address_item *addr) int rc = OK; int size_limit; +GET_OPTION("message_size_limit"); deliver_set_expansions(addr); size_limit = expand_string_integer(tp->message_size_limit, TRUE); deliver_set_expansions(NULL); @@ -2150,6 +2153,7 @@ if(addr->prop.errors_address) else return_path = sender_address; +GET_OPTION("return_path"); if (tp->return_path) { uschar * new_return_path = expand_string(tp->return_path); @@ -2179,6 +2183,7 @@ if (!findugid(addr, tp, &uid, &gid, &use_initgroups)) return; home directory set in the address may already be expanded; a flag is set to indicate that. In other cases we must expand it. */ +GET_OPTION("home_directory"); if ( (deliver_home = tp->home_dir) /* Set in transport, or */ || ( (deliver_home = addr->home_dir) /* Set in address and */ && !testflag(addr, af_home_expanded) /* not expanded */ @@ -2208,6 +2213,7 @@ all users have access. It is necessary to be in a visible directory for some operating systems when running pipes, as some commands (e.g. "rm" under Solaris 2.5) require this. */ +GET_OPTION("current_directory"); working_directory = tp->current_dir ? tp->current_dir : addr->current_dir; if (working_directory) { @@ -2605,36 +2611,40 @@ if ((status & 0xffff) != 0) /* If SPECIAL_WARN is set in the top address, send a warning message. */ -if (addr->special_action == SPECIAL_WARN && addr->transport->warn_message) +if (addr->special_action == SPECIAL_WARN) { - int fd; - uschar *warn_message; - pid_t pid; + uschar * warn_message = addr->transport->warn_message; + GET_OPTION("quota_warn_message"); + if (warn_message) + { + int fd; + pid_t pid; - DEBUG(D_deliver) debug_printf("Warning message requested by transport\n"); + DEBUG(D_deliver) debug_printf("Warning message requested by transport\n"); - if (!(warn_message = expand_string(addr->transport->warn_message))) - log_write(0, LOG_MAIN|LOG_PANIC, "Failed to expand \"%s\" (warning " - "message for %s transport): %s", addr->transport->warn_message, - addr->transport->name, expand_string_message); + if (!(warn_message = expand_string(warn_message))) + log_write(0, LOG_MAIN|LOG_PANIC, "Failed to expand \"%s\" (warning " + "message for %s transport): %s", addr->transport->warn_message, + addr->transport->name, expand_string_message); - else if ((pid = child_open_exim(&fd, US"tpt-warning-message")) > 0) - { - FILE *f = fdopen(fd, "wb"); - if (errors_reply_to && !contains_header(US"Reply-To", warn_message)) - fprintf(f, "Reply-To: %s\n", errors_reply_to); - fprintf(f, "Auto-Submitted: auto-replied\n"); - if (!contains_header(US"From", warn_message)) - moan_write_from(f); - fprintf(f, "%s", CS warn_message); + else if ((pid = child_open_exim(&fd, US"tpt-warning-message")) > 0) + { + FILE * f = fdopen(fd, "wb"); + if (errors_reply_to && !contains_header(US"Reply-To", warn_message)) + fprintf(f, "Reply-To: %s\n", errors_reply_to); + fprintf(f, "Auto-Submitted: auto-replied\n"); + if (!contains_header(US"From", warn_message)) + moan_write_from(f); + fprintf(f, "%s", CS warn_message); - /* Close and wait for child process to complete, without a timeout. */ + /* Close and wait for child process to complete, without a timeout. */ - (void)fclose(f); - (void)child_close(pid, 0); - } + (void)fclose(f); + (void)child_close(pid, 0); + } - addr->special_action = SPECIAL_NONE; + addr->special_action = SPECIAL_NONE; + } } } @@ -2650,6 +2660,7 @@ tpt_parallel_check(transport_instance * tp, address_item * addr, uschar ** key) { unsigned max_parallel; +GET_OPTION("max_parallel"); if (!tp->max_parallel) return FALSE; max_parallel = (unsigned) expand_string_integer(tp->max_parallel, TRUE); @@ -2773,6 +2784,7 @@ while (addr_local) /* Expand the batch_id string for comparison with other addresses. Expansion failure suppresses batching. */ + GET_OPTION("batch_id"); if (tp->batch_id) { deliver_set_expansions(addr); @@ -2827,11 +2839,12 @@ while (addr_local) if (ok && batch_id) { - uschar *bid; - address_item *save_nextnext = next->next; + uschar * bid; + address_item * save_nextnext = next->next; next->next = NULL; /* Expansion for a single address */ deliver_set_expansions(next); next->next = save_nextnext; + GET_OPTION("batch_id"); bid = expand_string(tp->batch_id); deliver_set_expansions(NULL); if (!bid) @@ -4454,9 +4467,10 @@ nonmatch domains else return_path = sender_address; + GET_OPTION("return_path"); if (tp->return_path) { - uschar *new_return_path = expand_string(tp->return_path); + uschar * new_return_path = expand_string(tp->return_path); if (new_return_path) return_path = new_return_path; else if (!f.expand_string_forcedfail) @@ -5557,18 +5571,18 @@ return actual_time; static FILE * expand_open(const uschar * filename, - const uschar * varname, const uschar * reason) + const uschar * optname, const uschar * reason) { const uschar * s = expand_cstring(filename); FILE * fp = NULL; if (!s || !*s) log_write(0, LOG_MAIN|LOG_PANIC, - "Failed to expand %s: '%s'\n", varname, filename); + "Failed to expand %s: '%s'\n", optname, filename); else if (*s != '/' || is_tainted(s)) log_write(0, LOG_MAIN|LOG_PANIC, "%s is not %s after expansion: '%s'\n", - varname, *s == '/' ? "untainted" : "absolute", s); + optname, *s == '/' ? "untainted" : "absolute", s); else if (!(fp = Ufopen(s, "rb"))) log_write(0, LOG_MAIN|LOG_PANIC, "Failed to open %s for %s " "message texts: %s", s, reason, strerror(errno)); @@ -5699,6 +5713,7 @@ else /* Open a template file if one is provided. Log failure to open, but carry on - default texts will be used. */ + GET_OPTION("bounce_message_file"); if (bounce_message_file) emf = expand_open(bounce_message_file, US"bounce_message_file", US"error"); @@ -6058,6 +6073,7 @@ transport_ctx tctx = {{0}}; if (pid <= 0) return FALSE; +GET_OPTION("warn_message_file"); if (warn_message_file) wmf = expand_open(warn_message_file, US"warn_message_file", US"warning"); @@ -6757,6 +6773,7 @@ else if (system_filter && process_recipients != RECIP_FAIL_TIMEOUT) /* Any error in the filter file causes a delivery to be abandoned. */ + GET_OPTION("system_filter"); redirect.string = system_filter; redirect.isfile = TRUE; redirect.check_owner = redirect.check_group = FALSE; @@ -6936,12 +6953,14 @@ else if (system_filter && process_recipients != RECIP_FAIL_TIMEOUT) if (p->address[0] == '|') { type = US"pipe"; + GET_OPTION("system_filter_pipe_transport"); tpname = system_filter_pipe_transport; address_pipe = p->address; } else if (p->address[0] == '>') { type = US"reply"; + GET_OPTION("system_filter_reply_transport"); tpname = system_filter_reply_transport; } else @@ -6949,11 +6968,13 @@ else if (system_filter && process_recipients != RECIP_FAIL_TIMEOUT) if (p->address[Ustrlen(p->address)-1] == '/') { type = US"directory"; + GET_OPTION("system_filter_directory_transport"); tpname = system_filter_directory_transport; } else { type = US"file"; + GET_OPTION("system_filter_file_transport"); tpname = system_filter_file_transport; } address_file = p->address; @@ -8437,54 +8458,57 @@ else if (addr_defer != (address_item *)(+1)) || addr_defer->dsn_flags & rf_notify_delay ) && delay_warning[1] > 0 - && sender_address[0] != 0 - && ( !delay_warning_condition - || expand_check_condition(delay_warning_condition, - US"delay_warning", US"option") - ) - ) + && sender_address[0] != 0) { - int count; - int show_time; - int queue_time = time(NULL) - received_time.tv_sec; - - queue_time = test_harness_fudged_queue_time(queue_time); - - /* See how many warnings we should have sent by now */ + GET_OPTION("delay_warning_condition"); + if ( ( !delay_warning_condition + || expand_check_condition(delay_warning_condition, + US"delay_warning", US"option") + ) + ) + { + int count; + int show_time; + int queue_time = time(NULL) - received_time.tv_sec; - for (count = 0; count < delay_warning[1]; count++) - if (queue_time < delay_warning[count+2]) break; + queue_time = test_harness_fudged_queue_time(queue_time); - show_time = delay_warning[count+1]; + /* See how many warnings we should have sent by now */ - if (count >= delay_warning[1]) - { - int extra; - int last_gap = show_time; - if (count > 1) last_gap -= delay_warning[count]; - extra = (queue_time - delay_warning[count+1])/last_gap; - show_time += last_gap * extra; - count += extra; - } + for (count = 0; count < delay_warning[1]; count++) + if (queue_time < delay_warning[count+2]) break; - DEBUG(D_deliver) - { - debug_printf("time on queue = %s id %s addr %s\n", - readconf_printtime(queue_time), message_id, addr_defer->address); - debug_printf("warning counts: required %d done %d\n", count, - warning_count); - } + show_time = delay_warning[count+1]; - /* We have computed the number of warnings there should have been by now. - If there haven't been enough, send one, and up the count to what it should - have been. */ + if (count >= delay_warning[1]) + { + int extra; + int last_gap = show_time; + if (count > 1) last_gap -= delay_warning[count]; + extra = (queue_time - delay_warning[count+1])/last_gap; + show_time += last_gap * extra; + count += extra; + } - if (warning_count < count) - if (send_warning_message(recipients, queue_time, show_time)) + DEBUG(D_deliver) { - warning_count = count; - update_spool = TRUE; /* Ensure spool rewritten */ + debug_printf("time on queue = %s id %s addr %s\n", + readconf_printtime(queue_time), message_id, addr_defer->address); + debug_printf("warning counts: required %d done %d\n", count, + warning_count); } + + /* We have computed the number of warnings there should have been by now. + If there haven't been enough, send one, and up the count to what it should + have been. */ + + if (warning_count < count) + if (send_warning_message(recipients, queue_time, show_time)) + { + warning_count = count; + update_spool = TRUE; /* Ensure spool rewritten */ + } + } } /* Clear deliver_domain */ diff --git a/src/src/dkim.c b/src/src/dkim.c index 63b16af39..9e76c51a0 100644 --- a/src/src/dkim.c +++ b/src/src/dkim.c @@ -624,6 +624,7 @@ if (dkim->dot_stuffed) store_pool = POOL_MAIN; +GET_OPTION("dkim_domain"); if ((s = dkim->dkim_domain) && !(dkim_domain = expand_cstring(s))) /* expansion error, do not send message. */ { errwhen = US"dkim_domain"; goto expand_bad; } @@ -652,6 +653,7 @@ if (dkim_domain) /* Set $dkim_selector expansion variable to each selector in list, for this domain. */ + GET_OPTION("dkim_selector"); if (!(dkim_sel = expand_string(dkim->dkim_selector))) { errwhen = US"dkim_selector"; goto expand_bad; } @@ -669,6 +671,7 @@ if (dkim_domain) /* Get canonicalization to use */ + GET_OPTION("dkim_canon"); dkim_canon_expanded = dkim->dkim_canon ? expand_string(dkim->dkim_canon) : US"relaxed"; if (!dkim_canon_expanded) /* expansion error, do not send message. */ @@ -686,6 +689,7 @@ if (dkim_domain) pdkim_canon = PDKIM_CANON_RELAXED; } + GET_OPTION("dkim_sign_headers"); if ( dkim->dkim_sign_headers && !(dkim_sign_headers_expanded = expand_string(dkim->dkim_sign_headers))) { errwhen = US"dkim_sign_header"; goto expand_bad; } @@ -693,6 +697,7 @@ if (dkim_domain) /* Get private key to use. */ + GET_OPTION("dkim_private_key"); if (!(dkim_private_key_expanded = expand_string(dkim->dkim_private_key))) { errwhen = US"dkim_private_key"; goto expand_bad; } @@ -707,15 +712,18 @@ if (dkim_domain) expand_file_big_buffer(dkim_private_key_expanded))) goto bad; + GET_OPTION("dkim_hash"); if (!(dkim_hash_expanded = expand_string(dkim->dkim_hash))) { errwhen = US"dkim_hash"; goto expand_bad; } + GET_OPTION("dkim_identity"); if (dkim->dkim_identity) if (!(dkim_identity_expanded = expand_string(dkim->dkim_identity))) { errwhen = US"dkim_identity"; goto expand_bad; } else if (!*dkim_identity_expanded) dkim_identity_expanded = NULL; + GET_OPTION("dkim_timestamps"); if (dkim->dkim_timestamps) if (!(dkim_timestamps_expanded = expand_string(dkim->dkim_timestamps))) { errwhen = US"dkim_timestamps"; goto expand_bad; } diff --git a/src/src/dkim_transport.c b/src/src/dkim_transport.c index 38f849af6..8c8d9b41a 100644 --- a/src/src/dkim_transport.c +++ b/src/src/dkim_transport.c @@ -18,6 +18,7 @@ static BOOL dkt_sign_fail(struct ob_dkim * dkim, int * errp) { +GET_OPTION("dkim_strict"); if (dkim->dkim_strict) { uschar * dkim_strict_result = expand_string(dkim->dkim_strict); diff --git a/src/src/exim.c b/src/src/exim.c index 10fc98963..c591ee60c 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -5063,6 +5063,8 @@ for (i = 0;;) /* If a pattern for matching the gecos field was supplied, apply it and then expand the name string. */ + GET_OPTION("gecos_pattern"); + GET_OPTION("gecos_name"); if (gecos_pattern && gecos_name) { const pcre2_code *re; @@ -5108,6 +5110,7 @@ any setting of unknown_login overrides the actual name. */ if (!originator_login || f.running_in_test_harness) { + GET_OPTION("unknown_login"); if (unknown_login) { originator_login = expand_string(unknown_login); @@ -5407,17 +5410,18 @@ for hosts that want to play several parts at once. We need to ensure that it is set for host checking, and for receiving messages. */ smtp_active_hostname = primary_hostname; -if (raw_active_hostname != NULL) +GET_OPTION("smtp_active_hostname"); +if (raw_active_hostname) { - uschar *nah = expand_string(raw_active_hostname); - if (nah == NULL) + uschar * nah = expand_string(raw_active_hostname); + if (!nah) { if (!f.expand_string_forcedfail) log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to expand \"%s\" " "(smtp_active_hostname): %s", raw_active_hostname, expand_string_message); } - else if (nah[0] != 0) smtp_active_hostname = nah; + else if (nah[0]) smtp_active_hostname = nah; } /* Handle host checking: this facility mocks up an incoming SMTP call from a @@ -5675,6 +5679,7 @@ if (smtp_input) else { + GET_OPTION("message_size_limit"); thismessage_size_limit = expand_string_integer(message_size_limit, TRUE); if (expand_string_message) if (thismessage_size_limit == -1) @@ -5767,14 +5772,18 @@ for (BOOL more = TRUE; more; ) the very end. The result of the ACL is ignored (as for other non-SMTP messages). It is run for its potential side effects. */ - if (smtp_batched_input && acl_not_smtp_start != NULL) - { - uschar *user_msg, *log_msg; - f.enable_dollar_recipients = TRUE; - (void)acl_check(ACL_WHERE_NOTSMTP_START, NULL, acl_not_smtp_start, - &user_msg, &log_msg); - f.enable_dollar_recipients = FALSE; - } + if (smtp_batched_input) + { + GET_OPTION("acl_not_smtp_start"); + if (acl_not_smtp_start) + { + uschar * user_msg, * log_msg; + f.enable_dollar_recipients = TRUE; + (void)acl_check(ACL_WHERE_NOTSMTP_START, NULL, acl_not_smtp_start, + &user_msg, &log_msg); + f.enable_dollar_recipients = FALSE; + } + } /* Now get the data for the message */ @@ -5928,9 +5937,10 @@ for (BOOL more = TRUE; more; ) ignored; rejecting here would just add complication, and it can just as well be done later. Allow $recipients to be visible in the ACL. */ + GET_OPTION("acl_not_smtp_start"); if (acl_not_smtp_start) { - uschar *user_msg, *log_msg; + uschar * user_msg, * log_msg; f.enable_dollar_recipients = TRUE; (void)acl_check(ACL_WHERE_NOTSMTP_START, NULL, acl_not_smtp_start, &user_msg, &log_msg); diff --git a/src/src/expand.c b/src/src/expand.c index f9813133d..6be5cca0e 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -8737,12 +8737,14 @@ Returns: OK value placed in rvalue */ int -exp_bool(address_item *addr, - uschar *mtype, uschar *mname, unsigned dbg_opt, - uschar *oname, BOOL bvalue, - uschar *svalue, BOOL *rvalue) +exp_bool(address_item * addr, + uschar * mtype, uschar * mname, unsigned dbg_opt, + uschar * oname, BOOL bvalue, + uschar * svalue, BOOL * rvalue) { -uschar *expanded; +uschar * expanded; + +DEBUG(D_expand) debug_printf("try option %s\n", oname); if (!svalue) { *rvalue = bvalue; return OK; } if (!(expanded = expand_string(svalue))) diff --git a/src/src/macros.h b/src/src/macros.h index 8aed335b5..902cdd165 100644 --- a/src/src/macros.h +++ b/src/src/macros.h @@ -1190,4 +1190,8 @@ When doing en extended loop of matching, release store periodically. */ #define REGEX_LOOPCOUNT_STORE_RESET 1000 +/* Debug an option access. Use for non-list ones about to be expanded. */ +#define GET_OPTION(name) \ + DEBUG(D_expand) debug_printf("try option " name "\n"); + /* End of macros.h */ diff --git a/src/src/moan.c b/src/src/moan.c index a3c8e0aba..6fe82b29c 100644 --- a/src/src/moan.c +++ b/src/src/moan.c @@ -30,8 +30,9 @@ Returns: nothing void moan_write_from(FILE *f) { -uschar * s = expand_string(dsn_from); -if (!s) +uschar * s; +GET_OPTION("dsn_from"); +if (!(s = expand_string(dsn_from))) { log_write(0, LOG_MAIN|LOG_PANIC, "Failed to expand dsn_from (using default): %s", expand_string_message); @@ -175,6 +176,7 @@ uschar * s, * s2; /* For DMARC if there is a specific sender set, expand the variable for the header From: and grab the address from that for the envelope FROM. */ +GET_OPTION("dmarc_forensic_sender"); if ( ident == ERRMESS_DMARC_FORENSIC && dmarc_forensic_sender && (s = expand_string(dmarc_forensic_sender)) @@ -513,9 +515,12 @@ if (check_sender && message_file && f.trusted_caller && { uschar *new_sender = NULL; if (regex_match_and_setup(regex_From, big_buffer, 0, -1)) + { + GET_OPTION("uucp_from_sender"); new_sender = expand_string(uucp_from_sender); + } if (new_sender) sender_address = new_sender; - else firstline = big_buffer; + else firstline = big_buffer; } /* If viable sender address, send a message */ diff --git a/src/src/receive.c b/src/src/receive.c index 990b9c22e..abac05c56 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -1574,6 +1574,7 @@ uschar * timestamp = expand_string(US"${tod_full}"); header_line * received_header= header_list; if (recipients_count == 1) received_for = recipients_list[0].address; +GET_OPTION("received_header_text"); received = expand_string(received_header_text); received_for = NULL; @@ -2201,8 +2202,9 @@ OVERSIZE: { if (!f.sender_address_forced) { - uschar *uucp_sender = expand_string(uucp_from_sender); - if (!uucp_sender) + uschar * uucp_sender; + GET_OPTION("uucp_from_sender"); + if (!(uucp_sender = expand_string(uucp_from_sender))) log_write(0, LOG_MAIN|LOG_PANIC, "expansion of \"%s\" failed after matching " "\"From \" line: %s", uucp_from_sender, expand_string_message); @@ -2821,6 +2823,7 @@ if ( !msgid_header /* Permit only letters, digits, dots, and hyphens in the domain */ + GET_OPTION("message_id_header_domain"); if (message_id_domain) { uschar *new_id_domain = expand_string(message_id_domain); @@ -2842,6 +2845,7 @@ if ( !msgid_header /* Permit all characters except controls and RFC 2822 specials in the additional text part. */ + GET_OPTION("message_id_header_text"); if (message_id_text) { uschar *new_id_text = expand_string(message_id_text); @@ -3517,6 +3521,7 @@ else dkim_exim_verify_finish(); /* Check if we must run the DKIM ACL */ + GET_OPTION("acl_smtp_dkim"); if (acl_smtp_dkim && dkim_verify_signers && *dkim_verify_signers) { uschar * dkim_verify_signers_expanded = @@ -3606,11 +3611,14 @@ else #endif /* DISABLE_DKIM */ #ifdef WITH_CONTENT_SCAN - if ( recipients_count > 0 - && acl_smtp_mime - && !run_mime_acl(acl_smtp_mime, &smtp_yield, &smtp_reply, &blackholed_by) - ) - goto TIDYUP; + if (recipients_count > 0) + { + GET_OPTION("acl_smtp_mime"); + if (acl_smtp_mime + && !run_mime_acl(acl_smtp_mime, &smtp_yield, &smtp_reply, &blackholed_by) + ) + goto TIDYUP; + } #endif /* WITH_CONTENT_SCAN */ #ifdef SUPPORT_DMARC @@ -3618,67 +3626,73 @@ else #endif #ifndef DISABLE_PRDR - if (prdr_requested && recipients_count > 1 && acl_smtp_data_prdr) + if (prdr_requested && recipients_count > 1) { - int all_pass = OK; - int all_fail = FAIL; + GET_OPTION("acl_smtp_data_prdr"); + if (acl_smtp_data_prdr) + { + int all_pass = OK; + int all_fail = FAIL; - smtp_printf("353 PRDR content analysis beginning\r\n", SP_MORE); - /* Loop through recipients, responses must be in same order received */ - for (unsigned int c = 0; recipients_count > c; c++) - { - const uschar * addr = recipients_list[c].address; - uschar * msg= US"PRDR R=<%s> %s"; - uschar * code; - DEBUG(D_receive) - debug_printf("PRDR processing recipient %s (%d of %d)\n", - addr, c+1, recipients_count); - rc = acl_check(ACL_WHERE_PRDR, addr, - acl_smtp_data_prdr, &user_msg, &log_msg); - - /* If any recipient rejected content, indicate it in final message */ - all_pass |= rc; - /* If all recipients rejected, indicate in final message */ - all_fail &= rc; - - switch (rc) - { - case OK: case DISCARD: code = US"250"; break; - case DEFER: code = US"450"; break; - default: code = US"550"; break; - } - if (user_msg != NULL) - smtp_user_msg(code, user_msg); - else + smtp_printf("353 PRDR content analysis beginning\r\n", SP_MORE); + /* Loop through recipients, responses must be in same order received */ + for (unsigned int c = 0; recipients_count > c; c++) { + const uschar * addr = recipients_list[c].address; + uschar * msg= US"PRDR R=<%s> %s"; + uschar * code; + DEBUG(D_receive) + debug_printf("PRDR processing recipient %s (%d of %d)\n", + addr, c+1, recipients_count); + rc = acl_check(ACL_WHERE_PRDR, addr, + acl_smtp_data_prdr, &user_msg, &log_msg); + + /* If any recipient rejected content, indicate it in final message */ + all_pass |= rc; + /* If all recipients rejected, indicate in final message */ + all_fail &= rc; + switch (rc) - { - case OK: case DISCARD: - msg = string_sprintf(CS msg, addr, "acceptance"); break; - case DEFER: - msg = string_sprintf(CS msg, addr, "temporary refusal"); break; - default: - msg = string_sprintf(CS msg, addr, "refusal"); break; - } - smtp_user_msg(code, msg); - } - if (log_msg) log_write(0, LOG_MAIN, "PRDR %s %s", addr, log_msg); - else if (user_msg) log_write(0, LOG_MAIN, "PRDR %s %s", addr, user_msg); - else log_write(0, LOG_MAIN, "%s", CS msg); + { + case OK: case DISCARD: code = US"250"; break; + case DEFER: code = US"450"; break; + default: code = US"550"; break; + } + if (user_msg != NULL) + smtp_user_msg(code, user_msg); + else + { + switch (rc) + { + case OK: case DISCARD: + msg = string_sprintf(CS msg, addr, "acceptance"); break; + case DEFER: + msg = string_sprintf(CS msg, addr, "temporary refusal"); break; + default: + msg = string_sprintf(CS msg, addr, "refusal"); break; + } + smtp_user_msg(code, msg); + } + if (log_msg) log_write(0, LOG_MAIN, "PRDR %s %s", addr, log_msg); + else if (user_msg) log_write(0, LOG_MAIN, "PRDR %s %s", addr, user_msg); + else log_write(0, LOG_MAIN, "%s", CS msg); - if (rc != OK) { receive_remove_recipient(addr); c--; } - } - /* Set up final message, used if data acl gives OK */ - smtp_reply = string_sprintf("%s id=%s message %s", - all_fail == FAIL ? US"550" : US"250", - message_id, - all_fail == FAIL - ? US"rejected for all recipients" - : all_pass == OK - ? US"accepted" - : US"accepted for some recipients"); - if (recipients_count == 0) - goto NOT_ACCEPTED; + if (rc != OK) { receive_remove_recipient(addr); c--; } + } + /* Set up final message, used if data acl gives OK */ + smtp_reply = string_sprintf("%s id=%s message %s", + all_fail == FAIL ? US"550" : US"250", + message_id, + all_fail == FAIL + ? US"rejected for all recipients" + : all_pass == OK + ? US"accepted" + : US"accepted for some recipients"); + if (recipients_count == 0) + goto NOT_ACCEPTED; + } + else + prdr_requested = FALSE; } else prdr_requested = FALSE; @@ -3687,6 +3701,7 @@ else /* Check the recipients count again, as the MIME ACL might have changed them. */ + GET_OPTION("acl_smtp_data"); if (acl_smtp_data && recipients_count > 0) { rc = acl_check(ACL_WHERE_DATA, NULL, acl_smtp_data, &user_msg, &log_msg); @@ -3724,6 +3739,7 @@ else { #ifdef WITH_CONTENT_SCAN + GET_OPTION("acl_not_smtp_mime"); if ( acl_not_smtp_mime && !run_mime_acl(acl_not_smtp_mime, &smtp_yield, &smtp_reply, &blackholed_by) @@ -3731,9 +3747,10 @@ else goto TIDYUP; #endif /* WITH_CONTENT_SCAN */ + GET_OPTION("acl_not_smtp"); if (acl_not_smtp) { - uschar *user_msg, *log_msg; + uschar * user_msg, * log_msg; f.authentication_local = TRUE; rc = acl_check(ACL_WHERE_NOTSMTP, NULL, acl_not_smtp, &user_msg, &log_msg); if (rc == DISCARD) diff --git a/src/src/route.c b/src/src/route.c index 3401f15b4..0fdcdf2ed 100644 --- a/src/src/route.c +++ b/src/src/route.c @@ -616,7 +616,7 @@ uschar *check; if (!s) return OK; -DEBUG(D_route) debug_printf("checking require_files\n"); +DEBUG(D_route|D_expand) debug_printf("checking require_files\n"); listptr = s; while ((check = string_nextinlist(&listptr, &sep, NULL, 0))) @@ -637,7 +637,7 @@ while ((check = string_nextinlist(&listptr, &sep, NULL, 0))) /* Empty items are just skipped */ - if (*ss == 0) continue; + if (!*ss) continue; /* If there are no slashes in the string, we have a user name or uid, with optional group/gid. */ @@ -651,9 +651,9 @@ while ((check = string_nextinlist(&listptr, &sep, NULL, 0))) /* If there's a comma, temporarily terminate the user name/number at that point. Then set the uid. */ - if (comma != NULL) *comma = 0; + if (comma) *comma = 0; ok = route_finduser(ss, &pw, &uid); - if (comma != NULL) *comma = ','; + if (comma) *comma = ','; if (!ok) { @@ -663,24 +663,22 @@ while ((check = string_nextinlist(&listptr, &sep, NULL, 0))) /* If there was no comma, the gid is that associated with the user. */ - if (comma == NULL) - { - if (pw != NULL) gid = pw->pw_gid; else + if (!comma) + if (pw) + gid = pw->pw_gid; + else { *perror = string_sprintf("group missing after numerical uid %d for " "require_files", (int)uid); goto RETURN_DEFER; } - } else - { if (!route_findgroup(comma + 1, &gid)) { *perror = string_sprintf("group \"%s\" for require_files not found\n", comma + 1); goto RETURN_DEFER; } - } /* Note that we have values set, and proceed to next item */ @@ -974,6 +972,7 @@ check_local_user before any subsequent expansions are done. Otherwise, $home could mean different things for different options, which would be extremely confusing. */ +GET_OPTION("router_home_directory"); if (r->router_home_directory) { uschar * router_home = expand_string(r->router_home_directory); @@ -1018,7 +1017,8 @@ if ((rc = check_files(r->require_files, perror)) != OK) if (r->condition) { - DEBUG(D_route) debug_printf("checking \"condition\" \"%.80s\"...\n", r->condition); + DEBUG(D_route|D_expand) + debug_printf("checking \"condition\" \"%.80s\"...\n", r->condition); if (!expand_check_condition(r->condition, r->name, US"router")) { if (f.search_find_defer) @@ -1440,6 +1440,7 @@ const uschar * varlist = r->set; tree_node ** root = (tree_node **) &addr->prop.variables; int sep = ';'; +GET_OPTION("set"); if (!varlist) return OK; /* Walk the varlist, creating variables */ @@ -1474,6 +1475,7 @@ for (uschar * ele; (ele = string_nextinlist(&varlist, &sep, NULL, 0)); ) /* Expand "more" if necessary; DEFER => an expansion failed */ + GET_OPTION("more"); yield = exp_bool(addr, US"router", r->name, D_route, US"more", r->more, r->expand_more, &more); if (yield != OK) return yield; @@ -1754,7 +1756,7 @@ for (r = addr->start_router ? addr->start_router : routers; r; r = nextr) if (r->address_data) { - DEBUG(D_route) debug_printf("processing address_data\n"); + DEBUG(D_route|D_expand) debug_printf("processing address_data\n"); if (!(deliver_address_data = expand_string(r->address_data))) { if (f.expand_string_forcedfail) @@ -1764,6 +1766,7 @@ for (r = addr->start_router ? addr->start_router : routers; r; r = nextr) /* Expand "more" if necessary; DEFER => an expansion failed */ + GET_OPTION("more"); yield = exp_bool(addr, US"router", r->name, D_route, US"more", r->more, r->expand_more, &more); if (yield != OK) goto ROUTE_EXIT; @@ -1872,6 +1875,7 @@ for (r = addr->start_router ? addr->start_router : routers; r; r = nextr) { /* Expand "more" if necessary */ + GET_OPTION("more"); yield = exp_bool(addr, US"router", r->name, D_route, US"more", r->more, r->expand_more, &more); if (yield != OK) goto ROUTE_EXIT; @@ -1897,18 +1901,21 @@ if (!r) HDEBUG(D_route) debug_printf("no more routers\n"); if (!addr->message) { - uschar *message = US"Unrouteable address"; - if (addr->router && addr->router->cannot_route_message) + uschar * message = US"Unrouteable address"; + if (addr->router) { - uschar *expmessage = expand_string(addr->router->cannot_route_message); - if (!expmessage) - { - if (!f.expand_string_forcedfail) - log_write(0, LOG_MAIN|LOG_PANIC, "failed to expand " - "cannot_route_message in %s router: %s", addr->router->name, - expand_string_message); - } - else message = expmessage; + uschar * s = addr->router->cannot_route_message; + GET_OPTION("cannot_route_message"); + if (s) + { + if ((s = expand_string(s))) + message = s; + else + if (!f.expand_string_forcedfail) + log_write(0, LOG_MAIN|LOG_PANIC, "failed to expand " + "cannot_route_message in %s router: %s", addr->router->name, + expand_string_message); + } } addr->user_message = addr->message = message; } @@ -1950,6 +1957,7 @@ networking, so it is included in the binary only if requested. */ #ifdef SUPPORT_TRANSLATE_IP_ADDRESS +GET_OPTION("translate_ip_address"); if (r->translate_ip_address) { int rc; @@ -2008,6 +2016,7 @@ if (r->translate_ip_address) /* See if this is an unseen routing; first expand the option if necessary. DEFER can be given if the expansion fails */ +GET_OPTION("unseen"); yield = exp_bool(addr, US"router", r->name, D_route, US"unseen", r->unseen, r->expand_unseen, &unseen); if (yield != OK) goto ROUTE_EXIT; diff --git a/src/src/routers/dnslookup.c b/src/src/routers/dnslookup.c index d27757c7e..671e8c93f 100644 --- a/src/src/routers/dnslookup.c +++ b/src/src/routers/dnslookup.c @@ -151,14 +151,11 @@ host_item h; int rc; int widen_sep = 0; int whichrrs = HOST_FIND_BY_MX | HOST_FIND_BY_A | HOST_FIND_BY_AAAA; -dnslookup_router_options_block *ob = +dnslookup_router_options_block * ob = (dnslookup_router_options_block *)(rblock->options_block); -uschar *srv_service = NULL; -uschar *widen = NULL; -const uschar *pre_widen = addr->domain; -const uschar *post_widen = NULL; -const uschar *fully_qualified_name; -const uschar *listptr; +uschar * srv_service = NULL, * widen = NULL; +const uschar * pre_widen = addr->domain, * post_widen = NULL; +const uschar * fully_qualified_name, * listptr; uschar widen_buffer[256]; DEBUG(D_route) @@ -167,8 +164,8 @@ DEBUG(D_route) /* If an SRV check is required, expand the service name */ +GET_OPTION("check_srv"); if (ob->check_srv) - { if ( !(srv_service = expand_string(ob->check_srv)) && !f.expand_string_forcedfail) { @@ -176,8 +173,8 @@ if (ob->check_srv) rblock->name, ob->check_srv, expand_string_message); return DEFER; } - else whichrrs |= HOST_FIND_BY_SRV; - } + else + whichrrs |= HOST_FIND_BY_SRV; /* Set up the first of any widening domains. The code further down copes with either pre- or post-widening, but at present there is no way to turn on diff --git a/src/src/routers/iplookup.c b/src/src/routers/iplookup.c index a6dc0fc87..f9966bcc0 100644 --- a/src/src/routers/iplookup.c +++ b/src/src/routers/iplookup.c @@ -178,19 +178,17 @@ reply = store_get(256, GET_TAINTED); /* Build the query string to send. If not explicitly given, a default of "user@domain user@domain" is used. */ -if (ob->query == NULL) +GET_OPTION("query"); +if (!ob->query) query = string_sprintf("%s@%s %s@%s", addr->local_part, addr->domain, addr->local_part, addr->domain); else - { - query = expand_string(ob->query); - if (query == NULL) + if (!(query = expand_string(ob->query))) { addr->message = string_sprintf("%s router: failed to expand %s: %s", rblock->name, ob->query, expand_string_message); return DEFER; } - } query_len = Ustrlen(query); DEBUG(D_route) debug_printf("%s router query is \"%s\"\n", rblock->name, @@ -362,23 +360,24 @@ else /* If an explicit rerouting string is specified, expand it. Otherwise, use what was sent back verbatim. */ -if (ob->reroute != NULL) +GET_OPTION("reroute"); +if (ob->reroute) { reroute = expand_string(ob->reroute); expand_nmax = -1; - if (reroute == NULL) + if (!reroute) { addr->message = string_sprintf("%s router: failed to expand %s: %s", rblock->name, ob->reroute, expand_string_message); return DEFER; } } -else reroute = reply; +else + reroute = reply; /* We should now have a new address in the form user@domain. */ -domain = Ustrchr(reroute, '@'); -if (domain == NULL) +if (!(domain = Ustrchr(reroute, '@'))) { log_write(0, LOG_MAIN, "%s router: reroute string %s is not of the form " "user@domain", rblock->name, reroute); diff --git a/src/src/routers/manualroute.c b/src/src/routers/manualroute.c index 160c866b9..200e0206e 100644 --- a/src/src/routers/manualroute.c +++ b/src/src/routers/manualroute.c @@ -118,8 +118,8 @@ if (ob->hai_code < 0) /* One of route_list or route_data must be specified */ -if ((ob->route_list == NULL && ob->route_data == NULL) || - (ob->route_list != NULL && ob->route_data != NULL)) +if ( !ob->route_list && !ob->route_data + || ob->route_list && ob->route_data) log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s router:\n " "route_list or route_data (but not both) must be specified", rblock->name); @@ -291,6 +291,7 @@ string, decline. */ else { + GET_OPTION("route_data"); if (!(route_item = rf_expand_data(addr, ob->route_data, &rc))) return rc; (void) parse_route_item(route_item, NULL, &hostlist, &options); diff --git a/src/src/routers/queryprogram.c b/src/src/routers/queryprogram.c index 2a6a73eb6..dd5e24b93 100644 --- a/src/src/routers/queryprogram.c +++ b/src/src/routers/queryprogram.c @@ -287,6 +287,7 @@ if (curr_uid != root_uid && (uid != curr_uid || gid != curr_gid)) /* Set up the command to run */ +GET_OPTION("command"); if (!transport_set_up_command(&argvptr, /* anchor for arg list */ ob->command, /* raw command */ TSUC_EXPAND_ARGS, /* arguments expanded but must not be tainted */ diff --git a/src/src/routers/redirect.c b/src/src/routers/redirect.c index 4c8e30563..6b27c82b0 100644 --- a/src/src/routers/redirect.c +++ b/src/src/routers/redirect.c @@ -370,12 +370,11 @@ while (generated) in \N...\N to avoid expansion later. In Cygwin, home directories can contain $ characters. */ - if (rblock->home_directory != NULL) + if (rblock->home_directory) next->home_dir = rblock->home_directory; else if (rblock->check_local_user) next->home_dir = string_sprintf("\\N%s\\N", pw->pw_dir); - else if (rblock->router_home_directory != NULL && - testflag(addr, af_home_expanded)) + else if (rblock->router_home_directory && testflag(addr, af_home_expanded)) { next->home_dir = deliver_home; setflag(next, af_home_expanded); @@ -395,6 +394,7 @@ while (generated) if (next->address[0] == '|') { address_pipe = next->address; + GET_OPTION("pipe_transport"); if (rf_get_transport(ob->pipe_transport_name, &ob->pipe_transport, next, rblock->name, US"pipe_transport")) next->transport = ob->pipe_transport; @@ -402,6 +402,7 @@ while (generated) } else if (next->address[0] == '>') { + GET_OPTION("reply_transport"); if (rf_get_transport(ob->reply_transport_name, &ob->reply_transport, next, rblock->name, US"reply_transport")) next->transport = ob->reply_transport; @@ -412,15 +413,19 @@ while (generated) address_file = next->address; if (next->address[len-1] == '/') { + GET_OPTION("directory_transport"); if (rf_get_transport(ob->directory_transport_name, &(ob->directory_transport), next, rblock->name, US"directory_transport")) next->transport = ob->directory_transport; } else + { + GET_OPTION("file_transport"); if (rf_get_transport(ob->file_transport_name, &ob->file_transport, next, rblock->name, US"file_transport")) next->transport = ob->file_transport; + } address_file = NULL; } @@ -566,11 +571,15 @@ address. Otherwise, if a local qualify_domain is provided, set that up. */ if (ob->qualify_preserve_domain) qualify_domain_recipient = addr->domain; -else if (ob->qualify_domain) +else { - uschar *new_qdr = rf_expand_data(addr, ob->qualify_domain, &xrc); - if (!new_qdr) return xrc; - qualify_domain_recipient = new_qdr; + GET_OPTION("qualify_domain"); + if (ob->qualify_domain) + { + uschar *new_qdr = rf_expand_data(addr, ob->qualify_domain, &xrc); + if (!new_qdr) return xrc; + qualify_domain_recipient = new_qdr; + } } redirect.owners = ob->owners; diff --git a/src/src/routers/rf_expand_data.c b/src/src/routers/rf_expand_data.c index 9892567f0..6ba613215 100644 --- a/src/src/routers/rf_expand_data.c +++ b/src/src/routers/rf_expand_data.c @@ -31,7 +31,7 @@ uschar * rf_expand_data(address_item *addr, uschar *s, int *prc) { uschar *yield = expand_string(s); -if (yield != NULL) return yield; +if (yield) return yield; if (f.expand_string_forcedfail) { DEBUG(D_route) debug_printf("forced failure for expansion of \"%s\"\n", s); diff --git a/src/src/routers/rf_get_errors_address.c b/src/src/routers/rf_get_errors_address.c index 222d157d8..792b9b5f3 100644 --- a/src/src/routers/rf_get_errors_address.c +++ b/src/src/routers/rf_get_errors_address.c @@ -38,14 +38,13 @@ int rf_get_errors_address(address_item * addr, router_instance * rblock, int verify, const uschar ** errors_to) { -uschar *s; +uschar * s; *errors_to = addr->prop.errors_address; if (!rblock->errors_to) return OK; -s = expand_string(rblock->errors_to); - -if (s == NULL) +GET_OPTION("errors_to"); +if (!(s = expand_string(rblock->errors_to))) { if (f.expand_string_forcedfail) { @@ -60,7 +59,7 @@ if (s == NULL) /* If the errors_to address is empty, it means "ignore errors" */ -if (*s == 0) +if (!*s) { addr->prop.ignore_error = TRUE; /* For locally detected errors */ *errors_to = US""; /* Return path for SMTP */ diff --git a/src/src/routers/rf_get_transport.c b/src/src/routers/rf_get_transport.c index d54e3c296..d37966865 100644 --- a/src/src/routers/rf_get_transport.c +++ b/src/src/routers/rf_get_transport.c @@ -47,6 +47,7 @@ rf_get_transport(uschar *tpname, transport_instance **tpptr, address_item *addr, uschar *ss; BOOL expandable; +GET_OPTION("transport"); if (!tpname) { if (!require_name) return TRUE; diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 2d977b975..ff768e94c 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -2172,6 +2172,7 @@ lwr_receive_ungetc = NULL; /* Set up the message size limit; this may be host-specific */ +GET_OPTION("message_size_limit"); thismessage_size_limit = expand_string_integer(message_size_limit, TRUE); if (expand_string_message) { @@ -2569,6 +2570,7 @@ if (proxy_protocol_host()) /* Run the connect ACL if it exists */ user_msg = NULL; +GET_OPTION("acl_smtp_connect"); if (acl_smtp_connect) { int rc; @@ -2615,16 +2617,20 @@ if (user_msg) esclen = codelen - 4; } } -else if (!(s = expand_string(smtp_banner))) +else { - log_write(0, f.expand_string_forcedfail ? LOG_MAIN : LOG_MAIN|LOG_PANIC_DIE, - "Expansion of \"%s\" (smtp_banner) failed: %s", - smtp_banner, expand_string_message); - /* for force-fail */ -#ifndef DISABLE_TLS - if (tls_in.on_connect) tls_close(NULL, TLS_SHUTDOWN_WAIT); -#endif - return FALSE; + GET_OPTION("smtp_banner"); + if (!(s = expand_string(smtp_banner))) + { + log_write(0, f.expand_string_forcedfail ? LOG_MAIN : LOG_MAIN|LOG_PANIC_DIE, + "Expansion of \"%s\" (smtp_banner) failed: %s", + smtp_banner, expand_string_message); + /* for force-fail */ + #ifndef DISABLE_TLS + if (tls_in.on_connect) tls_close(NULL, TLS_SHUTDOWN_WAIT); + #endif + return FALSE; + } } /* Remove any terminating newlines; might as well remove trailing space too */ @@ -3185,6 +3191,7 @@ fl.smtp_exit_function_called = TRUE; /* Call the not-QUIT ACL, if there is one, unless no reason is given. */ +GET_OPTION("acl_smtp_notquit"); if (acl_smtp_notquit && reason) { smtp_notquit_reason = reason; @@ -3521,6 +3528,7 @@ smtp_quit_handler(uschar ** user_msgp, uschar ** log_msgp) HAD(SCH_QUIT); f.smtp_in_quit = TRUE; incomplete_transaction_log(US"QUIT"); +GET_OPTION("acl_smtp_quit"); if ( acl_smtp_quit && acl_check(ACL_WHERE_QUIT, NULL, acl_smtp_quit, user_msgp, log_msgp) == ERROR) @@ -3694,6 +3702,7 @@ while (done <= 0) for (auth_instance * au = auths; au; au = au->next) if (strcmpic(US"tls", au->driver_name) == 0) { + GET_OPTION("acl_smtp_auth"); if ( acl_smtp_auth && (rc = acl_check(ACL_WHERE_AUTH, NULL, acl_smtp_auth, &user_msg, &log_msg)) != OK @@ -3772,6 +3781,7 @@ while (done <= 0) /* Check the ACL */ + GET_OPTION("acl_smtp_auth"); if ( acl_smtp_auth && (rc = acl_check(ACL_WHERE_AUTH, NULL, acl_smtp_auth, &user_msg, &log_msg)) != OK @@ -3966,6 +3976,7 @@ while (done <= 0) /* Apply an ACL check if one is defined; afterwards, recheck synchronization in case the client started sending in a delay. */ + GET_OPTION("acl_smtp_helo"); if (acl_smtp_helo) if ((rc = acl_check(ACL_WHERE_HELO, NULL, acl_smtp_helo, &user_msg, &log_msg)) != OK) @@ -4097,16 +4108,19 @@ while (done <= 0) /* Advertise ETRN/VRFY/EXPN if there's are ACL checking whether a host is permitted to issue them; a check is made when any host actually tries. */ + GET_OPTION("acl_smtp_etrn"); if (acl_smtp_etrn) { g = string_catn(g, smtp_code, 3); g = string_catn(g, US"-ETRN\r\n", 7); } + GET_OPTION("acl_smtp_vrfy"); if (acl_smtp_vrfy) { g = string_catn(g, smtp_code, 3); g = string_catn(g, US"-VRFY\r\n", 7); } + GET_OPTION("acl_smtp_expn"); if (acl_smtp_expn) { g = string_catn(g, smtp_code, 3); @@ -4502,6 +4516,7 @@ while (done <= 0) US"invalid data for AUTH"); goto COMMAND_LOOP; } + GET_OPTION("acl_smtp_mailauth"); if (!acl_smtp_mailauth) { ignore_msg = US"client not authenticated"; @@ -4698,6 +4713,7 @@ while (done <= 0) when pipelining is not advertised, do another sync check in case the ACL delayed and the client started sending in the meantime. */ + GET_OPTION("acl_smtp_mail"); if (acl_smtp_mail) { rc = acl_check(ACL_WHERE_MAIL, NULL, acl_smtp_mail, &user_msg, &log_msg); @@ -4953,10 +4969,13 @@ while (done <= 0) if (f.recipients_discarded) rc = DISCARD; else + { + GET_OPTION("acl_smtp_rcpt"); if ( (rc = acl_check(ACL_WHERE_RCPT, recipient, acl_smtp_rcpt, &user_msg, &log_msg)) == OK && !f.smtp_in_pipelining_advertised && !check_sync()) goto SYNC_FAILURE; + } /* The ACL was happy */ @@ -5119,6 +5138,7 @@ while (done <= 0) since the ACL may have delayed. To handle cutthrough delivery enforce a dummy call to get the DATA command sent. */ + GET_OPTION("acl_smtp_predata"); if (!acl_smtp_predata && cutthrough.cctx.sock < 0) rc = OK; else @@ -5177,6 +5197,7 @@ while (done <= 0) US"verify"))) break; + GET_OPTION("acl_smtp_vrfy"); if ((rc = acl_check(ACL_WHERE_VRFY, address, acl_smtp_vrfy, &user_msg, &log_msg)) != OK) done = smtp_handle_acl_fail(ACL_WHERE_VRFY, rc, user_msg, log_msg); @@ -5215,6 +5236,7 @@ while (done <= 0) case EXPN_CMD: HAD(SCH_EXPN); + GET_OPTION("acl_smtp_expn"); rc = acl_check(ACL_WHERE_EXPN, NULL, acl_smtp_expn, &user_msg, &log_msg); if (rc != OK) done = smtp_handle_acl_fail(ACL_WHERE_EXPN, rc, user_msg, log_msg); @@ -5244,6 +5266,7 @@ while (done <= 0) /* Apply an ACL check if one is defined */ + GET_OPTION("acl_smtp_starttls"); if ( acl_smtp_starttls && (rc = acl_check(ACL_WHERE_STARTTLS, NULL, acl_smtp_starttls, &user_msg, &log_msg)) != OK @@ -5362,6 +5385,7 @@ while (done <= 0) case QUIT_CMD: f.smtp_in_quit = TRUE; user_msg = NULL; + GET_OPTION("acl_smtp_quit"); if ( acl_smtp_quit && ((rc = acl_check(ACL_WHERE_QUIT, NULL, acl_smtp_quit, &user_msg, &log_msg)) == ERROR)) @@ -5481,6 +5505,7 @@ while (done <= 0) log_write(L_etrn, LOG_MAIN, "ETRN %s received from %s", smtp_cmd_argument, host_and_ident(FALSE)); + GET_OPTION("acl_smtp_etrn"); if ((rc = acl_check(ACL_WHERE_ETRN, NULL, acl_smtp_etrn, &user_msg, &log_msg)) != OK) { @@ -5497,6 +5522,7 @@ while (done <= 0) since that is strictly the only kind of ETRN that can be implemented according to the RFC. */ + GET_OPTION("smtp_etrn_command"); if (smtp_etrn_command) { uschar *error; diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c index 62557072e..895b594fc 100644 --- a/src/src/smtp_out.c +++ b/src/src/smtp_out.c @@ -278,6 +278,7 @@ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, US &on, sizeof(on))) /* Set DSCP value, if we can. For now, if we fail to set the value, we don't bomb out, just log it and continue in default traffic class. */ +GET_OPTION("dscp"); if (dscp && dscp_lookup(dscp, sc->host_af, &dscp_level, &dscp_option, &dscp_value)) { HDEBUG(D_transport|D_acl|D_v) diff --git a/src/src/spf.c b/src/src/spf.c index 2e3f861eb..cc36463e4 100644 --- a/src/src/spf.c +++ b/src/src/spf.c @@ -253,10 +253,13 @@ if (!(spf_server = SPF_server_new_dns(dc, debug))) DEBUG(D_receive) debug_printf("spf: SPF_server_new() failed.\n"); return FALSE; } - /* Override the outdated explanation URL. - See https://www.mail-archive.com/mailop@mailop.org/msg08019.html - Used to work as "Please%_see%_http://www.open-spf.org/Why?id=%{S}&ip=%{C}&receiver=%{R}", - but is broken now (May 18th, 2020) */ + +/* Override the outdated explanation URL. +See https://www.mail-archive.com/mailop@mailop.org/msg08019.html +Used to work as "Please%_see%_http://www.open-spf.org/Why?id=%{S}&ip=%{C}&receiver=%{R}", +but is broken now (May 18th, 2020) */ + +GET_OPTION("spf_smtp_comment_template"); if (!(s = expand_string(spf_smtp_comment_template))) log_write(0, LOG_MAIN|LOG_PANIC_DIE, "expansion of spf_smtp_comment_template failed"); diff --git a/src/src/transports/appendfile.c b/src/src/transports/appendfile.c index ce52cc6ff..72c96f0d0 100644 --- a/src/src/transports/appendfile.c +++ b/src/src/transports/appendfile.c @@ -178,18 +178,24 @@ static int appendfile_transport_setup(transport_instance *tblock, address_item *addrlist, transport_feedback *dummy, uid_t uid, gid_t gid, uschar **errmsg) { -appendfile_transport_options_block *ob = +appendfile_transport_options_block * ob = (appendfile_transport_options_block *)(tblock->options_block); -uschar *q = ob->quota; +uschar * q; double default_value = 0.0; if (ob->expand_maildir_use_size_file) - ob->maildir_use_size_file = expand_check_condition(ob->expand_maildir_use_size_file, + { + GET_OPTION("maildir_use_size_file"); + ob->maildir_use_size_file = + expand_check_condition(ob->expand_maildir_use_size_file, US"`maildir_use_size_file` in transport", tblock->name); + } /* Loop for quota, quota_filecount, quota_warn_threshold, mailbox_size, mailbox_filecount */ +GET_OPTION("quota"); +q = ob->quota; for (int i = 0; i < 5; i++) { double d = default_value; @@ -258,6 +264,7 @@ for (int i = 0; i < 5; i++) which = US"quota"; ob->quota_value = (off_t)d; ob->quota_no_check = no_check; + GET_OPTION("quota_filecount"); q = ob->quota_filecount; break; @@ -266,6 +273,7 @@ for (int i = 0; i < 5; i++) which = US"quota_filecount"; ob->quota_filecount_value = (int)d; ob->quota_filecount_no_check = no_check; + GET_OPTION("quota_warn_threshold"); q = ob->quota_warn_threshold; break; @@ -273,6 +281,7 @@ for (int i = 0; i < 5; i++) if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4) which = US"quota_warn_threshold"; ob->quota_warn_threshold_value = (off_t)d; + GET_OPTION("mailbox_size"); q = ob->mailbox_size_string; default_value = -1.0; break; @@ -281,6 +290,7 @@ for (int i = 0; i < 5; i++) if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4) which = US"mailbox_size";; ob->mailbox_size_value = (off_t)d; + GET_OPTION("mailbox_filecount"); q = ob->mailbox_filecount_string; break; @@ -399,10 +409,10 @@ if (ob->dirname) if (ob->maildir_format && ob->mailstore_format) log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s transport:\n " "only one of maildir and mailstore may be specified", tblock->name); - if (ob->quota_filecount != NULL && ob->quota == NULL) + if (ob->quota_filecount != NULL && !ob->quota) log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s transport:\n " "quota must be set if quota_filecount is set", tblock->name); - if (ob->quota_directory != NULL && ob->quota == NULL) + if (ob->quota_directory != NULL && !ob->quota) log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s transport:\n " "quota must be set if quota_directory is set", tblock->name); } @@ -1221,6 +1231,7 @@ if (!fdname) { if (!(fdname = ob->filename)) { + GET_OPTION("directory"); fdname = ob->dirname; isdirectory = TRUE; } @@ -2234,6 +2245,7 @@ else /* Use an explicitly configured directory if set */ + GET_OPTION("quota_directory"); if (ob->quota_directory) { if (!(check_path = expand_string(ob->quota_directory))) @@ -2431,6 +2443,7 @@ else DEBUG(D_transport) debug_printf("delivering in maildir format in %s\n", path); + GET_OPTION("maildir_tag"); nametag = ob->maildir_tag; /* Check that nametag expands successfully; a hard failure causes a panic @@ -2567,9 +2580,10 @@ else /* Write the envelope file, then close it. */ + GET_OPTION("mailstore_prefix"); if (ob->mailstore_prefix) { - uschar *s = expand_string(ob->mailstore_prefix); + uschar * s = expand_string(ob->mailstore_prefix); if (!s) { if (!f.expand_string_forcedfail) @@ -2595,9 +2609,10 @@ else for (address_item * taddr = addr; taddr; taddr = taddr->next) fprintf(env_file, "%s@%s\n", taddr->local_part, taddr->domain); + GET_OPTION("mailstore_suffix"); if (ob->mailstore_suffix) { - uschar *s = expand_string(ob->mailstore_suffix); + uschar * s = expand_string(ob->mailstore_suffix); if (!s) { if (!f.expand_string_forcedfail) @@ -2757,18 +2772,21 @@ transport_newlines = 0; /* Write any configured prefix text first */ -if (yield == OK && ob->message_prefix && *ob->message_prefix) +if (yield == OK) { - uschar *prefix = expand_string(ob->message_prefix); - if (!prefix) - { - errno = ERRNO_EXPANDFAIL; - addr->transport_return = PANIC; - addr->message = string_sprintf("Expansion of \"%s\" (prefix for %s " - "transport) failed", ob->message_prefix, tblock->name); - yield = DEFER; - } - else if (!transport_write_string(fd, "%s", prefix)) yield = DEFER; + uschar * prefix = ob->message_prefix; + GET_OPTION("message_prefix"); + if (prefix && *prefix) + if (!(prefix = expand_string(prefix))) + { + errno = ERRNO_EXPANDFAIL; + addr->transport_return = PANIC; + addr->message = string_sprintf("Expansion of \"%s\" (prefix for %s " + "transport) failed", ob->message_prefix, tblock->name); + yield = DEFER; + } + else if (!transport_write_string(fd, "%s", prefix)) + yield = DEFER; } /* If the use_bsmtp option is on, we need to write SMTP prefix information. The @@ -2820,18 +2838,21 @@ if (yield == OK) /* Now a configured suffix. */ -if (yield == OK && ob->message_suffix && *ob->message_suffix) +if (yield == OK) { - uschar *suffix = expand_string(ob->message_suffix); - if (!suffix) - { - errno = ERRNO_EXPANDFAIL; - addr->transport_return = PANIC; - addr->message = string_sprintf("Expansion of \"%s\" (suffix for %s " - "transport) failed", ob->message_suffix, tblock->name); - yield = DEFER; - } - else if (!transport_write_string(fd, "%s", suffix)) yield = DEFER; + uschar * suffix = ob->message_suffix; + GET_OPTION("message_suffix"); + if (suffix && *suffix) + if (!(suffix = expand_string(suffix))) + { + errno = ERRNO_EXPANDFAIL; + addr->transport_return = PANIC; + addr->message = string_sprintf("Expansion of \"%s\" (suffix for %s " + "transport) failed", ob->message_suffix, tblock->name); + yield = DEFER; + } + else if (!transport_write_string(fd, "%s", suffix)) + yield = DEFER; } /* If batch smtp, write the terminating dot. */ diff --git a/src/src/transports/autoreply.c b/src/src/transports/autoreply.c index fa884cec4..3755ba284 100644 --- a/src/src/transports/autoreply.c +++ b/src/src/transports/autoreply.c @@ -314,20 +314,21 @@ if (addr->reply) } else { - uschar *oncerepeat = ob->once_repeat; + uschar * oncerepeat; DEBUG(D_transport) debug_printf("taking data from transport\n"); - from = ob->from; - reply_to = ob->reply_to; - to = ob->to; - cc = ob->cc; - bcc = ob->bcc; - subject = ob->subject; - headers = ob->headers; - text = ob->text; - file = ob->file; - logfile = ob->logfile; - oncelog = ob->oncelog; + GET_OPTION("once_repeat"); oncerepeat = ob->once_repeat; + GET_OPTION("from"); from = ob->from; + GET_OPTION("reply_to"); reply_to = ob->reply_to; + GET_OPTION("to"); to = ob->to; + GET_OPTION("cc"); cc = ob->cc; + GET_OPTION("bcc"); bcc = ob->bcc; + GET_OPTION("subject"); subject = ob->subject; + GET_OPTION("headers"); headers = ob->headers; + GET_OPTION("text"); text = ob->text; + GET_OPTION("file"); file = ob->file; + GET_OPTION("log"); logfile = ob->logfile; + GET_OPTION("once"); oncelog = ob->oncelog; file_expand = ob->file_expand; return_message = ob->return_message; diff --git a/src/src/transports/pipe.c b/src/src/transports/pipe.c index 64c70e719..157d2368f 100644 --- a/src/src/transports/pipe.c +++ b/src/src/transports/pipe.c @@ -315,6 +315,7 @@ argv = *argvptr; /* If allow_commands is set, see if the command is in the permitted list. */ +GET_OPTION("allow_commands"); if (ob->allow_commands) { int sep = 0; @@ -368,10 +369,11 @@ for it. */ if (argv[0][0] != '/') { int sep = 0; - uschar *p; - const uschar *listptr = expand_string(ob->path); + uschar * p; - while ((p = string_nextinlist(&listptr, &sep, NULL, 0))) + GET_OPTION("path"); + for (const uschar * listptr = expand_string(ob->path); + p = string_nextinlist(&listptr, &sep, NULL, 0); ) { struct stat statbuf; sprintf(CS big_buffer, "%.256s/%.256s", p, argv[0]); @@ -550,6 +552,7 @@ if (testflag(addr, af_pfr) && addr->local_part[0] == '|') { /* Enables expansion of $address_pipe into separate arguments */ setflag(addr, af_force_command); + GET_OPTION("commsnd"); cmd = ob->cmd; expand_arguments = TRUE; expand_fail = PANIC; @@ -563,6 +566,7 @@ if (testflag(addr, af_pfr) && addr->local_part[0] == '|') } else { + GET_OPTION("commsnd"); cmd = ob->cmd; expand_arguments = TRUE; expand_fail = PANIC; @@ -650,6 +654,7 @@ else if (timezone_string && timezone_string[0]) /* Add any requested items */ +GET_OPTION("environment"); if (envlist) if (!(envlist = expand_cstring(envlist))) { @@ -796,9 +801,10 @@ transport_count = 0; /* First write any configured prefix information */ +GET_OPTION("message_prefix"); if (ob->message_prefix) { - uschar *prefix = expand_string(ob->message_prefix); + uschar * prefix = expand_string(ob->message_prefix); if (!prefix) { addr->transport_return = f.search_find_defer? DEFER : PANIC; @@ -838,9 +844,10 @@ if (!transport_write_message(&tctx, 0)) /* Now any configured suffix */ +GET_OPTION("message_suffix"); if (ob->message_suffix) { - uschar *suffix = expand_string(ob->message_suffix); + uschar * suffix = expand_string(ob->message_suffix); if (!suffix) { addr->transport_return = f.search_find_defer? DEFER : PANIC; diff --git a/src/src/transports/queuefile.c b/src/src/transports/queuefile.c index b6511133c..21c98eeef 100644 --- a/src/src/transports/queuefile.c +++ b/src/src/transports/queuefile.c @@ -195,6 +195,7 @@ DEBUG(D_transport) # define O_NOFOLLOW 0 #endif +GET_OPTION("directory"); if (!(dstdir = expand_string(ob->dirname))) { addr->message = string_sprintf("%s transport: failed to expand dirname option", diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 596a328c3..736592352 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -1088,6 +1088,7 @@ if (pending_BANNER) /*XXX EXPERIMENTAL_ESMTP_LIMITS ? */ # ifndef DISABLE_TLS_RESUME + GET_OPTION("host_name_extract"); s = ((smtp_transport_options_block *)sx->conn_args.ob)->host_name_extract; if (!s) s = HNE_DEFAULT; ehlo_response_lbserver(sx, s); @@ -1769,6 +1770,7 @@ uschar * local_authenticated_sender = authenticated_sender; authenticated_sender, ob->authenticated_sender, f.smtp_authenticated?"Y":"N"); #endif +GET_OPTION("authenticated_sender"); if (ob->authenticated_sender) { uschar * new = expand_string(ob->authenticated_sender); @@ -2374,6 +2376,7 @@ PIPE_CONNECT_RETRY: For early-pipe, we are ok if binding to a local interface; otherwise (if $sending_ip_address is seen in helo_data) we disabled early-pipe above. */ + GET_OPTION("helo_data"); if (sx->helo_data) if (!(sx->helo_data = expand_string(sx->helo_data))) if (sx->verify) @@ -2501,6 +2504,7 @@ goto SEND_QUIT; an LB. Call this anyway, so that a dummy host_name_extract option value can force resumption attempts. */ + GET_OPTION("host_name_extract"); if (!(s = ob->host_name_extract)) s = US"never-LB"; ehlo_response_lbserver(sx, s); # endif @@ -2629,6 +2633,7 @@ goto SEND_QUIT; } #endif #ifndef DISABLE_TLS_RESUME + GET_OPTION("host_name_extract"); if (!(s = ob->host_name_extract)) s = HNE_DEFAULT; ehlo_response_lbserver(sx, s); #endif @@ -2837,13 +2842,17 @@ if (tls_out.active.sock >= 0) { uschar * greeting_cmd; - if (!sx->helo_data && !(sx->helo_data = expand_string(ob->helo_data))) + if (!sx->helo_data) { - uschar *message = string_sprintf("failed to expand helo_data: %s", - expand_string_message); - set_errno_nohost(sx->addrlist, ERRNO_EXPANDFAIL, message, DEFER, FALSE, &sx->delivery_start); - yield = DEFER; - goto SEND_QUIT; + GET_OPTION("helo_data"); + if (!(sx->helo_data = expand_string(ob->helo_data))) + { + uschar *message = string_sprintf("failed to expand helo_data: %s", + expand_string_message); + set_errno_nohost(sx->addrlist, ERRNO_EXPANDFAIL, message, DEFER, FALSE, &sx->delivery_start); + yield = DEFER; + goto SEND_QUIT; + } } #ifndef DISABLE_PIPE_CONNECT @@ -3094,6 +3103,7 @@ if (sx->addrlist->prop.utf8_msg) /* If the transport sets a downconversion mode it overrides any set by ACL for the message. */ + GET_OPTION("utf8_downconvert"); if ((s = ob->utf8_downconvert)) { if (!(s = expand_string(s))) @@ -5565,8 +5575,9 @@ retry_non_continued: host_af = Ustrchr(host->address, ':') ? AF_INET6 : AF_INET; { - uschar * s = ob->interface; - if (s && *s) + uschar * s; + GET_OPTION("interface"); + if ((s = ob->interface) && *s) { if (!smtp_get_interface(s, host_af, addrlist, &interface, tid)) return FALSE; diff --git a/src/src/transports/smtp_socks.c b/src/src/transports/smtp_socks.c index 22ee74bd8..ac8d0f2da 100644 --- a/src/src/transports/smtp_socks.c +++ b/src/src/transports/smtp_socks.c @@ -229,6 +229,7 @@ blob early_data; if (!timeout) timeout = 24*60*60; /* use 1 day for "indefinite" */ tmo = time(NULL) + timeout; +GET_OPTION("socks_proxy"); if (!(proxy_list = expand_string(ob->socks_proxy))) { log_write(0, LOG_MAIN|LOG_PANIC, "Bad expansion for socks_proxy in %s", diff --git a/src/src/verify.c b/src/src/verify.c index bde660063..78923651c 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -368,6 +368,7 @@ if (addr->transport == cutthrough.addr.transport) host_af = Ustrchr(host->address, ':') ? AF_INET6 : AF_INET; + GET_OPTION("interface"); if ( !smtp_get_interface(tf->interface, host_af, addr, &interface, US"callout") || !smtp_get_port(tf->port, addr, &port, US"callout") @@ -579,10 +580,14 @@ else with a random local part, ensure that such a local part is available. If not, log the fact, but carry on without randomising. */ - if (options & vopt_callout_random && callout_random_local_part) - if (!(random_local_part = expand_string(callout_random_local_part))) + if (options & vopt_callout_random) + { + GET_OPTION("callout_random_local_part"); + if ( callout_random_local_part + && !(random_local_part = expand_string(callout_random_local_part))) log_write(0, LOG_MAIN|LOG_PANIC, "failed to expand " "callout_random_local_part: %s", expand_string_message); + } /* Compile regex' used by client-side smtp */ @@ -660,6 +665,7 @@ coding means skipping this whole loop and doing the append separately. */ deliver_domain = addr->domain; transport_name = addr->transport->name; + GET_OPTION("interface"); if ( !smtp_get_interface(tf->interface, host_af, addr, &interface, US"callout") || !smtp_get_port(tf->port, addr, &port, US"callout") diff --git a/test/stderr/0002 b/test/stderr/0002 index 087b58f60..d258b26b4 100644 --- a/test/stderr/0002 +++ b/test/stderr/0002 @@ -4,6 +4,9 @@ environment after trimming: configuration file is TESTSUITE/test-config admin user dropping to exim gid; retaining priv uid +try option gecos_pattern +try option gecos_name +try option unknown_login ╭considering: primary_hostname: $primary_hostname ├───────text: primary_hostname: ├considering: $primary_hostname @@ -146,6 +149,9 @@ environment after trimming: configuration file is TESTSUITE/test-config admin user dropping to exim gid; retaining priv uid +try option gecos_pattern +try option gecos_name +try option unknown_login /considering: primary_hostname: $primary_hostname |-------text: primary_hostname: |considering: $primary_hostname @@ -280,6 +286,9 @@ environment after trimming: configuration file is TESTSUITE/test-config admin user dropping to exim gid; retaining priv uid +try option gecos_pattern +try option gecos_name +try option unknown_login ╭considering: -oMa sender_host_address = $sender_host_address ├───────text: -oMa sender_host_address = ├considering: $sender_host_address @@ -356,6 +365,9 @@ environment after trimming: configuration file is TESTSUITE/test-config admin user dropping to exim gid; retaining priv uid +try option gecos_pattern +try option gecos_name +try option unknown_login ╭considering: -oMa sender_host_address = $sender_host_address ├───────text: -oMa sender_host_address = ├considering: $sender_host_address diff --git a/test/stderr/0092 b/test/stderr/0092 index 51757f42f..9df1800b5 100644 --- a/test/stderr/0092 +++ b/test/stderr/0092 @@ -54,13 +54,18 @@ configuration file is TESTSUITE/test-config admin user changed uid/gid: privilege not needed uid=EXIM_UID gid=EXIM_GID pid=p1234 +try option gecos_pattern +try option gecos_name +try option unknown_login originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME sender address = CALLER@myhost.test.ex +try option smtp_active_hostname sender_fullhost = [V4NET.0.0.1] sender_rcvhost = [V4NET.0.0.1] host in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from [V4NET.0.0.1] +try option message_size_limit host in host_lookup? no (option unset) set_process_info: pppp handling incoming connection from [V4NET.0.0.1] ╭considering: ${if eq {V4NET.0.0.1} {$sender_host_address} {2} {30}}s @@ -98,6 +103,8 @@ host in recipient_unqualified_hosts? no (option unset) host in helo_verify_hosts? no (option unset) host in helo_try_verify_hosts? no (option unset) host in helo_accept_junk_hosts? no (option unset) +try option acl_smtp_connect +try option smtp_banner ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full ├──────value: myhost.test.ex ├considering: ESMTP Exim $version_number $tod_full @@ -120,12 +127,16 @@ test in helo_lookup_domains? no (end of list) sender_fullhost = (test) [V4NET.0.0.1] sender_rcvhost = [V4NET.0.0.1] (helo=test) set_process_info: pppp handling incoming connection from (test) [V4NET.0.0.1] +try option spf_smtp_comment_template +try option acl_smtp_helo SMTP>> 250 myhost.test.ex Hello test [V4NET.0.0.1] SMTP<< mail from:userx@test.ex spool directory space = nnnnnK inodes = nnnnn check_space = 10240K inodes = 100 msg_size = 0 log directory space = nnnnnK inodes = nnnnn check_space = 10240K inodes = 100 +try option acl_smtp_mail SMTP>> 250 OK SMTP<< rcpt to:userx@test.ex +try option acl_smtp_rcpt using ACL "check_recipient" processing "accept" (TESTSUITE/test-config 27) check hosts = : @@ -156,10 +167,12 @@ accept: condition test succeeded in ACL "check_recipient" end of ACL "check_recipient": ACCEPT SMTP>> 250 Accepted SMTP<< data +try option acl_smtp_predata SMTP>> 354 Enter message, ending with "." on a line by itself search_tidyup called LOG: lost_incoming_connection MAIN SMTP data timeout (message abandoned) on connection from (test) [V4NET.0.0.1] F= D=qqs +try option acl_smtp_notquit SMTP>> 421 myhost.test.ex SMTP incoming data timeout - closing connection. search_tidyup called >>>>>>>>>>>>>>>> Exim pid=p1234 (fresh-exec) terminating with rc=1 >>>>>>>>>>>>>>>> diff --git a/test/stderr/0402 b/test/stderr/0402 index 2aa76c63d..57c4d48ac 100644 --- a/test/stderr/0402 +++ b/test/stderr/0402 @@ -14,11 +14,16 @@ seeking password data for user "CALLER": using cached result getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID seeking password data for user "CALLER": using cached result getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID +try option gecos_pattern +try option gecos_name +try option unknown_login originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME sender address = CALLER@test.ex +try option smtp_active_hostname set_process_info: pppp accepting a local non-SMTP message from spool directory space = nnnnnK inodes = nnnnn check_space = 10240K inodes = 100 msg_size = 0 log directory space = nnnnnK inodes = nnnnn check_space = 10240K inodes = 100 +try option message_size_limit Sender: CALLER@test.ex Recipients: CALLER@test.ex @@ -26,9 +31,12 @@ Recipients: userz rd+CALLER rd+usery +try option acl_not_smtp_start search_tidyup called >>Headers received: +try option message_id_header_domain +try option message_id_header_text qualify & rewrite recipients list rewrite rules on sender address qualify and rewrite headers @@ -45,6 +53,7 @@ Data file written for message 10HmaX-000000005vi-0000 ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 +try option received_header_text ╭considering: Received: ${if def:sender_rcvhost {from $sender_rcvhost }{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol }}${if def:tls_in_ver { ($tls_in_ver)}}${if def:tls_in_cipher_std { tls $tls_in_cipher_std @@ -380,6 +389,8 @@ P Received: from CALLER by mail.test.ex with local (Exim x.yz) (envelope-from ) id 10HmaX-000000005vi-0000; Tue, 2 Mar 1999 09:44:33 +0000 +try option acl_not_smtp_mime +try option acl_not_smtp ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 @@ -513,6 +524,7 @@ checking local_parts usery in "usery"? list element: usery usery in "usery"? yes (matched "usery") +try option router_home_directory ╭considering: /non-exist/$domain ├───────text: /non-exist/ ├considering: $domain @@ -521,17 +533,23 @@ usery in "usery"? ├──expanding: /non-exist/$domain ╰─────result: /non-exist/test.ex ╰──(tainted) +try option set calling r5 router +try option qualify_domain rda_interpret (string): 'TESTSUITE/test-mail/junk' expanded: 'TESTSUITE/test-mail/junk' file is not a filter file parse_forward_list: TESTSUITE/test-mail/junk extract item: TESTSUITE/test-mail/junk +try option file_transport +try option transport set transport ft1 r5 router generated TESTSUITE/test-mail/junk pipe, file, or autoreply errors_to=NULL transport=ft1 uid=unset gid=unset home=/non-exist/$local_part +try option unseen +try option unseen routed by r5 router envelope to: rd+usery@test.ex transport: @@ -565,6 +583,7 @@ checking local_parts CALLER in "CALLER"? list element: CALLER CALLER in "CALLER"? yes (matched "CALLER") +try option router_home_directory ╭considering: /non-exist/$local_part ├───────text: /non-exist/ ├considering: $local_part @@ -573,17 +592,23 @@ CALLER in "CALLER"? ├──expanding: /non-exist/$local_part ╰─────result: /non-exist/CALLER ╰──(tainted) +try option set calling r4 router +try option qualify_domain rda_interpret (string): 'TESTSUITE/test-mail/junk' expanded: 'TESTSUITE/test-mail/junk' file is not a filter file parse_forward_list: TESTSUITE/test-mail/junk extract item: TESTSUITE/test-mail/junk +try option file_transport +try option transport set transport ft1 r4 router generated TESTSUITE/test-mail/junk pipe, file, or autoreply errors_to=NULL transport=ft1 uid=unset gid=unset home=/non-exist/CALLER +try option unseen +try option unseen routed by r4 router envelope to: rd+CALLER@test.ex transport: @@ -609,6 +634,7 @@ checking local_parts userz in "userz"? list element: userz userz in "userz"? yes (matched "userz") +try option router_home_directory ╭considering: /non-exist/$domain ├───────text: /non-exist/ ├considering: $domain @@ -617,14 +643,18 @@ userz in "userz"? ├──expanding: /non-exist/$domain ╰─────result: /non-exist/test.ex ╰──(tainted) +try option set calling r3 router r3 router called for userz@test.ex domain = test.ex +try option transport set transport t2 queued for t2 transport: local_part = userz domain = test.ex errors_to=NULL domain_data=NULL local_part_data=userz +try option unseen +try option unseen routed by r3 router envelope to: userz@test.ex transport: t2 @@ -643,6 +673,7 @@ checking local_parts usery in "usery"? list element: usery usery in "usery"? yes (matched "usery") +try option router_home_directory ╭considering: /non-exist/$domain ├───────text: /non-exist/ ├considering: $domain @@ -651,14 +682,18 @@ usery in "usery"? ├──expanding: /non-exist/$domain ╰─────result: /non-exist/test.ex ╰──(tainted) +try option set calling r2 router r2 router called for usery@test.ex domain = test.ex +try option transport set transport t1 queued for t1 transport: local_part = usery domain = test.ex errors_to=NULL domain_data=NULL local_part_data=usery +try option unseen +try option unseen routed by r2 router envelope to: usery@test.ex transport: t1 @@ -670,6 +705,7 @@ checking local_parts CALLER in "CALLER"? list element: CALLER CALLER in "CALLER"? yes (matched "CALLER") +try option router_home_directory ╭considering: /non-exist/$local_part ├───────text: /non-exist/ ├considering: $local_part @@ -678,14 +714,18 @@ CALLER in "CALLER"? ├──expanding: /non-exist/$local_part ╰─────result: /non-exist/CALLER ╰──(tainted) +try option set calling r1 router r1 router called for CALLER@test.ex domain = test.ex +try option transport set transport t1 queued for t1 transport: local_part = CALLER domain = test.ex errors_to=NULL domain_data=NULL local_part_data=CALLER +try option unseen +try option unseen routed by r1 router envelope to: CALLER@test.ex transport: t1 @@ -723,6 +763,9 @@ search_tidyup called returned from EXIM_DBOPEN: (nil) failed to open DB file TESTSUITE/spool/db/retry: No such file or directory no retry data available +try option max_parallel +try option return_path +try option home_directory ╭considering: /non-exist/$local_part ├───────text: /non-exist/ ├considering: $local_part @@ -731,7 +774,13 @@ no retry data available ├──expanding: /non-exist/$local_part ╰─────result: /non-exist/usery ╰──(tainted) +try option current_directory search_tidyup called +try option quota +try option quota_filecount +try option quota_warn_threshold +try option mailbox_size +try option mailbox_filecount changed uid/gid: local delivery to TESTSUITE/test-mail/junk transport=ft1 uid=CALLER_UID gid=CALLER_GID pid=p1236 home=/non-exist/usery current=/ @@ -752,6 +801,7 @@ hitch name: TESTSUITE/test-mail/junk.lock.test.ex.dddddddd.pppppppp lock file created mailbox TESTSUITE/test-mail/junk is locked writing to file TESTSUITE/test-mail/junk +try option message_prefix ╭considering: From ${if def:return_path{$return_path}{MAILER-DAEMON}} ${tod_bsdinbox} ├───────text: From @@ -795,6 +845,7 @@ writing to file TESTSUITE/test-mail/junk writing data block fd=dddd size=sss timeout=0 cannot use sendfile for body: spoolfile not wireformat writing data block fd=dddd size=sss timeout=0 +try option message_suffix writing data block fd=dddd size=sss timeout=0 appendfile yields 0 with errno=dd more_errno=dd search_tidyup called @@ -812,7 +863,16 @@ LOG: MAIN returned from EXIM_DBOPEN: (nil) failed to open DB file TESTSUITE/spool/db/retry: No such file or directory no retry data available +try option max_parallel +try option return_path +try option home_directory +try option current_directory search_tidyup called +try option quota +try option quota_filecount +try option quota_warn_threshold +try option mailbox_size +try option mailbox_filecount changed uid/gid: local delivery to TESTSUITE/test-mail/junk transport=ft1 uid=CALLER_UID gid=CALLER_GID pid=p1237 home=/non-exist/CALLER current=/ @@ -833,6 +893,7 @@ hitch name: TESTSUITE/test-mail/junk.lock.test.ex.dddddddd.pppppppp lock file created mailbox TESTSUITE/test-mail/junk is locked writing to file TESTSUITE/test-mail/junk +try option message_prefix ╭considering: From ${if def:return_path{$return_path}{MAILER-DAEMON}} ${tod_bsdinbox} ├───────text: From @@ -876,6 +937,7 @@ writing to file TESTSUITE/test-mail/junk writing data block fd=dddd size=sss timeout=0 cannot use sendfile for body: spoolfile not wireformat writing data block fd=dddd size=sss timeout=0 +try option message_suffix writing data block fd=dddd size=sss timeout=0 appendfile yields 0 with errno=dd more_errno=dd search_tidyup called @@ -893,7 +955,16 @@ LOG: MAIN returned from EXIM_DBOPEN: (nil) failed to open DB file TESTSUITE/spool/db/retry: No such file or directory no retry data available +try option max_parallel +try option return_path +try option home_directory +try option current_directory search_tidyup called +try option quota +try option quota_filecount +try option quota_warn_threshold +try option mailbox_size +try option mailbox_filecount changed uid/gid: local delivery to CALLER transport=t1 uid=CALLER_UID gid=CALLER_GID pid=p1238 home=/non-exist/CALLER current=/ @@ -919,6 +990,9 @@ LOG: MAIN returned from EXIM_DBOPEN: (nil) failed to open DB file TESTSUITE/spool/db/retry: No such file or directory no retry data available +try option max_parallel +try option return_path +try option home_directory ╭considering: /non-exist/$local_part ├───────text: /non-exist/ ├considering: $local_part @@ -927,7 +1001,13 @@ no retry data available ├──expanding: /non-exist/$local_part ╰─────result: /non-exist/usery ╰──(tainted) +try option current_directory search_tidyup called +try option quota +try option quota_filecount +try option quota_warn_threshold +try option mailbox_size +try option mailbox_filecount changed uid/gid: local delivery to usery transport=t1 uid=CALLER_UID gid=CALLER_GID pid=p1239 home=/non-exist/usery current=/ @@ -953,6 +1033,9 @@ LOG: MAIN returned from EXIM_DBOPEN: (nil) failed to open DB file TESTSUITE/spool/db/retry: No such file or directory no retry data available +try option max_parallel +try option return_path +try option home_directory ╭considering: /$local_part ├───────text: / ├considering: $local_part @@ -961,7 +1044,13 @@ no retry data available ├──expanding: /$local_part ╰─────result: /userz ╰──(tainted) +try option current_directory search_tidyup called +try option quota +try option quota_filecount +try option quota_warn_threshold +try option mailbox_size +try option mailbox_filecount changed uid/gid: local delivery to userz transport=t2 uid=CALLER_UID gid=CALLER_GID pid=p1240 home=/userz current=/ diff --git a/test/stderr/0544 b/test/stderr/0544 index 17ec179ea..2cbbb848d 100644 --- a/test/stderr/0544 +++ b/test/stderr/0544 @@ -4,9 +4,18 @@ environment after trimming: adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user +try option gecos_pattern +try option gecos_name +try option unknown_login +try option smtp_active_hostname +try option message_size_limit +try option acl_not_smtp_start +try option message_id_header_domain +try option message_id_header_text ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 +try option received_header_text ╭considering: Received: ${if def:sender_rcvhost {from $sender_rcvhost }{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol }}${if def:tls_in_ver { ($tls_in_ver)}}${if def:tls_in_cipher_std { tls $tls_in_cipher_std @@ -337,6 +346,8 @@ admin user ╰─────result: Received: from CALLER by the.local.host.name with local (Exim x.yz) (envelope-from ) id 10HmaX-000000005vi-0000 +try option acl_not_smtp_mime +try option acl_not_smtp ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 @@ -351,6 +362,20 @@ configuration file is TESTSUITE/test-config trusted user admin user dropping to exim gid; retaining priv uid +try option router_home_directory +try option set +try option transport +try option unseen +try option unseen +try option router_home_directory +try option set +try option transport +try option unseen +try option unseen +try option multi_domain +try option multi_domain +try option max_parallel +try option return_path ╭considering: $domain ├──────value: domain1.ex ╰──(tainted) @@ -361,6 +386,7 @@ LOG: MAIN == userx@domain1.ex R=smarthost T=smtp defer (-1): first-pass only routing due to -odqs, queue_smtp_domains or control=queue LOG: MAIN == userx@domain2.ex R=smarthost T=smtp defer (-1): first-pass only routing due to -odqs, queue_smtp_domains or control=queue +try option delay_warning_condition ╭considering: ${if or {{ !eq{$h_list-id:$h_list-post:$h_list-subscribe:}{} }{ match{$h_precedence:}{(?i)bulk|list|junk} }{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }} {no}{yes}} ╭considering: $h_list-id:$h_list-post:$h_list-subscribe:}{} }{ match{$h_precedence:}{(?i)bulk|list|junk} }{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }} {no}{yes}} ├considering: $h_list-post:$h_list-subscribe:}{} }{ match{$h_precedence:}{(?i)bulk|list|junk} }{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }} {no}{yes}} @@ -418,8 +444,15 @@ environment after trimming: adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user +try option gecos_pattern +try option gecos_name +try option unknown_login +try option smtp_active_hostname LOG: smtp_connection MAIN SMTP connection from CALLER +try option message_size_limit +try option acl_smtp_connect +try option smtp_banner ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full ├──────value: the.local.host.name ├considering: ESMTP Exim $version_number $tod_full @@ -432,6 +465,8 @@ LOG: smtp_connection MAIN ├──────value: Tue, 2 Mar 1999 09:44:33 +0000 ├──expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full ╰─────result: the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +try option spf_smtp_comment_template +try option acl_smtp_helo ╭considering: ${if match_domain {$sender_helo_name}{+dlist}} ╭considering: $sender_helo_name}{+dlist}} ├──────value: ehlo.domain @@ -455,6 +490,10 @@ LOG: smtp_connection MAIN ├─────result: true ├──expanding: ${if match_domain {$sender_helo_name}{+dlist}} ╰─────result: true +try option acl_smtp_etrn +try option acl_smtp_vrfy +try option acl_smtp_expn +try option acl_smtp_mail ╭considering: domain=$domain/sender_domain=$sender_address_domain ├───────text: domain= ├considering: $domain/sender_domain=$sender_address_domain @@ -467,6 +506,7 @@ LOG: smtp_connection MAIN ├──expanding: domain=$domain/sender_domain=$sender_address_domain ╰─────result: domain=/sender_domain=sender.domain ╰──(tainted) +try option acl_smtp_rcpt ╭considering: domain=$domain/sender_domain=$sender_address_domain ├───────text: domain= ├considering: $domain/sender_domain=$sender_address_domain @@ -493,6 +533,7 @@ LOG: smtp_connection MAIN ├──expanding: domain=$domain/sender_domain=$sender_address_domain ╰─────result: domain=recipient.domain/sender_domain=sender.domain ╰──(tainted) +try option acl_smtp_quit LOG: smtp_connection MAIN SMTP connection from CALLER D=qqs closed by QUIT >>>>>>>>>>>>>>>> Exim pid=p1236 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/0620 b/test/stderr/0620 index b0a0114fd..852014746 100644 --- a/test/stderr/0620 +++ b/test/stderr/0620 @@ -4,8 +4,15 @@ environment after trimming: adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user +try option gecos_pattern +try option gecos_name +try option unknown_login +try option smtp_active_hostname LOG: smtp_connection MAIN SMTP connection from CALLER +try option message_size_limit +try option acl_smtp_connect +try option smtp_banner ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full ├──────value: primaryhostname.ex ├considering: ESMTP Exim $version_number $tod_full @@ -18,6 +25,10 @@ LOG: smtp_connection MAIN ├──────value: Tue, 2 Mar 1999 09:44:33 +0000 ├──expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full ╰─────result: primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +try option spf_smtp_comment_template +try option acl_smtp_helo +try option acl_smtp_mail +try option acl_smtp_rcpt ╭considering: domain $domain ├───────text: domain ├considering: $domain @@ -58,6 +69,7 @@ LOG: MAIN ╰──(tainted) LOG: MAIN $0 'trythiskey.ex' $1 '' +try option acl_smtp_quit LOG: smtp_connection MAIN SMTP connection from CALLER D=qqs closed by QUIT >>>>>>>>>>>>>>>> Exim pid=p1234 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> @@ -67,8 +79,15 @@ environment after trimming: adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user +try option gecos_pattern +try option gecos_name +try option unknown_login +try option smtp_active_hostname LOG: smtp_connection MAIN SMTP connection from CALLER +try option message_size_limit +try option acl_smtp_connect +try option smtp_banner ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full ├──────value: primaryhostname.ex ├considering: ESMTP Exim $version_number $tod_full @@ -81,6 +100,10 @@ LOG: smtp_connection MAIN ├──────value: Tue, 2 Mar 1999 09:44:33 +0000 ├──expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full ╰─────result: primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +try option spf_smtp_comment_template +try option acl_smtp_helo +try option acl_smtp_mail +try option acl_smtp_rcpt ╭considering: domain $domain ├───────text: domain ├considering: $domain @@ -120,6 +143,7 @@ LOG: MAIN ╰──(tainted) LOG: MAIN $0 'trythiskey.ex' $1 '' +try option acl_smtp_quit LOG: smtp_connection MAIN SMTP connection from CALLER D=qqs closed by QUIT >>>>>>>>>>>>>>>> Exim pid=p1235 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/0628 b/test/stderr/0628 index f112b1cc7..9c2db0ec3 100644 --- a/test/stderr/0628 +++ b/test/stderr/0628 @@ -20,6 +20,7 @@ 01:01:01 p1237 Process p1237 is ready for new message 01:01:01 p1237 smtp_setup_msg entered 01:01:01 p1237 SMTP<< QUIT +01:01:01 p1237 try option acl_smtp_quit 01:01:01 p1237 SMTP>> 221 myhost.test.ex closing connection 01:01:01 p1237 LOG: smtp_connection MAIN 01:01:01 p1237 SMTP connection from (test.ex) [127.0.0.1] D=qqs closed by QUIT @@ -67,7 +68,10 @@ 01:01:01 p1239 routing dest@test.ex 01:01:01 p1239 --------> r1 router <-------- 01:01:01 p1239 local_part=dest domain=test.ex +01:01:01 p1239 try option router_home_directory +01:01:01 p1239 try option set 01:01:01 p1239 calling r1 router +01:01:01 p1239 try option qualify_domain 01:01:01 p1239 rda_interpret (string): ':blackhole:' 01:01:01 p1239 expanded: ':blackhole:' 01:01:01 p1239 file is not a filter file @@ -134,6 +138,7 @@ 01:01:01 p1240 Process p1240 is ready for new message 01:01:01 p1240 smtp_setup_msg entered 01:01:01 p1240 SMTP<< QUIT +01:01:01 p1240 try option acl_smtp_quit 01:01:01 p1240 SMTP>> 221 myhost.test.ex closing connection 01:01:01 p1240 LOG: smtp_connection MAIN 01:01:01 p1240 SMTP connection from (test.ex) [127.0.0.1] D=qqs closed by QUIT @@ -169,7 +174,10 @@ 01:01:01 p1241 routing dest2@test.ex 01:01:01 p1241 --------> r1 router <-------- 01:01:01 p1241 local_part=dest2 domain=test.ex +01:01:01 p1241 try option router_home_directory +01:01:01 p1241 try option set 01:01:01 p1241 calling r1 router +01:01:01 p1241 try option qualify_domain 01:01:01 p1241 rda_interpret (string): ':blackhole:' 01:01:01 p1241 expanded: ':blackhole:' 01:01:01 p1241 file is not a filter file diff --git a/test/stderr/0632 b/test/stderr/0632 index 66928e2e8..85f1979a7 100644 --- a/test/stderr/0632 +++ b/test/stderr/0632 @@ -7,9 +7,13 @@ adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user dropping to exim gid; retaining priv uid +try option gecos_pattern +try option gecos_name +try option unknown_login daemon_smtp_port overridden by -oX: <: 1225 creating notifier socket +try option notifier_socket ╭considering: $spool_directory/exim_daemon_notify ├──────value: TESTSUITE/spool ├considering: /exim_daemon_notify @@ -22,11 +26,17 @@ listening on all interfaces (IPv4) port PORT_D pid written to TESTSUITE/spool/exim-daemon.pid LOG: MAIN exim x.yz daemon started: pid=p1234, no queue runs, listening for SMTP on port PORT_D +try option spf_smtp_comment_template daemon running with uid=EXIM_UID gid=EXIM_GID euid=EXIM_UID egid=EXIM_GID Listening... Connection request from 127.0.0.1 port sssss +try option smtp_accept_max_per_host search_tidyup called +p1235 try option smtp_active_hostname p1235 Process p1235 is handling incoming connection from [127.0.0.1] +p1235 try option message_size_limit +p1235 try option acl_smtp_connect +p1235 try option smtp_banner p1235 ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full p1235 ├──────value: myhost.test.ex p1235 ├considering: ESMTP Exim $version_number $tod_full @@ -40,9 +50,13 @@ p1235 ├──────value: Tue, 2 Mar 1999 09:44:33 +0000 p1235 ├──expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full p1235 ╰─────result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 p1235 Process p1235 is ready for new message +p1235 try option acl_smtp_helo +p1235 try option acl_smtp_mail +p1235 try option acl_smtp_rcpt p1235 compiled caseless RE '^nomatch_list' not found in local cache p1235 compiled RE '^nomatch_list' saved in local cache p1235 sending RE '^nomatch_list' to daemon +p1235 try option notifier_socket p1235 ╭considering: $spool_directory/exim_daemon_notify p1235 ├──────value: TESTSUITE/spool p1235 ├considering: /exim_daemon_notify @@ -64,6 +78,7 @@ p1235 compiled RE 'static_RE' not found in local cache p1235 compiling RE 'static_RE' p1235 compiled RE 'static_RE' saved in local cache p1235 sending RE 'static_RE' to daemon +p1235 try option notifier_socket p1235 ╭considering: $spool_directory/exim_daemon_notify p1235 ├──────value: TESTSUITE/spool p1235 ├considering: /exim_daemon_notify @@ -91,6 +106,7 @@ p1235 compiled RE 'tricky_static_RE$' not found in local cache p1235 compiling RE 'tricky_static_RE$' p1235 compiled RE 'tricky_static_RE$' saved in local cache p1235 sending RE 'tricky_static_RE$' to daemon +p1235 try option notifier_socket p1235 ╭considering: $spool_directory/exim_daemon_notify p1235 ├──────value: TESTSUITE/spool p1235 ├considering: /exim_daemon_notify @@ -120,11 +136,13 @@ p1235 ├──condition: match {a_random_string} {pid=${pid} uncacheable_RE} p1235 ├─────result: false p1235 ├──expanding: ${if match {a_random_string} {pid=${pid} uncacheable_RE}} p1235 ╰─────result: +p1235 try option acl_smtp_predata p1235 search_tidyup called p1235 search_tidyup called p1235 ╭considering: ${tod_full} p1235 ├──expanding: ${tod_full} p1235 ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 +p1235 try option received_header_text p1235 ╭considering: Received: ${if def:sender_rcvhost {from $sender_rcvhost p1235 }{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) p1235 }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol }}${if def:tls_in_ver { ($tls_in_ver)}}${if def:tls_in_cipher_std { tls $tls_in_cipher_std @@ -472,6 +490,9 @@ p1235 (envelope-from ) p1235 id 10HmaX-000000005vi-0000 p1235 for dest_1@test.ex p1235 ╰──(tainted) +p1235 try option acl_smtp_dkim +p1235 try option acl_smtp_mime +p1235 try option acl_smtp_data p1235 ╭considering: ${tod_full} p1235 ├──expanding: ${tod_full} p1235 ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 @@ -479,6 +500,7 @@ LOG: MAIN <= CALLER@test.ex H=(test.ex) [127.0.0.1] Ci=p1235 P=smtp S=sss search_tidyup called Process p1235 is ready for new message +try option acl_smtp_quit LOG: smtp_connection MAIN SMTP connection Ci=p1235 from (test.ex) [127.0.0.1] D=qqs closed by QUIT p1234 1 SMTP accept process running @@ -505,8 +527,13 @@ p1234 normal exit, 0 p1234 0 SMTP accept processes now running p1234 Listening... p1234 Connection request from 127.0.0.1 port sssss +p1234 try option smtp_accept_max_per_host p1234 search_tidyup called +p1236 try option smtp_active_hostname p1236 Process p1236 is handling incoming connection from [127.0.0.1] +p1236 try option message_size_limit +p1236 try option acl_smtp_connect +p1236 try option smtp_banner p1236 ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full p1236 ├──────value: myhost.test.ex p1236 ├considering: ESMTP Exim $version_number $tod_full @@ -520,6 +547,9 @@ p1236 ├──────value: Tue, 2 Mar 1999 09:44:33 +0000 p1236 ├──expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full p1236 ╰─────result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 p1236 Process p1236 is ready for new message +p1236 try option acl_smtp_helo +p1236 try option acl_smtp_mail +p1236 try option acl_smtp_rcpt p1236 compiled caseless RE '^nomatch_list' found in local cache p1236 ╭considering: ${if match {a_random_string} {static_RE}} p1236 ╭considering: a_random_string} {static_RE}} @@ -574,11 +604,13 @@ p1236 ├──condition: match {a_random_string} {pid=${pid} uncacheable_RE} p1236 ├─────result: false p1236 ├──expanding: ${if match {a_random_string} {pid=${pid} uncacheable_RE}} p1236 ╰─────result: +p1236 try option acl_smtp_predata p1236 search_tidyup called p1236 search_tidyup called p1236 ╭considering: ${tod_full} p1236 ├──expanding: ${tod_full} p1236 ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 +p1236 try option received_header_text p1236 ╭considering: Received: ${if def:sender_rcvhost {from $sender_rcvhost p1236 }{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) p1236 }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol }}${if def:tls_in_ver { ($tls_in_ver)}}${if def:tls_in_cipher_std { tls $tls_in_cipher_std @@ -926,6 +958,9 @@ p1236 (envelope-from ) p1236 id 10HmaY-000000005vi-0000 p1236 for dest_2@test.ex p1236 ╰──(tainted) +p1236 try option acl_smtp_dkim +p1236 try option acl_smtp_mime +p1236 try option acl_smtp_data p1236 ╭considering: ${tod_full} p1236 ├──expanding: ${tod_full} p1236 ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 @@ -933,6 +968,7 @@ LOG: MAIN <= CALLER@test.ex H=(test.ex) [127.0.0.1] Ci=p1236 P=smtp S=sss search_tidyup called Process p1236 is ready for new message +try option acl_smtp_quit LOG: smtp_connection MAIN SMTP connection Ci=p1236 from (test.ex) [127.0.0.1] D=qqs closed by QUIT p1234 1 SMTP accept process running diff --git a/test/stderr/3000 b/test/stderr/3000 index 69915e2d1..6f8b2689d 100644 --- a/test/stderr/3000 +++ b/test/stderr/3000 @@ -6,6 +6,9 @@ adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user dropping to exim gid; retaining priv uid +try option gecos_pattern +try option gecos_name +try option unknown_login ╭considering: ${perl{foo}{arg1}} ╭considering: foo}{arg1}} ├───────text: foo diff --git a/test/stderr/5410 b/test/stderr/5410 index 24abaeafa..5d94a6b18 100644 --- a/test/stderr/5410 +++ b/test/stderr/5410 @@ -4,9 +4,16 @@ environment after trimming: adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user +try option gecos_pattern +try option gecos_name +try option unknown_login +try option smtp_active_hostname in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER +try option message_size_limit +try option acl_smtp_connect +try option smtp_banner ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full ├──────value: myhost.test.ex ├considering: ESMTP Exim $version_number $tod_full @@ -21,7 +28,12 @@ LOG: smtp_connection MAIN ╰─────result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 list element: * in limits_advertise_hosts? yes (matched "*") +try option spf_smtp_comment_template +try option acl_smtp_helo in dsn_advertise_hosts? no (option unset) +try option acl_smtp_etrn +try option acl_smtp_vrfy +try option acl_smtp_expn in pipelining_advertise_hosts? list element: * in pipelining_advertise_hosts? yes (matched "*") @@ -29,6 +41,8 @@ LOG: smtp_connection MAIN in chunking_advertise_hosts? no (end of list) list element: * in tls_advertise_hosts? yes (matched "*") +try option acl_smtp_mail +try option acl_smtp_rcpt ╭considering: ${if eq {SERVER}{server}{queue}{cutthrough}} ╭considering: SERVER}{server}{queue}{cutthrough}} ├───────text: SERVER @@ -77,6 +91,7 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") +try option unseen ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" end of ACL "cutthrough": ACCEPT @@ -99,9 +114,13 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") -Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... 127.0.0.1 in hosts_try_fastopen? +try option unseen +try option interface +Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... try option dscp +127.0.0.1 in hosts_try_fastopen? list element: connected +try option helo_data ╭considering: $primary_hostname ├──────value: myhost.test.ex ├──expanding: $primary_hostname @@ -117,6 +136,7 @@ cmd buf flush ddd bytes 250-PIPELINING 250-STARTTLS 250 HELP +try option host_name_extract ╭considering: ${if and {{match{$host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ╭considering: $host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ├──────value: 127.0.0.1 @@ -236,6 +256,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) +try option authenticated_sender SMTP|> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes @@ -245,14 +266,18 @@ sync_responses expect rcpt for userx@domain.com SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ +try option acl_smtp_predata processing "accept" (TESTSUITE/test-config 57) accept: condition test succeeded in inline ACL end of inline ACL: ACCEPT SMTP>> DATA SMTP<< 354 Enter message, ending with "." on a line by itself +try option message_id_header_domain +try option message_id_header_text ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 +try option received_header_text ╭considering: Received: ${if def:sender_rcvhost {from $sender_rcvhost }{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol }}${if def:tls_in_ver { ($tls_in_ver)}}${if def:tls_in_cipher_std { tls $tls_in_cipher_std @@ -602,6 +627,9 @@ end of inline ACL: ACCEPT ╰──(tainted) ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ +try option acl_smtp_dkim +try option acl_smtp_mime +try option acl_smtp_data ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 @@ -618,6 +646,7 @@ LOG: MAIN <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss LOG: MAIN Completed +try option acl_smtp_quit LOG: smtp_connection MAIN SMTP connection from CALLER D=qqs closed by QUIT >>>>>>>>>>>>>>>> Exim pid=p1235 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> @@ -627,9 +656,16 @@ environment after trimming: adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user +try option gecos_pattern +try option gecos_name +try option unknown_login +try option smtp_active_hostname in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER +try option message_size_limit +try option acl_smtp_connect +try option smtp_banner ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full ├──────value: myhost.test.ex ├considering: ESMTP Exim $version_number $tod_full @@ -644,7 +680,12 @@ LOG: smtp_connection MAIN ╰─────result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 list element: * in limits_advertise_hosts? yes (matched "*") +try option spf_smtp_comment_template +try option acl_smtp_helo in dsn_advertise_hosts? no (option unset) +try option acl_smtp_etrn +try option acl_smtp_vrfy +try option acl_smtp_expn in pipelining_advertise_hosts? list element: * in pipelining_advertise_hosts? yes (matched "*") @@ -652,6 +693,8 @@ LOG: smtp_connection MAIN in chunking_advertise_hosts? no (end of list) list element: * in tls_advertise_hosts? yes (matched "*") +try option acl_smtp_mail +try option acl_smtp_rcpt ╭considering: ${if eq {SERVER}{server}{queue}{cutthrough}} ╭considering: SERVER}{server}{queue}{cutthrough}} ├───────text: SERVER @@ -700,6 +743,7 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") +try option unseen ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" end of ACL "cutthrough": ACCEPT @@ -722,9 +766,13 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") -Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... 127.0.0.1 in hosts_try_fastopen? +try option unseen +try option interface +Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... try option dscp +127.0.0.1 in hosts_try_fastopen? list element: connected +try option helo_data ╭considering: $primary_hostname ├──────value: myhost.test.ex ├──expanding: $primary_hostname @@ -740,6 +788,7 @@ cmd buf flush ddd bytes 250-PIPELINING 250-STARTTLS 250 HELP +try option host_name_extract ╭considering: ${if and {{match{$host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ╭considering: $host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ├──────value: 127.0.0.1 @@ -809,6 +858,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) +try option authenticated_sender SMTP|> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes @@ -818,14 +868,18 @@ sync_responses expect rcpt for usery@domain.com SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ +try option acl_smtp_predata processing "accept" (TESTSUITE/test-config 57) accept: condition test succeeded in inline ACL end of inline ACL: ACCEPT SMTP>> DATA SMTP<< 354 Enter message, ending with "." on a line by itself +try option message_id_header_domain +try option message_id_header_text ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 +try option received_header_text ╭considering: Received: ${if def:sender_rcvhost {from $sender_rcvhost }{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol }}${if def:tls_in_ver { ($tls_in_ver)}}${if def:tls_in_cipher_std { tls $tls_in_cipher_std @@ -1175,6 +1229,9 @@ end of inline ACL: ACCEPT ╰──(tainted) ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ +try option acl_smtp_dkim +try option acl_smtp_mime +try option acl_smtp_data ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 @@ -1191,6 +1248,7 @@ LOG: MAIN <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss LOG: MAIN Completed +try option acl_smtp_quit LOG: smtp_connection MAIN SMTP connection from CALLER D=qqs closed by QUIT >>>>>>>>>>>>>>>> Exim pid=p1236 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> @@ -1200,9 +1258,16 @@ environment after trimming: adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user +try option gecos_pattern +try option gecos_name +try option unknown_login +try option smtp_active_hostname in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER +try option message_size_limit +try option acl_smtp_connect +try option smtp_banner ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full ├──────value: myhost.test.ex ├considering: ESMTP Exim $version_number $tod_full @@ -1217,7 +1282,12 @@ LOG: smtp_connection MAIN ╰─────result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 list element: * in limits_advertise_hosts? yes (matched "*") +try option spf_smtp_comment_template +try option acl_smtp_helo in dsn_advertise_hosts? no (option unset) +try option acl_smtp_etrn +try option acl_smtp_vrfy +try option acl_smtp_expn in pipelining_advertise_hosts? list element: * in pipelining_advertise_hosts? yes (matched "*") @@ -1225,6 +1295,8 @@ LOG: smtp_connection MAIN in chunking_advertise_hosts? no (end of list) list element: * in tls_advertise_hosts? yes (matched "*") +try option acl_smtp_mail +try option acl_smtp_rcpt ╭considering: ${if eq {SERVER}{server}{queue}{cutthrough}} ╭considering: SERVER}{server}{queue}{cutthrough}} ├───────text: SERVER @@ -1273,6 +1345,7 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") +try option unseen ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" end of ACL "cutthrough": ACCEPT @@ -1295,9 +1368,13 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") -Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... 127.0.0.1 in hosts_try_fastopen? +try option unseen +try option interface +Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... try option dscp +127.0.0.1 in hosts_try_fastopen? list element: connected +try option helo_data ╭considering: $primary_hostname ├──────value: myhost.test.ex ├──expanding: $primary_hostname @@ -1313,6 +1390,7 @@ cmd buf flush ddd bytes 250-PIPELINING 250-STARTTLS 250 HELP +try option host_name_extract ╭considering: ${if and {{match{$host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ╭considering: $host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ├──────value: 127.0.0.1 @@ -1382,6 +1460,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) +try option authenticated_sender SMTP|> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes @@ -1391,14 +1470,18 @@ sync_responses expect rcpt for usery@domain.com SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ +try option acl_smtp_predata processing "accept" (TESTSUITE/test-config 57) accept: condition test succeeded in inline ACL end of inline ACL: ACCEPT SMTP>> DATA SMTP<< 354 Enter message, ending with "." on a line by itself +try option message_id_header_domain +try option message_id_header_text ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 +try option received_header_text ╭considering: Received: ${if def:sender_rcvhost {from $sender_rcvhost }{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol }}${if def:tls_in_ver { ($tls_in_ver)}}${if def:tls_in_cipher_std { tls $tls_in_cipher_std @@ -1748,6 +1831,9 @@ end of inline ACL: ACCEPT ╰──(tainted) ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ +try option acl_smtp_dkim +try option acl_smtp_mime +try option acl_smtp_data ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 @@ -1764,6 +1850,7 @@ LOG: MAIN <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss LOG: MAIN Completed +try option acl_smtp_quit LOG: smtp_connection MAIN SMTP connection from CALLER D=qqs closed by QUIT >>>>>>>>>>>>>>>> Exim pid=p1237 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/5420 b/test/stderr/5420 index ac3c16c81..3e535861c 100644 --- a/test/stderr/5420 +++ b/test/stderr/5420 @@ -4,9 +4,16 @@ environment after trimming: adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user +try option gecos_pattern +try option gecos_name +try option unknown_login +try option smtp_active_hostname in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER +try option message_size_limit +try option acl_smtp_connect +try option smtp_banner ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full ├──────value: myhost.test.ex ├considering: ESMTP Exim $version_number $tod_full @@ -21,7 +28,12 @@ LOG: smtp_connection MAIN ╰─────result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 list element: * in limits_advertise_hosts? yes (matched "*") +try option spf_smtp_comment_template +try option acl_smtp_helo in dsn_advertise_hosts? no (option unset) +try option acl_smtp_etrn +try option acl_smtp_vrfy +try option acl_smtp_expn in pipelining_advertise_hosts? list element: * in pipelining_advertise_hosts? yes (matched "*") @@ -29,6 +41,8 @@ LOG: smtp_connection MAIN in chunking_advertise_hosts? no (end of list) list element: * in tls_advertise_hosts? yes (matched "*") +try option acl_smtp_mail +try option acl_smtp_rcpt ╭considering: ${if eq {SERVER}{server}{queue}{cutthrough}} ╭considering: SERVER}{server}{queue}{cutthrough}} ├───────text: SERVER @@ -68,6 +82,9 @@ domain.com in "! +local_domains"? domain.com in "test.ex : *.test.ex"? no (end of list) end sublist local_domains domain.com in "! +local_domains"? yes (end of list) +try option router_home_directory +try option set +processing address_data ╭considering: $local_part ├──────value: userx ╰──(tainted) @@ -77,6 +94,9 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") +try option transport +try option unseen +try option unseen ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" end of ACL "cutthrough": ACCEPT @@ -90,6 +110,9 @@ domain.com in "! +local_domains"? domain.com in "test.ex : *.test.ex"? no (end of list) end sublist local_domains domain.com in "! +local_domains"? yes (end of list) +try option router_home_directory +try option set +processing address_data ╭considering: $local_part ├──────value: userx ╰──(tainted) @@ -99,9 +122,15 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") -Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... 127.0.0.1 in hosts_try_fastopen? +try option transport +try option unseen +try option unseen +try option interface +Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... try option dscp +127.0.0.1 in hosts_try_fastopen? list element: connected +try option helo_data ╭considering: $primary_hostname ├──────value: myhost.test.ex ├──expanding: $primary_hostname @@ -117,6 +146,7 @@ cmd buf flush ddd bytes 250-PIPELINING 250-STARTTLS 250 HELP +try option host_name_extract ╭considering: ${if and {{match{$host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ╭considering: $host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ├──────value: 127.0.0.1 @@ -236,6 +266,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) +try option authenticated_sender SMTP|> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes @@ -245,14 +276,18 @@ sync_responses expect rcpt for userx@domain.com SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ +try option acl_smtp_predata processing "accept" (TESTSUITE/test-config 55) accept: condition test succeeded in inline ACL end of inline ACL: ACCEPT SMTP>> DATA SMTP<< 354 Enter message, ending with "." on a line by itself +try option message_id_header_domain +try option message_id_header_text ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 +try option received_header_text ╭considering: Received: ${if def:sender_rcvhost {from $sender_rcvhost }{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol }}${if def:tls_in_ver { ($tls_in_ver)}}${if def:tls_in_cipher_std { tls $tls_in_cipher_std @@ -602,6 +637,9 @@ end of inline ACL: ACCEPT ╰──(tainted) ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ +try option acl_smtp_dkim +try option acl_smtp_mime +try option acl_smtp_data ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 @@ -618,6 +656,7 @@ LOG: MAIN <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss LOG: MAIN Completed +try option acl_smtp_quit LOG: smtp_connection MAIN SMTP connection from CALLER D=qqs closed by QUIT >>>>>>>>>>>>>>>> Exim pid=p1235 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> @@ -627,9 +666,16 @@ environment after trimming: adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user +try option gecos_pattern +try option gecos_name +try option unknown_login +try option smtp_active_hostname in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER +try option message_size_limit +try option acl_smtp_connect +try option smtp_banner ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full ├──────value: myhost.test.ex ├considering: ESMTP Exim $version_number $tod_full @@ -644,7 +690,12 @@ LOG: smtp_connection MAIN ╰─────result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 list element: * in limits_advertise_hosts? yes (matched "*") +try option spf_smtp_comment_template +try option acl_smtp_helo in dsn_advertise_hosts? no (option unset) +try option acl_smtp_etrn +try option acl_smtp_vrfy +try option acl_smtp_expn in pipelining_advertise_hosts? list element: * in pipelining_advertise_hosts? yes (matched "*") @@ -652,6 +703,8 @@ LOG: smtp_connection MAIN in chunking_advertise_hosts? no (end of list) list element: * in tls_advertise_hosts? yes (matched "*") +try option acl_smtp_mail +try option acl_smtp_rcpt ╭considering: ${if eq {SERVER}{server}{queue}{cutthrough}} ╭considering: SERVER}{server}{queue}{cutthrough}} ├───────text: SERVER @@ -691,6 +744,9 @@ domain.com in "! +local_domains"? domain.com in "test.ex : *.test.ex"? no (end of list) end sublist local_domains domain.com in "! +local_domains"? yes (end of list) +try option router_home_directory +try option set +processing address_data ╭considering: $local_part ├──────value: usery ╰──(tainted) @@ -700,6 +756,9 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") +try option transport +try option unseen +try option unseen ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" end of ACL "cutthrough": ACCEPT @@ -713,6 +772,9 @@ domain.com in "! +local_domains"? domain.com in "test.ex : *.test.ex"? no (end of list) end sublist local_domains domain.com in "! +local_domains"? yes (end of list) +try option router_home_directory +try option set +processing address_data ╭considering: $local_part ├──────value: usery ╰──(tainted) @@ -722,9 +784,15 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") -Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... 127.0.0.1 in hosts_try_fastopen? +try option transport +try option unseen +try option unseen +try option interface +Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... try option dscp +127.0.0.1 in hosts_try_fastopen? list element: connected +try option helo_data ╭considering: $primary_hostname ├──────value: myhost.test.ex ├──expanding: $primary_hostname @@ -740,6 +808,7 @@ cmd buf flush ddd bytes 250-PIPELINING 250-STARTTLS 250 HELP +try option host_name_extract ╭considering: ${if and {{match{$host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ╭considering: $host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ├──────value: 127.0.0.1 @@ -809,6 +878,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) +try option authenticated_sender SMTP|> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes @@ -818,14 +888,18 @@ sync_responses expect rcpt for usery@domain.com SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ +try option acl_smtp_predata processing "accept" (TESTSUITE/test-config 55) accept: condition test succeeded in inline ACL end of inline ACL: ACCEPT SMTP>> DATA SMTP<< 354 Enter message, ending with "." on a line by itself +try option message_id_header_domain +try option message_id_header_text ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 +try option received_header_text ╭considering: Received: ${if def:sender_rcvhost {from $sender_rcvhost }{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol }}${if def:tls_in_ver { ($tls_in_ver)}}${if def:tls_in_cipher_std { tls $tls_in_cipher_std @@ -1175,6 +1249,9 @@ end of inline ACL: ACCEPT ╰──(tainted) ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ +try option acl_smtp_dkim +try option acl_smtp_mime +try option acl_smtp_data ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 @@ -1191,6 +1268,7 @@ LOG: MAIN <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss LOG: MAIN Completed +try option acl_smtp_quit LOG: smtp_connection MAIN SMTP connection from CALLER D=qqs closed by QUIT >>>>>>>>>>>>>>>> Exim pid=p1236 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> @@ -1200,9 +1278,16 @@ environment after trimming: adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys configuration file is TESTSUITE/test-config admin user +try option gecos_pattern +try option gecos_name +try option unknown_login +try option smtp_active_hostname in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER +try option message_size_limit +try option acl_smtp_connect +try option smtp_banner ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full ├──────value: myhost.test.ex ├considering: ESMTP Exim $version_number $tod_full @@ -1217,7 +1302,12 @@ LOG: smtp_connection MAIN ╰─────result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 list element: * in limits_advertise_hosts? yes (matched "*") +try option spf_smtp_comment_template +try option acl_smtp_helo in dsn_advertise_hosts? no (option unset) +try option acl_smtp_etrn +try option acl_smtp_vrfy +try option acl_smtp_expn in pipelining_advertise_hosts? list element: * in pipelining_advertise_hosts? yes (matched "*") @@ -1225,6 +1315,8 @@ LOG: smtp_connection MAIN in chunking_advertise_hosts? no (end of list) list element: * in tls_advertise_hosts? yes (matched "*") +try option acl_smtp_mail +try option acl_smtp_rcpt ╭considering: ${if eq {SERVER}{server}{queue}{cutthrough}} ╭considering: SERVER}{server}{queue}{cutthrough}} ├───────text: SERVER @@ -1264,6 +1356,9 @@ domain.com in "! +local_domains"? domain.com in "test.ex : *.test.ex"? no (end of list) end sublist local_domains domain.com in "! +local_domains"? yes (end of list) +try option router_home_directory +try option set +processing address_data ╭considering: $local_part ├──────value: usery ╰──(tainted) @@ -1273,6 +1368,9 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") +try option transport +try option unseen +try option unseen ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" end of ACL "cutthrough": ACCEPT @@ -1286,6 +1384,9 @@ domain.com in "! +local_domains"? domain.com in "test.ex : *.test.ex"? no (end of list) end sublist local_domains domain.com in "! +local_domains"? yes (end of list) +try option router_home_directory +try option set +processing address_data ╭considering: $local_part ├──────value: usery ╰──(tainted) @@ -1295,9 +1396,15 @@ domain.com in "! +local_domains"? yes (end of list) domain.com in "*"? list element: * domain.com in "*"? yes (matched "*") -Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... 127.0.0.1 in hosts_try_fastopen? +try option transport +try option unseen +try option unseen +try option interface +Connecting to 127.0.0.1 [127.0.0.1]:PORT_D from ip4.ip4.ip4.ip4 ... try option dscp +127.0.0.1 in hosts_try_fastopen? list element: connected +try option helo_data ╭considering: $primary_hostname ├──────value: myhost.test.ex ├──expanding: $primary_hostname @@ -1313,6 +1420,7 @@ cmd buf flush ddd bytes 250-PIPELINING 250-STARTTLS 250 HELP +try option host_name_extract ╭considering: ${if and {{match{$host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ╭considering: $host}{.outlook.com\$}} {match{$item}{\N^250-([\w.]+)\s\N}}} {$1}} ├──────value: 127.0.0.1 @@ -1382,6 +1490,7 @@ cmd buf flush ddd bytes using PIPELINING not using DSN 127.0.0.1 in hosts_require_auth? no (option unset) +try option authenticated_sender SMTP|> MAIL FROM: SMTP>> RCPT TO: cmd buf flush ddd bytes @@ -1391,14 +1500,18 @@ sync_responses expect rcpt for usery@domain.com SMTP<< 250 Accepted holding verify callout open for cutthrough delivery ----------- end cutthrough setup ------------ +try option acl_smtp_predata processing "accept" (TESTSUITE/test-config 55) accept: condition test succeeded in inline ACL end of inline ACL: ACCEPT SMTP>> DATA SMTP<< 354 Enter message, ending with "." on a line by itself +try option message_id_header_domain +try option message_id_header_text ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 +try option received_header_text ╭considering: Received: ${if def:sender_rcvhost {from $sender_rcvhost }{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol }}${if def:tls_in_ver { ($tls_in_ver)}}${if def:tls_in_cipher_std { tls $tls_in_cipher_std @@ -1748,6 +1861,9 @@ end of inline ACL: ACCEPT ╰──(tainted) ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ +try option acl_smtp_dkim +try option acl_smtp_mime +try option acl_smtp_data ╭considering: ${tod_full} ├──expanding: ${tod_full} ╰─────result: Tue, 2 Mar 1999 09:44:33 +0000 @@ -1764,6 +1880,7 @@ LOG: MAIN <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss LOG: MAIN Completed +try option acl_smtp_quit LOG: smtp_connection MAIN SMTP connection from CALLER D=qqs closed by QUIT >>>>>>>>>>>>>>>> Exim pid=p1237 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> -- 2.30.2