From e47376befc6e4a415319e3c29fad9b0ba2bbd8ee Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Wed, 13 Apr 2016 16:36:44 +0100 Subject: [PATCH] Expansions: better error messages for parse errors, and better debug --- src/src/expand.c | 282 ++++++++++++++++++------ test/stderr/0002 | 233 ++++++++++++-------- test/stderr/0092 | 32 +-- test/stderr/0402 | 196 ++++++++++++----- test/stderr/0544 | 198 ++++++++++++----- test/stderr/3000 | 51 +++-- test/stderr/5410 | 561 +++++++++++++++++++++++++++++++++-------------- test/stderr/5420 | 561 +++++++++++++++++++++++++++++++++-------------- test/stdout/0002 | 19 +- test/stdout/3000 | 4 +- 10 files changed, 1494 insertions(+), 643 deletions(-) diff --git a/src/src/expand.c b/src/src/expand.c index c8d1ffc7d..5189cdcfe 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -1991,12 +1991,17 @@ for (i = 0; i < n; i++) { if (*s != '{') { - if (i < m) return 1; + if (i < m) + { + expand_string_message = string_sprintf("Not enough arguments for '%s' " + "(min is %d)", name, m); + return 1; + } sub[i] = NULL; break; } - sub[i] = expand_string_internal(s+1, TRUE, &s, skipping, TRUE, resetok); - if (sub[i] == NULL) return 3; + if (!(sub[i] = expand_string_internal(s+1, TRUE, &s, skipping, TRUE, resetok))) + return 3; if (*s++ != '}') return 1; while (isspace(*s)) s++; } @@ -2004,10 +2009,11 @@ if (check_end && *s++ != '}') { if (s[-1] == '{') { - expand_string_message = string_sprintf("Too many arguments for \"%s\" " + expand_string_message = string_sprintf("Too many arguments for '%s' " "(max is %d)", name, n); return 2; } + expand_string_message = string_sprintf("missing '}' after '%s'", name); return 1; } @@ -3165,6 +3171,7 @@ process_yesno(BOOL skipping, BOOL yes, uschar *save_lookup, const uschar **sptr, int rc = 0; const uschar *s = *sptr; /* Local value */ uschar *sub1, *sub2; +const uschar * errwhere; /* If there are no following strings, we substitute the contents of $value for lookups and for extractions in the success case. For the ${if item, the string @@ -3190,7 +3197,11 @@ if (*s == '}') /* The first following string must be braced. */ -if (*s++ != '{') goto FAILED_CURLY; +if (*s++ != '{') + { + errwhere = US"'yes' part did not start with '{'"; + goto FAILED_CURLY; + } /* Expand the first substring. Forced failures are noticed only if we actually want this string. Set skipping in the call in the fail case (this will always @@ -3199,7 +3210,11 @@ be the case if we were already skipping). */ sub1 = expand_string_internal(s, TRUE, &s, !yes, TRUE, resetok); if (sub1 == NULL && (yes || !expand_string_forcedfail)) goto FAILED; expand_string_forcedfail = FALSE; -if (*s++ != '}') goto FAILED_CURLY; +if (*s++ != '}') + { + errwhere = US"'yes' part did not end with '}'"; + goto FAILED_CURLY; + } /* If we want the first string, add it to the output */ @@ -3225,7 +3240,11 @@ if (*s == '{') sub2 = expand_string_internal(s+1, TRUE, &s, yes || skipping, TRUE, resetok); if (sub2 == NULL && (!yes || !expand_string_forcedfail)) goto FAILED; expand_string_forcedfail = FALSE; - if (*s++ != '}') goto FAILED_CURLY; + if (*s++ != '}') + { + errwhere = US"'no' part did not start with '{'"; + goto FAILED_CURLY; + } /* If we want the second string, add it to the output */ @@ -3248,7 +3267,11 @@ else if (*s != '}') if (!yes && !skipping) { while (isspace(*s)) s++; - if (*s++ != '}') goto FAILED_CURLY; + if (*s++ != '}') + { + errwhere = US"did not close with '}' after forcedfail"; + goto FAILED_CURLY; + } expand_string_message = string_sprintf("\"%s\" failed and \"fail\" requested", type); expand_string_forcedfail = TRUE; @@ -3266,23 +3289,30 @@ else if (*s != '}') /* All we have to do now is to check on the final closing brace. */ while (isspace(*s)) s++; -if (*s++ == '}') goto RETURN; - -/* Get here if there is a bracketing failure */ - -FAILED_CURLY: -rc++; - -/* Get here for other failures */ - -FAILED: -rc++; +if (*s++ != '}') + { + errwhere = US"did not close with '}'"; + goto FAILED_CURLY; + } -/* Update the input pointer value before returning */ RETURN: +/* Update the input pointer value before returning */ *sptr = s; return rc; + +FAILED_CURLY: + /* Get here if there is a bracketing failure */ + expand_string_message = string_sprintf( + "curly-bracket problem in conditional yes/no parsing: %s\n" + " remaining string is '%s'", errwhere, --s); + rc = 2; + goto RETURN; + +FAILED: + /* Get here for other failures */ + rc = 1; + goto RETURN; } @@ -3828,6 +3858,9 @@ uschar *save_expand_nstring[EXPAND_MAXN+1]; int save_expand_nlength[EXPAND_MAXN+1]; BOOL resetok = TRUE; +DEBUG(D_expand) + debug_printf("%s: %s\n", skipping ? " scanning" : "considering", string); + expand_string_forcedfail = FALSE; expand_string_message = US""; @@ -4171,8 +4204,12 @@ while (*s != 0) if (*s == '{') /*}*/ { key = expand_string_internal(s+1, TRUE, &s, skipping, TRUE, &resetok); - if (key == NULL) goto EXPAND_FAILED; /*{*/ - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (!key) goto EXPAND_FAILED; /*{{*/ + if (*s++ != '}') + { + expand_string_message = US"missing '}' after lookup key"; + goto EXPAND_FAILED_CURLY; + } while (isspace(*s)) s++; } else key = NULL; @@ -4235,10 +4272,18 @@ while (*s != 0) queries that also require a file name (e.g. sqlite), the file name comes first. */ - if (*s != '{') goto EXPAND_FAILED_CURLY; + if (*s != '{') + { + expand_string_message = US"missing '{' for lookup file-or-query arg"; + goto EXPAND_FAILED_CURLY; + } filename = expand_string_internal(s+1, TRUE, &s, skipping, TRUE, &resetok); if (filename == NULL) goto EXPAND_FAILED; - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '}' closing lookup file-or-query arg"; + goto EXPAND_FAILED_CURLY; + } while (isspace(*s)) s++; /* If this isn't a single-key+file lookup, re-arrange the variables @@ -4246,15 +4291,13 @@ while (*s != 0) there is just a "key", and no file name. For the special query-style + file types, the query (i.e. "key") starts with a file name. */ - if (key == NULL) + if (!key) { while (isspace(*filename)) filename++; key = filename; if (mac_islookup(stype, lookup_querystyle)) - { filename = NULL; - } else { if (*filename != '/') @@ -4841,10 +4884,20 @@ while (*s != 0) { if (expand_string_internal(s+1, TRUE, &s, TRUE, TRUE, &resetok) == NULL) goto EXPAND_FAILED; - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '}' closing failstring for readsocket"; + goto EXPAND_FAILED_CURLY; + } while (isspace(*s)) s++; } - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + + readsock_done: + if (*s++ != '}') + { + expand_string_message = US"missing '}' closing readsocket"; + goto EXPAND_FAILED_CURLY; + } continue; /* Come here on failure to create socket, connect socket, write to the @@ -4857,10 +4910,13 @@ while (*s != 0) if (!(arg = expand_string_internal(s+1, TRUE, &s, FALSE, TRUE, &resetok))) goto EXPAND_FAILED; yield = string_cat(yield, &size, &ptr, arg); - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '}' closing failstring for readsocket"; + goto EXPAND_FAILED_CURLY; + } while (isspace(*s)) s++; - if (*s++ != '}') goto EXPAND_FAILED_CURLY; - continue; + goto readsock_done; } /* Handle "run" to execute a program. */ @@ -4881,16 +4937,22 @@ while (*s != 0) } while (isspace(*s)) s++; - if (*s != '{') goto EXPAND_FAILED_CURLY; + if (*s != '{') + { + expand_string_message = US"missing '{' for command arg of run"; + goto EXPAND_FAILED_CURLY; + } arg = expand_string_internal(s+1, TRUE, &s, skipping, TRUE, &resetok); if (arg == NULL) goto EXPAND_FAILED; while (isspace(*s)) s++; - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '}' closing command arg of run"; + goto EXPAND_FAILED_CURLY; + } if (skipping) /* Just pretend it worked when we're skipping */ - { runrc = 0; - } else { if (!transport_set_up_command(&argv, /* anchor for arg list */ @@ -5316,11 +5378,18 @@ while (*s != 0) { if (!expand_string_internal(s+1, TRUE, &s, skipping, TRUE, &resetok)) goto EXPAND_FAILED; /*{*/ - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '{' for arg of extract"; + goto EXPAND_FAILED_CURLY; + } while (isspace(*s)) s++; } if (*s != '}') + { + expand_string_message = US"missing '}' closing extract"; goto EXPAND_FAILED_CURLY; + } } else for (i = 0; i < j; i++) /* Read the proper number of arguments */ @@ -5330,7 +5399,12 @@ while (*s != 0) { sub[i] = expand_string_internal(s+1, TRUE, &s, skipping, TRUE, &resetok); if (sub[i] == NULL) goto EXPAND_FAILED; /*{*/ - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = string_sprintf( + US"missing '}' closing arg %d of extract", i+1); + goto EXPAND_FAILED_CURLY; + } /* After removal of leading and trailing white space, the first argument must not be empty; if it consists entirely of digits @@ -5371,7 +5445,12 @@ while (*s != 0) } } } - else goto EXPAND_FAILED_CURLY; + else + { + expand_string_message = string_sprintf( + US"missing '{' for arg %d of extract", i+1); + goto EXPAND_FAILED_CURLY; + } } /* Extract either the numbered or the keyed substring into $value. If @@ -5424,11 +5503,20 @@ while (*s != 0) { while (isspace(*s)) s++; if (*s != '{') /*}*/ + { + expand_string_message = string_sprintf( + US"missing '{' for arg %d of listextract", i+1); goto EXPAND_FAILED_CURLY; + } sub[i] = expand_string_internal(s+1, TRUE, &s, skipping, TRUE, &resetok); if (!sub[i]) goto EXPAND_FAILED; /*{*/ - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = string_sprintf( + US"missing '}' closing arg %d of listextract", i+1); + goto EXPAND_FAILED_CURLY; + } /* After removal of leading and trailing white space, the first argument must be numeric and nonempty. */ @@ -5511,10 +5599,17 @@ while (*s != 0) /* Read the field argument */ while (isspace(*s)) s++; if (*s != '{') /*}*/ + { + expand_string_message = US"missing '{' for field arg of certextract"; goto EXPAND_FAILED_CURLY; + } sub[0] = expand_string_internal(s+1, TRUE, &s, skipping, TRUE, &resetok); if (!sub[0]) goto EXPAND_FAILED; /*{*/ - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '}' closing field arg of certextract"; + goto EXPAND_FAILED_CURLY; + } /* strip spaces fore & aft */ { int len; @@ -5531,7 +5626,10 @@ while (*s != 0) /* inspect the cert argument */ while (isspace(*s)) s++; if (*s != '{') /*}*/ + { + expand_string_message = US"missing '{' for cert variable arg of certextract"; goto EXPAND_FAILED_CURLY; + } if (*++s != '$') { expand_string_message = US"second argument of \"certextract\" must " @@ -5540,7 +5638,11 @@ while (*s != 0) } sub[1] = expand_string_internal(s+1, TRUE, &s, skipping, FALSE, &resetok); if (!sub[1]) goto EXPAND_FAILED; /*{*/ - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '}' closing cert variable arg of certextract"; + goto EXPAND_FAILED_CURLY; + } if (skipping) lookup_value = NULL; @@ -5584,25 +5686,48 @@ while (*s != 0) uschar *save_lookup_value = lookup_value; while (isspace(*s)) s++; - if (*s++ != '{') goto EXPAND_FAILED_CURLY; + if (*s++ != '{') + { + expand_string_message = + string_sprintf("missing '{' for first arg of %s", name); + goto EXPAND_FAILED_CURLY; + } list = expand_string_internal(s, TRUE, &s, skipping, TRUE, &resetok); if (list == NULL) goto EXPAND_FAILED; - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = + string_sprintf("missing '}' closing first arg of %s", name); + goto EXPAND_FAILED_CURLY; + } if (item_type == EITEM_REDUCE) { uschar * t; while (isspace(*s)) s++; - if (*s++ != '{') goto EXPAND_FAILED_CURLY; + if (*s++ != '{') + { + expand_string_message = US"missing '{' for second arg of reduce"; + goto EXPAND_FAILED_CURLY; + } t = expand_string_internal(s, TRUE, &s, skipping, TRUE, &resetok); if (!t) goto EXPAND_FAILED; lookup_value = t; - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '}' closing second arg of reduce"; + goto EXPAND_FAILED_CURLY; + } } while (isspace(*s)) s++; - if (*s++ != '{') goto EXPAND_FAILED_CURLY; + if (*s++ != '{') + { + expand_string_message = + string_sprintf("missing '{' for last arg of %s", name); + goto EXPAND_FAILED_CURLY; + } expr = s; @@ -5757,28 +5882,52 @@ while (*s != 0) uschar *save_iterate_item = iterate_item; while (isspace(*s)) s++; - if (*s++ != '{') goto EXPAND_FAILED_CURLY; + if (*s++ != '{') + { + expand_string_message = US"missing '{' for list arg of sort"; + goto EXPAND_FAILED_CURLY; + } srclist = expand_string_internal(s, TRUE, &s, skipping, TRUE, &resetok); if (!srclist) goto EXPAND_FAILED; - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '}' closing list arg of sort"; + goto EXPAND_FAILED_CURLY; + } while (isspace(*s)) s++; - if (*s++ != '{') goto EXPAND_FAILED_CURLY; + if (*s++ != '{') + { + expand_string_message = US"missing '{' for comparator arg of sort"; + goto EXPAND_FAILED_CURLY; + } cmp = expand_string_internal(s, TRUE, &s, skipping, FALSE, &resetok); if (!cmp) goto EXPAND_FAILED; - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '}' closing comparator arg of sort"; + goto EXPAND_FAILED_CURLY; + } while (isspace(*s)) s++; - if (*s++ != '{') goto EXPAND_FAILED_CURLY; + if (*s++ != '{') + { + expand_string_message = US"missing '{' for extractor arg of sort"; + goto EXPAND_FAILED_CURLY; + } xtract = s; tmp = expand_string_internal(s, TRUE, &s, TRUE, TRUE, &resetok); if (!tmp) goto EXPAND_FAILED; xtract = string_copyn(xtract, s - xtract); - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '}' closing extractor arg of sort"; + goto EXPAND_FAILED_CURLY; + } /*{*/ if (*s++ != '}') { /*{*/ @@ -5998,7 +6147,11 @@ while (*s != 0) key = expand_string_internal(s+1, TRUE, &s, skipping, TRUE, &resetok); if (!key) goto EXPAND_FAILED; /*{*/ - if (*s++ != '}') goto EXPAND_FAILED_CURLY; + if (*s++ != '}') + { + expand_string_message = US"missing '{' for name arg of env"; + goto EXPAND_FAILED_CURLY; + } lookup_value = US getenv(CS key); @@ -6062,7 +6215,12 @@ while (*s != 0) sub = expand_string_internal(s+2, TRUE, &s1, skipping, FALSE, &resetok); if (!sub) goto EXPAND_FAILED; /*{*/ - if (*s1 != '}') goto EXPAND_FAILED_CURLY; + if (*s1 != '}') + { + expand_string_message = + string_sprintf("missing '}' closing cert arg of %s", name); + goto EXPAND_FAILED_CURLY; + } if ((vp = find_var_ent(sub)) && vp->type == vtype_cert) { s = s1+1; @@ -7199,9 +7357,9 @@ else if (resetok_p) *resetok_p = FALSE; DEBUG(D_expand) { - debug_printf("expanding: %.*s\n result: %s\n", (int)(s - string), string, + debug_printf(" expanding: %.*s\n result: %s\n", (int)(s - string), string, yield); - if (skipping) debug_printf("skipping: result is not used\n"); + if (skipping) debug_printf(" skipping: result is not used\n"); } return yield; @@ -7210,10 +7368,12 @@ to update the pointer to the terminator, for cases of nested calls with "fail". */ EXPAND_FAILED_CURLY: -expand_string_message = malformed_header? - US"missing or misplaced { or } - could be header name not terminated by colon" - : - US"missing or misplaced { or }"; +if (malformed_header) + expand_string_message = + US"missing or misplaced { or } - could be header name not terminated by colon"; + +else if (!expand_string_message || !*expand_string_message) + expand_string_message = US"missing or misplaced { or }"; /* At one point, Exim reset the store to yield (if yield was not NULL), but that is a bad idea, because expand_string_message is in dynamic store. */ diff --git a/test/stderr/0002 b/test/stderr/0002 index b4f06a104..19ed3479a 100644 --- a/test/stderr/0002 +++ b/test/stderr/0002 @@ -1,120 +1,164 @@ Exim version x.yz .... configuration file is TESTSUITE/test-config admin user -expanding: primary_hostname: $primary_hostname - result: primary_hostname: myhost.test.ex -expanding: abcd - result: abcd -expanding: \N^([ab]+)(\w+)$\N - result: ^([ab]+)(\w+)$ +considering: primary_hostname: $primary_hostname + expanding: primary_hostname: $primary_hostname + result: primary_hostname: myhost.test.ex +considering: match: ${if match{abcd}{\N^([ab]+)(\w+)$\N}{$2$1}fail} +considering: abcd}{\N^([ab]+)(\w+)$\N}{$2$1}fail} + expanding: abcd + result: abcd +considering: \N^([ab]+)(\w+)$\N}{$2$1}fail} + expanding: \N^([ab]+)(\w+)$\N + result: ^([ab]+)(\w+)$ condition: match{abcd}{\N^([ab]+)(\w+)$\N} result: true -expanding: $2$1 - result: cdab -expanding: match: ${if match{abcd}{\N^([ab]+)(\w+)$\N}{$2$1}fail} - result: match: cdab -expanding: wxyz - result: wxyz -expanding: \N^([ab]+)(\w+)$\N - result: ^([ab]+)(\w+)$ +considering: $2$1}fail} + expanding: $2$1 + result: cdab + expanding: match: ${if match{abcd}{\N^([ab]+)(\w+)$\N}{$2$1}fail} + result: match: cdab +considering: match: ${if match{wxyz}{\N^([ab]+)(\w+)$\N}{$2$1}fail} +considering: wxyz}{\N^([ab]+)(\w+)$\N}{$2$1}fail} + expanding: wxyz + result: wxyz +considering: \N^([ab]+)(\w+)$\N}{$2$1}fail} + expanding: \N^([ab]+)(\w+)$\N + result: ^([ab]+)(\w+)$ condition: match{wxyz}{\N^([ab]+)(\w+)$\N} result: false -expanding: $2$1 - result: -skipping: result is not used + scanning: $2$1}fail} + expanding: $2$1 + result: + skipping: result is not used failed to expand: match: ${if match{wxyz}{\N^([ab]+)(\w+)$\N}{$2$1}fail} error message: "if" failed and "fail" requested failure was forced -expanding: 1 - result: 1 -expanding: 1 - result: 1 +considering: ${if eq {1}{1}{yes}{${lookup{xx}lsearch{/non/exist}}}} +considering: 1}{1}{yes}{${lookup{xx}lsearch{/non/exist}}}} + expanding: 1 + result: 1 +considering: 1}{yes}{${lookup{xx}lsearch{/non/exist}}}} + expanding: 1 + result: 1 condition: eq {1}{1} result: true -expanding: yes - result: yes -expanding: xx - result: xx -skipping: result is not used -expanding: /non/exist - result: /non/exist -skipping: result is not used -expanding: ${lookup{xx}lsearch{/non/exist}} - result: -skipping: result is not used -expanding: ${if eq {1}{1}{yes}{${lookup{xx}lsearch{/non/exist}}}} - result: yes -expanding: a.b.c - result: a.b.c -expanding: a.b.c - result: a.b.c +considering: yes}{${lookup{xx}lsearch{/non/exist}}}} + expanding: yes + result: yes + scanning: ${lookup{xx}lsearch{/non/exist}}}} + scanning: xx}lsearch{/non/exist}}}} + expanding: xx + result: xx + skipping: result is not used + scanning: /non/exist}}}} + expanding: /non/exist + result: /non/exist + skipping: result is not used + expanding: ${lookup{xx}lsearch{/non/exist}} + result: + skipping: result is not used + expanding: ${if eq {1}{1}{yes}{${lookup{xx}lsearch{/non/exist}}}} + result: yes +considering: match_address: ${if match_address{a.b.c}{a.b.c}{yes}{no}} +considering: a.b.c}{a.b.c}{yes}{no}} + expanding: a.b.c + result: a.b.c +considering: a.b.c}{yes}{no}} + expanding: a.b.c + result: a.b.c LOG: MAIN PANIC no @ found in the subject of an address list match: subject="a.b.c" pattern="a.b.c" condition: match_address{a.b.c}{a.b.c} result: false -expanding: yes - result: yes -skipping: result is not used -expanding: no - result: no -expanding: match_address: ${if match_address{a.b.c}{a.b.c}{yes}{no}} - result: match_address: no + scanning: yes}{no}} + expanding: yes + result: yes + skipping: result is not used +considering: no}} + expanding: no + result: no + expanding: match_address: ${if match_address{a.b.c}{a.b.c}{yes}{no}} + result: match_address: no >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> Exim version x.yz .... configuration file is TESTSUITE/test-config admin user -expanding: -oMa sender_host_address = $sender_host_address - result: -oMa sender_host_address = V4NET.0.0.1 -expanding: sender_host_port = $sender_host_port - result: sender_host_port = 1234 -expanding: -oMaa sender_host_authenticated = $sender_host_authenticated - result: -oMaa sender_host_authenticated = AAA -expanding: -oMai authenticated_id = $authenticated_id - result: -oMai authenticated_id = philip -expanding: -oMas authenticated_sender = $authenticated_sender - result: -oMas authenticated_sender = xx@yy.zz -expanding: -oMi interface_address = $interface_address - result: -oMi interface_address = 1.1.1.1 -expanding: interface_port = $interface_port - result: interface_port = 99 -expanding: -oMr received_protocol = $received_protocol - result: -oMr received_protocol = special -expanding: -oMt sender_ident = $sender_ident - result: -oMt sender_ident = me +considering: -oMa sender_host_address = $sender_host_address + expanding: -oMa sender_host_address = $sender_host_address + result: -oMa sender_host_address = V4NET.0.0.1 +considering: sender_host_port = $sender_host_port + expanding: sender_host_port = $sender_host_port + result: sender_host_port = 1234 +considering: -oMaa sender_host_authenticated = $sender_host_authenticated + expanding: -oMaa sender_host_authenticated = $sender_host_authenticated + result: -oMaa sender_host_authenticated = AAA +considering: -oMai authenticated_id = $authenticated_id + expanding: -oMai authenticated_id = $authenticated_id + result: -oMai authenticated_id = philip +considering: -oMas authenticated_sender = $authenticated_sender + expanding: -oMas authenticated_sender = $authenticated_sender + result: -oMas authenticated_sender = xx@yy.zz +considering: -oMi interface_address = $interface_address + expanding: -oMi interface_address = $interface_address + result: -oMi interface_address = 1.1.1.1 +considering: interface_port = $interface_port + expanding: interface_port = $interface_port + result: interface_port = 99 +considering: -oMr received_protocol = $received_protocol + expanding: -oMr received_protocol = $received_protocol + result: -oMr received_protocol = special +considering: -oMt sender_ident = $sender_ident + expanding: -oMt sender_ident = $sender_ident + result: -oMt sender_ident = me >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> 1999-03-02 09:44:33 no host name found for IP address V4NET.11.12.13 Exim version x.yz .... configuration file is TESTSUITE/test-config admin user -expanding: -oMa sender_host_address = $sender_host_address - result: -oMa sender_host_address = V4NET.0.0.1 -expanding: sender_host_port = $sender_host_port - result: sender_host_port = 1234 -expanding: -oMaa sender_host_authenticated = $sender_host_authenticated - result: -oMaa sender_host_authenticated = AAA -expanding: -oMai authenticated_id = $authenticated_id - result: -oMai authenticated_id = philip -expanding: -oMas authenticated_sender = $authenticated_sender - result: -oMas authenticated_sender = xx@yy.zz -expanding: -oMi interface_address = $interface_address - result: -oMi interface_address = 1.1.1.1 -expanding: interface_port = $interface_port - result: interface_port = 99 -expanding: -oMr received_protocol = $received_protocol - result: -oMr received_protocol = special -expanding: black - result: black -expanding: white - result: white +considering: -oMa sender_host_address = $sender_host_address + expanding: -oMa sender_host_address = $sender_host_address + result: -oMa sender_host_address = V4NET.0.0.1 +considering: sender_host_port = $sender_host_port + expanding: sender_host_port = $sender_host_port + result: sender_host_port = 1234 +considering: -oMaa sender_host_authenticated = $sender_host_authenticated + expanding: -oMaa sender_host_authenticated = $sender_host_authenticated + result: -oMaa sender_host_authenticated = AAA +considering: -oMai authenticated_id = $authenticated_id + expanding: -oMai authenticated_id = $authenticated_id + result: -oMai authenticated_id = philip +considering: -oMas authenticated_sender = $authenticated_sender + expanding: -oMas authenticated_sender = $authenticated_sender + result: -oMas authenticated_sender = xx@yy.zz +considering: -oMi interface_address = $interface_address + expanding: -oMi interface_address = $interface_address + result: -oMi interface_address = 1.1.1.1 +considering: interface_port = $interface_port + expanding: interface_port = $interface_port + result: interface_port = 99 +considering: -oMr received_protocol = $received_protocol + expanding: -oMr received_protocol = $received_protocol + result: -oMr received_protocol = special +considering: ----> No lookup yet: ${if eq{black}{white}{$sender_host_name}{No}} +considering: black}{white}{$sender_host_name}{No}} + expanding: black + result: black +considering: white}{$sender_host_name}{No}} + expanding: white + result: white condition: eq{black}{white} result: false -expanding: $sender_host_name - result: -skipping: result is not used -expanding: No - result: No -expanding: ----> No lookup yet: ${if eq{black}{white}{$sender_host_name}{No}} - result: ----> No lookup yet: No + scanning: $sender_host_name}{No}} + expanding: $sender_host_name + result: + skipping: result is not used +considering: No}} + expanding: No + result: No + expanding: ----> No lookup yet: ${if eq{black}{white}{$sender_host_name}{No}} + result: ----> No lookup yet: No +considering: -oMs sender_host_name = $sender_host_name looking up host name for V4NET.0.0.1 IP address lookup yielded "ten-1.test.ex" ten-1.test.ex V4NET.0.0.1 mx=-1 sort=xx @@ -122,10 +166,11 @@ checking addresses for ten-1.test.ex V4NET.0.0.1 OK sender_fullhost = ten-1.test.ex [V4NET.0.0.1] sender_rcvhost = ten-1.test.ex ([V4NET.0.0.1] ident=me) -expanding: -oMs sender_host_name = $sender_host_name - result: -oMs sender_host_name = ten-1.test.ex -expanding: -oMt sender_ident = $sender_ident - result: -oMt sender_ident = me + expanding: -oMs sender_host_name = $sender_host_name + result: -oMs sender_host_name = ten-1.test.ex +considering: -oMt sender_ident = $sender_ident + expanding: -oMt sender_ident = $sender_ident + result: -oMt sender_ident = me >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> Exim version x.yz .... changed uid/gid: forcing real = effective diff --git a/test/stderr/0092 b/test/stderr/0092 index 4cae3dbf7..e763efc0f 100644 --- a/test/stderr/0092 +++ b/test/stderr/0092 @@ -50,27 +50,33 @@ LOG: smtp_connection MAIN SMTP connection from [V4NET.0.0.1] host in host_lookup? no (option unset) set_process_info: pppp handling incoming connection from [V4NET.0.0.1] -expanding: V4NET.0.0.1 - result: V4NET.0.0.1 -expanding: $sender_host_address - result: V4NET.0.0.1 +considering: ${if eq {V4NET.0.0.1} {$sender_host_address} {2} {30}}s +considering: V4NET.0.0.1} {$sender_host_address} {2} {30}}s + expanding: V4NET.0.0.1 + result: V4NET.0.0.1 +considering: $sender_host_address} {2} {30}}s + expanding: $sender_host_address + result: V4NET.0.0.1 condition: eq {V4NET.0.0.1} {$sender_host_address} result: true -expanding: 2 - result: 2 -expanding: 30 - result: 30 -skipping: result is not used -expanding: ${if eq {V4NET.0.0.1} {$sender_host_address} {2} {30}}s - result: 2s +considering: 2} {30}}s + expanding: 2 + result: 2 + scanning: 30}}s + expanding: 30 + result: 30 + skipping: result is not used + expanding: ${if eq {V4NET.0.0.1} {$sender_host_address} {2} {30}}s + result: 2s host in host_reject_connection? no (option unset) host in sender_unqualified_hosts? no (option unset) 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) -expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full - result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full + expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full + result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 SMTP>> 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 smtp_setup_msg entered SMTP<< mail from:userx@test.ex diff --git a/test/stderr/0402 b/test/stderr/0402 index c0a03d3ee..bf70c587f 100644 --- a/test/stderr/0402 +++ b/test/stderr/0402 @@ -38,56 +38,116 @@ F From: CALLER_NAME Date: Tue, 2 Mar 1999 09:44:33 +0000 Data file written for message 10HmaX-0005vi-00 -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 +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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_rcvhost result: false -expanding: from $sender_rcvhost + scanning: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: from $sender_rcvhost - result: from + result: from -skipping: result is not used + skipping: result is not used +considering: ${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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_ident result: true -expanding: $sender_ident - result: CALLER -expanding: from ${quote_local_part:$sender_ident} - result: from CALLER +considering: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} +considering: $sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: $sender_ident + result: CALLER + expanding: from ${quote_local_part:$sender_ident} + result: from CALLER condition: def:sender_helo_name result: false -expanding: (helo=$sender_helo_name) + scanning: (helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (helo=$sender_helo_name) - result: (helo=) + result: (helo=) -skipping: result is not used -expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + skipping: result is not used + expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }} - result: from CALLER + result: from CALLER condition: def:received_protocol result: true -expanding: with $received_protocol - result: with local +considering: with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: with $received_protocol + result: with local condition: def:sender_address result: true -expanding: (envelope-from <$sender_address>) +considering: (envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (envelope-from <$sender_address>) - result: (envelope-from ) + result: (envelope-from ) condition: def:received_for result: false -expanding: + scanning: + for $received_for}} + expanding: for $received_for - result: + result: for -skipping: result is not used + skipping: result is not used + expanding: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + result: Received: from CALLER by mail.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmaX-0005vi-00 >>Generated Received: header line P Received: from CALLER by mail.test.ex with local (Exim x.yz) (envelope-from ) id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000 calling local_scan(); timeout=300 local_scan() returned 0 NULL -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 Writing spool header file DSN: Write SPOOL :-dsn_envid NULL DSN: Write SPOOL :-dsn_ret 0 @@ -214,8 +274,9 @@ local_part=rd+usery domain=test.ex stripped prefix rd+ checking local_parts usery in "usery"? yes (matched "usery") -expanding: /non-exist/$domain - result: /non-exist/test.ex +considering: /non-exist/$domain + expanding: /non-exist/$domain + result: /non-exist/test.ex calling r5 router rda_interpret (string): TESTSUITE/test-mail/junk expanded: TESTSUITE/test-mail/junk @@ -252,8 +313,9 @@ local_part=rd+CALLER domain=test.ex stripped prefix rd+ checking local_parts CALLER in "CALLER"? yes (matched "CALLER") -expanding: /non-exist/$local_part - result: /non-exist/CALLER +considering: /non-exist/$local_part + expanding: /non-exist/$local_part + result: /non-exist/CALLER calling r4 router rda_interpret (string): TESTSUITE/test-mail/junk expanded: TESTSUITE/test-mail/junk @@ -284,8 +346,9 @@ r2 router skipped: local_parts mismatch local_part=userz domain=test.ex checking local_parts userz in "userz"? yes (matched "userz") -expanding: /non-exist/$domain - result: /non-exist/test.ex +considering: /non-exist/$domain + expanding: /non-exist/$domain + result: /non-exist/test.ex calling r3 router r3 router called for userz@test.ex domain = test.ex @@ -308,8 +371,9 @@ r1 router skipped: local_parts mismatch local_part=usery domain=test.ex checking local_parts usery in "usery"? yes (matched "usery") -expanding: /non-exist/$domain - result: /non-exist/test.ex +considering: /non-exist/$domain + expanding: /non-exist/$domain + result: /non-exist/test.ex calling r2 router r2 router called for usery@test.ex domain = test.ex @@ -327,8 +391,9 @@ routing CALLER@test.ex local_part=CALLER domain=test.ex checking local_parts CALLER in "CALLER"? yes (matched "CALLER") -expanding: /non-exist/$local_part - result: /non-exist/CALLER +considering: /non-exist/$local_part + expanding: /non-exist/$local_part + result: /non-exist/CALLER calling r1 router r1 router called for CALLER@test.ex domain = test.ex @@ -372,16 +437,18 @@ locked TESTSUITE/spool/db/retry.lockfile EXIM_DBOPEN(TESTSUITE/spool/db/retry) returned from EXIM_DBOPEN no retry data available -expanding: /non-exist/$local_part - result: /non-exist/usery +considering: /non-exist/$local_part + expanding: /non-exist/$local_part + result: /non-exist/usery search_tidyup called changed uid/gid: local delivery to TESTSUITE/test-mail/junk transport=ft1 uid=CALLER_UID gid=CALLER_GID pid=pppp home=/non-exist/usery current=/ set_process_info: pppp delivering 10HmaX-0005vi-00 to TESTSUITE/test-mail/junk using ft1 appendfile transport entered -expanding: $address_file - result: TESTSUITE/test-mail/junk +considering: $address_file + expanding: $address_file + result: TESTSUITE/test-mail/junk appendfile: mode=600 notify_comsat=0 quota=0 warning=0 file=TESTSUITE/test-mail/junk format=unix message_prefix=From ${if def:return_path{$return_path}{MAILER-DAEMON}} ${tod_bsdinbox}\n @@ -393,16 +460,22 @@ 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 +considering: From ${if def:return_path{$return_path}{MAILER-DAEMON}} ${tod_bsdinbox} + condition: def:return_path result: true -expanding: $return_path - result: CALLER@test.ex -expanding: MAILER-DAEMON - result: MAILER-DAEMON -skipping: result is not used -expanding: From ${if def:return_path{$return_path}{MAILER-DAEMON}} ${tod_bsdinbox} +considering: $return_path}{MAILER-DAEMON}} ${tod_bsdinbox} + + expanding: $return_path + result: CALLER@test.ex + scanning: MAILER-DAEMON}} ${tod_bsdinbox} + + expanding: MAILER-DAEMON + result: MAILER-DAEMON + skipping: result is not used + expanding: From ${if def:return_path{$return_path}{MAILER-DAEMON}} ${tod_bsdinbox} - result: From CALLER@test.ex Tue Mar 02 09:44:33 1999 + result: From CALLER@test.ex Tue Mar 02 09:44:33 1999 writing data block fd=dddd size=sss timeout=0 writing data block fd=dddd size=sss timeout=0 @@ -428,8 +501,9 @@ changed uid/gid: local delivery to TESTSUITE/test-mail/junk transport=t1 uid=CALLER_UID gid=CALLER_GID pid=pppp @@ -522,8 +603,9 @@ locked TESTSUITE/spool/db/retry.lockfile EXIM_DBOPEN(TESTSUITE/spool/db/retry) returned from EXIM_DBOPEN no retry data available -expanding: /$local_part - result: /userz +considering: /$local_part + expanding: /$local_part + result: /userz search_tidyup called changed uid/gid: local delivery to userz transport=t2 uid=CALLER_UID gid=CALLER_GID pid=pppp diff --git a/test/stderr/0544 b/test/stderr/0544 index e8b01dfe0..a95583ab7 100644 --- a/test/stderr/0544 +++ b/test/stderr/0544 @@ -1,50 +1,110 @@ Exim version x.yz .... configuration file is TESTSUITE/test-config admin user -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 +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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_rcvhost result: false -expanding: from $sender_rcvhost + scanning: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: from $sender_rcvhost - result: from + result: from -skipping: result is not used + skipping: result is not used +considering: ${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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_ident result: true -expanding: $sender_ident - result: CALLER -expanding: from ${quote_local_part:$sender_ident} - result: from CALLER +considering: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} +considering: $sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: $sender_ident + result: CALLER + expanding: from ${quote_local_part:$sender_ident} + result: from CALLER condition: def:sender_helo_name result: false -expanding: (helo=$sender_helo_name) + scanning: (helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (helo=$sender_helo_name) - result: (helo=) + result: (helo=) -skipping: result is not used -expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + skipping: result is not used + expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }} - result: from CALLER + result: from CALLER condition: def:received_protocol result: true -expanding: with $received_protocol - result: with local +considering: with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: with $received_protocol + result: with local condition: def:sender_address result: true -expanding: (envelope-from <$sender_address>) +considering: (envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (envelope-from <$sender_address>) - result: (envelope-from ) + result: (envelope-from ) condition: def:received_for result: false -expanding: + scanning: + for $received_for}} + expanding: for $received_for - result: + result: for -skipping: result is not used -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 + skipping: result is not used + expanding: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + result: Received: from CALLER by the.local.host.name with local (Exim x.yz) + (envelope-from ) + id 10HmaX-0005vi-00 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 LOG: MAIN <= CALLER@test.ex U=CALLER P=local S=sss created log directory TESTSUITE/spool/log @@ -52,33 +112,43 @@ Exim version x.yz .... configuration file is TESTSUITE/test-config trusted user admin user -expanding: $domain - result: domain1.ex +considering: $domain + expanding: $domain + result: domain1.ex LOG: MAIN == userx@domain1.ex R=smarthost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set LOG: MAIN == userx@domain2.ex R=smarthost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set -expanding: $h_list-id:$h_list-post:$h_list-subscribe: - result: -expanding: - result: -expanding: $h_precedence: - result: -expanding: (?i)bulk|list|junk - result: (?i)bulk|list|junk -expanding: $h_auto-submitted: - result: -expanding: (?i)auto-generated|auto-replied - result: (?i)auto-generated|auto-replied +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}} + expanding: $h_list-id:$h_list-post:$h_list-subscribe: + result: +considering: } }{ match{$h_precedence:}{(?i)bulk|list|junk} }{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }} {no}{yes}} + expanding: + result: +considering: $h_precedence:}{(?i)bulk|list|junk} }{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }} {no}{yes}} + expanding: $h_precedence: + result: +considering: (?i)bulk|list|junk} }{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }} {no}{yes}} + expanding: (?i)bulk|list|junk + result: (?i)bulk|list|junk +considering: $h_auto-submitted:}{(?i)auto-generated|auto-replied} }} {no}{yes}} + expanding: $h_auto-submitted: + result: +considering: (?i)auto-generated|auto-replied} }} {no}{yes}} + expanding: (?i)auto-generated|auto-replied + result: (?i)auto-generated|auto-replied condition: 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} }} result: false -expanding: no - result: no -skipping: result is not used -expanding: yes - result: yes -expanding: ${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}} - result: yes + scanning: no}{yes}} + expanding: no + result: no + skipping: result is not used +considering: yes}} + expanding: yes + result: yes + expanding: ${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}} + result: yes >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> Exim version x.yz .... @@ -86,24 +156,32 @@ configuration file is TESTSUITE/test-config admin user LOG: smtp_connection MAIN SMTP connection from CALLER -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 -expanding: $sender_helo_name - result: ehlo.domain -expanding: +dlist - result: +dlist -expanding: $domain - result: ehlo.domain +considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full + 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 +considering: ${if match_domain {$sender_helo_name}{+dlist}} +considering: $sender_helo_name}{+dlist}} + expanding: $sender_helo_name + result: ehlo.domain +considering: +dlist}} + expanding: +dlist + result: +dlist +considering: $domain + expanding: $domain + result: ehlo.domain condition: match_domain {$sender_helo_name}{+dlist} result: true -expanding: ${if match_domain {$sender_helo_name}{+dlist}} - result: true -expanding: domain=$domain/sender_domain=$sender_address_domain - result: domain=/sender_domain=sender.domain -expanding: domain=$domain/sender_domain=$sender_address_domain - result: domain=recipient.domain/sender_domain=sender.domain -expanding: domain=$domain/sender_domain=$sender_address_domain - result: domain=recipient.domain/sender_domain=sender.domain + expanding: ${if match_domain {$sender_helo_name}{+dlist}} + result: true +considering: domain=$domain/sender_domain=$sender_address_domain + expanding: domain=$domain/sender_domain=$sender_address_domain + result: domain=/sender_domain=sender.domain +considering: domain=$domain/sender_domain=$sender_address_domain + expanding: domain=$domain/sender_domain=$sender_address_domain + result: domain=recipient.domain/sender_domain=sender.domain +considering: domain=$domain/sender_domain=$sender_address_domain + expanding: domain=$domain/sender_domain=$sender_address_domain + result: domain=recipient.domain/sender_domain=sender.domain LOG: smtp_connection MAIN SMTP connection from CALLER closed by QUIT >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/3000 b/test/stderr/3000 index 6859068af..7615889c8 100644 --- a/test/stderr/3000 +++ b/test/stderr/3000 @@ -2,34 +2,45 @@ Exim version x.yz .... configuration file is TESTSUITE/test-config admin user -expanding: foo - result: foo -expanding: arg1 - result: arg1 +considering: ${perl{foo}{arg1}} +considering: foo}{arg1}} + expanding: foo + result: foo +considering: arg1}} + expanding: arg1 + result: arg1 Starting Perl interpreter -expanding: ${perl{foo}{arg1}} - result: Subroutine foo called with args: arg1 -expanding: foo_undef - result: foo_undef + expanding: ${perl{foo}{arg1}} + result: Subroutine foo called with args: arg1 +considering: ${perl{foo_undef}} +considering: foo_undef}} + expanding: foo_undef + result: foo_undef failed to expand: ${perl{foo_undef}} error message: Perl subroutine "foo_undef" returned undef to force failure failure was forced -expanding: debug_write - result: debug_write -expanding: debug from Perl\n - result: debug from Perl +considering: ${perl{debug_write}{debug from Perl\n}} +considering: debug_write}{debug from Perl\n}} + expanding: debug_write + result: debug_write +considering: debug from Perl\n}} + expanding: debug from Perl\n + result: debug from Perl debug from Perl -expanding: ${perl{debug_write}{debug from Perl\n}} - result: Wrote debug -expanding: log_write - result: log_write -expanding: log from Perl - result: log from Perl + expanding: ${perl{debug_write}{debug from Perl\n}} + result: Wrote debug +considering: ${perl{log_write}{log from Perl}} +considering: log_write}{log from Perl}} + expanding: log_write + result: log_write +considering: log from Perl}} + expanding: log from Perl + result: log from Perl LOG: MAIN log from Perl -expanding: ${perl{log_write}{log from Perl}} - result: Wrote log + expanding: ${perl{log_write}{log from Perl}} + result: Wrote log >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> LOG: smtp_connection MAIN SMTP connection from CALLER diff --git a/test/stderr/5410 b/test/stderr/5410 index 0f655c416..8762f82a1 100644 --- a/test/stderr/5410 +++ b/test/stderr/5410 @@ -4,32 +4,39 @@ admin user in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER -expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full - result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full + expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full + result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 in dsn_advertise_hosts? no (option unset) in pipelining_advertise_hosts? yes (matched "*") in tls_advertise_hosts? yes (matched "*") -expanding: SERVER - result: SERVER -expanding: server - result: server +considering: ${if eq {SERVER}{server}{queue}{cutthrough}} +considering: SERVER}{server}{queue}{cutthrough}} + expanding: SERVER + result: SERVER +considering: server}{queue}{cutthrough}} + expanding: server + result: server condition: eq {SERVER}{server} result: false -expanding: queue - result: queue -skipping: result is not used -expanding: cutthrough - result: cutthrough -expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} - result: cutthrough + scanning: queue}{cutthrough}} + expanding: queue + result: queue + skipping: result is not used +considering: cutthrough}} + expanding: cutthrough + result: cutthrough + expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} + result: cutthrough using ACL "cutthrough" processing "accept" check control = cutthrough_delivery check verify = recipient domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: userx +considering: $local_part + expanding: $local_part + result: userx domain.com in "*"? yes (matched "*") ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" @@ -37,12 +44,14 @@ end of ACL "cutthrough": ACCEPT ----------- start cutthrough setup ------------ domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: userx +considering: $local_part + expanding: $local_part + result: userx domain.com in "*"? yes (matched "*") Connecting to 127.0.0.1 [127.0.0.1]:1225 from ip4.ip4.ip4.ip4 ... connected -expanding: $primary_hostname - result: myhost.test.ex +considering: $primary_hostname + expanding: $primary_hostname + result: myhost.test.ex SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 127.0.0.1 in hosts_avoid_esmtp? no (option unset) SMTP>> EHLO myhost.test.ex @@ -52,33 +61,43 @@ expanding: $primary_hostname 250-PIPELINING 250-STARTTLS 250 HELP -expanding: $address_data - result: userx -expanding: usery - result: usery +considering: ${if eq {$address_data}{usery}{*}{:}} +considering: $address_data}{usery}{*}{:}} + expanding: $address_data + result: userx +considering: usery}{*}{:}} + expanding: usery + result: usery condition: eq {$address_data}{usery} result: false -expanding: * - result: * -skipping: result is not used -expanding: : - result: : -expanding: ${if eq {$address_data}{usery}{*}{:}} - result: : + scanning: *}{:}} + expanding: * + result: * + skipping: result is not used +considering: :}} + expanding: : + result: : + expanding: ${if eq {$address_data}{usery}{*}{:}} + result: : 127.0.0.1 in hosts_avoid_tls? no (end of list) -expanding: $address_data - result: userx -expanding: userz - result: userz +considering: ${if eq {$address_data}{userz}{*}{:}} +considering: $address_data}{userz}{*}{:}} + expanding: $address_data + result: userx +considering: userz}{*}{:}} + expanding: userz + result: userz condition: eq {$address_data}{userz} result: false -expanding: * - result: * -skipping: result is not used -expanding: : - result: : -expanding: ${if eq {$address_data}{userz}{*}{:}} - result: : + scanning: *}{:}} + expanding: * + result: * + skipping: result is not used +considering: :}} + expanding: : + result: : + expanding: ${if eq {$address_data}{userz}{*}{:}} + result: : 127.0.0.1 in hosts_verify_avoid_tls? no (end of list) SMTP>> STARTTLS SMTP<< 220 TLS go ahead @@ -103,51 +122,113 @@ 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 -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 +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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_rcvhost result: false -expanding: from $sender_rcvhost + scanning: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: from $sender_rcvhost - result: from + result: from -skipping: result is not used + skipping: result is not used +considering: ${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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_ident result: true -expanding: $sender_ident - result: CALLER -expanding: from ${quote_local_part:$sender_ident} - result: from CALLER +considering: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} +considering: $sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: $sender_ident + result: CALLER + expanding: from ${quote_local_part:$sender_ident} + result: from CALLER condition: def:sender_helo_name result: true -expanding: (helo=$sender_helo_name) +considering: (helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (helo=$sender_helo_name) - result: (helo=myhost.test.ex) + result: (helo=myhost.test.ex) -expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }} - result: from CALLER (helo=myhost.test.ex) + result: from CALLER (helo=myhost.test.ex) condition: def:received_protocol result: true -expanding: with $received_protocol - result: with local-esmtp +considering: with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: with $received_protocol + result: with local-esmtp condition: def:sender_address result: true -expanding: (envelope-from <$sender_address>) +considering: (envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (envelope-from <$sender_address>) - result: (envelope-from ) + result: (envelope-from ) condition: def:received_for result: true -expanding: +considering: + for $received_for}} + expanding: for $received_for - result: + result: + for userx@domain.com + expanding: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + result: Received: from CALLER (helo=myhost.test.ex) + by myhost.test.ex with local-esmtp (Exim x.yz) + (envelope-from ) + id 10HmaY-0005vi-00 for userx@domain.com ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 SMTP>> . SMTP<< 250 OK id=10HmaX-0005vi-00 LOG: MAIN @@ -167,32 +248,39 @@ admin user in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER -expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full - result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full + expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full + result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 in dsn_advertise_hosts? no (option unset) in pipelining_advertise_hosts? yes (matched "*") in tls_advertise_hosts? yes (matched "*") -expanding: SERVER - result: SERVER -expanding: server - result: server +considering: ${if eq {SERVER}{server}{queue}{cutthrough}} +considering: SERVER}{server}{queue}{cutthrough}} + expanding: SERVER + result: SERVER +considering: server}{queue}{cutthrough}} + expanding: server + result: server condition: eq {SERVER}{server} result: false -expanding: queue - result: queue -skipping: result is not used -expanding: cutthrough - result: cutthrough -expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} - result: cutthrough + scanning: queue}{cutthrough}} + expanding: queue + result: queue + skipping: result is not used +considering: cutthrough}} + expanding: cutthrough + result: cutthrough + expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} + result: cutthrough using ACL "cutthrough" processing "accept" check control = cutthrough_delivery check verify = recipient domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: usery +considering: $local_part + expanding: $local_part + result: usery domain.com in "*"? yes (matched "*") ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" @@ -200,12 +288,14 @@ end of ACL "cutthrough": ACCEPT ----------- start cutthrough setup ------------ domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: usery +considering: $local_part + expanding: $local_part + result: usery domain.com in "*"? yes (matched "*") Connecting to 127.0.0.1 [127.0.0.1]:1225 from ip4.ip4.ip4.ip4 ... connected -expanding: $primary_hostname - result: myhost.test.ex +considering: $primary_hostname + expanding: $primary_hostname + result: myhost.test.ex SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 127.0.0.1 in hosts_avoid_esmtp? no (option unset) SMTP>> EHLO myhost.test.ex @@ -215,19 +305,24 @@ expanding: $primary_hostname 250-PIPELINING 250-STARTTLS 250 HELP -expanding: $address_data - result: usery -expanding: usery - result: usery +considering: ${if eq {$address_data}{usery}{*}{:}} +considering: $address_data}{usery}{*}{:}} + expanding: $address_data + result: usery +considering: usery}{*}{:}} + expanding: usery + result: usery condition: eq {$address_data}{usery} result: true -expanding: * - result: * -expanding: : - result: : -skipping: result is not used -expanding: ${if eq {$address_data}{usery}{*}{:}} - result: * +considering: *}{:}} + expanding: * + result: * + scanning: :}} + expanding: : + result: : + skipping: result is not used + expanding: ${if eq {$address_data}{usery}{*}{:}} + result: * 127.0.0.1 in hosts_avoid_tls? yes (matched "*") 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM: @@ -240,51 +335,113 @@ 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 -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 +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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_rcvhost result: false -expanding: from $sender_rcvhost + scanning: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: from $sender_rcvhost - result: from + result: from -skipping: result is not used + skipping: result is not used +considering: ${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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_ident result: true -expanding: $sender_ident - result: CALLER -expanding: from ${quote_local_part:$sender_ident} - result: from CALLER +considering: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} +considering: $sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: $sender_ident + result: CALLER + expanding: from ${quote_local_part:$sender_ident} + result: from CALLER condition: def:sender_helo_name result: true -expanding: (helo=$sender_helo_name) +considering: (helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (helo=$sender_helo_name) - result: (helo=myhost.test.ex) + result: (helo=myhost.test.ex) -expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }} - result: from CALLER (helo=myhost.test.ex) + result: from CALLER (helo=myhost.test.ex) condition: def:received_protocol result: true -expanding: with $received_protocol - result: with local-esmtp +considering: with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: with $received_protocol + result: with local-esmtp condition: def:sender_address result: true -expanding: (envelope-from <$sender_address>) +considering: (envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (envelope-from <$sender_address>) - result: (envelope-from ) + result: (envelope-from ) condition: def:received_for result: true -expanding: +considering: + for $received_for}} + expanding: for $received_for - result: + result: + for usery@domain.com + expanding: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + result: Received: from CALLER (helo=myhost.test.ex) + by myhost.test.ex with local-esmtp (Exim x.yz) + (envelope-from ) + id 10HmbA-0005vi-00 for usery@domain.com ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 SMTP>> . SMTP<< 250 OK id=10HmaZ-0005vi-00 LOG: MAIN @@ -304,32 +461,39 @@ admin user in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER -expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full - result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full + expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full + result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 in dsn_advertise_hosts? no (option unset) in pipelining_advertise_hosts? yes (matched "*") in tls_advertise_hosts? yes (matched "*") -expanding: SERVER - result: SERVER -expanding: server - result: server +considering: ${if eq {SERVER}{server}{queue}{cutthrough}} +considering: SERVER}{server}{queue}{cutthrough}} + expanding: SERVER + result: SERVER +considering: server}{queue}{cutthrough}} + expanding: server + result: server condition: eq {SERVER}{server} result: false -expanding: queue - result: queue -skipping: result is not used -expanding: cutthrough - result: cutthrough -expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} - result: cutthrough + scanning: queue}{cutthrough}} + expanding: queue + result: queue + skipping: result is not used +considering: cutthrough}} + expanding: cutthrough + result: cutthrough + expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} + result: cutthrough using ACL "cutthrough" processing "accept" check control = cutthrough_delivery check verify = recipient domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: usery +considering: $local_part + expanding: $local_part + result: usery domain.com in "*"? yes (matched "*") ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" @@ -337,12 +501,14 @@ end of ACL "cutthrough": ACCEPT ----------- start cutthrough setup ------------ domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: usery +considering: $local_part + expanding: $local_part + result: usery domain.com in "*"? yes (matched "*") Connecting to 127.0.0.1 [127.0.0.1]:1225 from ip4.ip4.ip4.ip4 ... connected -expanding: $primary_hostname - result: myhost.test.ex +considering: $primary_hostname + expanding: $primary_hostname + result: myhost.test.ex SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 127.0.0.1 in hosts_avoid_esmtp? no (option unset) SMTP>> EHLO myhost.test.ex @@ -352,19 +518,24 @@ expanding: $primary_hostname 250-PIPELINING 250-STARTTLS 250 HELP -expanding: $address_data - result: usery -expanding: usery - result: usery +considering: ${if eq {$address_data}{usery}{*}{:}} +considering: $address_data}{usery}{*}{:}} + expanding: $address_data + result: usery +considering: usery}{*}{:}} + expanding: usery + result: usery condition: eq {$address_data}{usery} result: true -expanding: * - result: * -expanding: : - result: : -skipping: result is not used -expanding: ${if eq {$address_data}{usery}{*}{:}} - result: * +considering: *}{:}} + expanding: * + result: * + scanning: :}} + expanding: : + result: : + skipping: result is not used + expanding: ${if eq {$address_data}{usery}{*}{:}} + result: * 127.0.0.1 in hosts_avoid_tls? yes (matched "*") 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM: @@ -377,51 +548,113 @@ 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 -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 +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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_rcvhost result: false -expanding: from $sender_rcvhost + scanning: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: from $sender_rcvhost - result: from + result: from -skipping: result is not used + skipping: result is not used +considering: ${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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_ident result: true -expanding: $sender_ident - result: CALLER -expanding: from ${quote_local_part:$sender_ident} - result: from CALLER +considering: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} +considering: $sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: $sender_ident + result: CALLER + expanding: from ${quote_local_part:$sender_ident} + result: from CALLER condition: def:sender_helo_name result: true -expanding: (helo=$sender_helo_name) +considering: (helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (helo=$sender_helo_name) - result: (helo=myhost.test.ex) + result: (helo=myhost.test.ex) -expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }} - result: from CALLER (helo=myhost.test.ex) + result: from CALLER (helo=myhost.test.ex) condition: def:received_protocol result: true -expanding: with $received_protocol - result: with local-esmtp +considering: with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: with $received_protocol + result: with local-esmtp condition: def:sender_address result: true -expanding: (envelope-from <$sender_address>) +considering: (envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (envelope-from <$sender_address>) - result: (envelope-from ) + result: (envelope-from ) condition: def:received_for result: true -expanding: +considering: + for $received_for}} + expanding: for $received_for - result: + result: + for usery@domain.com + expanding: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + result: Received: from CALLER (helo=myhost.test.ex) + by myhost.test.ex with local-esmtp (Exim x.yz) + (envelope-from ) + id 10HmbC-0005vi-00 for usery@domain.com ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 SMTP>> . SMTP<< 250 OK id=10HmbB-0005vi-00 LOG: MAIN diff --git a/test/stderr/5420 b/test/stderr/5420 index 7f9332965..f289d1a4c 100644 --- a/test/stderr/5420 +++ b/test/stderr/5420 @@ -4,32 +4,39 @@ admin user in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER -expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full - result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full + expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full + result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 in dsn_advertise_hosts? no (option unset) in pipelining_advertise_hosts? yes (matched "*") in tls_advertise_hosts? yes (matched "*") -expanding: SERVER - result: SERVER -expanding: server - result: server +considering: ${if eq {SERVER}{server}{queue}{cutthrough}} +considering: SERVER}{server}{queue}{cutthrough}} + expanding: SERVER + result: SERVER +considering: server}{queue}{cutthrough}} + expanding: server + result: server condition: eq {SERVER}{server} result: false -expanding: queue - result: queue -skipping: result is not used -expanding: cutthrough - result: cutthrough -expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} - result: cutthrough + scanning: queue}{cutthrough}} + expanding: queue + result: queue + skipping: result is not used +considering: cutthrough}} + expanding: cutthrough + result: cutthrough + expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} + result: cutthrough using ACL "cutthrough" processing "accept" check control = cutthrough_delivery check verify = recipient domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: userx +considering: $local_part + expanding: $local_part + result: userx domain.com in "*"? yes (matched "*") ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" @@ -37,12 +44,14 @@ end of ACL "cutthrough": ACCEPT ----------- start cutthrough setup ------------ domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: userx +considering: $local_part + expanding: $local_part + result: userx domain.com in "*"? yes (matched "*") Connecting to 127.0.0.1 [127.0.0.1]:1225 from ip4.ip4.ip4.ip4 ... connected -expanding: $primary_hostname - result: myhost.test.ex +considering: $primary_hostname + expanding: $primary_hostname + result: myhost.test.ex SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 127.0.0.1 in hosts_avoid_esmtp? no (option unset) SMTP>> EHLO myhost.test.ex @@ -52,33 +61,43 @@ expanding: $primary_hostname 250-PIPELINING 250-STARTTLS 250 HELP -expanding: $address_data - result: userx -expanding: usery - result: usery +considering: ${if eq {$address_data}{usery}{*}{:}} +considering: $address_data}{usery}{*}{:}} + expanding: $address_data + result: userx +considering: usery}{*}{:}} + expanding: usery + result: usery condition: eq {$address_data}{usery} result: false -expanding: * - result: * -skipping: result is not used -expanding: : - result: : -expanding: ${if eq {$address_data}{usery}{*}{:}} - result: : + scanning: *}{:}} + expanding: * + result: * + skipping: result is not used +considering: :}} + expanding: : + result: : + expanding: ${if eq {$address_data}{usery}{*}{:}} + result: : 127.0.0.1 in hosts_avoid_tls? no (end of list) -expanding: $address_data - result: userx -expanding: userz - result: userz +considering: ${if eq {$address_data}{userz}{*}{:}} +considering: $address_data}{userz}{*}{:}} + expanding: $address_data + result: userx +considering: userz}{*}{:}} + expanding: userz + result: userz condition: eq {$address_data}{userz} result: false -expanding: * - result: * -skipping: result is not used -expanding: : - result: : -expanding: ${if eq {$address_data}{userz}{*}{:}} - result: : + scanning: *}{:}} + expanding: * + result: * + skipping: result is not used +considering: :}} + expanding: : + result: : + expanding: ${if eq {$address_data}{userz}{*}{:}} + result: : 127.0.0.1 in hosts_verify_avoid_tls? no (end of list) SMTP>> STARTTLS SMTP<< 220 TLS go ahead @@ -102,51 +121,113 @@ 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 -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 +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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_rcvhost result: false -expanding: from $sender_rcvhost + scanning: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: from $sender_rcvhost - result: from + result: from -skipping: result is not used + skipping: result is not used +considering: ${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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_ident result: true -expanding: $sender_ident - result: CALLER -expanding: from ${quote_local_part:$sender_ident} - result: from CALLER +considering: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} +considering: $sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: $sender_ident + result: CALLER + expanding: from ${quote_local_part:$sender_ident} + result: from CALLER condition: def:sender_helo_name result: true -expanding: (helo=$sender_helo_name) +considering: (helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (helo=$sender_helo_name) - result: (helo=myhost.test.ex) + result: (helo=myhost.test.ex) -expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }} - result: from CALLER (helo=myhost.test.ex) + result: from CALLER (helo=myhost.test.ex) condition: def:received_protocol result: true -expanding: with $received_protocol - result: with local-esmtp +considering: with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: with $received_protocol + result: with local-esmtp condition: def:sender_address result: true -expanding: (envelope-from <$sender_address>) +considering: (envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (envelope-from <$sender_address>) - result: (envelope-from ) + result: (envelope-from ) condition: def:received_for result: true -expanding: +considering: + for $received_for}} + expanding: for $received_for - result: + result: + for userx@domain.com + expanding: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + result: Received: from CALLER (helo=myhost.test.ex) + by myhost.test.ex with local-esmtp (Exim x.yz) + (envelope-from ) + id 10HmaY-0005vi-00 for userx@domain.com ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 SMTP>> . SMTP<< 250 OK id=10HmaX-0005vi-00 LOG: MAIN @@ -166,32 +247,39 @@ admin user in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER -expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full - result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full + expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full + result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 in dsn_advertise_hosts? no (option unset) in pipelining_advertise_hosts? yes (matched "*") in tls_advertise_hosts? yes (matched "*") -expanding: SERVER - result: SERVER -expanding: server - result: server +considering: ${if eq {SERVER}{server}{queue}{cutthrough}} +considering: SERVER}{server}{queue}{cutthrough}} + expanding: SERVER + result: SERVER +considering: server}{queue}{cutthrough}} + expanding: server + result: server condition: eq {SERVER}{server} result: false -expanding: queue - result: queue -skipping: result is not used -expanding: cutthrough - result: cutthrough -expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} - result: cutthrough + scanning: queue}{cutthrough}} + expanding: queue + result: queue + skipping: result is not used +considering: cutthrough}} + expanding: cutthrough + result: cutthrough + expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} + result: cutthrough using ACL "cutthrough" processing "accept" check control = cutthrough_delivery check verify = recipient domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: usery +considering: $local_part + expanding: $local_part + result: usery domain.com in "*"? yes (matched "*") ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" @@ -199,12 +287,14 @@ end of ACL "cutthrough": ACCEPT ----------- start cutthrough setup ------------ domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: usery +considering: $local_part + expanding: $local_part + result: usery domain.com in "*"? yes (matched "*") Connecting to 127.0.0.1 [127.0.0.1]:1225 from ip4.ip4.ip4.ip4 ... connected -expanding: $primary_hostname - result: myhost.test.ex +considering: $primary_hostname + expanding: $primary_hostname + result: myhost.test.ex SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 127.0.0.1 in hosts_avoid_esmtp? no (option unset) SMTP>> EHLO myhost.test.ex @@ -214,19 +304,24 @@ expanding: $primary_hostname 250-PIPELINING 250-STARTTLS 250 HELP -expanding: $address_data - result: usery -expanding: usery - result: usery +considering: ${if eq {$address_data}{usery}{*}{:}} +considering: $address_data}{usery}{*}{:}} + expanding: $address_data + result: usery +considering: usery}{*}{:}} + expanding: usery + result: usery condition: eq {$address_data}{usery} result: true -expanding: * - result: * -expanding: : - result: : -skipping: result is not used -expanding: ${if eq {$address_data}{usery}{*}{:}} - result: * +considering: *}{:}} + expanding: * + result: * + scanning: :}} + expanding: : + result: : + skipping: result is not used + expanding: ${if eq {$address_data}{usery}{*}{:}} + result: * 127.0.0.1 in hosts_avoid_tls? yes (matched "*") 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM: @@ -239,51 +334,113 @@ 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 -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 +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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_rcvhost result: false -expanding: from $sender_rcvhost + scanning: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: from $sender_rcvhost - result: from + result: from -skipping: result is not used + skipping: result is not used +considering: ${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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_ident result: true -expanding: $sender_ident - result: CALLER -expanding: from ${quote_local_part:$sender_ident} - result: from CALLER +considering: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} +considering: $sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: $sender_ident + result: CALLER + expanding: from ${quote_local_part:$sender_ident} + result: from CALLER condition: def:sender_helo_name result: true -expanding: (helo=$sender_helo_name) +considering: (helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (helo=$sender_helo_name) - result: (helo=myhost.test.ex) + result: (helo=myhost.test.ex) -expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }} - result: from CALLER (helo=myhost.test.ex) + result: from CALLER (helo=myhost.test.ex) condition: def:received_protocol result: true -expanding: with $received_protocol - result: with local-esmtp +considering: with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: with $received_protocol + result: with local-esmtp condition: def:sender_address result: true -expanding: (envelope-from <$sender_address>) +considering: (envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (envelope-from <$sender_address>) - result: (envelope-from ) + result: (envelope-from ) condition: def:received_for result: true -expanding: +considering: + for $received_for}} + expanding: for $received_for - result: + result: + for usery@domain.com + expanding: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + result: Received: from CALLER (helo=myhost.test.ex) + by myhost.test.ex with local-esmtp (Exim x.yz) + (envelope-from ) + id 10HmbA-0005vi-00 for usery@domain.com ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 SMTP>> . SMTP<< 250 OK id=10HmaZ-0005vi-00 LOG: MAIN @@ -303,32 +460,39 @@ admin user in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from CALLER -expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full - result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full + expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full + result: myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 in dsn_advertise_hosts? no (option unset) in pipelining_advertise_hosts? yes (matched "*") in tls_advertise_hosts? yes (matched "*") -expanding: SERVER - result: SERVER -expanding: server - result: server +considering: ${if eq {SERVER}{server}{queue}{cutthrough}} +considering: SERVER}{server}{queue}{cutthrough}} + expanding: SERVER + result: SERVER +considering: server}{queue}{cutthrough}} + expanding: server + result: server condition: eq {SERVER}{server} result: false -expanding: queue - result: queue -skipping: result is not used -expanding: cutthrough - result: cutthrough -expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} - result: cutthrough + scanning: queue}{cutthrough}} + expanding: queue + result: queue + skipping: result is not used +considering: cutthrough}} + expanding: cutthrough + result: cutthrough + expanding: ${if eq {SERVER}{server}{queue}{cutthrough}} + result: cutthrough using ACL "cutthrough" processing "accept" check control = cutthrough_delivery check verify = recipient domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: usery +considering: $local_part + expanding: $local_part + result: usery domain.com in "*"? yes (matched "*") ----------- end verify ------------ accept: condition test succeeded in ACL "cutthrough" @@ -336,12 +500,14 @@ end of ACL "cutthrough": ACCEPT ----------- start cutthrough setup ------------ domain.com in "test.ex : *.test.ex"? no (end of list) domain.com in "! +local_domains"? yes (end of list) -expanding: $local_part - result: usery +considering: $local_part + expanding: $local_part + result: usery domain.com in "*"? yes (matched "*") Connecting to 127.0.0.1 [127.0.0.1]:1225 from ip4.ip4.ip4.ip4 ... connected -expanding: $primary_hostname - result: myhost.test.ex +considering: $primary_hostname + expanding: $primary_hostname + result: myhost.test.ex SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 127.0.0.1 in hosts_avoid_esmtp? no (option unset) SMTP>> EHLO myhost.test.ex @@ -351,19 +517,24 @@ expanding: $primary_hostname 250-PIPELINING 250-STARTTLS 250 HELP -expanding: $address_data - result: usery -expanding: usery - result: usery +considering: ${if eq {$address_data}{usery}{*}{:}} +considering: $address_data}{usery}{*}{:}} + expanding: $address_data + result: usery +considering: usery}{*}{:}} + expanding: usery + result: usery condition: eq {$address_data}{usery} result: true -expanding: * - result: * -expanding: : - result: : -skipping: result is not used -expanding: ${if eq {$address_data}{usery}{*}{:}} - result: * +considering: *}{:}} + expanding: * + result: * + scanning: :}} + expanding: : + result: : + skipping: result is not used + expanding: ${if eq {$address_data}{usery}{*}{:}} + result: * 127.0.0.1 in hosts_avoid_tls? yes (matched "*") 127.0.0.1 in hosts_require_auth? no (option unset) SMTP>> MAIL FROM: @@ -376,51 +547,113 @@ 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 -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 +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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_rcvhost result: false -expanding: from $sender_rcvhost + scanning: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: from $sender_rcvhost - result: from + result: from -skipping: result is not used + skipping: result is not used +considering: ${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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} condition: def:sender_ident result: true -expanding: $sender_ident - result: CALLER -expanding: from ${quote_local_part:$sender_ident} - result: from CALLER +considering: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} +considering: $sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: $sender_ident + result: CALLER + expanding: from ${quote_local_part:$sender_ident} + result: from CALLER condition: def:sender_helo_name result: true -expanding: (helo=$sender_helo_name) +considering: (helo=$sender_helo_name) + }}}}by $primary_hostname ${if def:received_protocol {with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (helo=$sender_helo_name) - result: (helo=myhost.test.ex) + result: (helo=myhost.test.ex) -expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) }} - result: from CALLER (helo=myhost.test.ex) + result: from CALLER (helo=myhost.test.ex) condition: def:received_protocol result: true -expanding: with $received_protocol - result: with local-esmtp +considering: with $received_protocol}} ${if def:tls_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: with $received_protocol + result: with local-esmtp condition: def:sender_address result: true -expanding: (envelope-from <$sender_address>) +considering: (envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + expanding: (envelope-from <$sender_address>) - result: (envelope-from ) + result: (envelope-from ) condition: def:received_for result: true -expanding: +considering: + for $received_for}} + expanding: for $received_for - result: + result: + for usery@domain.com + expanding: 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_cipher {($tls_cipher) + }}(Exim $version_number) + ${if def:sender_address {(envelope-from <$sender_address>) + }}id $message_exim_id${if def:received_for { + for $received_for}} + result: Received: from CALLER (helo=myhost.test.ex) + by myhost.test.ex with local-esmtp (Exim x.yz) + (envelope-from ) + id 10HmbC-0005vi-00 for usery@domain.com ----------- start cutthrough headers send ----------- ----------- done cutthrough headers send ------------ -expanding: ${tod_full} - result: Tue, 2 Mar 1999 09:44:33 +0000 +considering: ${tod_full} + expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 SMTP>> . SMTP<< 250 OK id=10HmbB-0005vi-00 LOG: MAIN diff --git a/test/stdout/0002 b/test/stdout/0002 index ee1ef9d93..13ef57a45 100644 --- a/test/stdout/0002 +++ b/test/stdout/0002 @@ -95,8 +95,8 @@ > > # Operators > -> Failed: missing or misplaced { or } -> Failed: missing or misplaced { or } +> Failed: Not enough arguments for 'acl' (min is 1) +> Failed: Not enough arguments for 'acl' (min is 1) > Failed: error from acl "a_nosuch" > acl: (0) [] [] > acl: (1) [person@dom.ain] [] @@ -269,9 +269,9 @@ > > # Error forms > -> Failed: missing or misplaced { or } +> Failed: Not enough arguments for 'hash' (min is 2) > Failed: "nonnumber" is not a number (in "hash" expansion) -> Failed: Too many arguments for "hash" (max is 3) +> Failed: Too many arguments for 'hash' (max is 3) > Failed: "-2" is not a positive number (in "substr" expansion) > > # Skipped operators @@ -343,7 +343,8 @@ > Failed: unknown variable "post" after "def:" > def:h_f n > def:h_f n -> Failed: missing or misplaced { or } +> Failed: curly-bracket problem in conditional yes/no parsing: 'yes' part did not start with '{' + remaining string is ':{y}{n}}' > > exists: y > exists: n @@ -578,7 +579,8 @@ > b > > a:b:c -> Failed: missing or misplaced { or } inside "map" item +> Failed: curly-bracket problem in conditional yes/no parsing: did not close with '}' + remaining string is '{bogus_argument}}}}' inside "map" item > > # Translation > @@ -664,7 +666,7 @@ > > # File insertion > -> Failed: missing or misplaced { or } +> Failed: Not enough arguments for 'readfile' (min is 1) > abcde 12345 @@ -750,7 +752,8 @@ xyz > Failed: unknown condition "xya" inside "and{...}" condition > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition > Failed: missing } at end of string - could be header name not terminated by colon -> Failed: missing or misplaced { or } +> Failed: curly-bracket problem in conditional yes/no parsing: did not close with '}' + remaining string is '' > Failed: missing or misplaced { or } - could be header name not terminated by colon > Failed: each subcondition inside an "or{...}" condition must be in its own {} > Failed: missing } at end of condition inside "or" group diff --git a/test/stdout/3000 b/test/stdout/3000 index ad21103b3..ca7b094e6 100644 --- a/test/stdout/3000 +++ b/test/stdout/3000 @@ -10,9 +10,9 @@ > Failed: syntax error in Exim::expand_string argument: unknown variable name "notexists" at TESTSUITE/aux-fixed/3000.pl line 9. > -> Failed: missing or misplaced { or } +> Failed: Not enough arguments for 'perl' (min is 1) > Subroutine foo called with args: 1 2 3 4 5 6 7 8 -> Failed: Too many arguments for "perl" (max is 9) +> Failed: Too many arguments for 'perl' (max is 9) > > 42 > 30 -- 2.30.2