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