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.
6 > # Some fixed variables
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"
19 > # $message_headers should be empty
26 > # Overlong names and overbig numbers
28 > Failed: unknown variable name "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
29 > Failed: unknown variable in "${aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}"
35 > addrss: local-part@dom.ain
36 > addrss: local-part@dom.ain
39 > escape: B7\267F2\362
46 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
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")
54 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "-2 -")
57 > Failed: error in expression evaluation: expecting + or - (after processing "0")
60 > expand: $primary_hostname myhost.test.ex
61 > hash: jmg monty fbWx
67 > Failed: "1a2b3c4d5e6" contains an odd number of characters
68 > Failed: "1a2b3c4d5e6g" is not a hex string
69 > hex2b64:MPPJPkZDbetYunCBao7BJA==
70 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
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.
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
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"
91 > Failed: missing mask value in "192.168.10.206"
92 > Failed: "a.b.c.d" is not an IP address
94 > lc/uc: the quick BROWN FOX
95 > length: The quick abc
98 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
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
122 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
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
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
138 > # stat is a bit tricky, but some of the fields of the aux-var directory
139 > # should be the same on all systems
143 > Failed: stat(/a/non/existent/file) failed: No such file or directory
145 > # "Operators" that have expanded arguments
147 > hash: jmg monty fbWx
148 > hash: abcX abX aX X
150 > length: The quick abc
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)
161 > # Skipped operators
197 > Failed: "3z " is not a number
198 > Failed: "a" is not a number
202 > Failed: unknown variable "post" after "def:"
205 > Failed: missing or misplaced { or }
240 > isip: y fe80::a00:20ff:fe86:a061
241 > isip4: n fe80::a00:20ff:fe86:a061
242 > isip6: y fe80::a00:20ff:fe86:a061
250 > Failed: "if" failed and "fail" requested
259 > >x@zz.aa.bb< [] >x@zz.aa.bb<
261 > >x@xxxabc< [] >x@xxxabc<
266 > match_local_part:yes
267 > match_local_part:yes
279 > Failed: "somename" is not an IP address
287 > queue_running after or: y
288 > first_delivery after or: y
290 > # Default values for both if strings
292 > ${if eq{1}{1}} >true<
295 > # Lookups: DIR is the testing directory. In this test we can only use the
296 > # lookups that are required in all cases.
310 > Failed: "lookup" failed and "fail" requested
316 > q4: "a:b" abc continued data (make sure not key)
329 > a:b: lookup succeeded
335 > # Should give the same results as above because expansion does nothing
345 > a:b: lookup succeeded
347 > # Should fail because of no expansion
354 > # But these should succeed
359 > # Some tests of case-(in)dependence
361 > MiXeD-CD: Data found for case-dependent MiXeD-CD
362 > MixeD-CD: NOT FOUND
363 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
364 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
366 > # IP address (CIDR) lookups
368 > 1.2.3.4: data for 1.2.3.4
370 > 1.2.3.5: data for *
371 > abcd::cdab: data for abcd::cdab
372 > 192.168.1.2: data for 192.168.0.0/16
373 > 192.168.5.6: data for 192.168.0.0/16
374 > abcd:abcd:: data for abcd:abcd::/32
375 > abcd:abcd:1:: data for abcd:abcd::/32
376 > abcd:abcd::3 data for abcd:abcd::/32
377 > 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
380 > # Nested Lookups - style 1
382 > The data for key1->key2
383 > Failed: "lookup" failed and "fail" requested
385 > # Nested Lookups - style 2
387 > The data for key1->key2
390 > # Other nesting tests
394 > both-in-1,both-in-2
395 > Failed: "lookup" failed and "fail" requested
397 > # Lookup quotes for standardly expected lookups
399 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
400 > Failed: unknown lookup type "xxx"
416 > Failed: "extract" failed and "fail" requested
417 > Failed: "extract" failed and "fail" requested
428 > Failed: first argument of "extract" must not be empty
429 > Failed: first argument of "extract" must not be empty
434 > abcdea aaa xyz zbcdez
437 > abcdea abc z zzzdez
442 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
443 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
444 > 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?=
445 > 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?=
456 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
457 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
458 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
459 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
460 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
461 > ${sg{abbab}{a*}{+}} =++b+b++b+
465 > Failed: missing or misplaced { or }
473 > abcde - 12345 - - xyz -
474 > Failed: failed to open /non/exist/file: No such file or directory
476 > >abcde!12345!!xyz!<
478 > # Calling a command
505 > prvs=userx/xxxxxxxxxx@test.ex
506 > prvs=userx/xxxxxxxxxx@test.ex
507 > prvs=userx/xxxxxxxxxx@test.ex
511 > Failed: prvs second argument must be a single digit
512 > Failed: prvs second argument must be a single digit
513 > Failed: prvs second argument must be a single digit
515 > # Correct checks; can't put explicit addresses in the tests, because they
516 > # will change over time.
521 > >1< >userx@test.ex< >1<
542 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
543 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
544 > Failed: missing } at end of string
545 > Failed: missing } at end of string
546 > Failed: hmac algorithm "xxx" is not recognised
547 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
548 > Failed: unknown condition "xya" inside "and{...}" condition
549 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
550 > Failed: missing } at end of string - could be header name not terminated by colon
551 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
552 > Failed: missing } at end of condition inside "or" group
553 > Failed: unknown condition "yes" inside "or{...}" condition
554 > Failed: non-digit after underscore in "substr_1_"
555 > Failed: non-digit after underscore in "substr__3"
557 > # Miscellaneous (for bug fixes, etc)
564 > primary_hostname: myhost.test.ex
566 > Failed: "if" failed and "fail" requested
570 > -oMa sender_host_address =
571 > sender_host_port = 0
572 > -oMaa sender_host_authenticated =
573 > -oMai authenticated_id = CALLER
574 > -oMas authenticated_sender = CALLER@myhost.test.ex
575 > -oMi interface_address =
576 > interface_port = -1
577 > -oMr received_protocol =
578 > -oMs sender_host_name =
579 > -oMt sender_ident = CALLER
581 > -oMa sender_host_address = V4NET.0.0.1
582 > sender_host_port = 1234
583 > -oMaa sender_host_authenticated = AAA
584 > -oMai authenticated_id = philip
585 > -oMas authenticated_sender = xx@yy.zz
586 > -oMi interface_address = 1.1.1.1
587 > interface_port = 99
588 > -oMr received_protocol = special
589 > -oMt sender_ident = me
591 > -oMa sender_host_address = V4NET.0.0.1
592 > sender_host_port = 1234
593 > -oMs sender_host_name = my.host.name
595 > -oMs sender_host_name =
596 > host_lookup_failed = 1
598 > -p received_protocol = special
599 > -p sender_host_name = host.name
601 > -oMa sender_host_address = V4NET.0.0.1
602 > sender_host_port = 1234
603 > -oMaa sender_host_authenticated = AAA
604 > -oMai authenticated_id = philip
605 > -oMas authenticated_sender = xx@yy.zz
606 > -oMi interface_address = 1.1.1.1
607 > interface_port = 99
608 > -oMr received_protocol = special
609 > ----> No lookup yet: No
610 > -oMs sender_host_name = ten-1.test.ex
611 > -oMt sender_ident = me
614 **** SMTP testing session as if from host V4NET.0.0.1
615 **** but without any ident (RFC 1413) callback.
616 **** This is not for real!
618 550 Administrative prohibition
\r
620 **** SMTP testing session as if from host V4NET.0.0.2
621 **** but without any ident (RFC 1413) callback.
622 **** This is not for real!
624 550 Administrative prohibition
\r
626 **** SMTP testing session as if from host V4NET.0.0.0
627 **** but without any ident (RFC 1413) callback.
628 **** This is not for real!
630 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
633 354 Enter message, ending with "." on a line by itself
\r
634 550 reply_address=<>
\r
637 354 Enter message, ending with "." on a line by itself
\r
638 550 reply_address=<a@b>
\r
641 354 Enter message, ending with "." on a line by itself
\r
642 550 reply_address=<c@d>
\r
645 354 Enter message, ending with "." on a line by itself
\r
646 550 reply_address=<>
\r
649 354 Enter message, ending with "." on a line by itself
\r
650 550 reply_address=<x@y>
\r
651 221 myhost.test.ex closing connection
\r
653 **** SMTP testing session as if from host V4NET.0.0.0
654 **** but without any ident (RFC 1413) callback.
655 **** This is not for real!
657 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
660 354 Enter message, ending with "." on a line by itself
\r
661 550 reply_address=<>
\r
662 221 myhost.test.ex closing connection
\r
664 **** SMTP testing session as if from host V4NET.0.0.0
665 **** but without any ident (RFC 1413) callback.
666 **** This is not for real!
668 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
671 354 Enter message, ending with "." on a line by itself
\r
672 550 reply_address=<>
\r
673 221 myhost.test.ex closing connection
\r