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