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}"
43 > map: ::a::: ::b::: ::c::
52 > # Tests with iscntrl() and illegal separators
59 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "0+") inside "reduce" item
66 > addrss: local-part@dom.ain
67 > addrss: local-part@dom.ain
71 > addresses: ''abc@xyz' ''pqr@xyz
72 > addresses: local-part@dom.ain
73 > addresses: local-part@dom.ain+xyz@abc
74 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
77 > escape: B7\267F2\362
84 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
88 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
89 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
95 > Failed: error in expression evaluation: expecting operator (after processing "0")
98 > Failed: error in expression evaluation: expecting operator (after processing "0")
112 > expand: $primary_hostname myhost.test.ex
113 > hash: jmg monty fbWx
114 > hash: abcX abX aX X
119 > Failed: "1a2b3c4d5e6" contains an odd number of characters
120 > Failed: "1a2b3c4d5e6g" is not a hex string
121 > hex2b64:MPPJPkZDbetYunCBao7BJA==
122 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
124 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
125 > environments. Write cunning tests that produce the same output in both cases,
126 > while doing a reasonable check.
131 > Failed: argument for base62 operator is "12345x", which is not a decimal number
132 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
134 > hmac: dd97e3ba5d1a61b5006108f8c8252953
135 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
136 > md5: 77add1d5f41223d5582fca736a5cb335
137 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
138 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
139 > mask: 192.168.10.192/28
140 > mask: 192.168.10.206/32
141 > Failed: mask value too big in "192.168.10.206/33"
143 > Failed: missing mask value in "192.168.10.206"
144 > Failed: "a.b.c.d" is not an IP address
146 > lc/uc: the quick BROWN FOX
147 > length: The quick abc
150 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
156 > quote_local_part: abcd
157 > quote_local_part: O'Reilly
158 > quote_local_part: "a space"
159 > quote_local_part: ".something"
160 > quote_local_part: "something."
161 > quote_local_part: joe.bloggs
162 > quote_local_part: a!b
163 > quote_local_part: "x@y"
164 > quote_local_part: ab*cd
165 > quote_local_part: "x:y"
166 > quote_local_part: "abcd\"ef"
167 > quote_local_part: ""
168 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
174 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
182 > Failed: string "14" is not an Exim time interval in "time_eval" operator
183 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
186 > time_interval: 1w4d13h46m39s
187 > Failed: string "-1" is not a positive number in "time_interval" operator
188 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
190 > # stat is a bit tricky, but some of the fields of the aux-var directory
191 > # should be the same on all systems
195 > Failed: stat(/a/non/existent/file) failed: No such file or directory
197 > # "Operators" that have expanded arguments
199 > hash: jmg monty fbWx
200 > hash: abcX abX aX X
202 > length: The quick abc
208 > Failed: missing or misplaced { or }
209 > Failed: "nonnumber" is not a number (in "hash" expansion)
210 > Failed: Too many arguments for "hash" (max is 3)
211 > Failed: "-2" is not a positive number (in "substr" expansion)
213 > # Skipped operators
223 > # Number suffixes in conditions
230 > # >32b should work, >64b not
234 > 4611686018427387904 y
235 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
265 > Failed: invalid integer "3z "
266 > Failed: integer expected but "a" found
276 > Failed: unknown variable "post" after "def:"
279 > Failed: missing or misplaced { or }
314 > isip: y fe80::a00:20ff:fe86:a061
315 > isip4: n fe80::a00:20ff:fe86:a061
316 > isip6: y fe80::a00:20ff:fe86:a061
324 > Failed: "if" failed and "fail" requested
333 > >x@zz.aa.bb< [] >x@zz.aa.bb<
335 > >x@xxxabc< [] >x@xxxabc<
340 > match_local_part:yes
341 > match_local_part:yes
353 > Failed: "somename" is not an IP address
362 > queue_running after or: y
363 > first_delivery after or: y
365 > # Default values for both if strings
367 > ${if eq{1}{1}} >true<
370 > # Lookups: DIR is the testing directory. In this test we can only use the
371 > # lookups that are required in all cases.
385 > Failed: "lookup" failed and "fail" requested
391 > q4: "a:b" abc continued data (make sure not key)
404 > a:b: lookup succeeded
410 > # Should give the same results as above because expansion does nothing
420 > a:b: lookup succeeded
422 > # Should fail because of no expansion
429 > # But these should succeed
434 > # Some tests of case-(in)dependence
436 > MiXeD-CD: Data found for case-dependent MiXeD-CD
437 > MixeD-CD: NOT FOUND
438 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
439 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
441 > # IP address (CIDR) lookups
443 > 1.2.3.4: data for 1.2.3.4
445 > 1.2.3.5: data for *
446 > abcd::cdab: data for abcd::cdab
447 > 192.168.1.2: data for 192.168.0.0/16
448 > 192.168.5.6: data for 192.168.0.0/16
449 > abcd:abcd:: data for abcd:abcd::/32
450 > abcd:abcd:1:: data for abcd:abcd::/32
451 > abcd:abcd::3 data for abcd:abcd::/32
452 > 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
455 > # Nested Lookups - style 1
457 > The data for key1->key2
458 > Failed: "lookup" failed and "fail" requested
460 > # Nested Lookups - style 2
462 > The data for key1->key2
465 > # Other nesting tests
469 > both-in-1,both-in-2
470 > Failed: "lookup" failed and "fail" requested
472 > # Lookup quotes for standardly expected lookups
474 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
475 > Failed: unknown lookup type "xxx"
491 > Failed: "extract" failed and "fail" requested
492 > Failed: "extract" failed and "fail" requested
503 > Failed: first argument of "extract" must not be empty
504 > Failed: first argument of "extract" must not be empty
509 > abcdea aaa xyz zbcdez
512 > abcdea abc z zzzdez
515 > "TrUe" true EXPECT: true
516 > "FALSE" false EXPECT: false
517 > " yes" true EXPECT: true
518 > " no" false EXPECT: false
519 > "yes " true EXPECT: true
520 > Failed: unrecognised boolean value "-1"
521 > "0" false EXPECT: false
522 > "1" true EXPECT: true
523 > " 0 " false EXPECT: false
524 > " 1 " true EXPECT: true
525 > "1111111111111111111" true EXPECT: true
526 > "9" true EXPECT: true
527 > " " false EXPECT: false
528 > Failed: unrecognised boolean value "text"
529 > Failed: unrecognised boolean value "text"
530 > Failed: unrecognised boolean value "text"
531 > Failed: unrecognised boolean value "text"
532 > "00" false EXPECT: false
533 > "!true" false EXPECT: false
534 > "!false" true EXPECT: true
536 > "TrUe" true EXPECT: true
537 > "FALSE" false EXPECT: false
538 > " yes" true EXPECT: true
539 > " no" false EXPECT: false
540 > "yes " true EXPECT: true
541 > "-1" true EXPECT: true
542 > "0" false EXPECT: false
543 > "1" true EXPECT: true
544 > " 0 " false EXPECT: false
545 > " 1 " true EXPECT: true
546 > "1111111111111111111" true EXPECT: true
547 > "9" true EXPECT: true
548 > " " false EXPECT: false
549 > "text" true EXPECT: true
550 > " text" true EXPECT: true
551 > "text " true EXPECT: true
552 > " text " true EXPECT: true
553 > "00" true EXPECT: true
554 > "!true" false EXPECT: false
555 > "!false" true EXPECT: true
560 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
561 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
562 > 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?=
563 > 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?=
569 > <:ab cd:> <:ab cd:>
570 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
571 > 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
581 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
582 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
583 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
584 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
585 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
586 > ${sg{abbab}{a*}{+}} =++b+b++b+
590 > Failed: missing or misplaced { or }
598 > abcde - 12345 - - xyz -
599 > Failed: failed to open /non/exist/file: No such file or directory
601 > >abcde!12345!!xyz!<
603 > # Calling a command
630 > prvs=xxxxxxxxxx=userx@test.ex
631 > prvs=xxxxxxxxxx=userx@test.ex
632 > prvs=xxxxxxxxxx=userx@test.ex
636 > Failed: prvs second argument must be a single digit
637 > Failed: prvs second argument must be a single digit
638 > Failed: prvs second argument must be a single digit
640 > # Correct checks; can't put explicit addresses in the tests, because they
641 > # will change over time.
646 > >1< >userx@test.ex< >1<
667 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
668 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
669 > Failed: missing } at end of string
670 > Failed: missing } at end of string
671 > Failed: hmac algorithm "xxx" is not recognised
672 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
673 > Failed: unknown condition "xya" inside "and{...}" condition
674 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
675 > Failed: missing } at end of string - could be header name not terminated by colon
676 > Failed: missing or misplaced { or }
677 > Failed: missing or misplaced { or } - could be header name not terminated by colon
678 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
679 > Failed: missing } at end of condition inside "or" group
680 > Failed: unknown condition "yes" inside "or{...}" condition
681 > Failed: non-digit after underscore in "substr_1_"
682 > Failed: non-digit after underscore in "substr__3"
684 > # Iterations: forany and forall
696 > Failed: unknown condition "yes" inside "forany" condition
697 > Failed: missing } at end of condition inside "forany"
710 > outer=yes item='' (unset)
715 > # Error inside nest - check message is helpful
716 > Failed: missing } at end of condition inside "forall" inside "forany" condition
719 > # Miscellaneous (for bug fixes, etc)
726 > primary_hostname: myhost.test.ex
728 > Failed: "if" failed and "fail" requested
732 > -oMa sender_host_address =
733 > sender_host_port = 0
734 > -oMaa sender_host_authenticated =
735 > -oMai authenticated_id = CALLER
736 > -oMas authenticated_sender = CALLER@myhost.test.ex
737 > -oMi interface_address =
738 > interface_port = -1
739 > -oMr received_protocol =
740 > -oMs sender_host_name =
741 > -oMt sender_ident = CALLER
743 > -oMa sender_host_address = V4NET.0.0.1
744 > sender_host_port = 1234
745 > -oMaa sender_host_authenticated = AAA
746 > -oMai authenticated_id = philip
747 > -oMas authenticated_sender = xx@yy.zz
748 > -oMi interface_address = 1.1.1.1
749 > interface_port = 99
750 > -oMr received_protocol = special
751 > -oMt sender_ident = me
753 > -oMa sender_host_address = V4NET.0.0.1
754 > sender_host_port = 1234
755 > -oMs sender_host_name = my.host.name
757 > -oMs sender_host_name =
758 > host_lookup_failed = 1
760 > -p received_protocol = special
761 > -p sender_host_name = host.name
763 > -oMa sender_host_address = V4NET.0.0.1
764 > sender_host_port = 1234
765 > -oMaa sender_host_authenticated = AAA
766 > -oMai authenticated_id = philip
767 > -oMas authenticated_sender = xx@yy.zz
768 > -oMi interface_address = 1.1.1.1
769 > interface_port = 99
770 > -oMr received_protocol = special
771 > ----> No lookup yet: No
772 > -oMs sender_host_name = ten-1.test.ex
773 > -oMt sender_ident = me
776 **** SMTP testing session as if from host V4NET.0.0.1
777 **** but without any ident (RFC 1413) callback.
778 **** This is not for real!
780 550 Administrative prohibition
\r
782 **** SMTP testing session as if from host V4NET.0.0.2
783 **** but without any ident (RFC 1413) callback.
784 **** This is not for real!
786 550 Administrative prohibition
\r
788 **** SMTP testing session as if from host V4NET.0.0.0
789 **** but without any ident (RFC 1413) callback.
790 **** This is not for real!
792 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
795 354 Enter message, ending with "." on a line by itself
\r
796 550 reply_address=<>
\r
799 354 Enter message, ending with "." on a line by itself
\r
800 550 reply_address=<a@b>
\r
803 354 Enter message, ending with "." on a line by itself
\r
804 550 reply_address=<c@d>
\r
807 354 Enter message, ending with "." on a line by itself
\r
808 550 reply_address=<>
\r
811 354 Enter message, ending with "." on a line by itself
\r
812 550 reply_address=<x@y>
\r
813 221 myhost.test.ex closing connection
\r
815 **** SMTP testing session as if from host V4NET.0.0.0
816 **** but without any ident (RFC 1413) callback.
817 **** This is not for real!
819 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
822 354 Enter message, ending with "." on a line by itself
\r
823 550 reply_address=<>
\r
824 221 myhost.test.ex closing connection
\r
826 **** SMTP testing session as if from host V4NET.0.0.0
827 **** but without any ident (RFC 1413) callback.
828 **** This is not for real!
830 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
833 354 Enter message, ending with "." on a line by itself
\r
834 550 reply_address=<>
\r
835 221 myhost.test.ex closing connection
\r