Fix ${extract } corrupting an enclosing ${reduce } $value. Bug 2061
[users/heiko/exim.git] / test / scripts / 2200-dnsdb / 2200
1 # dnsdb lookup in string expansions
2
3 exim -be
4 test.ex                    ${lookup dnsdb{test.ex}{$value}fail}
5 s/lash.test.ex             ${lookup dnsdb{s/lash.test.ex}{$value}fail}
6 txt=test.ex                ${lookup dnsdb{txt=test.ex}{$value}fail}
7 a=black-1.test.ex          ${lookup dnsdb{a=black-1.test.ex}{$value}fail}
8 xxx=test.ex                ${lookup dnsdb{xxx=test.ex}{$value}fail}
9 a=localhost.test.ex        ${lookup dnsdb{a=localhost.test.ex}{$value}fail}
10 cname=alias-eximtesthost.test.ex ${lookup dnsdb{cname=alias-eximtesthost.test.ex}{$value}fail}
11 ns=test.ex                 ${lookup dnsdb{ns=test.ex}{$value}fail}
12 zns=x.y.z.test.ex          ${lookup dnsdb{zns=x.y.z.test.ex}{$value}fail}
13 mx=mxt1.test.ex            ${lookup dnsdb{mx=mxt1.test.ex}{$value}fail}
14 mx=mxt3.test.ex            ${lookup dnsdb{mx=mxt3.test.ex}{$value}fail}
15 mxh=mxt1.test.ex           ${lookup dnsdb{mxh=mxt1.test.ex}{$value}fail}
16 ptr=V4NET.0.0.1            ${lookup dnsdb{ptr=V4NET.0.0.1}{$value}fail}
17 ptr=ptr.test.ex            ${lookup dnsdb{ptr=ptr.test.ex}{$value}fail}
18 srv=_smtp._tcp.srv01.test.ex     ${lookup dnsdb{srv=_smtp._tcp.srv01.test.ex}{$value}{fail}}
19 srv=_smtp._tcp.nosmtp.test.ex    ${lookup dnsdb{srv=_smtp._tcp.nosmtp.test.ex}{$value}{fail}}
20
21 csa=csa1.test.ex           ${lookup dnsdb{csa=csa1.test.ex}}
22 csa=csa2.test.ex           ${lookup dnsdb{csa=csa2.test.ex}}
23
24 soa=test.ex                ${lookup dnsdb{soa=test.ex}{$value}{fail}}
25 soa=a.test.ex              ${lookup dnsdb{>:, soa=test.ex}{$value}{fail}}
26
27 # DNS lookups with multiple items
28
29 ten-1:ten2                 ${lookup dnsdb{a=ten-1.test.ex:ten-2.test.ex}}
30 ten-1:defer:ten2           ${lookup dnsdb{a=ten-1.test.ex:test.again.dns:ten-2.test.ex}}
31 ten-1|ten2                 ${lookup dnsdb{a=<|ten-1.test.ex|ten-2.test.ex}}
32 mxt1;mxt2 | output         ${lookup dnsdb{>|mx=<;mxt1.test.ex;mxt2.test.ex}}
33 mxt1;mxt2 | output+field   ${lookup dnsdb{>|,:mx=<;mxt1.test.ex;mxt2.test.ex}}
34 mxt1;mxt2 | output         ${lookup dnsdb{>|mxh=<;mxt1.test.ex;mxt2.test.ex}}
35 13/14 rbl                  ${lookup dnsdb{> 13.12.11.V4NET.rbl.test.ex:13.12.11.V4NET.rbl.test.ex}}
36 double ptr                 ${lookup dnsdb{ptr=V4NET.0.0.1:V4NET.0.0.2}}
37 ten-1:bad                  ${lookup dnsdb{ a = ten-1.test.ex:badbad.test.ex}{$value}{FAILED}}
38 bad:bad                    ${lookup dnsdb{ a = <; badbad.test.ex ; badbad.test.ex}{$value}{FAILED}}
39
40 defer:defer                ${lookup dnsdb{a=test.again.dns:test.again.dns}}
41 defer_lax:ten-1            ${lookup dnsdb{a=test.again.dns:ten-1.test.ex}}
42 defer_lax:ten-1            ${lookup dnsdb{defer_lax,a=test.again.dns:ten-1.test.ex}}
43 defer_never:ten-1          ${lookup dnsdb{defer_never,a=test.again.dns:ten-1.test.ex}}
44 defer_never:defer          ${lookup dnsdb{defer_never,a=test.again.dns:test.again.dns}}
45 defer_strict:ten-1         ${lookup dnsdb{defer_strict,a=test.again.dns:ten-1.test.ex}}
46
47 # Retry timeout and count.  This only tests the syntax; we do not
48 # have any good way of testing the function.
49
50 delay1500                  ${lookup dnsdb{retrans_1s,retry_2,a=delay1500.test.ex}}
51 ****
52 #
53 # Cacheability
54 exim -d-all+lookup -be
55 a=localhost.test.ex        ${lookup dnsdb{a=localhost.test.ex}{$value}fail}
56 a=localhost.test.ex        ${lookup dnsdb{a=localhost.test.ex}{$value}fail}
57 ****
58 #
59 # TTL-limited noncacheability
60 exim -d-all+lookup -odq user@shorthost.test.ex
61 ****
62 #
63 # ACL defer_strict
64 exim -bs
65 HELO test
66 MAIL FROM:<>
67 RCPT TO:<defer_strict@test.again.dns>
68 QUIT
69 ****
70 #
71 no_msglog_check
72 #