Docs: clarify helo_allow_chars option
[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 > isip6:  n   fe80:a00:20ff:fe86:a061
470 > isip:   y  fe80::1.2.3.4
471 > isip:   n  rhubarb
472 > isip4:  n  rhubarb
473 > isip6:  n  rhubarb
474 > isip6:  n  ::/100
475 > isip6:  n  ::/foo
476 > isip6:  n  ::/f o
477
478 > match:  cdab
479 > match:  cdab
480 > match:  cdab
481 > Failed: "if" failed and "fail" requested
482 > match:  cd[xyz]ab
483 > # check for empty capture group
484 > match:  <>
485
486 > match_domain:    yes
487 > match_domain:    no
488 > match_domain:    yes
489 > match_domain:    yes
490 > match_domain:    no
491
492 >  >x@zz.aa.bb< [zz] >x@zz.aa.bb< 
493
494 >  >x@xxxabc< [abc] >x@xxxabc< 
495
496 > match_address:   yes
497 > match_address:   yes
498
499 > match_local_part:yes
500 > match_local_part:yes
501
502 > match_ip:        01 true
503 > match_ip:        02 
504 > match_ip:        03 true
505 > match_ip:        04 true
506 > match_ip:        05 
507 > match_ip:        06 
508 > match_ip:        07 true
509 > match_ip:        08 true
510 > match_ip:        09 
511 > match_ip:        10 true
512 > Failed: "somename" is not an IP address
513 > match_ip:        12 true
514 > match_ip:        13 true
515 > match_ip:        14 true
516 > match_ip:        15 true
517
518 > queue_running:  n
519 > first_delivery: n
520
521 > queue_running after or: y
522 > first_delivery after or: y
523
524 > # acl expansion condition
525 > acl if: Y:(0) [] []
526 > acl if: Y:(1) [argY] []
527 > acl if: N:(2) [argN] [arg2]
528 > Failed: DEFER from acl "a_defer"
529
530 > # Default values for both if strings
531
532 > ${if eq{1}{1}}  >true<
533 > ${if eq{1}{2}}  ><
534
535 > # Lookups: DIR is the testing directory. In this test we can only use the
536 > # lookups that are required in all cases.
537
538 > CALLER
539 > postmaster: CALLER
540
541 > ==X@Y
542 > ==*
543 > ==*@Z
544 > ==*
545
546 > x@y  ==X@Y
547 > *    ==*
548 > *@z  ==*@Z
549 > *    ==*
550
551 > data for a.b.c.d
552 > failed x.y.z
553 > data for *.p.q
554 > data for *.p.q
555 > data for *.p.q
556 > Failed: "lookup" failed and "fail" requested
557 > data for *
558
559 > a.b.c.d: data for a.b.c.d
560 > failed x.y.z
561 > *.p.q:   data for *.p.q
562 > *.p.q:   data for *.p.q
563 > *.p.q:   data for *.p.q
564 > Failed: "lookup" failed and "fail" requested
565 > *:       data for *
566
567 > q1:  "abc"
568 > q2:  "xyz":
569 > q3:  "pqr"  :
570 > q4:  "a:b" abc continued data (make sure not key)
571 > q5:  "\"quoted\""
572 > q6:  "white space"
573 > q7:  "b\\s"
574
575 > q1f: abc           "abc"
576 > q2f: xyz:          "xyz":
577 > q3f: pqr  :        "pqr"  :
578 > q4f: a:b           "a:b" abc continued data (make sure not key)
579 > q5f: "quoted"    "\"quoted\""
580 > q6f: white space   "white space"
581 > q7f: b\s          "b\\s"
582
583 > abc:   abc
584 > a.b.c: *.b.c
585 > ab.c:  *b.c
586 > xyz:   ^X
587 > .Xyz:   ^X
588 > .Zyz:   ^Z
589 > a b:   "^a +b"
590 > a  b:  "^a +b"
591 > a:b:   lookup succeeded
592 > a.b:   ^a\\.+b
593 > a..b:  ^a\\.+b
594 > a9b:   \N^a\d+b
595 > a99b:  \N^a\d+b
596
597 > # Should give the same results as above because expansion does nothing
598
599 > abc:   abc
600 > a.b.c: *.b.c
601 > ab.c:  *b.c
602 > xyz:   ^X
603 > .Xyz:   ^X
604 > .Zyz:   ^Z
605 > a b:   "^a +b"
606 > a  b:  "^a +b"
607 > a:b:   lookup succeeded
608
609 > # Should fail because of no expansion
610
611 > a.b:   NO
612 > a..b:  NO
613 > a9b:   NO
614 > a99b:  NO
615
616 > # But these should succeed
617
618 > a\:b:  ^a\\.+b
619 > a\:Xb: ^a\\.+b
620
621 > # Some tests of case-(in)dependence
622
623 > .MiXeD-CD:  Data found for case-dependent MiXeD-CD
624 > .MixeD-CD:  NOT FOUND
625 > .MiXeD-Ncd: Data found for case-independent MiXeD-nCD
626 > .MixeD-Ncd: Data found for case-independent MiXeD-nCD
627
628 > # IP address (CIDR) lookups
629
630 > 1.2.3.4:      data for 1.2.3.4
631 > 1.2.3.5:      
632 > 1.2.3.5:      data for *
633 > abcd::cdab:   data for abcd::cdab
634 > 192.168.1.2:  data for 192.168.0.0/16
635 > 192.168.5.6:  data for 192.168.0.0/16
636 > abcd:abcd::   data for abcd:abcd::/32
637 > abcd:abcd:1:: data for abcd:abcd::/32
638 > abcd:abcd::3  data for abcd:abcd::/32
639 > 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
640
641
642 > # Nested Lookups - style 1
643
644 > The data for key1->key2
645 > Failed: "lookup" failed and "fail" requested
646
647 > # Nested Lookups - style 2
648
649 > The data for key1->key2
650 > failed for key4
651
652 > # Other nesting tests
653
654 > 1-in-1
655 > 2-in-2
656 > both-in-1,both-in-2
657 > Failed: "lookup" failed and "fail" requested
658
659 > # Lookup quotes for standardly expected lookups
660
661 > lsearch  !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
662 > Failed: unknown lookup type "xxx"
663
664 > # Extract
665
666 > 2
667 > 2
668 > 2
669 > 2
670 > empty:<>
671 > empty:<>
672 > <3>
673 > <3>
674 > empty:<>
675 > empty:<>
676 > no Z
677 > no 4
678 > Failed: "extract" failed and "fail" requested
679 > Failed: "extract" failed and "fail" requested
680 > D
681 > a:b:c:d:e
682 > a
683 > e
684 > a
685 > FAIL
686 > b
687
688 > b
689 > three four
690 > Failed: first argument of "extract" must not be empty
691 > Failed: first argument of "extract" must not be empty
692 > b
693
694 > a:b:c
695 > Failed: missing '}' closing extract inside "map" item
696 > a:b:c
697
698 > # Translation
699
700 > abcdea aaa xyz zbcdez
701 > abcdea a   z   zbcdez
702 > abcdea a       abcdea
703 > abcdea abc z   zzzdez
704 > (null)         ''
705
706 > # Boolean
707 > "TrUe"                true      EXPECT: true
708 > "FALSE"               false     EXPECT: false
709 > " yes"                true      EXPECT: true
710 > " no"                 false     EXPECT: false
711 > "yes "                true      EXPECT: true
712 > "-1"                  true     EXPECT: true
713 > "0"                   false     EXPECT: false
714 > "1"                   true      EXPECT: true
715 > " 0 "                 false     EXPECT: false
716 > " 1 "                 true      EXPECT: true
717 > "1111111111111111111" true      EXPECT: true
718 > "9"                   true      EXPECT: true
719 > " "                   false     EXPECT: false
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 > Failed: unrecognised boolean value "text"
725 > "00"                  false     EXPECT: false
726 > "!true"               false     EXPECT: false
727 > "!false"              true      EXPECT: true
728
729 > "TrUe"                true      EXPECT: true
730 > "FALSE"               false     EXPECT: false
731 > " yes"                true      EXPECT: true
732 > " no"                 false     EXPECT: false
733 > "yes "                true      EXPECT: true
734 > "-1"                  true      EXPECT: true
735 > "0"                   false     EXPECT: false
736 > "1"                   true      EXPECT: true
737 > " 0 "                 false     EXPECT: false
738 > " 1 "                 true      EXPECT: true
739 > "1111111111111111111" true      EXPECT: true
740 > "9"                   true      EXPECT: true
741 > " "                   false     EXPECT: false
742 > "text"                true      EXPECT: true
743 > " text"               true      EXPECT: true
744 > "text "               true      EXPECT: true
745 > " text "              true      EXPECT: true
746 > "00"                  true      EXPECT: true
747 > "!true"               false     EXPECT: false
748 > "!false"              true      EXPECT: true
749
750 > # RFC 2047
751
752 > abcd      abcd
753 > <:abcd:>  =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
754 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
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?=
756 > 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?=
757
758 > # RFC 2047 decode
759
760 > abcd      abcd
761 > <:abcd:>  <:abcd:>
762 > <:ab cd:> <:ab cd:>
763 > Long:      here we go: a string that is going to be encoded: it will go over the 75-char limit
764 > 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
765
766 > # UTF-8
767
768 > abcd      abcd
769 > aÀÿd      aÀÿd
770 > toobig    a_d
771
772 > # Substitution
773
774 > ${sg{abcdefabcdef}{abc}{xyz}}          =xyzdefxyzdef
775 > ${sg{ab:xy::z}{:}{::}}                 =ab::xy::::z
776 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}}    =a><><><ef
777 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}}   =a>bc<>ef<>bc<ef
778 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
779 > ${sg{abbab}{a*}{+}}                    =++b+b++b+
780
781 > # File insertion
782
783 > Failed: Not enough arguments for 'readfile' (min is 1)
784 > abcde
785 12345
786
787 xyz
788
789 > abcde12345xyz
790 > abcde:12345::xyz:
791 > abcde - 12345 -  - xyz - 
792 > Failed: failed to open /non/exist/file: No such file or directory
793 > non-exist
794 > >abcde!12345!!xyz!<
795
796 > # Calling a command
797
798 > abcd
799 1234
800
801 > rc=0
802 > 1
803 > rc=0
804 > abcd
805 1234
806
807 > rc=0
808 > 2
809 > rc=1
810 > abcd
811 1234
812
813 > rc=1
814 > N
815 > rc=127
816 > >><<
817 > rc=0
818 > 1!=2
819 > rc=0
820 > abcd
821 1234
822
823 > rc=0
824 > 2
825 > rc=1
826
827 > # PRVS
828
829 > prvs=xxxxxxxxxx=userx@test.ex
830 > prvs=xxxxxxxxxx=userx@test.ex
831 > prvs=xxxxxxxxxx=userx@test.ex
832
833 > # Syntax errors
834
835 > Failed: prvs third argument must be a single digit
836 > Failed: prvs third argument must be a single digit
837 > Failed: prvs third argument must be a single digit
838
839 > # Correct checks; can't put explicit addresses in the tests, because they
840 > # will change over time.
841
842 > userx@test.ex
843 > result=1
844
845 > >1< >userx@test.ex< >1<
846 > result=1
847
848 > userx@test.ex
849 > result=1
850
851 > # Incorrect secret
852
853 > userx@test.ex
854 > result=
855
856 > 0
857 > result=
858
859 > # Non-prvs address
860
861 > >><<
862 > result=
863
864 > # Syntax errors
865
866 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
867 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
868 > Failed: missing } at end of string
869 > Failed: missing } at end of string
870 > Failed: hmac algorithm "xxx" is not recognised
871 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
872 > Failed: unknown condition "xya" inside "and{...}" condition
873 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
874 > Failed: missing } at end of string - could be header name not terminated by colon
875 > Failed: curly-bracket problem in conditional yes/no parsing: did not close with '}'
876  remaining string is ''
877 > Failed: missing or misplaced { or } - could be header name not terminated by colon
878 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
879 > Failed: missing } at end of condition inside "or" group
880 > Failed: unknown condition "yes" inside "or{...}" condition
881 > Failed: non-digit after underscore in "substr_1_"
882 > Failed: non-digit after underscore in "substr__3"
883
884 > # Iterations: forany and forall
885
886 > yes
887 > yes
888 > yes
889 > no
890 > yes
891 > no
892 > no
893 > yes
894 > yes
895
896 > Failed: unknown condition "yes" inside "forany" condition
897 > Failed: missing } at end of condition inside "forany"
898
899 > yes
900 > no
901 > no
902 > no
903
904 > no
905 > yes
906 > yes
907 > yes
908
909 > # Expect yes
910 > outer=yes item='' (unset)
911
912 > # Expect no
913 > outer=no
914
915 > # Error inside nest - check message is helpful
916 > Failed: missing } at end of condition inside "forall" inside "forany" condition
917
918
919 > # Miscellaneous (for bug fixes, etc)
920
921 > true
922
923 > # Environment access
924
925 > CALLER
926 > correct
927
928 > # JSON
929
930 > "http://www.example.com/image/481989943"
931 > 100
932 > 943
933 > 943
934
935 > "green"
936 > green
937 > <>
938 > expect: <>
939
940 > 59
941 > 59
942
943 > {"1":116, "2":943, "3":234}
944 > expect: {"1":116, "2":943, "3":234}
945
946 > {"1":116, "2":943, "3":234}
947 > expect: {"1":116, "2":943, "3":234}
948
949 > <>
950 > expect: <>
951 > <>
952 > expect: <>
953
954 > # string value with embedded comma
955 > <Doe, John>
956 > expect <Doe, John>
957 > # string value with embedded doublequote
958 > <word1 \" word2>
959 > expect <word1 \" word2>
960
961 > yes
962 > yes
963
964
965 > escape: B7·F2ò
966
967 > primary_hostname: myhost.test.ex
968 > sender_address: sndr@dom
969 > match:  cdab
970 > Failed: "if" failed and "fail" requested
971 > yes
972 > match_address:   no
973 > protected:  
974
975 > primary_hostname: myhost.test.ex
976 > match:  cdab
977 > Failed: "if" failed and "fail" requested
978 > yes
979 > match_address:   no
980 > protected:  
981
982 > -be Sender host name and address etc, all unset
983 > -oMa  sender_host_address = 
984 >       sender_host_port = 0
985 > -oMaa sender_host_authenticated = 
986 > -oMai authenticated_id = CALLER
987 > -oMas authenticated_sender = CALLER@myhost.test.ex
988 > -oMi  interface_address = 
989 >       interface_port = -1
990 > -oMr  received_protocol = 
991 > -oMs  sender_host_name = 
992 > -oMt  sender_ident = CALLER
993
994 > -be Sender host name and address etc, all set except host name.
995 > -oMa  sender_host_address = V4NET.0.0.1
996 >       sender_host_port = 1234
997 > -oMaa sender_host_authenticated = AAA
998 > -oMai authenticated_id = philip
999 > -oMas authenticated_sender = xx@yy.zz
1000 > -oMi  interface_address = 1.1.1.1
1001 >       interface_port = 99
1002 > -oMr  received_protocol = special
1003 > -oMt  sender_ident = me
1004
1005 > -be Sender host name explicitly set
1006 > -oMa  sender_host_address = V4NET.0.0.1
1007 >       sender_host_port = 1234
1008 > -oMs  sender_host_name = my.host.name
1009
1010 > be Sender host name lookup fails (V4NET.11.12.13 is not reverse registered)
1011 > -oMs  sender_host_name = 
1012 >       host_lookup_failed = 1
1013
1014 > -be Sender host name and protocol set by Sendmail-compatible option
1015 > -p  received_protocol = special
1016 > -p  sender_host_name = host.name
1017
1018 > -be Sender host name and address etc, all set except host name
1019 > -oMa  sender_host_address = V4NET.0.0.1
1020 >       sender_host_port = 1234
1021 > -oMaa sender_host_authenticated = AAA
1022 > -oMai authenticated_id = philip
1023 > -oMas authenticated_sender = xx@yy.zz
1024 > -oMi  interface_address = 1.1.1.1
1025 >       interface_port = 99
1026 > -oMr  received_protocol = special
1027 > ----> No lookup yet: No
1028 > -oMs  sender_host_name = ten-1.test.ex
1029 > -oMt  sender_ident = me
1030
1031
1032 **** SMTP testing session as if from host V4NET.0.0.1
1033 **** but without any ident (RFC 1413) callback.
1034 **** This is not for real!
1035
1036 550 Administrative prohibition\r
1037
1038 **** SMTP testing session as if from host V4NET.0.0.2
1039 **** but without any ident (RFC 1413) callback.
1040 **** This is not for real!
1041
1042 550 Administrative prohibition\r
1043
1044 **** SMTP testing session as if from host V4NET.0.0.0
1045 **** but without any ident (RFC 1413) callback.
1046 **** This is not for real!
1047
1048 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
1049 250 myhost.test.ex Hello test [V4NET.0.0.0]\r
1050 250 OK\r
1051 250 Accepted\r
1052 354 Enter message, ending with "." on a line by itself\r
1053 550 reply_address=<>\r
1054 250 OK\r
1055 250 Accepted\r
1056 354 Enter message, ending with "." on a line by itself\r
1057 550 reply_address=<a@b>\r
1058 250 OK\r
1059 250 Accepted\r
1060 354 Enter message, ending with "." on a line by itself\r
1061 550 reply_address=<c@d>\r
1062 250 OK\r
1063 250 Accepted\r
1064 354 Enter message, ending with "." on a line by itself\r
1065 550 reply_address=<>\r
1066 250 OK\r
1067 250 Accepted\r
1068 354 Enter message, ending with "." on a line by itself\r
1069 550 reply_address=<x@y>\r
1070 221 myhost.test.ex closing connection\r
1071
1072 **** SMTP testing session as if from host V4NET.0.0.0
1073 **** but without any ident (RFC 1413) callback.
1074 **** This is not for real!
1075
1076 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
1077 250 myhost.test.ex Hello test [V4NET.0.0.0]\r
1078 250 OK\r
1079 250 Accepted\r
1080 354 Enter message, ending with "." on a line by itself\r
1081 550 reply_address=<>\r
1082 221 myhost.test.ex closing connection\r
1083
1084 **** SMTP testing session as if from host V4NET.0.0.0
1085 **** but without any ident (RFC 1413) callback.
1086 **** This is not for real!
1087
1088 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
1089 250 myhost.test.ex Hello test [V4NET.0.0.0]\r
1090 250 OK\r
1091 250 Accepted\r
1092 354 Enter message, ending with "." on a line by itself\r
1093 550 reply_address=<>\r
1094 221 myhost.test.ex closing connection\r
1095 > match_ip:        15 
1096 > match_ip:        16 
1097 > match_ip:        17 
1098
1099 > in list
1100 > in list
1101
1102 > '${listextract {2} {<. my.target.host.name}}'  =>   'target'
1103