Check for proper output separator in expanding ${addresses:STRING} (Closes 2171)
[exim.git] / test / stdout / 0002
CommitLineData
54c5ebb1
PH
1>
2> # These expansions can test variables in the configuration, but as there
3> # is no message being processed, there is no message-related data. But
4> # that of course gets tested in plenty of other places.
5>
6> # Some fixed variables
7>
8> exim_path: TESTSUITE/eximdir/exim
71224040 9> exim_version: x.yz
98b8312f
HSHR
10> config_dir: TESTSUITE
11> config_file: TESTSUITE/test-config
54c5ebb1
PH
12> primary_hostname: myhost.test.ex
13> primary_hostname: myhost.test.ex
14> qualify_domain: myhost.test.ex
15> bounce_return_size_limit: 102400
16> spool_directory: TESTSUITE/spool
0cd5fd23 17> queue_name:
54c5ebb1
PH
18> Failed: unknown variable in "${unknown}"
19> h_subject: (should be empty)
20> h_subject: (should be empty)
21> Failed: unknown expansion operator "header_subject"
22>
23> # $message_headers should be empty
24> message_headers: ><
25>
26> # Continuation
27> xy
28> xy
29>
30> # Overlong names and overbig numbers
31>
32> Failed: unknown variable name "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
33> Failed: unknown variable in "${aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}"
34> +
35> +
36>
29f89cad
PH
37> # List operations
38>
39> filter: "a:b:c"
40> filter: a:c
41> filter: a'c
42> filter: ''a' ''c
43> filter: ""
44>
45> map: ""
46> map: a:b:c
47> map: ::a::: ::b::: ::c::
48> map: fail string
49> map: []:[b]:[c]
50>
51> reduce: "+"
52> reduce: +abc
53> reduce: 6
54> reduce: 9
1e0a93cf
JH
55> # Check for extract corrupting reduce's
56> reduce: a , b
29f89cad 57>
a64a3dfa
JH
58> listnamed: *.aa.bb : ^\Nxxx(.*)
59> listnamed: *.aa.bb : ^\Nxxx(.*)
60> listnamed: V4NET.11.12.13 : iplsearch;TESTSUITE/aux-fixed/0002.iplsearch
61> listnamed: *.aa.bb : ^\Nxxx(.*) : ;;
62> listnamed: a : b;c : *.aa.bb : ^\Nxxx(.*) : ;; : 2001::630::212::8::204::::b664
042eb971 63> Failed: "nolist" is not a named list
a64a3dfa 64> listnamed: *.aa.bb : ^\Nxxx(.*)
042eb971
JH
65> Failed: "hlist" is not a domain named list
66> Failed: bad suffix on "list" operator
67>
a64a3dfa
JH
68> listcount: 3
69> listcount: 0
70> listcount: 3
71> listcount: 2
042eb971 72>
aa26e137
JH
73> listextract: b
74> listextract: XcX
75> listextract:
76> listextract:
77> listextract: fail
f90d49f7 78> Failed: "listextract" failed and "fail" requested
aa26e137 79>
ac4ef9bd
JH
80> sort: 1:2:3:4
81> sort: 4,3,2,1
82> sort: a:aa:B:c
83> sort: 10 smtp.ex.com:100 r2.ex.com:666 r99.ex.com
84> sort: 10,smtp.ex.com:100,r2.ex.com:666,r99.ex.com
85> sort: ""
86>
ec95d1a6
PH
87> # Tests with iscntrl() and illegal separators
88>
89> map: 'a'
90''
91'b'
92'c'
93>
94> Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "0+") inside "reduce" item
95> reduce: 6
96> reduce: 6
97> reduce: 6
98>
54c5ebb1
PH
99> # Operators
100>
e47376be
JH
101> Failed: Not enough arguments for 'acl' (min is 1)
102> Failed: Not enough arguments for 'acl' (min is 1)
bef3ea7f 103> Failed: error from acl "a_nosuch"
525239c1
JH
104> acl: (0) [] []
105> acl: (1) [person@dom.ain] []
106> acl: (2) [firstarg] [secondarg]
107> acl: (1) [arg with spaces] []
723c72e6
JH
108> acl:
109> acl:
bef3ea7f
JH
110> acl: (0) [] []
111> acl: (1) [person@dom.ain] []
112> Failed: error from acl "a_defer"
113> acl: (2) [new arg1] [top_arg_1]
525239c1 114> acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] []
723c72e6 115>
54c5ebb1
PH
116> addrss: local-part@dom.ain
117> addrss: local-part@dom.ain
118> domain: dom.ain
119> domain: dom.ain
29f89cad
PH
120>
121> addresses: ''abc@xyz' ''pqr@xyz
122> addresses: local-part@dom.ain
123> addresses: local-part@dom.ain+xyz@abc
124> addresses: local-part@dom.ain:xyz@abc:p@q:r@s
125> addresses:
1b7cf216 126> Failed: output separator missing in expanding ${addresses:>}
29f89cad 127>
3367f8c2
JH
128> escape: B7\267F2\362
129> excape8bit: undisturbed text tab
130newline tab\134backslash ~tilde\177DEL\200\201.
131>
54c5ebb1
PH
132> eval: 2
133> eval: 7
134> eval: 9
135> eval: 4
136> eval: 6
137> eval: 42
138> Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
139> eval: -2
140> eval: 1
141> eval: 1
142> Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
af561417 143> Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
54c5ebb1
PH
144> eval: 1
145> eval: -5
af561417 146> eval: 1
54c5ebb1
PH
147> eval: 40962
148> eval: 63
af561417 149> Failed: error in expression evaluation: expecting operator (after processing "0")
54c5ebb1
PH
150> eval10: 77
151> eval10: 8
af561417
PH
152> Failed: error in expression evaluation: expecting operator (after processing "0")
153> eval: 4
154> eval: 4
155> eval: 4
156> eval: 13
157> eval: 9
158> eval: 6
159> eval: 3
160> eval: 0
161> eval: 24
162> eval: 4608
163> eval: 4608
164> eval: -4608
165>
54c5ebb1
PH
166> expand: $primary_hostname myhost.test.ex
167> hash: jmg monty fbWx
168> hash: abcX abX aX X
169> hex2b64:EjRWeA==
170> hex2b64:q83v
171> hex2b64:q83v
172> hex2b64:Gis8TV5v
173> Failed: "1a2b3c4d5e6" contains an odd number of characters
174> Failed: "1a2b3c4d5e6g" is not a hex string
175> hex2b64:MPPJPkZDbetYunCBao7BJA==
176> hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
177>
03ca21f8
JH
178> base32: 0 <>
179> base32: 1 <b>
180> base32: 31 <7>
181> base32: 32 <ba>
182> base32: 42 <bk>
183> Failed: argument for base32 operator is "0x1", which is not a decimal number
184>
185> base32d: 0 0
186> base32d: 1 1
187> base32d: 31 31
188> base32d: 32 32
189> base32d: 42 42
190> Failed: argument for base32d operator is "ABC", which is not a base 32 number
191>
54c5ebb1
PH
192> The base62 operator is actually a base36 operator in the Darwin and Cygwin
193> environments. Write cunning tests that produce the same output in both cases,
194> while doing a reasonable check.
195>
196> base62: OK
197> base62d: OK
198> base62d: OK
199> Failed: argument for base62 operator is "12345x", which is not a decimal number
200> Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
201>
202> hmac: dd97e3ba5d1a61b5006108f8c8252953
203> hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
204> md5: 77add1d5f41223d5582fca736a5cb335
205> sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
206> sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
207> mask: 192.168.10.192/28
208> mask: 192.168.10.206/32
209> Failed: mask value too big in "192.168.10.206/33"
210> mask: 0.0.0.0/0
211> Failed: missing mask value in "192.168.10.206"
212> Failed: "a.b.c.d" is not an IP address
fc4a7f70
JH
213> ipv6denorm: 0000:0000:0000:0000:0000:0000:0000:0001
214> ipv6denorm: fe00:0000:0000:0000:0000:0000:0000:0001
215> ipv6denorm: 0000:0000:0000:0000:0000:ffff:c0a8:0001
216> ipv6denorm: fe80:0000:0000:0000:0000:0000:c0a8:0001
217> ipv6norm: ::1
218> ipv6norm: 2a00::
219> ipv6norm: 2a00::1
220> ipv6norm: 2a00:eadf::1:0
221> ipv6norm: 2a00:eadf:0:1::
222> ipv6norm: 2a00::
223> ipv6norm: 2a00:2:3:4:5:6:7:8
54c5ebb1
PH
224> nhash: 19 0/61
225> lc/uc: the quick BROWN FOX
226> length: The quick abc
227> lclpt: local-part
228> lclpt: local-part
229> quote: aZ09_.-Q "ab*cd" "abcd\"ef"
230> quote: "nl(\n)"
231> quote: "cr(\r)"
232> quote: "tab( )"
233> quote: "xff()"
234> quote: Empty>""<
235> quote_local_part: abcd
236> quote_local_part: O'Reilly
237> quote_local_part: "a space"
238> quote_local_part: ".something"
239> quote_local_part: "something."
240> quote_local_part: joe.bloggs
241> quote_local_part: a!b
242> quote_local_part: "x@y"
243> quote_local_part: ab*cd
244> quote_local_part: "x:y"
245> quote_local_part: "abcd\"ef"
246> quote_local_part: ""
247> rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
c10d53a2 248> hexquote: \x01\x02\x03\x04\x05\x06\x07\x20\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x20\x10\x11\x12\x13\x14\x15\x16\x17\x20\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x20!"#$%&'\x20()*+,-./\x2001234567\x2089:;<=>?\x20@ABCDEFG\x20HIJKLMNO\x20PQRSTUVW\x20XYZ[\]^_\x20`abcdefg\x20hijklmno\x20pqrstuvw\x20xyz{|}~\x7f
54c5ebb1
PH
249> substr: ba 34 1
250> substr: barb rhuba
251> substr:
252> substr:
253> str2b64:YWJjZA==
254> str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
9aa35e9c
JH
255> base64: YWJjZA==
256> base64: VGhlIHF1aWNrIGJyb3duIAogZm94
257> base64d:abcd
258> base64d:The quick brown
259 fox
54c5ebb1
PH
260> strlen: 0
261> strlen: 1
262> strlen: 8
f90d018c
PH
263> time_eval: 10
264> time_eval: 7200
265> time_eval: 86700
266> time_eval: 788645
267> Failed: string "14" is not an Exim time interval in "time_eval" operator
268> Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
54c5ebb1
PH
269> time_interval: 0s
270> time_interval: 44s
271> time_interval: 1w4d13h46m39s
272> Failed: string "-1" is not a positive number in "time_interval" operator
273> Failed: string "rhubarb" is not a positive number in "time_interval" operator
274>
275> # stat is a bit tricky, but some of the fields of the aux-var directory
276> # should be the same on all systems
277>
278> stat: 40755
279> stat: drwxr-xr-x
280> Failed: stat(/a/non/existent/file) failed: No such file or directory
281>
282> # "Operators" that have expanded arguments
283>
284> hash: jmg monty fbWx
285> hash: abcX abX aX X
286> nhash: 19 0/61
287> length: The quick abc
288> substr: ba 34 1
289> substr:
290>
291> # Error forms
292>
e47376be 293> Failed: Not enough arguments for 'hash' (min is 2)
54c5ebb1 294> Failed: "nonnumber" is not a number (in "hash" expansion)
e47376be 295> Failed: Too many arguments for 'hash' (max is 3)
54c5ebb1
PH
296> Failed: "-2" is not a positive number (in "substr" expansion)
297>
298> # Skipped operators
299>
300> addrss: NO
301> domain: NO
302> escape: NO
303> expand: NO
304> hash: NO
305> md5: NO
306> mask: NO
307>
c9a55f6a
JH
308> # Number suffixes in conditions
309> 1k: y
310> 1K: y
311> 1M: y
312> 1G: y
313>
d45b1de8 314> # Numeric overflow
aa7c82b2 315> # >32b should work, >64b not
d45b1de8 316>
725735cd
JH
317> 1 > 2047M n
318> 1 > 2048M n
319> 1 > 4096000000 n
320> 1 > 4096M n
321> 1 > 4611686018427387904 n
aa7c82b2 322> Failed: absolute value of integer "46116860184273879040" is too large (overflow)
d45b1de8 323>
54c5ebb1
PH
324> # Conditions
325>
326> 2=2: y
327> 2==2: y
328> 3=2: n
329> 2==3: n
330> !2=2: n
331> !2==2: n
332> !3=2: y
333> !2==3: y
334> 2>3: n
335> 3>3: n
336> 4>3: y
d45b1de8 337> 1>-1: y
54c5ebb1
PH
338> 2>=3: n
339> 3>=3: y
340> 4>=3: y
341> 2<3: y
342> 3<3: n
343> 4<3: n
344> 2<=3: y
345> 3<=3: y
346> 4<=3: n
347> 5<=3: n
d45b1de8 348> -3<=1: y
54c5ebb1
PH
349>
350> 5>3k: n
351> 5>3m: n
d45b1de8
PH
352> Failed: invalid integer "3z "
353> Failed: integer expected but "a" found
0de7239e 354> Failed: integer expected but "${substr_2_2:65535}" found
54c5ebb1 355>
5dd1517f
PH
356> >0: n
357> =: y
358> -2<: y
359> 08>07: y
360> 011=11: y
361>
54c5ebb1
PH
362> def:y y
363> def:n n
364> Failed: unknown variable "post" after "def:"
365> def:h_f n
366> def:h_f n
e47376be
JH
367> Failed: curly-bracket problem in conditional yes/no parsing: 'yes' part did not start with '{'
368 remaining string is ':{y}{n}}'
54c5ebb1
PH
369>
370> exists: y
371> exists: n
372>
373> eq: y
374> eq: n
375> !eq: n
376> !eq: y
377>
378> eqi: y
379> eqi: y
380> eqi: n
381> !eqi: n
382> !eqi: n
383> !eqi: y
384>
385> lt: y
386> lti: n
387> le: y
388> lei: y
389> gt: n
390> gti: n
391> ge: n
392> gei: y
393>
394> isip: y 1.2.3.4
395> isip4: y 1.2.3.4
396> isip6: n 1.2.3.4
8d909960
JH
397> isip: n ::1.2.3.256
398> isip4: n 1.2.3.256
54c5ebb1
PH
399> isip: n 1:2:3:4
400> isip4: n 1:2:3:4
401> isip6: n 1:2:3:4
402> isip: y ::1
403> isip4: n ::1
404> isip6: y ::1
405> isip: y fe80::a00:20ff:fe86:a061
406> isip4: n fe80::a00:20ff:fe86:a061
407> isip6: y fe80::a00:20ff:fe86:a061
8d909960 408> isip: y fe80::1.2.3.4
54c5ebb1
PH
409> isip: n rhubarb
410> isip4: n rhubarb
411> isip6: n rhubarb
412>
413> match: cdab
414> match: cdab
415> match: cdab
416> Failed: "if" failed and "fail" requested
417> match: cd[xyz]ab
418>
419> match_domain: yes
420> match_domain: no
421> match_domain: yes
422> match_domain: yes
423> match_domain: no
424>
f78eb7c6
PH
425> >x@zz.aa.bb< [] >x@zz.aa.bb<
426>
427> >x@xxxabc< [] >x@xxxabc<
428>
54c5ebb1
PH
429> match_address: yes
430> match_address: yes
431>
432> match_local_part:yes
433> match_local_part:yes
434>
435> match_ip: 01 true
436> match_ip: 02
437> match_ip: 03 true
438> match_ip: 04 true
439> match_ip: 05
440> match_ip: 06
441> match_ip: 07 true
442> match_ip: 08 true
443> match_ip: 09
444> match_ip: 10 true
445> Failed: "somename" is not an IP address
446> match_ip: 12 true
447> match_ip: 13 true
448> match_ip: 14 true
6a3bceb1 449> match_ip: 15 true
54c5ebb1
PH
450>
451> queue_running: n
452> first_delivery: n
453>
454> queue_running after or: y
455> first_delivery after or: y
456>
bef3ea7f
JH
457> # acl expansion condition
458> acl if: Y:(0) [] []
459> acl if: Y:(1) [argY] []
460> acl if: N:(2) [argN] [arg2]
461> Failed: error from acl "a_defer"
462>
54c5ebb1
PH
463> # Default values for both if strings
464>
465> ${if eq{1}{1}} >true<
466> ${if eq{1}{2}} ><
467>
468> # Lookups: DIR is the testing directory. In this test we can only use the
469> # lookups that are required in all cases.
470>
471> CALLER
472>
473> ==X@Y
474> ==*
475> ==*@Z
476> ==*
477>
478> data for a.b.c.d
479> failed x.y.z
480> data for *.p.q
481> data for *.p.q
482> data for *.p.q
483> Failed: "lookup" failed and "fail" requested
484> data for *
485>
486> q1: "abc"
487> q2: "xyz":
488> q3: "pqr" :
489> q4: "a:b" abc continued data (make sure not key)
490> q5: "\"quoted\""
491> q6: "white space"
492> q7: "b\\s"
493>
494> abc: abc
495> a.b.c: *.b.c
496> ab.c: *b.c
497> xyz: ^X
498> Xyz: ^X
499> Zyz: ^Z
500> a b: "^a +b"
501> a b: "^a +b"
502> a:b: lookup succeeded
503> a.b: ^a\\.+b
504> a..b: ^a\\.+b
505> a9b: \N^a\d+b
506> a99b: \N^a\d+b
507>
508> # Should give the same results as above because expansion does nothing
509>
510> abc: abc
511> a.b.c: *.b.c
512> ab.c: *b.c
513> xyz: ^X
514> Xyz: ^X
515> Zyz: ^Z
516> a b: "^a +b"
517> a b: "^a +b"
518> a:b: lookup succeeded
519>
520> # Should fail because of no expansion
521>
522> a.b: NO
523> a..b: NO
524> a9b: NO
525> a99b: NO
526>
527> # But these should succeed
528>
529> a\:b: ^a\\.+b
530> a\:Xb: ^a\\.+b
531>
366fc9f0
PH
532> # Some tests of case-(in)dependence
533>
534> MiXeD-CD: Data found for case-dependent MiXeD-CD
535> MixeD-CD: NOT FOUND
536> MiXeD-Ncd: Data found for case-independent MiXeD-nCD
537> MixeD-Ncd: Data found for case-independent MiXeD-nCD
538>
54c5ebb1
PH
539> # IP address (CIDR) lookups
540>
541> 1.2.3.4: data for 1.2.3.4
542> 1.2.3.5:
543> 1.2.3.5: data for *
544> abcd::cdab: data for abcd::cdab
545> 192.168.1.2: data for 192.168.0.0/16
546> 192.168.5.6: data for 192.168.0.0/16
547> abcd:abcd:: data for abcd:abcd::/32
548> abcd:abcd:1:: data for abcd:abcd::/32
549> abcd:abcd::3 data for abcd:abcd::/32
550> Failed: lookup of "rhubarb" gave DEFER: "rhubarb" is not a valid iplsearch key (an IP address, with optional CIDR mask, is wanted): in a host list, use net-iplsearch as the search type
551>
552>
553> # Nested Lookups - style 1
554>
555> The data for key1->key2
556> Failed: "lookup" failed and "fail" requested
557>
558> # Nested Lookups - style 2
559>
560> The data for key1->key2
561> failed for key4
562>
563> # Other nesting tests
564>
565> 1-in-1
566> 2-in-2
567> both-in-1,both-in-2
568> Failed: "lookup" failed and "fail" requested
569>
570> # Lookup quotes for standardly expected lookups
571>
572> lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
573> Failed: unknown lookup type "xxx"
574>
575> # Extract
576>
577> 2
578> 2
579> 2
580> 2
581> Empty:<>
582> Empty:<>
583> <3>
584> <3>
585> Empty:<>
586> Empty:<>
587> no Z
588> no 4
589> Failed: "extract" failed and "fail" requested
590> Failed: "extract" failed and "fail" requested
591> D
592> a:b:c:d:e
593> a
594> e
595> a
596> FAIL
597> b
598>
599> b
600> three four
601> Failed: first argument of "extract" must not be empty
602> Failed: first argument of "extract" must not be empty
603> b
604>
93cc2d6e 605> a:b:c
1cf59ee7
JH
606> Failed: missing '}' closing extract inside "map" item
607> a:b:c
93cc2d6e 608>
54c5ebb1
PH
609> # Translation
610>
611> abcdea aaa xyz zbcdez
612> abcdea a z zbcdez
613> abcdea a abcdea
614> abcdea abc z zzzdez
615>
fdab5d49
JJ
616> # Boolean
617> "TrUe" true EXPECT: true
618> "FALSE" false EXPECT: false
619> " yes" true EXPECT: true
620> " no" false EXPECT: false
621> "yes " true EXPECT: true
51c7471d 622> "-1" true EXPECT: true
fdab5d49
JJ
623> "0" false EXPECT: false
624> "1" true EXPECT: true
625> " 0 " false EXPECT: false
626> " 1 " true EXPECT: true
627> "1111111111111111111" true EXPECT: true
628> "9" true EXPECT: true
629> " " false EXPECT: false
630> Failed: unrecognised boolean value "text"
631> Failed: unrecognised boolean value "text"
51c7471d 632> Failed: unrecognised boolean value "-text"
fdab5d49
JJ
633> Failed: unrecognised boolean value "text"
634> Failed: unrecognised boolean value "text"
635> "00" false EXPECT: false
a769a501
PP
636> "!true" false EXPECT: false
637> "!false" true EXPECT: true
fdab5d49
JJ
638>
639> "TrUe" true EXPECT: true
640> "FALSE" false EXPECT: false
641> " yes" true EXPECT: true
642> " no" false EXPECT: false
643> "yes " true EXPECT: true
644> "-1" true EXPECT: true
645> "0" false EXPECT: false
646> "1" true EXPECT: true
647> " 0 " false EXPECT: false
648> " 1 " true EXPECT: true
649> "1111111111111111111" true EXPECT: true
650> "9" true EXPECT: true
651> " " false EXPECT: false
652> "text" true EXPECT: true
653> " text" true EXPECT: true
654> "text " true EXPECT: true
655> " text " true EXPECT: true
656> "00" true EXPECT: true
a769a501
PP
657> "!true" false EXPECT: false
658> "!false" true EXPECT: true
fdab5d49 659>
54c5ebb1
PH
660> # RFC 2047
661>
662> abcd abcd
663> <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
664> <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
90a3da69
PP
665> Long: =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_?= =?iso-8859-8?Q?it_will_go_over_the_75-char_limit?=
666> Long: =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_?= =?iso-8859-8?Q?it_will_go_over_the_75-char_limit_by_a_long_way=3B_in?= =?iso-8859-8?Q?_fact_this_one_will_go_over_the_150_character_limit?=
54c5ebb1 667>
9c57cbc0
PH
668> # RFC 2047 decode
669>
670> abcd abcd
671> <:abcd:> <:abcd:>
672> <:ab cd:> <:ab cd:>
673> Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
674> Long: 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
54c5ebb1
PH
675>
676> # UTF-8
677>
678> abcd abcd
679> ad ad
680> toobig a_d
681>
682> # Substitution
683>
684> ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
685> ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
686> ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
687> ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
688> ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
689> ${sg{abbab}{a*}{+}} =++b+b++b+
690>
691> # File insertion
692>
e47376be 693> Failed: Not enough arguments for 'readfile' (min is 1)
54c5ebb1
PH
694> abcde
69512345
696
697xyz
698
699> abcde12345xyz
700> abcde:12345::xyz:
701> abcde - 12345 - - xyz -
702> Failed: failed to open /non/exist/file: No such file or directory
703> non-exist
704> >abcde!12345!!xyz!<
705>
706> # Calling a command
707>
708> abcd
7091234
710
711> RC=0
712> 1
713> RC=0
714> abcd
7151234
716
717> RC=0
718> 2
719> RC=1
720> abcd
7211234
722
723> RC=1
724> N
725> RC=127
726> >><<
727> RC=0
728> 1!=2
729> RC=0
730>
731> # PRVS
732>
85b6260a
PH
733> prvs=xxxxxxxxxx=userx@test.ex
734> prvs=xxxxxxxxxx=userx@test.ex
735> prvs=xxxxxxxxxx=userx@test.ex
54c5ebb1
PH
736>
737> # Syntax errors
738>
739> Failed: prvs second argument must be a single digit
740> Failed: prvs second argument must be a single digit
741> Failed: prvs second argument must be a single digit
742>
743> # Correct checks; can't put explicit addresses in the tests, because they
744> # will change over time.
745>
746> userx@test.ex
747> result=1
748>
749> >1< >userx@test.ex< >1<
750> result=1
751>
752> userx@test.ex
753> result=1
754>
755> # Incorrect secret
756>
757> userx@test.ex
758> result=
759>
760> 0
761> result=
762>
763> # Non-prvs address
764>
765> >><<
766> result=
767>
768> # Syntax errors
769>
770> Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
771> Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
772> Failed: missing } at end of string
773> Failed: missing } at end of string
774> Failed: hmac algorithm "xxx" is not recognised
775> Failed: each subcondition inside an "and{...}" condition must be in its own {}
776> Failed: unknown condition "xya" inside "and{...}" condition
777> Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
778> Failed: missing } at end of string - could be header name not terminated by colon
e47376be
JH
779> Failed: curly-bracket problem in conditional yes/no parsing: did not close with '}'
780 remaining string is ''
0d85fa3f 781> Failed: missing or misplaced { or } - could be header name not terminated by colon
54c5ebb1
PH
782> Failed: each subcondition inside an "or{...}" condition must be in its own {}
783> Failed: missing } at end of condition inside "or" group
784> Failed: unknown condition "yes" inside "or{...}" condition
785> Failed: non-digit after underscore in "substr_1_"
786> Failed: non-digit after underscore in "substr__3"
787>
0ce9abe6
PH
788> # Iterations: forany and forall
789>
790> yes
791> yes
792> yes
793> no
794> yes
795> no
796> no
797> yes
798> yes
799>
800> Failed: unknown condition "yes" inside "forany" condition
801> Failed: missing } at end of condition inside "forany"
802>
803> yes
804> no
805> no
806> no
807>
808> no
809> yes
810> yes
811> yes
812>
813> # Expect yes
814> outer=yes item='' (unset)
815>
816> # Expect no
817> outer=no
818>
819> # Error inside nest - check message is helpful
820> Failed: missing } at end of condition inside "forall" inside "forany" condition
821>
822>
54c5ebb1
PH
823> # Miscellaneous (for bug fixes, etc)
824>
825> true
826>
089fc87a
JH
827> # Environment access
828>
829> CALLER
830> correct
831>
54c5ebb1
PH
832>
833> escape: B7F2
834>
835> primary_hostname: myhost.test.ex
836> match: cdab
837> Failed: "if" failed and "fail" requested
838> yes
839> match_address: no
840>
e1a3f32f 841> -be Sender host name and address etc, all unset
54c5ebb1
PH
842> -oMa sender_host_address =
843> sender_host_port = 0
844> -oMaa sender_host_authenticated =
845> -oMai authenticated_id = CALLER
846> -oMas authenticated_sender = CALLER@myhost.test.ex
847> -oMi interface_address =
848> interface_port = -1
849> -oMr received_protocol =
850> -oMs sender_host_name =
851> -oMt sender_ident = CALLER
852>
e1a3f32f 853> -be Sender host name and address etc, all set except host name.
54c5ebb1
PH
854> -oMa sender_host_address = V4NET.0.0.1
855> sender_host_port = 1234
856> -oMaa sender_host_authenticated = AAA
857> -oMai authenticated_id = philip
858> -oMas authenticated_sender = xx@yy.zz
859> -oMi interface_address = 1.1.1.1
860> interface_port = 99
861> -oMr received_protocol = special
862> -oMt sender_ident = me
863>
e1a3f32f 864> -be Sender host name explicitly set
54c5ebb1
PH
865> -oMa sender_host_address = V4NET.0.0.1
866> sender_host_port = 1234
867> -oMs sender_host_name = my.host.name
868>
e1a3f32f 869> be Sender host name lookup fails (V4NET.11.12.13 is not reverse registered)
54c5ebb1
PH
870> -oMs sender_host_name =
871> host_lookup_failed = 1
872>
e1a3f32f 873> -be Sender host name and protocol set by Sendmail-compatible option
54c5ebb1
PH
874> -p received_protocol = special
875> -p sender_host_name = host.name
876>
e1a3f32f 877> -be Sender host name and address etc, all set except host name
54c5ebb1
PH
878> -oMa sender_host_address = V4NET.0.0.1
879> sender_host_port = 1234
880> -oMaa sender_host_authenticated = AAA
881> -oMai authenticated_id = philip
882> -oMas authenticated_sender = xx@yy.zz
883> -oMi interface_address = 1.1.1.1
884> interface_port = 99
885> -oMr received_protocol = special
886> ----> No lookup yet: No
887> -oMs sender_host_name = ten-1.test.ex
888> -oMt sender_ident = me
889>
890
891**** SMTP testing session as if from host V4NET.0.0.1
892**** but without any ident (RFC 1413) callback.
893**** This is not for real!
894
895550 Administrative prohibition\r
896
897**** SMTP testing session as if from host V4NET.0.0.2
898**** but without any ident (RFC 1413) callback.
899**** This is not for real!
900
901550 Administrative prohibition\r
902
903**** SMTP testing session as if from host V4NET.0.0.0
904**** but without any ident (RFC 1413) callback.
905**** This is not for real!
906
907220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
908250 OK\r
909250 Accepted\r
910354 Enter message, ending with "." on a line by itself\r
911550 reply_address=<>\r
912250 OK\r
913250 Accepted\r
914354 Enter message, ending with "." on a line by itself\r
915550 reply_address=<a@b>\r
916250 OK\r
917250 Accepted\r
918354 Enter message, ending with "." on a line by itself\r
919550 reply_address=<c@d>\r
920250 OK\r
921250 Accepted\r
922354 Enter message, ending with "." on a line by itself\r
923550 reply_address=<>\r
924250 OK\r
925250 Accepted\r
926354 Enter message, ending with "." on a line by itself\r
927550 reply_address=<x@y>\r
928221 myhost.test.ex closing connection\r
929
930**** SMTP testing session as if from host V4NET.0.0.0
931**** but without any ident (RFC 1413) callback.
932**** This is not for real!
933
934220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
935250 OK\r
936250 Accepted\r
937354 Enter message, ending with "." on a line by itself\r
938550 reply_address=<>\r
939221 myhost.test.ex closing connection\r
940
941**** SMTP testing session as if from host V4NET.0.0.0
942**** but without any ident (RFC 1413) callback.
943**** This is not for real!
944
945220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
946250 OK\r
947250 Accepted\r
948354 Enter message, ending with "." on a line by itself\r
949550 reply_address=<>\r
950221 myhost.test.ex closing connection\r
1688f43b
PH
951> match_ip: 15
952> match_ip: 16
953>
6754ce8c
TL
954> in list
955> in list
956>