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