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