Add $auth1, $auth2, $auth3 variables.
[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 > primary_hostname: myhost.test.ex
10 > primary_hostname: myhost.test.ex
11 > qualify_domain: myhost.test.ex
12 > bounce_return_size_limit: 102400
13 > spool_directory: TESTSUITE/spool
14 > Failed: unknown variable in "${unknown}"
15 > h_subject: (should be empty)
16 > h_subject: (should be empty)
17 > Failed: unknown expansion operator "header_subject"
18
19 > # $message_headers should be empty
20 > message_headers: ><
21
22 > # Continuation
23 > xy
24 > xy
25
26 > # Overlong names and overbig numbers
27
28 > Failed: unknown variable name "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
29 > Failed: unknown variable in "${aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}"
30 > +
31 > +
32
33 > # Operators
34
35 > addrss: local-part@dom.ain
36 > addrss: local-part@dom.ain
37 > domain: dom.ain
38 > domain: dom.ain
39 > escape: B7\267F2\362
40 > eval:   2
41 > eval:   7
42 > eval:   9
43 > eval:   4
44 > eval:   6
45 > eval:   42
46 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
47 > eval:   -2
48 > eval:   1
49 > eval:   1
50 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
51 > Failed: error in expression evaluation: expecting + or - (after processing "-2 - -3")
52 > eval:   1
53 > eval:   -5
54 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "-2 -")
55 > eval:   40962
56 > eval:   63
57 > Failed: error in expression evaluation: expecting + or - (after processing "0")
58 > eval10: 77
59 > eval10: 8
60 > expand: $primary_hostname myhost.test.ex
61 > hash:   jmg monty fbWx
62 > hash:   abcX abX aX X
63 > hex2b64:EjRWeA==
64 > hex2b64:q83v
65 > hex2b64:q83v
66 > hex2b64:Gis8TV5v
67 > Failed: "1a2b3c4d5e6" contains an odd number of characters
68 > Failed: "1a2b3c4d5e6g" is not a hex string
69 > hex2b64:MPPJPkZDbetYunCBao7BJA==
70 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
71
72 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
73 > environments. Write cunning tests that produce the same output in both cases,
74 > while doing a reasonable check.
75
76 > base62:  OK
77 > base62d: OK
78 > base62d: OK
79 > Failed: argument for base62 operator is "12345x", which is not a decimal number
80 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
81
82 > hmac:   dd97e3ba5d1a61b5006108f8c8252953
83 > hmac:   0210cf9d274b53f1550f657c378b29e8bfed1064
84 > md5:    77add1d5f41223d5582fca736a5cb335
85 > sha1:   DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
86 > sha1:   A9993E364706816ABA3E25717850C26C9CD0D89D
87 > mask:   192.168.10.192/28
88 > mask:   192.168.10.206/32
89 > Failed: mask value too big in "192.168.10.206/33"
90 > mask:   0.0.0.0/0
91 > Failed: missing mask value in "192.168.10.206"
92 > Failed: "a.b.c.d" is not an IP address
93 > nhash:  19 0/61
94 > lc/uc:  the quick  BROWN FOX
95 > length: The quick  abc
96 > lclpt:  local-part
97 > lclpt:  local-part
98 > quote:  aZ09_.-Q "ab*cd" "abcd\"ef"
99 > quote:  "nl(\n)"
100 > quote:  "cr(\r)"
101 > quote:  "tab( )"
102 > quote:  "xff(ÿ)"
103 > quote:  Empty>""<
104 > quote_local_part: abcd
105 > quote_local_part: O'Reilly
106 > quote_local_part: "a space"
107 > quote_local_part: ".something"
108 > quote_local_part: "something."
109 > quote_local_part: joe.bloggs
110 > quote_local_part: a!b
111 > quote_local_part: "x@y"
112 > quote_local_part: ab*cd
113 > quote_local_part: "x:y"
114 > quote_local_part: "abcd\"ef"
115 > quote_local_part: ""
116 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
117 > substr: ba 34  1
118 > substr: barb rhuba
119 > substr: 
120 > substr: 
121 > str2b64:YWJjZA==
122 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
123 > strlen: 0
124 > strlen: 1
125 > strlen: 8
126 > time_interval: 0s
127 > time_interval: 44s
128 > time_interval: 1w4d13h46m39s
129 > Failed: string "-1" is not a positive number in "time_interval" operator
130 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
131
132 > # stat is a bit tricky, but some of the fields of the aux-var directory
133 > # should be the same on all systems
134
135 > stat:   40755
136 > stat:   drwxr-xr-x
137 > Failed: stat(/a/non/existent/file) failed: No such file or directory
138
139 > # "Operators" that have expanded arguments
140
141 > hash:   jmg monty fbWx
142 > hash:   abcX abX aX X
143 > nhash:  19 0/61
144 > length: The quick  abc
145 > substr: ba 34  1
146 > substr: 
147
148 > # Error forms
149
150 > Failed: missing or misplaced { or }
151 > Failed: "nonnumber" is not a number (in "hash" expansion)
152 > Failed: Too many arguments for "hash" (max is 3)
153 > Failed: "-2" is not a positive number (in "substr" expansion)
154
155 > # Skipped operators
156
157 > addrss: NO
158 > domain: NO
159 > escape: NO
160 > expand: NO
161 > hash:   NO
162 > md5:    NO
163 > mask:   NO
164
165 > # Conditions
166
167 > 2=2:    y
168 > 2==2:   y
169 > 3=2:    n
170 > 2==3:   n
171 > !2=2:   n
172 > !2==2:  n
173 > !3=2:   y
174 > !2==3:  y
175 > 2>3:    n
176 > 3>3:    n
177 > 4>3:    y
178 > 2>=3:   n
179 > 3>=3:   y
180 > 4>=3:   y
181 > 2<3:    y
182 > 3<3:    n
183 > 4<3:    n
184 > 2<=3:   y
185 > 3<=3:   y
186 > 4<=3:   n
187 > 5<=3:   n
188
189 > 5>3k:   n
190 > 5>3m:   n
191 > Failed: "3z " is not a number
192 > Failed: "a" is not a number
193
194 > def:y   y
195 > def:n   n
196 > Failed: unknown variable "post" after "def:"
197 > def:h_f n
198 > def:h_f n
199 > Failed: missing or misplaced { or }
200
201 > exists: y
202 > exists: n
203
204 > eq:     y
205 > eq:     n
206 > !eq:    n
207 > !eq:    y
208
209 > eqi:    y
210 > eqi:    y
211 > eqi:    n
212 > !eqi:   n
213 > !eqi:   n
214 > !eqi:   y
215
216 > lt:     y
217 > lti:    n
218 > le:     y
219 > lei:    y
220 > gt:     n
221 > gti:    n
222 > ge:     n
223 > gei:    y
224
225 > isip:   y  1.2.3.4
226 > isip4:  y  1.2.3.4
227 > isip6:  n  1.2.3.4
228 > isip:   n  1:2:3:4
229 > isip4:  n  1:2:3:4
230 > isip6:  n  1:2:3:4
231 > isip:   y      ::1
232 > isip4:  n      ::1
233 > isip6:  y      ::1
234 > isip:   y  fe80::a00:20ff:fe86:a061
235 > isip4:  n  fe80::a00:20ff:fe86:a061
236 > isip6:  y  fe80::a00:20ff:fe86:a061
237 > isip:   n  rhubarb
238 > isip4:  n  rhubarb
239 > isip6:  n  rhubarb
240
241 > match:  cdab
242 > match:  cdab
243 > match:  cdab
244 > Failed: "if" failed and "fail" requested
245 > match:  cd[xyz]ab
246
247 > match_domain:    yes
248 > match_domain:    no
249 > match_domain:    yes
250 > match_domain:    yes
251 > match_domain:    no
252
253 >  >x@zz.aa.bb< [] >x@zz.aa.bb< 
254
255 >  >x@xxxabc< [] >x@xxxabc< 
256
257 > match_address:   yes
258 > match_address:   yes
259
260 > match_local_part:yes
261 > match_local_part:yes
262
263 > match_ip:        01 true
264 > match_ip:        02 
265 > match_ip:        03 true
266 > match_ip:        04 true
267 > match_ip:        05 
268 > match_ip:        06 
269 > match_ip:        07 true
270 > match_ip:        08 true
271 > match_ip:        09 
272 > match_ip:        10 true
273 > Failed: "somename" is not an IP address
274 > match_ip:        12 true
275 > match_ip:        13 true
276 > match_ip:        14 true
277
278 > queue_running:  n
279 > first_delivery: n
280
281 > queue_running after or: y
282 > first_delivery after or: y
283
284 > # Default values for both if strings
285
286 > ${if eq{1}{1}}  >true<
287 > ${if eq{1}{2}}  ><
288
289 > # Lookups: DIR is the testing directory. In this test we can only use the
290 > # lookups that are required in all cases.
291
292 > CALLER
293
294 > ==X@Y
295 > ==*
296 > ==*@Z
297 > ==*
298
299 > data for a.b.c.d
300 > failed x.y.z
301 > data for *.p.q
302 > data for *.p.q
303 > data for *.p.q
304 > Failed: "lookup" failed and "fail" requested
305 > data for *
306
307 > q1:  "abc"
308 > q2:  "xyz":
309 > q3:  "pqr"  :
310 > q4:  "a:b" abc continued data (make sure not key)
311 > q5:  "\"quoted\""
312 > q6:  "white space"
313 > q7:  "b\\s"
314
315 > abc:   abc
316 > a.b.c: *.b.c
317 > ab.c:  *b.c
318 > xyz:   ^X
319 > Xyz:   ^X
320 > Zyz:   ^Z
321 > a b:   "^a +b"
322 > a  b:  "^a +b"
323 > a:b:   lookup succeeded
324 > a.b:   ^a\\.+b
325 > a..b:  ^a\\.+b
326 > a9b:   \N^a\d+b
327 > a99b:  \N^a\d+b
328
329 > # Should give the same results as above because expansion does nothing
330
331 > abc:   abc
332 > a.b.c: *.b.c
333 > ab.c:  *b.c
334 > xyz:   ^X
335 > Xyz:   ^X
336 > Zyz:   ^Z
337 > a b:   "^a +b"
338 > a  b:  "^a +b"
339 > a:b:   lookup succeeded
340
341 > # Should fail because of no expansion
342
343 > a.b:   NO
344 > a..b:  NO
345 > a9b:   NO
346 > a99b:  NO
347
348 > # But these should succeed
349
350 > a\:b:  ^a\\.+b
351 > a\:Xb: ^a\\.+b
352
353 > # IP address (CIDR) lookups
354
355 > 1.2.3.4:      data for 1.2.3.4
356 > 1.2.3.5:      
357 > 1.2.3.5:      data for *
358 > abcd::cdab:   data for abcd::cdab
359 > 192.168.1.2:  data for 192.168.0.0/16
360 > 192.168.5.6:  data for 192.168.0.0/16
361 > abcd:abcd::   data for abcd:abcd::/32
362 > abcd:abcd:1:: data for abcd:abcd::/32
363 > abcd:abcd::3  data for abcd:abcd::/32
364 > 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
365
366
367 > # Nested Lookups - style 1
368
369 > The data for key1->key2
370 > Failed: "lookup" failed and "fail" requested
371
372 > # Nested Lookups - style 2
373
374 > The data for key1->key2
375 > failed for key4
376
377 > # Other nesting tests
378
379 > 1-in-1
380 > 2-in-2
381 > both-in-1,both-in-2
382 > Failed: "lookup" failed and "fail" requested
383
384 > # Lookup quotes for standardly expected lookups
385
386 > lsearch  !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
387 > Failed: unknown lookup type "xxx"
388
389 > # Extract
390
391 > 2
392 > 2
393 > 2
394 > 2
395 > Empty:<>
396 > Empty:<>
397 > <3>
398 > <3>
399 > Empty:<>
400 > Empty:<>
401 > no Z
402 > no 4
403 > Failed: "extract" failed and "fail" requested
404 > Failed: "extract" failed and "fail" requested
405 > D
406 > a:b:c:d:e
407 > a
408 > e
409 > a
410 > FAIL
411 > b
412
413 > b
414 > three four
415 > Failed: first argument of "extract" must not be empty
416 > Failed: first argument of "extract" must not be empty
417 > b
418
419 > # Translation
420
421 > abcdea aaa xyz zbcdez
422 > abcdea a   z   zbcdez
423 > abcdea a       abcdea
424 > abcdea abc z   zzzdez
425
426 > # RFC 2047
427
428 > abcd      abcd
429 > <:abcd:>  =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
430 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
431 > Long:     =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_i?= =?iso-8859-8?Q?t_will_go_over_the_75-char_limit?=
432 > Long:     =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_i?= =?iso-8859-8?Q?t_will_go_over_the_75-char_limit_by_a_long_way=3B_in_fac?= =?iso-8859-8?Q?t_this_one_will_go_over_the_150_character_limit?=
433
434
435 > # UTF-8
436
437 > abcd      abcd
438 > aÀÿd      aÀÿd
439 > toobig    a_d
440
441 > # Substitution
442
443 > ${sg{abcdefabcdef}{abc}{xyz}}          =xyzdefxyzdef
444 > ${sg{ab:xy::z}{:}{::}}                 =ab::xy::::z
445 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}}    =a><><><ef
446 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}}   =a>bc<>ef<>bc<ef
447 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
448 > ${sg{abbab}{a*}{+}}                    =++b+b++b+
449
450 > # File insertion
451
452 > Failed: missing or misplaced { or }
453 > abcde
454 12345
455
456 xyz
457
458 > abcde12345xyz
459 > abcde:12345::xyz:
460 > abcde - 12345 -  - xyz - 
461 > Failed: failed to open /non/exist/file: No such file or directory
462 > non-exist
463 > >abcde!12345!!xyz!<
464
465 > # Calling a command
466
467 > abcd
468 1234
469
470 > RC=0
471 > 1
472 > RC=0
473 > abcd
474 1234
475
476 > RC=0
477 > 2
478 > RC=1
479 > abcd
480 1234
481
482 > RC=1
483 > N
484 > RC=127
485 > >><<
486 > RC=0
487 > 1!=2
488 > RC=0
489
490 > # PRVS
491
492 > prvs=userx/xxxxxxxxxx@test.ex
493 > prvs=userx/xxxxxxxxxx@test.ex
494 > prvs=userx/xxxxxxxxxx@test.ex
495
496 > # Syntax errors
497
498 > Failed: prvs second argument must be a single digit
499 > Failed: prvs second argument must be a single digit
500 > Failed: prvs second argument must be a single digit
501
502 > # Correct checks; can't put explicit addresses in the tests, because they
503 > # will change over time.
504
505 > userx@test.ex
506 > result=1
507
508 > >1< >userx@test.ex< >1<
509 > result=1
510
511 > userx@test.ex
512 > result=1
513
514 > # Incorrect secret
515
516 > userx@test.ex
517 > result=
518
519 > 0
520 > result=
521
522 > # Non-prvs address
523
524 > >><<
525 > result=
526
527 > # Syntax errors
528
529 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
530 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
531 > Failed: missing } at end of string
532 > Failed: missing } at end of string
533 > Failed: hmac algorithm "xxx" is not recognised
534 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
535 > Failed: unknown condition "xya" inside "and{...}" condition
536 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
537 > Failed: missing } at end of string - could be header name not terminated by colon
538 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
539 > Failed: missing } at end of condition inside "or" group
540 > Failed: unknown condition "yes" inside "or{...}" condition
541 > Failed: non-digit after underscore in "substr_1_"
542 > Failed: non-digit after underscore in "substr__3"
543
544 > # Miscellaneous (for bug fixes, etc)
545
546 > true
547
548
549 > escape: B7·F2ò
550
551 > primary_hostname: myhost.test.ex
552 > match:  cdab
553 > Failed: "if" failed and "fail" requested
554 > yes
555 > match_address:   no
556
557 > -oMa  sender_host_address = 
558 >       sender_host_port = 0
559 > -oMaa sender_host_authenticated = 
560 > -oMai authenticated_id = CALLER
561 > -oMas authenticated_sender = CALLER@myhost.test.ex
562 > -oMi  interface_address = 
563 >       interface_port = -1
564 > -oMr  received_protocol = 
565 > -oMs  sender_host_name = 
566 > -oMt  sender_ident = CALLER
567
568 > -oMa  sender_host_address = V4NET.0.0.1
569 >       sender_host_port = 1234
570 > -oMaa sender_host_authenticated = AAA
571 > -oMai authenticated_id = philip
572 > -oMas authenticated_sender = xx@yy.zz
573 > -oMi  interface_address = 1.1.1.1
574 >       interface_port = 99
575 > -oMr  received_protocol = special
576 > -oMt  sender_ident = me
577
578 > -oMa  sender_host_address = V4NET.0.0.1
579 >       sender_host_port = 1234
580 > -oMs  sender_host_name = my.host.name
581
582 > -oMs  sender_host_name = 
583 >       host_lookup_failed = 1
584
585 > -p  received_protocol = special
586 > -p  sender_host_name = host.name
587
588 > -oMa  sender_host_address = V4NET.0.0.1
589 >       sender_host_port = 1234
590 > -oMaa sender_host_authenticated = AAA
591 > -oMai authenticated_id = philip
592 > -oMas authenticated_sender = xx@yy.zz
593 > -oMi  interface_address = 1.1.1.1
594 >       interface_port = 99
595 > -oMr  received_protocol = special
596 > ----> No lookup yet: No
597 > -oMs  sender_host_name = ten-1.test.ex
598 > -oMt  sender_ident = me
599
600
601 **** SMTP testing session as if from host V4NET.0.0.1
602 **** but without any ident (RFC 1413) callback.
603 **** This is not for real!
604
605 550 Administrative prohibition\r
606
607 **** SMTP testing session as if from host V4NET.0.0.2
608 **** but without any ident (RFC 1413) callback.
609 **** This is not for real!
610
611 550 Administrative prohibition\r
612
613 **** SMTP testing session as if from host V4NET.0.0.0
614 **** but without any ident (RFC 1413) callback.
615 **** This is not for real!
616
617 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
618 250 OK\r
619 250 Accepted\r
620 354 Enter message, ending with "." on a line by itself\r
621 550 reply_address=<>\r
622 250 OK\r
623 250 Accepted\r
624 354 Enter message, ending with "." on a line by itself\r
625 550 reply_address=<a@b>\r
626 250 OK\r
627 250 Accepted\r
628 354 Enter message, ending with "." on a line by itself\r
629 550 reply_address=<c@d>\r
630 250 OK\r
631 250 Accepted\r
632 354 Enter message, ending with "." on a line by itself\r
633 550 reply_address=<>\r
634 250 OK\r
635 250 Accepted\r
636 354 Enter message, ending with "." on a line by itself\r
637 550 reply_address=<x@y>\r
638 221 myhost.test.ex closing connection\r
639
640 **** SMTP testing session as if from host V4NET.0.0.0
641 **** but without any ident (RFC 1413) callback.
642 **** This is not for real!
643
644 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
645 250 OK\r
646 250 Accepted\r
647 354 Enter message, ending with "." on a line by itself\r
648 550 reply_address=<>\r
649 221 myhost.test.ex closing connection\r
650
651 **** SMTP testing session as if from host V4NET.0.0.0
652 **** but without any ident (RFC 1413) callback.
653 **** This is not for real!
654
655 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
656 250 OK\r
657 250 Accepted\r
658 354 Enter message, ending with "." on a line by itself\r
659 550 reply_address=<>\r
660 221 myhost.test.ex closing connection\r