diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2020-05-07 16:38:04 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-05-07 17:19:06 +0100 |
commit | 0006e6d8e151bb4b34452da30da60184736bb5ae (patch) | |
tree | cb4d945022114d96ca74e48636acd60e0735d3b4 /test | |
parent | b16c9f8bdcfd4cce490af9e493489e128f5c8f52 (diff) |
Lookups: ret=key option
Diffstat (limited to 'test')
-rw-r--r-- | test/aux-fixed/0625.lsearch | 1 | ||||
-rw-r--r-- | test/confs/0153 | 17 | ||||
l--------- | test/confs/0625 | 1 | ||||
-rw-r--r-- | test/log/0625 | 6 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0625 | 18 | ||||
-rw-r--r-- | test/scripts/2500-dsearch/2500 | 1 | ||||
-rw-r--r-- | test/stderr/0625 | 59 | ||||
-rw-r--r-- | test/stdout/0625 | 10 | ||||
-rw-r--r-- | test/stdout/2500 | 1 |
9 files changed, 108 insertions, 6 deletions
diff --git a/test/aux-fixed/0625.lsearch b/test/aux-fixed/0625.lsearch new file mode 100644 index 000000000..7ec3b5b90 --- /dev/null +++ b/test/aux-fixed/0625.lsearch @@ -0,0 +1 @@ +trythiskey.ex: has this data diff --git a/test/confs/0153 b/test/confs/0153 index 35a004a45..7b5f023b4 100644 --- a/test/confs/0153 +++ b/test/confs/0153 @@ -13,17 +13,22 @@ begin routers virtual: driver = redirect domains = *.virt.test.ex - address_data = ${if match{$domain}{^(.*)\\.virt\\.test\\.ex\$}{${bless:$1}}} - data = ${if exists{DIR/aux-fixed/TESTNUM.alias.$address_data} \ - {${lookup{$local_part}lsearch{DIR/aux-fixed/TESTNUM.alias.$address_data}}} \ - fail} +# address_data = ${if match{$domain}{^(.*)\\.virt\\.test\\.ex\$}{${bless:$1}}} + address_data = $1 +# data = ${if exists{DIR/aux-fixed/TESTNUM.alias.$address_data} \ +# {${lookup{$local_part}lsearch{DIR/aux-fixed/TESTNUM.alias.$address_data}}} \ +# fail} + data = ${lookup {TESTNUM.alias.$address_data} dsearch,ret=full {DIR/aux-fixed} \ + {${lookup{$local_part}lsearch{$value}}} \ + fail} no_more list: driver = redirect domains = list.test.ex - file = ${if exists{DIR/aux-fixed/TESTNUM.list.${bless:$local_part}} \ - {DIR/aux-fixed/TESTNUM.list.${bless:$local_part}}fail} +# file = ${if exists{DIR/aux-fixed/TESTNUM.list.${bless:$local_part}} \ +# {DIR/aux-fixed/TESTNUM.list.${bless:$local_part}}fail} + file = ${lookup {TESTNUM.list.$local_part} dsearch,ret=full {DIR/aux-fixed} {$value}fail} no_more real: diff --git a/test/confs/0625 b/test/confs/0625 new file mode 120000 index 000000000..f9ae37c6a --- /dev/null +++ b/test/confs/0625 @@ -0,0 +1 @@ +0624
\ No newline at end of file diff --git a/test/log/0625 b/test/log/0625 new file mode 100644 index 000000000..3cd4ee178 --- /dev/null +++ b/test/log/0625 @@ -0,0 +1,6 @@ +1999-03-02 09:44:33 domain trythiskey.ex +1999-03-02 09:44:33 value has this data +1999-03-02 09:44:33 $0 'trythiskey.ex' $1 '' +1999-03-02 09:44:33 domain trythiskey.ex +1999-03-02 09:44:33 value trythiskey.ex +1999-03-02 09:44:33 $0 'trythiskey.ex' $1 '' diff --git a/test/scripts/0000-Basic/0625 b/test/scripts/0000-Basic/0625 new file mode 100644 index 000000000..09587750d --- /dev/null +++ b/test/scripts/0000-Basic/0625 @@ -0,0 +1,18 @@ +# singlekey lookup ret-key +# +# baseline, get the data +exim -d-all+expand -bs '-DOPT=notthis : lsearch;DIR/aux-fixed/TESTNUM.lsearch : nothiseither' +HELO test +MAIL FROM:<testclient> +RCPT TO:<a@trythiskey.ex> +QUIT +**** +# +# get the key +exim -d-all+expand -bs '-DOPT=notthis : lsearch,ret=key;DIR/aux-fixed/TESTNUM.lsearch : nothiseither' +HELO test +MAIL FROM:<testclient> +RCPT TO:<a@trythiskey.ex> +QUIT +**** +# diff --git a/test/scripts/2500-dsearch/2500 b/test/scripts/2500-dsearch/2500 index 588690373..381ef2563 100644 --- a/test/scripts/2500-dsearch/2500 +++ b/test/scripts/2500-dsearch/2500 @@ -8,6 +8,7 @@ fail(case): ${lookup{TESTNUM.TST} dsearch{DIR/aux-fixed}{$value}{FAIL}} fail(case): ${lookup{TESTNUM.TST} dsearch{DIR/AUX-fixed}{$value}{FAIL}} fail(path): ${lookup{TESTNUM.tst} dsearch{.}{$value}{OTHER}} ok,full: ${lookup{TESTNUM.tst} dsearch,ret=full {DIR/aux-fixed}{$value}{FAIL}} +ok,key: ${lookup{TESTNUM.tst} dsearch,ret=key {DIR/aux-fixed}{$value}{FAIL}} ok,file: ${lookup{TESTNUM.tst} dsearch,filter=file {DIR/aux-fixed}{$value}{FAIL}} fail,file: ${lookup{TESTNUM.dir} dsearch,filter=file {DIR/aux-fixed}{$value}{FAIL}} ok,dir: ${lookup{TESTNUM.dir} dsearch,filter=dir {DIR/aux-fixed}{$value}{FAIL}} diff --git a/test/stderr/0625 b/test/stderr/0625 new file mode 100644 index 000000000..455a3ee1b --- /dev/null +++ b/test/stderr/0625 @@ -0,0 +1,59 @@ +Exim version x.yz .... +adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys +configuration file is TESTSUITE/test-config +admin user +LOG: smtp_connection MAIN + SMTP connection from CALLER + ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full + ├──expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full + ╰─────result: primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 + ╭considering: domain $domain + ├──expanding: domain $domain + ╰─────result: domain trythiskey.ex + ╰──(tainted) +LOG: MAIN + domain trythiskey.ex +created log directory TESTSUITE/spool/log + ╭considering: value $domain_data + ├──expanding: value $domain_data + ╰─────result: value has this data +LOG: MAIN + value has this data + ╭considering: \$0 '$0' \$1 '$1' + ├──expanding: \$0 '$0' \$1 '$1' + ╰─────result: $0 'trythiskey.ex' $1 '' + ╰──(tainted) +LOG: MAIN + $0 'trythiskey.ex' $1 '' +LOG: smtp_connection MAIN + SMTP connection from CALLER closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +adding SSLKEYLOGFILE=TESTSUITE/spool/sslkeys +configuration file is TESTSUITE/test-config +admin user +LOG: smtp_connection MAIN + SMTP connection from CALLER + ╭considering: $smtp_active_hostname ESMTP Exim $version_number $tod_full + ├──expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full + ╰─────result: primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 + ╭considering: domain $domain + ├──expanding: domain $domain + ╰─────result: domain trythiskey.ex + ╰──(tainted) +LOG: MAIN + domain trythiskey.ex + ╭considering: value $domain_data + ├──expanding: value $domain_data + ╰─────result: value trythiskey.ex +LOG: MAIN + value trythiskey.ex + ╭considering: \$0 '$0' \$1 '$1' + ├──expanding: \$0 '$0' \$1 '$1' + ╰─────result: $0 'trythiskey.ex' $1 '' + ╰──(tainted) +LOG: MAIN + $0 'trythiskey.ex' $1 '' +LOG: smtp_connection MAIN + SMTP connection from CALLER closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stdout/0625 b/test/stdout/0625 new file mode 100644 index 000000000..e09987cc3 --- /dev/null +++ b/test/stdout/0625 @@ -0,0 +1,10 @@ +220 primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 primaryhostname.ex Hello CALLER at test
+250 OK
+250 Accepted
+221 primaryhostname.ex closing connection
+220 primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 primaryhostname.ex Hello CALLER at test
+250 OK
+250 Accepted
+221 primaryhostname.ex closing connection
diff --git a/test/stdout/2500 b/test/stdout/2500 index ef5b2a18c..7e413c0a3 100644 --- a/test/stdout/2500 +++ b/test/stdout/2500 @@ -5,6 +5,7 @@ > Failed: failed to open TESTSUITE/AUX-fixed for directory search: No such file or directory > Failed: dirname '.' for dsearch is not absolute > ok,full: TESTSUITE/aux-fixed/2500.tst +> ok,key: 2500.tst > ok,file: 2500.tst > fail,file: FAIL > ok,dir: 2500.dir |