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