Cond !bool{}/!bool_lax{} did not negate. Fixed.
[exim.git] / test / scripts / 0000-Basic / 0002
CommitLineData
59371ea7
PH
1# Common string expansions
2#
3# This is the main string expansion test that tests those expansions that will
4# be present in the basic Exim binary which we require in order to run these
5# tests at all. Specialized expansion tests also exist for optional features
6# in other test scripts.
7
8exim -be
9
10# These expansions can test variables in the configuration, but as there
11# is no message being processed, there is no message-related data. But
12# that of course gets tested in plenty of other places.
13
14# Some fixed variables
15
16exim_path: $exim_path
17primary_hostname: $primary_hostname
18primary_hostname: ${primary_hostname}
19qualify_domain: $qualify_domain
20bounce_return_size_limit: ${bounce_return_size_limit}
21spool_directory: $spool_directory
22unknown: ${unknown}
23h_subject: $h_subject:(should be empty)
24h_subject:$h_subject (should be empty)
25header in curlies: ${header_subject:} (should fail)
26
27# \$message_headers should be empty
28message_headers: >$message_headers<
29
30# Continuation
31x\
32y
33x\
34 y
35
36# Overlong names and overbig numbers
37
38+$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
39+${aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
40+$11111111111111111111111111111111111
41+${11111111111111111111111111111111111}
42
29f89cad
PH
43# List operations
44
45filter: "${filter{a:b:c}{eq{1}{1}}}"
46filter: ${filter{a:b:c}{!eq{$item}{b}}}
47filter: ${filter{<' a'b'c}{!eq{$item}{b}}}
48filter: ${filter{<' ''a'b' ''c}{!eq{$item}{b}}}
49filter: "${filter{}{!eq{$item}{b}}}"
50
51map: "${map{}{$item}}"
52map: ${map{a:b:c}{$item}}
53map: ${map{a:b:c}{:$item:}}
54map: ${if eq{1}{0}{${map{a:b:c}{:$item:}}}{fail string}}
55map: ${map{:b:c}{[$item]}}
56
57reduce: "${reduce{}{+}{$value$item}}"
58reduce: ${reduce{a:b:c}{+}{$value$item}}
59reduce: ${reduce {<, 1,2,3}{0}{${eval:$value+$item}}}
60reduce: ${reduce {3:0:9:4:6}{0}{${if >{$item}{$value}{$item}{$value}}}}
61
ec95d1a6
PH
62# Tests with iscntrl() and illegal separators
63
64map: ${map{<\n a\n\nb\nc}{'$item'}}
65
66reduce: ${reduce {<n 1\n2\n3}{0}{${eval:$value+$item}}}
67reduce: ${reduce {<\n 1\n2\n3}{0}{${eval:$value+$item}}}
68reduce: ${reduce { <\n 1\n 2 \n 3 }{0}{${eval:$value+$item}}}
69reduce: ${reduce {<\x7f 1\x7f2\177 3}{0}{${eval:$value+$item}}}
70
59371ea7
PH
71# Operators
72
73addrss: ${address:local-part@dom.ain}
74addrss: ${address:Exim Person <local-part@dom.ain> (that's me)}
75domain: ${domain:local-part@dom.ain}
76domain: ${domain:Exim Person <local-part@dom.ain> (that's me)}
29f89cad
PH
77
78addresses: ${addresses:>' 'abc@xyz, 'pqr@xyz}
79addresses: ${addresses:Exim Person <local-part@dom.ain> (that's me)}
80addresses: ${addresses:>+ Exim Person <local-part@dom.ain> (that's me),\
81 xyz@abc}
82addresses: ${addresses:Exim Person <local-part@dom.ain> (that's me), \
83 xyz@abc, nullgroupname:;, group: p@q, r@s; }
84addresses: ${addresses:local-part@dom.ain <local-part@dom.ain>}
85
59371ea7
PH
86escape: ${escape:B7F2}
87eval: ${eval:1+1}
88eval: ${eval:1+2*3}
89eval: ${eval:(1+2)*3}
90eval: ${eval:3/2*4}
91eval: ${eval:3*4/2}
92eval: ${eval:42}
93eval: ${eval:}
94eval: ${eval:-2}
95eval: ${eval:-2 - -3}
96eval: ${eval:-2 - (-3)}
97eval: ${eval:-2 - (-3}
98eval: ${eval:-2 - -3)}
99eval: ${eval:-2 --3}
100eval: ${eval:-2 -+3}
101eval: ${eval:-2 -+-3}
102eval: ${eval:(2*(1+1))/2 + 40K}
103eval: ${eval:077}
104eval: ${eval:08}
105eval10: ${eval10:077}
106eval10: ${eval10:08}
af561417
PH
107eval10: ${eval10:0x1234}
108eval: ${eval:2+42%5}
0ce9abe6
PH
109eval: ${eval:0xc&5}
110eval: ${eval:0xc & 5 }
111eval: ${eval:0x0c|5}
112eval: ${eval:0xc^5}
113eval: ${eval:0xc>>1}
114eval: ${eval:0xc >> 2}
115eval: ${eval:0xc >> 4 }
116eval: ${eval:0xc<<1}
117eval: ${eval:~255&0x1234}
118eval: ${eval:~ 255&0x1234}
119eval: ${eval: -(~255&0x1234)}
af561417 120
59371ea7
PH
121expand: \$primary_hostname ${expand:\$primary_hostname}
122hash: ${hash_3:monty} ${hash_5:monty} ${hash_4_62:monty python}
123hash: ${hash_3:abc}X ${hash_3:ab}X ${hash_3:a}X ${hash_3:}X
124hex2b64:${hex2b64:12345678}
125hex2b64:${hex2b64:abcdef}
126hex2b64:${hex2b64:ABCDEF}
127hex2b64:${hex2b64:1a2b3c4d5e6f}
128hex2b64:${hex2b64:1a2b3c4d5e6}
129hex2b64:${hex2b64:1a2b3c4d5e6g}
130hex2b64:${hex2b64:${md5:the quick brown fox}}
131hex2b64:${hex2b64:${sha1:the quick brown fox}}
132
133The base62 operator is actually a base36 operator in the Darwin and Cygwin
134environments. Write cunning tests that produce the same output in both cases,
135while doing a reasonable check.
136
137base62: ${if or {\
138 {eq {${base62:12345}}{0003D7}}\
139 {eq {${base62:12345}}{0009IX}}\
0ce9abe6 140 }{OK}{NOT OK}}
59371ea7
PH
141base62d: ${if or {\
142 {eq {${base62d:0003D7}}{12345}}\
143 {eq {${base62d:0009IX}}{12345}}\
0ce9abe6 144 }{OK}{NOT OK}}
59371ea7
PH
145base62d: ${if or {\
146 {eq {${base62d:3D7}}{12345}}\
147 {eq {${base62d:9IX}}{12345}}\
0ce9abe6 148 }{OK}{NOT OK}}
59371ea7
PH
149base62 error: ${base62:12345x}
150base62d error:${base62d:0003D7.}
151
152hmac: ${hmac{md5}{somesecret}{mail.example.com 2002-10-17 11:30:59}}
153hmac: ${hmac{sha1}{somesecret}{mail.example.com 2002-10-17 11:30:59}}
154md5: ${md5:the quick brown fox jumps over the lazy dog}
155sha1: ${sha1:}
156sha1: ${sha1:abc}
157mask: ${mask:192.168.10.206/28}
158mask: ${mask:192.168.10.206/32}
159mask: ${mask:192.168.10.206/33}
160mask: ${mask:192.168.10.206/0}
161mask: ${mask:192.168.10.206}
162mask: ${mask:a.b.c.d}
163nhash: ${nhash_24:monty} ${nhash_8_63:monty python}
164lc/uc: ${lc:The Quick} ${uc: Brown Fox}
165length: ${length_10:The quick brown fox} ${l_10:abc}
166lclpt: ${local_part:local-part@dom.ain}
167lclpt: ${local_part:Exim Person <local-part@dom.ain> (that's me)}
168quote: ${quote:aZ09_.-Q} ${quote:ab*cd} ${quote:ab\cd"ef}
169quote: ${quote:nl(\n)}
170quote: ${quote:cr(\r)}
171quote: ${quote:tab(\t)}
172quote: ${quote:xff(\xff)}
173quote: Empty>${quote:}<
174quote_local_part: ${quote_local_part:abcd}
175quote_local_part: ${quote_local_part:O'Reilly}
176quote_local_part: ${quote_local_part:a space}
177quote_local_part: ${quote_local_part:.something}
178quote_local_part: ${quote_local_part:something.}
179quote_local_part: ${quote_local_part:joe.bloggs}
180quote_local_part: ${quote_local_part:a!b}
181quote_local_part: ${quote_local_part:x@y}
182quote_local_part: ${quote_local_part:ab*cd}
183quote_local_part: ${quote_local_part:x:y}
184quote_local_part: ${quote_local_part:ab\cd"ef}
185quote_local_part: ${quote_local_part:}
186rxquote:${rxquote:aZ09_,-Q} ${rxquote:ab*cd} ${rxquote:ab\cd"ef}
187substr: ${substr_3_2:rhubarb} ${s_-5_2:1234567} ${s_-5_2:12} ${s_-3_2:12}
188substr: ${s_3:rhubarb} ${s_-2:rhubarb}
189substr: ${s_1:}
190substr: ${substr_10:abc}
191str2b64:${str2b64:abcd}
192str2b64:${str2b64:The quick brown \n fox}
193strlen: ${strlen:}
194strlen: ${strlen:a}
195strlen: ${strlen:abcdefgh}
f90d018c
PH
196time_eval: ${time_eval:10s}
197time_eval: ${time_eval:2h}
198time_eval: ${time_eval:1d5m}
199time_eval: ${time_eval:1w2d3h4m5s}
200time_eval: ${time_eval:14}
201time_eval: ${time_eval:rhubarb}
59371ea7
PH
202time_interval: ${time_interval:0}
203time_interval: ${time_interval:44}
204time_interval: ${time_interval:999999}
205time_interval: ${time_interval:-1}
206time_interval: ${time_interval:rhubarb}
207
208# stat is a bit tricky, but some of the fields of the aux-var directory
209# should be the same on all systems
210
211stat: ${extract{mode}{${stat:DIR/aux-var}}}
212stat: ${extract{smode}{${stat:DIR/aux-var}}}
213stat: ${stat:/a/non/existent/file}
214
215# "Operators" that have expanded arguments
216
217hash: ${hash{3}{monty}} ${hash{5}{monty}} ${hash{4}{62}{monty python}}
218hash: ${hash{3}{abc}}X ${hash{3}{ab}}X ${hash{3}{a}}X ${hash{3}{}}X
219nhash: ${nhash{24}{monty}} ${nhash{8}{63}{monty python}}
220length: ${length{10}{The quick brown fox}} ${length{10}{abc}}
221substr: ${substr{3}{2}{rhubarb}} ${substr{-5}{2}{1234567}} ${substr{-5}{2}{12}} ${substr{-3}{2}{12}}
222substr: ${substr{${if eq{1}{1}{-8}}}{${if eq{1}{0}{25}{1}}}{abcde}}
223
224# Error forms
225
226${hash{one}}
227${hash{nonnumber}{abcd}}
228${hash{3}{2}{4}{abcd}}
229${substr{-3}{-2}{abcd}}
230
231# Skipped operators
232
233addrss: ${if eq {1}{2}{${address:invalid}}{NO}}
234domain: ${if eq {1}{2}{${domain:invalid}}{NO}}
235escape: ${if eq {1}{2}{${escape:invalid}}{NO}}
236expand: ${if eq {1}{2}{\$primary_hostname ${expand:\$invalid}}{NO}}
237hash: ${if eq {1}{2}{${hash_3:invalid}}{NO}}
238md5: ${if eq {1}{2}{${md5:invalid}}{NO}}
239mask: ${if eq {1}{2}{${mask:invalid}}{NO}}
240
d45b1de8
PH
241# Numeric overflow
242
2434096M ${if >{1}{4096M}{y}{n}}
2444096000000 ${if >{1}{4096000000}{y}{n}}
245
59371ea7
PH
246# Conditions
247
2482=2: ${if ={2}{2}{y}{n}}
2492==2: ${if =={2}{2}{y}{n}}
2503=2: ${if ={3}{2}{y}{n}}
2512==3: ${if =={2}{3}{y}{n}}
252!2=2: ${if !={2}{2}{y}{n}}
253!2==2: ${if !=={2}{2}{y}{n}}
254!3=2: ${if !={3}{2}{y}{n}}
255!2==3: ${if !=={2}{3}{y}{n}}
2562>3: ${if >{2}{3}{y}{n}}
2573>3: ${if >{3}{3}{y}{n}}
2584>3: ${if >{4}{3}{y}{n}}
d45b1de8 2591>-1: ${if >{1}{-1}{y}{n}}
59371ea7
PH
2602>=3: ${if >={2}{3}{y}{n}}
2613>=3: ${if >={3}{3}{y}{n}}
2624>=3: ${if >={4}{3}{y}{n}}
2632<3: ${if <{2}{3}{y}{n}}
2643<3: ${if <{3}{3}{y}{n}}
2654<3: ${if <{4}{3}{y}{n}}
2662<=3: ${if <={2}{3}{y}{n}}
2673<=3: ${if <={3}{3}{y}{n}}
2684<=3: ${if <={4}{3}{y}{n}}
2695<=3: ${if <={ 5 } { 3 } {y}{n}}
d45b1de8 270-3<=1: ${if <={-3}{1}{y}{n}}
59371ea7
PH
271
2725>3k: ${if >{5 } {3k }{y}{n}}
2735>3m: ${if >{5 } {3m }{y}{n}}
2745>3z: ${if >{5 } {3z }{y}{n}}
2755>a: ${if >{ 5 } {a}{y}{n}}
276
5dd1517f
PH
277>0: ${if > {}{0}{y}{n}}
278=: ${if = {}{}{y}{n}}
279-2<: ${if < {-2}{}{y}{n}}
28008>07: ${if > {08}{07}{y}{n}}
281011=11: ${if = {011}{11}{y}{n}}
282
59371ea7
PH
283def:y ${if def:tod_log{y}{n}}
284def:n ${if def:host{y}{n}}
285def:f ${if def:post{y}{n}}
286def:h_f ${if def:h_xxx {y}{n}}
287def:h_f ${if def:h_xxx:{y}{n}}
288def:d: ${if def:tod_log:{y}{n}}
289
290exists: ${if exists{/etc/passwd}{y}{n}}
291exists: ${if exists{/doesnt}{y}{n}}
292
293eq: ${if eq{abc}{abc}{y}{n}}
294eq: ${if eq{abc}{xyz}{y}{n}}
295!eq: ${if !eq{abc}{abc}{y}{n}}
296!eq: ${if !eq{abc}{xyz}{y}{n}}
297
298eqi: ${if eqi{abc}{abc}{y}{n}}
299eqi: ${if eqi{abc}{ABC}{y}{n}}
300eqi: ${if eqi{abc}{xyz}{y}{n}}
301!eqi: ${if !eqi{abc}{abc}{y}{n}}
302!eqi: ${if !eqi{abc}{aBc}{y}{n}}
303!eqi: ${if !eqi{abc}{xyz}{y}{n}}
304
305lt: ${if lt{ABC}{abc}{y}{n}}
306lti: ${if lti{ABC}{abc}{y}{n}}
307le: ${if le{ABC}{abc}{y}{n}}
308lei: ${if lei{ABC}{abc}{y}{n}}
309gt: ${if gt{ABC}{abc}{y}{n}}
310gti: ${if gti{ABC}{abc}{y}{n}}
311ge: ${if ge{ABC}{abc}{y}{n}}
312gei: ${if gei{ABC}{abc}{y}{n}}
313
314isip: ${if isip {1.2.3.4}{y}{n}} 1.2.3.4
315isip4: ${if isip4{1.2.3.4}{y}{n}} 1.2.3.4
316isip6: ${if isip6{1.2.3.4}{y}{n}} 1.2.3.4
317isip: ${if isip {1:2:3:4}{y}{n}} 1:2:3:4
318isip4: ${if isip4{1:2:3:4}{y}{n}} 1:2:3:4
319isip6: ${if isip6{1:2:3:4}{y}{n}} 1:2:3:4
320isip: ${if isip {::1}{y}{n}} ::1
321isip4: ${if isip4{::1}{y}{n}} ::1
322isip6: ${if isip6{::1}{y}{n}} ::1
323isip: ${if isip {fe80::a00:20ff:fe86:a061}{y}{n}} fe80::a00:20ff:fe86:a061
324isip4: ${if isip4{fe80::a00:20ff:fe86:a061}{y}{n}} fe80::a00:20ff:fe86:a061
325isip6: ${if isip6{fe80::a00:20ff:fe86:a061}{y}{n}} fe80::a00:20ff:fe86:a061
326isip: ${if isip {rhubarb}{y}{n}} rhubarb
327isip4: ${if isip4{rhubarb}{y}{n}} rhubarb
328isip6: ${if isip6{rhubarb}{y}{n}} rhubarb
329
330match: ${if match{abcd}{\N^([ab]+)(\w+)$\N}{$2$1}fail}
331match: ${if match{abcd}{^\N([ab]+)(\w+)$\N}{$2$1}fail}
332match: ${if match{abcd}{^([ab]+)(\\w+)\$}{$2$1}fail}
333match: ${if match{wxyz}{^([ab]+)(\\w+)\$}{$2$1}fail}
334match: ${if match{abcd}{^([ab]+)(\\w+)\$}{$2[${if match{xyz}{(.*)}{$1}fail}]$1}fail}
335
336match_domain: ${if match_domain{a.b.c}{x.y.z:a.b.c:p.q.r}{yes}{no}}
337match_domain: ${if match_domain{a.b.c}{x.y.z:p.q.r}{yes}{no}}
338match_domain: ${if match_domain{5.aa.bb}{+dlist}{yes}{no}}
339match_domain: ${if match_domain{xxxyz}{+dlist}{yes}{no}}
340match_domain: ${if match_domain{xyz}{+dlist}{yes}{no}}
341
f78eb7c6
PH
342${if match{x@zz.aa.bb}{^(.*)} \
343 { \
0ce9abe6 344 >$1< \
f78eb7c6
PH
345 ${if match_domain{${domain:$1}}{+dlist}{[$1]}} \
346 >$1< \
347 } \
0ce9abe6 348 { CAN'T HAPPEN}}
f78eb7c6
PH
349
350${if match{x@xxxabc}{^(.*)} \
351 { \
0ce9abe6 352 >$1< \
f78eb7c6
PH
353 ${if match_domain{${domain:$1}}{^\Nxxx(.*)\N}{[$1]}} \
354 >$1< \
355 } \
0ce9abe6 356 { CAN'T HAPPEN}}
f78eb7c6 357
59371ea7
PH
358match_address: ${if match_address{x@y.z}{p@q:*@y.z}{yes}{no}}
359match_address: ${if match_address{x@y.z}{p@q:x@*.z}{yes}{no}}
360
361match_local_part:${if match_local_part{jo}{jack:jill:jo:john}{yes}{no}}
362match_local_part:${if match_local_part{jo}{\N^\w\N}{yes}{no}}
363
364match_ip: 01 ${if match_ip{1.2.3.4}{4.5.6.7:1.2.3.4}}
365match_ip: 02 ${if match_ip{1.2.3.4}{4.5.6.7:1.2.3.6}}
366match_ip: 03 ${if match_ip{1.2.3.4}{4.5.6.7:1.2.3.6/24}}
367match_ip: 04 ${if match_ip{1.2.3.4}{4.5.6.7:1.2.3.6:*}}
368match_ip: 05 ${if match_ip{1.2.3.4}{4.5.6.7:1.2.3.6:name}}
369match_ip: 06 ${if match_ip{1.2.3.4}{:4.5.6.7}}
370match_ip: 07 ${if match_ip{}{:4.5.6.7}}
371match_ip: 08 ${if match_ip{V4NET.11.12.13}{+hlist}}
372match_ip: 09 ${if match_ip{V4NET.11.12.14}{+hlist}}
373match_ip: 10 ${if match_ip{192.168.3.4}{+hlist}}
374match_ip: 11 ${if match_ip{somename}{+hlist}}
375match_ip: 12 ${if match_ip{1.2.3.4}{lsearch;DIR/aux-fixed/0002.matchip}}
376match_ip: 13 ${if match_ip{1.2.3.4}{net-lsearch;DIR/aux-fixed/0002.matchip}}
377match_ip: 14 ${if match_ip{5.6.7.8}{net24-lsearch;DIR/aux-fixed/0002.matchip}}
6a3bceb1 378match_ip: 15 ${if match_ip{abcd::dcba}{net-iplsearch;DIR/aux-fixed/0002.matchip}}
59371ea7
PH
379
380queue_running: ${if queue_running{y}{n}}
381first_delivery: ${if first_delivery{y}{n}}
382
383queue_running after or: ${if or{{eq {0}{0}}{queue_running}}{y}{n}}
384first_delivery after or: ${if or{{eq {0}{0}}{first_delivery}}{y}{n}}
385
386# Default values for both if strings
387
388\${if eq{1}{1}} >${if eq{1}{1}}<
389\${if eq{1}{2}} >${if eq{1}{2}}<
390
391# Lookups: DIR is the testing directory. In this test we can only use the
392# lookups that are required in all cases.
393
394${lookup{postmaster}lsearch{DIR/aux-fixed/0002.aliases}{$value}fail}
395
396${lookup{x@y}lsearch*@{DIR/aux-fixed/0002.starat}{$value}fail}
397${lookup{x@z}lsearch*{DIR/aux-fixed/0002.starat}{$value}fail}
398${lookup{x@z}lsearch*@{DIR/aux-fixed/0002.starat}{$value}fail}
399${lookup{x@w}lsearch*@{DIR/aux-fixed/0002.starat}{$value}fail}
400
401${lookup{a.b.c.d}partial-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
402${lookup{x.y.z}partial-lsearch{DIR/aux-fixed/0002.domains}{$value}{failed x.y.z}}
403${lookup{p.q}partial-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
404${lookup{o.p.q}partial-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
405${lookup{m.n.o.p.q}partial-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
406${lookup{x.y.z}partial1-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
407${lookup{x.y.z}partial0-lsearch{DIR/aux-fixed/0002.domains}{$value}fail}
408
409q1: ${lookup{abc}lsearch{DIR/aux-fixed/0002.quoted}}
410q2: ${lookup{xyz}lsearch{DIR/aux-fixed/0002.quoted}}
411q3: ${lookup{pqr}lsearch{DIR/aux-fixed/0002.quoted}}
412q4: ${lookup{a:b}lsearch{DIR/aux-fixed/0002.quoted}}
413q5: ${lookup{"quoted"}lsearch{DIR/aux-fixed/0002.quoted}}
414q6: ${lookup{white space}lsearch{DIR/aux-fixed/0002.quoted}}
415q7: ${lookup{b\\s}lsearch{DIR/aux-fixed/0002.quoted}}
416
417abc: ${lookup{abc}wildlsearch{DIR/aux-var/0002.wild}}
418a.b.c: ${lookup{a.b.c}wildlsearch{DIR/aux-var/0002.wild}}
419ab.c: ${lookup{ab.c}wildlsearch{DIR/aux-var/0002.wild}}
420xyz: ${lookup{xyz}wildlsearch{DIR/aux-var/0002.wild}}
421Xyz: ${lookup{Xyz}wildlsearch{DIR/aux-var/0002.wild}}
422Zyz: ${lookup{Zyz}wildlsearch{DIR/aux-var/0002.wild}}
423a b: ${lookup{a b}wildlsearch{DIR/aux-var/0002.wild}}
424a b: ${lookup{a b}wildlsearch{DIR/aux-var/0002.wild}}
425a:b: ${lookup{a:b}wildlsearch{DIR/aux-var/0002.wild}}
426a.b: ${lookup{a.b}wildlsearch{DIR/aux-var/0002.wild}}
427a..b: ${lookup{a..b}wildlsearch{DIR/aux-var/0002.wild}}
428a9b: ${lookup{a9b}wildlsearch{DIR/aux-var/0002.wild}}
429a99b: ${lookup{a99b}wildlsearch{DIR/aux-var/0002.wild}}
430
431# Should give the same results as above because expansion does nothing
432
433abc: ${lookup{abc}nwildlsearch{DIR/aux-var/0002.wild}}
434a.b.c: ${lookup{a.b.c}nwildlsearch{DIR/aux-var/0002.wild}}
435ab.c: ${lookup{ab.c}nwildlsearch{DIR/aux-var/0002.wild}}
436xyz: ${lookup{xyz}nwildlsearch{DIR/aux-var/0002.wild}}
437Xyz: ${lookup{Xyz}nwildlsearch{DIR/aux-var/0002.wild}}
438Zyz: ${lookup{Zyz}nwildlsearch{DIR/aux-var/0002.wild}}
439a b: ${lookup{a b}nwildlsearch{DIR/aux-var/0002.wild}}
440a b: ${lookup{a b}nwildlsearch{DIR/aux-var/0002.wild}}
441a:b: ${lookup{a:b}nwildlsearch{DIR/aux-var/0002.wild}}
442
443# Should fail because of no expansion
444
445a.b: ${lookup{a.b}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NO}}
446a..b: ${lookup{a..b}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NO}}
447a9b: ${lookup{a9b}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NO}}
448a99b: ${lookup{a99b}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NO}}
449
450# But these should succeed
451
452a\\:b: ${lookup{a\\:b}nwildlsearch{DIR/aux-var/0002.wild}}
453a\\:Xb: ${lookup{a\\:Xb}nwildlsearch{DIR/aux-var/0002.wild}}
454
366fc9f0
PH
455# Some tests of case-(in)dependence
456
457MiXeD-CD: ${lookup{MiXeD-CD}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NOT FOUND}}
458MixeD-CD: ${lookup{MixeD-CD}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NOT FOUND}}
459MiXeD-Ncd: ${lookup{MiXeD-Ncd}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NOT FOUND}}
460MixeD-Ncd: ${lookup{MixeD-Ncd}nwildlsearch{DIR/aux-var/0002.wild}{$value}{NOT FOUND}}
461
59371ea7
PH
462# IP address (CIDR) lookups
463
4641.2.3.4: ${lookup{1.2.3.4}iplsearch{DIR/aux-fixed/0002.iplsearch}}
4651.2.3.5: ${lookup{1.2.3.5}iplsearch{DIR/aux-fixed/0002.iplsearch}}
4661.2.3.5: ${lookup{1.2.3.5}iplsearch*{DIR/aux-fixed/0002.iplsearch}}
467abcd::cdab: ${lookup{abcd::cdab}iplsearch{DIR/aux-fixed/0002.iplsearch}}
468192.168.1.2: ${lookup{192.168.1.2}iplsearch{DIR/aux-fixed/0002.iplsearch}}
469192.168.5.6: ${lookup{192.168.5.6}iplsearch{DIR/aux-fixed/0002.iplsearch}}
470abcd:abcd:: ${lookup{abcd:abcd::}iplsearch{DIR/aux-fixed/0002.iplsearch}}
471abcd:abcd:1:: ${lookup{abcd:abcd:1::}iplsearch{DIR/aux-fixed/0002.iplsearch}}
472abcd:abcd::3 ${lookup{abcd:abcd::3}iplsearch{DIR/aux-fixed/0002.iplsearch}}
473rhubarb ${lookup{rhubarb}iplsearch{DIR/aux-fixed/0002.iplsearch}}
474
475
476# Nested Lookups - style 1
477
478${lookup{${lookup{key1}lsearch{DIR/aux-fixed/0002.rec}{$value}{key1f}}}lsearch{DIR/aux-fixed/0002.rec}{$value}fail}
479${lookup{${lookup{key3}lsearch{DIR/aux-fixed/0002.rec}{$value}{key1f}}}lsearch{DIR/aux-fixed/0002.rec}{$value}fail}
480
481# Nested Lookups - style 2
482
483${lookup{key1}lsearch{DIR/aux-fixed/0002.rec}{${lookup{$value}lsearch{DIR/aux-fixed/0002.rec}{$value}{failed for $value}}}{failed for key1}}
484${lookup{key3}lsearch{DIR/aux-fixed/0002.rec}{${lookup{$value}lsearch{DIR/aux-fixed/0002.rec}{$value}{failed for $value}}}{failed for key1}}
485
486# Other nesting tests
487
488${lookup{one}lsearch{DIR/aux-fixed/0002.alias1}{$value${lookup{one}lsearch{DIR/aux-fixed/0002.alias2}{,$value}}}{${lookup{one}lsearch{DIR/aux-fixed/0002.alias2}{$value}fail}}}
489${lookup{two}lsearch{DIR/aux-fixed/0002.alias1}{$value${lookup{two}lsearch{DIR/aux-fixed/0002.alias2}{,$value}}}{${lookup{two}lsearch{DIR/aux-fixed/0002.alias2}{$value}fail}}}
490${lookup{both}lsearch{DIR/aux-fixed/0002.alias1}{$value${lookup{both}lsearch{DIR/aux-fixed/0002.alias2}{,$value}}}{${lookup{both}lsearch{DIR/aux-fixed/0002.alias2}{$value}fail}}}
491${lookup{neither}lsearch{DIR/aux-fixed/0002.alias1}{$value${lookup{neither}lsearch{DIR/aux-fixed/0002.alias2}{,$value}}}{${lookup{neither}lsearch{DIR/aux-fixed/0002.alias2}{$value}fail}}}
492
493# Lookup quotes for standardly expected lookups
494
495lsearch ${quote_lsearch: !@#\$%^&*()_-+=|\\~`1234567890\{[\}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm}
496xxx ${quote_xxx: !@#\$%^&*()_-+=|\\~`1234567890\{[\}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm}
497
498# Extract
499
500${extract{B}{A=1 B=2 C=3}}
501${extract{ B }{A=1 B=2 C=3}{$value}{NOT FOUND}}
502${extract{2}{:}{1:2:3}}
503${extract{ 2 }{:}{1:2:3}{$value}{NOT FOUND}}
504Empty:<${extract{D}{A=1 B=2 C=3}}>
505Empty:<${extract{4}{:}{1:2:3}}>
506${extract{C}{A=1 B=2 C=3}{<$value>}}
507${extract{3}{:}{1:2:3}{<$value>}}
508Empty:<${extract{Z}{A=1 B=2 C=3}{<$value>}}>
509Empty:<${extract{4}{:}{1:2:3}{<$value>}}>
510${extract{Z}{A=1 B=2 C=3}{<$value>}{no Z}}
511${extract{4}{:}{1:2:3}{<$value>}{no 4}}
512${extract{Z}{A=1 B=2 C=3}{<$value>}fail}
513${extract{4}{:}{1:2:3}{<$value>}fail}
514${extract{K4}{${sg{1=A 4=D 3=C}{(\\d+)=}{K\$1=}}}}
515${extract{0}{:}{a:b:c:d:e}{$value}{FAIL}}
516${extract{1}{:}{a:b:c:d:e}{$value}{FAIL}}
517${extract{-1}{:}{a:b:c:d:e}{$value}{FAIL}}
518${extract{-5}{:}{a:b:c:d:e}{$value}{FAIL}}
519${extract{-6}{:}{a:b:c:d:e}{$value}{FAIL}}
520${extract{-3}{:,}{a,,b::c}}
521${extract{2}{:,}{a,,b::c}}
522${extract{3}{:,}{a,,b::c}}
523${extract{a-b}{X = "one two" a-b "three four" 5=99}}
524${extract{}{X=3}}
525${extract{ }{X=3}}
526${extract{ 2 }{ }{a b c}}
527
528# Translation
529
530abcdea aaa xyz ${tr{abcdea}{aaa}{xyz}}
531abcdea a z ${tr{abcdea}{a}{z}}
532abcdea a ${tr{abcdea}{a}{}}
533abcdea abc z ${tr{abcdea}{abc}{z}}
534
fdab5d49
JJ
535# Boolean
536"TrUe" ${if bool{TrUe}{true}{false}} EXPECT: true
537"FALSE" ${if bool{FALSE}{true}{false}} EXPECT: false
538" yes" ${if bool{ yes}{true}{false}} EXPECT: true
539" no" ${if bool{ no}{true}{false}} EXPECT: false
540"yes " ${if bool{yes }{true}{false}} EXPECT: true
541"-1" ${if bool{-1}{true}{false}} EXPECT: error
542"0" ${if bool{0}{true}{false}} EXPECT: false
543"1" ${if bool{1}{true}{false}} EXPECT: true
544" 0 " ${if bool{ 0 }{true}{false}} EXPECT: false
545" 1 " ${if bool{ 1 }{true}{false}} EXPECT: true
546"1111111111111111111" ${if bool{1111111111111111111}{true}{false}} EXPECT: true
547"9" ${if bool{9}{true}{false}} EXPECT: true
548" " ${if bool{ }{true}{false}} EXPECT: false
549"text" ${if bool{text}{true}{false}} EXPECT: error
550" text" ${if bool{ text}{true}{false}} EXPECT: error
551"text " ${if bool{text }{true}{false}} EXPECT: error
552" text " ${if bool{ text }{true}{false}} EXPECT: error
553"00" ${if bool{00}{true}{false}} EXPECT: false
5ee6f336
PP
554"!true" ${if !bool{true}{true}{false}} EXPECT: false
555"!false" ${if !bool{false}{true}{false}} EXPECT: true
fdab5d49
JJ
556
557"TrUe" ${if bool_lax{TrUe}{true}{false}} EXPECT: true
558"FALSE" ${if bool_lax{FALSE}{true}{false}} EXPECT: false
559" yes" ${if bool_lax{ yes}{true}{false}} EXPECT: true
560" no" ${if bool_lax{ no}{true}{false}} EXPECT: false
561"yes " ${if bool_lax{yes }{true}{false}} EXPECT: true
562"-1" ${if bool_lax{-1}{true}{false}} EXPECT: true
563"0" ${if bool_lax{0}{true}{false}} EXPECT: false
564"1" ${if bool_lax{1}{true}{false}} EXPECT: true
565" 0 " ${if bool_lax{ 0 }{true}{false}} EXPECT: false
566" 1 " ${if bool_lax{ 1 }{true}{false}} EXPECT: true
567"1111111111111111111" ${if bool_lax{1111111111111111111}{true}{false}} EXPECT: true
568"9" ${if bool_lax{9}{true}{false}} EXPECT: true
569" " ${if bool_lax{ }{true}{false}} EXPECT: false
570"text" ${if bool_lax{text}{true}{false}} EXPECT: true
571" text" ${if bool_lax{ text}{true}{false}} EXPECT: true
572"text " ${if bool_lax{text }{true}{false}} EXPECT: true
573" text " ${if bool_lax{ text }{true}{false}} EXPECT: true
574"00" ${if bool_lax{00}{true}{false}} EXPECT: true
5ee6f336
PP
575"!true" ${if !bool_lax{true}{true}{false}} EXPECT: false
576"!false" ${if !bool_lax{false}{true}{false}} EXPECT: true
fdab5d49 577
59371ea7
PH
578# RFC 2047
579
580abcd ${rfc2047:abcd}
581<:abcd:> ${rfc2047:<:abcd:>}
582<:ab cd:> ${rfc2047:<:ab cd:>}
583Long: ${rfc2047: here we go: a string that is going to be encoded: it will go over the 75-char limit}
584Long: ${rfc2047: here we go: a string that is going to be encoded: it will go over the 75-char limit by a long way; in fact this one will go over the 150 character limit}
585
9c57cbc0
PH
586# RFC 2047 decode
587
588${rfc2047d:abcd abcd}
589${rfc2047d:<:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=}
590${rfc2047d:<:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=}
591${rfc2047d:Long: =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_i?= =?iso-8859-8?Q?t_will_go_over_the_75-char_limit?=}
592${rfc2047d:Long: =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_i?= =?iso-8859-8?Q?t_will_go_over_the_75-char_limit_by_a_long_way=3B_in_fac?= =?iso-8859-8?Q?t_this_one_will_go_over_the_150_character_limit?=}
59371ea7
PH
593
594# UTF-8
595
596abcd ${from_utf8:abcd}
597ad ${from_utf8:aÀÿd}
598toobig ${from_utf8:aĀd}
599
600# Substitution
601
602\${sg{abcdefabcdef}{abc}{xyz}} =${sg{abcdefabcdef}{abc}{xyz}}
603\${sg{ab:xy::z}{:}{::}} =${sg{ab:xy::z}{:}{::}}
604\${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =${sg{abcdefabcdef}{(..)[^c]}{>$1<}}
605\${sg{abcdefabcdef}{(..)[^c]}{>\\\$1<}} =${sg{abcdefabcdef}{(..)[^c]}{>\$1<}}
606\${sg{abcdefabcdef}{(..)[^c]}{>\\N\$1\\N<}}=${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}
607\${sg{abbab}{a*}{+}} =${sg{abbab}{a*}{+}}
608
609# File insertion
610
611${readfile}
612${readfile{DIR/aux-fixed/0002.readfile}}
613${readfile{DIR/aux-fixed/0002.readfile}{}}
614${readfile{DIR/aux-fixed/0002.readfile}{:}}
615${readfile{DIR/aux-fixed/0002.readfile}{ - }}
616${readfile{/non/exist/file}}
617${if exists{/non/exist/file}{${readfile{/non/exist/file}}}{non-exist}}
618>${readfile{DIR/aux-fixed/0002.readfile}{!}}\
619 <
620
621# Calling a command
622
623${run{DIR/aux-fixed/0002.runfile 0}}
624RC=$runrc
625${run{DIR/aux-fixed/0002.runfile 0}{1}{2}}
626RC=$runrc
627${run{DIR/aux-fixed/0002.runfile 0}{$value}{2}}
628RC=$runrc
629${run{DIR/aux-fixed/0002.runfile 1}{$value}{2}}
630RC=$runrc
631${run{DIR/aux-fixed/0002.runfile 1}{$value}{$value}}
632RC=$runrc
633${run{DIR/test-nonexist}{Y}{N}}
634RC=$runrc
635>>${run{DIR/bin/iefbr14}}<<
636RC=$runrc
637${if eq{1}{2}{${run{/non/exist}}}{1!=2}}
638RC=$runrc
639
640# PRVS
641
642${prvs{userx@test.ex}{secret}}
643${prvs{userx@test.ex}{secret}{1}}
644${prvs{userx@test.ex}{secret}{8}}
645
646# Syntax errors
647
648${prvs{userx@test.ex}{secret}{12}}
649${prvs{userx@test.ex}{secret}{rhubarb}}
650${prvs{userx@test.ex}{secret}{}}
651
652# Correct checks; can't put explicit addresses in the tests, because they
0ce9abe6 653# will change over time.
59371ea7
PH
654
655${prvscheck{${prvs{userx@test.ex}{secret}}}{secret}}
656result=$prvscheck_result
657
658${prvscheck{${prvs{userx@test.ex}{secret}{1}}}{secret}\
659{>$prvscheck_result< >$prvscheck_address< >$prvscheck_keynum<}}
660result=$prvscheck_result
661
662${prvscheck{${prvs{userx@test.ex}{secret}{8}}}{secret}{}}
663result=$prvscheck_result
664
665# Incorrect secret
666
667${prvscheck{${prvs{userx@test.ex}{secret}}}{socrot}}
668result=$prvscheck_result
669
670${prvscheck{${prvs{userx@test.ex}{secret}}}{socrot}{$prvscheck_keynum}}
671result=$prvscheck_result
672
673# Non-prvs address
674
675>>${prvscheck{userx@test.ex}{secret}}<<
676result=$prvscheck_result
677
678# Syntax errors
679
680${tod_log
681${tod_log+6
682${expand:abcd
683${expand:abcd${tod_log}
684${hmac{xxx}{a}{b}}
685${if and {xyz}{a}{b}}
686${if and {{xya}}{a}{b}}
687${if and {{${lookup{x}lsearch{/a/b}}}}{a}{b}}
688${if eq {$h_xyz}{1}{y}{n}}
0d85fa3f
PH
689${if eq {$h_xyz:}{1}{y}{n}
690${if def:h_xyz}{y}{n}}
59371ea7
PH
691${if or {eq {}{}{yes}{no}}
692${if or {{eq {}{}{yes}{no}}
693${if or {{eq {}{}}{yes}{no}}
694${substr_1_:12345}
695${substr__3:12345}
696
0ce9abe6
PH
697# Iterations: forany and forall
698
699${if forany{a:b:c}{eq{$item}{a}}{yes}{no}}
700${if forany{a:b:c}{eq{$item}{b}}{yes}{no}}
701${if forany{a:b:c}{eq{$item}{c}}{yes}{no}}
702${if forany {a:b:c} {eq {$item} {z}} {yes} {no}}
703${if !forany{a:b:c}{eq{$item}{z}}{yes}{no}}
704${if !forany{a:b:c}{eq{$item}{a}}{yes}{no}}
705${if forany{}{eq{$item}{a}}{yes}{no}}
706${if !forany{}{eq{$item}{a}}{yes}{no}}
707${if forany{<, $primary_hostname,foo,bar}{eq{$item}{$primary_hostname}}{yes}{no}}
708
709${if forany{}{yes}{no}}
710${if forany{a:b:c}{gt{$item}{a}{yes}{no}}
711
712${if forall{a:b:c}{match{$item}{^[a-c]\$}}{yes}{no}}
713${if forall{q:b:c}{match{$item}{^[a-c]\$}}{yes}{no}}
714${if forall{a:b:z}{match{$item}{^[a-c]\$}}{yes}{no}}
715${if forall{}{match{$item}{^[a-c]\$}}{yes}{no}}
716
717${if !forall{a:b:c}{match{$item}{^[a-c]\$}}{yes}{no}}
718${if !forall{q:b:c}{match{$item}{^[a-c]\$}}{yes}{no}}
719${if !forall{a:b:z}{match{$item}{^[a-c]\$}}{yes}{no}}
720${if !forall{}{match{$item}{^[a-c]\$}}{yes}{no}}
721
722# Expect yes
723${if forany{a:b:c}\
724 {\
725 eq\
726 {$item: ${if forall{x:y:z}{match{$item}{^[x-z]\$}}{true}{false}}}\
727 {$item: true}\
728 }\
729{outer=yes}{outer=no}} item='$item' (unset)
730
731# Expect no
732${if forany{a:b:c}\
733 {\
734 eq\
735 {$item: ${if !forall{x:y:z}{match{$item}{^[x-z]\$}}{true}{false}}}\
736 {$item: true}\
737 }\
738{outer=yes}{outer=no}}
739
740# Error inside nest - check message is helpful
741${if forany{a:b:c}\
742 {\
743 eq\
744 {$item: ${if forall{x:y:z}{match{$item}{^[x-z]\$}{true}{false}}}\
745 {$item: true}\
746 }\
747{outer=yes}{outer=no}}
748
749
59371ea7
PH
750# Miscellaneous (for bug fixes, etc)
751
752${if ={1}{1} {true}{${if ={1}{1} {true}{${if ={1}{1}{true}fail}}}}}
753
754****
755# Test "escape" with print_topbitchars
756exim -be -DPTBC=print_topbitchars
757escape: ${escape:B7F2}
758****
759# Checkout expansion debugging
760exim -d-all+expand -be
761primary_hostname: $primary_hostname
762match: ${if match{abcd}{\N^([ab]+)(\w+)$\N}{$2$1}fail}
763match: ${if match{wxyz}{\N^([ab]+)(\w+)$\N}{$2$1}fail}
764${if eq {1}{1}{yes}{${lookup{xx}lsearch{/non/exist}}}}
765match_address: ${if match_address{a.b.c}{a.b.c}{yes}{no}}
766****
767# Sender host name and address etc, all unset
768exim -be
769-oMa sender_host_address = $sender_host_address
770 sender_host_port = $sender_host_port
771-oMaa sender_host_authenticated = $sender_host_authenticated
772-oMai authenticated_id = $authenticated_id
773-oMas authenticated_sender = $authenticated_sender
774-oMi interface_address = $interface_address
775 interface_port = $interface_port
776-oMr received_protocol = $received_protocol
777-oMs sender_host_name = $sender_host_name
778-oMt sender_ident = $sender_ident
779****
780# Sender host name and address etc, all set except host name.
781exim -d-all+expand -be -oMa V4NET.0.0.1.1234 -oMaa AAA -oMai philip -oMas xx@yy.zz -oMi 1.1.1.1.99 -oMr special -oMt me
782-oMa sender_host_address = $sender_host_address
783 sender_host_port = $sender_host_port
784-oMaa sender_host_authenticated = $sender_host_authenticated
785-oMai authenticated_id = $authenticated_id
786-oMas authenticated_sender = $authenticated_sender
787-oMi interface_address = $interface_address
788 interface_port = $interface_port
789-oMr received_protocol = $received_protocol
790-oMt sender_ident = $sender_ident
791****
792# Sender host name explicitly set
793exim -be -oMa V4NET.0.0.1.1234 -oMs my.host.name
794-oMa sender_host_address = $sender_host_address
795 sender_host_port = $sender_host_port
796-oMs sender_host_name = $sender_host_name
797****
798# Sender host name lookup fails (V4NET.11.12.13 is not reverse registered)
799exim -be -oMa V4NET.11.12.13
800-oMs sender_host_name = $sender_host_name
801 host_lookup_failed = $host_lookup_failed
802****
803# Sender host name and protocol set by Sendmail-compatible option
804exim -be -pspecial:host.name
805-p received_protocol = $received_protocol
806-p sender_host_name = $sender_host_name
807****
808# Sender host name and address etc, all set except host name,
809# which should therefore be looked up from the address, but not if
810# we are skipping. The debug output for this test will show when
811# the lookup occurs.
812exim -d-all+host_lookup+expand -be -oMa V4NET.0.0.1.1234 -oMaa AAA -oMai philip -oMas xx@yy.zz -oMi 1.1.1.1.99 -oMr special -oMt me
813-oMa sender_host_address = $sender_host_address
814 sender_host_port = $sender_host_port
815-oMaa sender_host_authenticated = $sender_host_authenticated
816-oMai authenticated_id = $authenticated_id
817-oMas authenticated_sender = $authenticated_sender
818-oMi interface_address = $interface_address
819 interface_port = $interface_port
820-oMr received_protocol = $received_protocol
821----> No lookup yet: ${if eq{black}{white}{$sender_host_name}{No}}
822-oMs sender_host_name = $sender_host_name
823-oMt sender_ident = $sender_ident
824****
825# Test no auto host name lookup for query-style lookups
826exim -d -bh V4NET.0.0.1
827****
828exim -d -bh V4NET.0.0.2
829****
830# Test $reply_address
831exim -bh V4NET.0.0.0
832mail from:<>
833rcpt to:<some@body>
834data
835.
836mail from:<>
837rcpt to:<some@body>
838data
839From: a@b
840.
841mail from:<>
842rcpt to:<some@body>
843data
844From: a@b
845Reply-to: c@d
846.
847mail from:<>
848rcpt to:<some@body>
849data
850Reply-to:
851.
852mail from:<>
853rcpt to:<some@body>
854data
855Reply-to:
856From: x@y
857.
858quit
859****
860# Check RFC 2047 decoding with (default) length check
861exim -bh V4NET.0.0.0
862mail from:<>
863rcpt to:<some@body>
864data
865Subject: =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_it_will_go_over_the_75-char_limit_by_a_long_way=3B_in_fact_this_one_will_go_over_the_150_character_limit?=
866.
867quit
868****
869# Check RFC 2047 decoding with length check disabled
870exim -DLENCHECK=check_rfc2047_length=false -bh V4NET.0.0.0
871mail from:<>
872rcpt to:<some@body>
873data
874Subject: =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_it_will_go_over_the_75-char_limit_by_a_long_way=3B_in_fact_this_one_will_go_over_the_150_character_limit?=
875.
876quit
877****
1688f43b
PH
878# Certain kind of error
879exim -d -be
880match_ip: 15 ${if match_ip{1.2.3.4}{1.2.3}}
881match_ip: 16 ${if match_ip{1.2.3.4}{1.2.3.4/abc}}
882****