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 > listnamed: *.aa.bb : ^\Nxxx(.*)
53 > listnamed: *.aa.bb : ^\Nxxx(.*)
54 > listnamed: V4NET.11.12.13 : iplsearch;TESTSUITE/aux-fixed/0002.iplsearch
55 > listnamed: *.aa.bb : ^\Nxxx(.*) : ;;
56 > listnamed: a : b;c : *.aa.bb : ^\Nxxx(.*) : ;; : 2001::630::212::8::204::::b664
57 > Failed: "nolist" is not a named list
58 > listnamed: *.aa.bb : ^\Nxxx(.*)
59 > Failed: "hlist" is not a domain named list
60 > Failed: bad suffix on "list" operator
72 > Failed: "extract" failed and "fail" requested
77 > sort: 10 smtp.ex.com:100 r2.ex.com:666 r99.ex.com
78 > sort: 10,smtp.ex.com:100,r2.ex.com:666,r99.ex.com
81 > # Tests with iscntrl() and illegal separators
88 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "0+") inside "reduce" item
95 > Failed: missing or misplaced { or }
96 > Failed: missing or misplaced { or }
97 > Failed: error from acl "a_nosuch"
99 > acl: (1) [person@dom.ain] []
100 > acl: (2) [firstarg] [secondarg]
101 > acl: (1) [arg with spaces] []
105 > acl: (1) [person@dom.ain] []
106 > Failed: error from acl "a_defer"
107 > acl: (2) [new arg1] [top_arg_1]
108 > acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] []
110 > addrss: local-part@dom.ain
111 > addrss: local-part@dom.ain
115 > addresses: ''abc@xyz' ''pqr@xyz
116 > addresses: local-part@dom.ain
117 > addresses: local-part@dom.ain+xyz@abc
118 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
121 > escape: B7\267F2\362
128 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
132 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
133 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
139 > Failed: error in expression evaluation: expecting operator (after processing "0")
142 > Failed: error in expression evaluation: expecting operator (after processing "0")
156 > expand: $primary_hostname myhost.test.ex
157 > hash: jmg monty fbWx
158 > hash: abcX abX aX X
163 > Failed: "1a2b3c4d5e6" contains an odd number of characters
164 > Failed: "1a2b3c4d5e6g" is not a hex string
165 > hex2b64:MPPJPkZDbetYunCBao7BJA==
166 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
168 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
169 > environments. Write cunning tests that produce the same output in both cases,
170 > while doing a reasonable check.
175 > Failed: argument for base62 operator is "12345x", which is not a decimal number
176 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
178 > hmac: dd97e3ba5d1a61b5006108f8c8252953
179 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
180 > md5: 77add1d5f41223d5582fca736a5cb335
181 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
182 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
183 > mask: 192.168.10.192/28
184 > mask: 192.168.10.206/32
185 > Failed: mask value too big in "192.168.10.206/33"
187 > Failed: missing mask value in "192.168.10.206"
188 > Failed: "a.b.c.d" is not an IP address
190 > lc/uc: the quick BROWN FOX
191 > length: The quick abc
194 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
200 > quote_local_part: abcd
201 > quote_local_part: O'Reilly
202 > quote_local_part: "a space"
203 > quote_local_part: ".something"
204 > quote_local_part: "something."
205 > quote_local_part: joe.bloggs
206 > quote_local_part: a!b
207 > quote_local_part: "x@y"
208 > quote_local_part: ab*cd
209 > quote_local_part: "x:y"
210 > quote_local_part: "abcd\"ef"
211 > quote_local_part: ""
212 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
213 > 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
219 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
227 > Failed: string "14" is not an Exim time interval in "time_eval" operator
228 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
231 > time_interval: 1w4d13h46m39s
232 > Failed: string "-1" is not a positive number in "time_interval" operator
233 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
235 > # stat is a bit tricky, but some of the fields of the aux-var directory
236 > # should be the same on all systems
240 > Failed: stat(/a/non/existent/file) failed: No such file or directory
242 > # "Operators" that have expanded arguments
244 > hash: jmg monty fbWx
245 > hash: abcX abX aX X
247 > length: The quick abc
253 > Failed: missing or misplaced { or }
254 > Failed: "nonnumber" is not a number (in "hash" expansion)
255 > Failed: Too many arguments for "hash" (max is 3)
256 > Failed: "-2" is not a positive number (in "substr" expansion)
258 > # Skipped operators
268 > # Number suffixes in conditions
275 > # >32b should work, >64b not
281 > 1 > 4611686018427387904 n
282 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
312 > Failed: invalid integer "3z "
313 > Failed: integer expected but "a" found
314 > Failed: integer expected but "${substr_2_2:65535}" found
324 > Failed: unknown variable "post" after "def:"
327 > Failed: missing or misplaced { or }
362 > isip: y fe80::a00:20ff:fe86:a061
363 > isip4: n fe80::a00:20ff:fe86:a061
364 > isip6: y fe80::a00:20ff:fe86:a061
372 > Failed: "if" failed and "fail" requested
381 > >x@zz.aa.bb< [] >x@zz.aa.bb<
383 > >x@xxxabc< [] >x@xxxabc<
388 > match_local_part:yes
389 > match_local_part:yes
401 > Failed: "somename" is not an IP address
410 > queue_running after or: y
411 > first_delivery after or: y
413 > # acl expansion condition
414 > acl if: Y:(0) [] []
415 > acl if: Y:(1) [argY] []
416 > acl if: N:(2) [argN] [arg2]
417 > Failed: error from acl "a_defer"
419 > # Default values for both if strings
421 > ${if eq{1}{1}} >true<
424 > # Lookups: DIR is the testing directory. In this test we can only use the
425 > # lookups that are required in all cases.
439 > Failed: "lookup" failed and "fail" requested
445 > q4: "a:b" abc continued data (make sure not key)
458 > a:b: lookup succeeded
464 > # Should give the same results as above because expansion does nothing
474 > a:b: lookup succeeded
476 > # Should fail because of no expansion
483 > # But these should succeed
488 > # Some tests of case-(in)dependence
490 > MiXeD-CD: Data found for case-dependent MiXeD-CD
491 > MixeD-CD: NOT FOUND
492 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
493 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
495 > # IP address (CIDR) lookups
497 > 1.2.3.4: data for 1.2.3.4
499 > 1.2.3.5: data for *
500 > abcd::cdab: data for abcd::cdab
501 > 192.168.1.2: data for 192.168.0.0/16
502 > 192.168.5.6: data for 192.168.0.0/16
503 > abcd:abcd:: data for abcd:abcd::/32
504 > abcd:abcd:1:: data for abcd:abcd::/32
505 > abcd:abcd::3 data for abcd:abcd::/32
506 > 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
509 > # Nested Lookups - style 1
511 > The data for key1->key2
512 > Failed: "lookup" failed and "fail" requested
514 > # Nested Lookups - style 2
516 > The data for key1->key2
519 > # Other nesting tests
523 > both-in-1,both-in-2
524 > Failed: "lookup" failed and "fail" requested
526 > # Lookup quotes for standardly expected lookups
528 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
529 > Failed: unknown lookup type "xxx"
545 > Failed: "extract" failed and "fail" requested
546 > Failed: "extract" failed and "fail" requested
557 > Failed: first argument of "extract" must not be empty
558 > Failed: first argument of "extract" must not be empty
563 > abcdea aaa xyz zbcdez
566 > abcdea abc z zzzdez
569 > "TrUe" true EXPECT: true
570 > "FALSE" false EXPECT: false
571 > " yes" true EXPECT: true
572 > " no" false EXPECT: false
573 > "yes " true EXPECT: true
574 > "-1" true EXPECT: true
575 > "0" false EXPECT: false
576 > "1" true EXPECT: true
577 > " 0 " false EXPECT: false
578 > " 1 " true EXPECT: true
579 > "1111111111111111111" true EXPECT: true
580 > "9" true EXPECT: true
581 > " " false EXPECT: false
582 > Failed: unrecognised boolean value "text"
583 > Failed: unrecognised boolean value "text"
584 > Failed: unrecognised boolean value "-text"
585 > Failed: unrecognised boolean value "text"
586 > Failed: unrecognised boolean value "text"
587 > "00" false EXPECT: false
588 > "!true" false EXPECT: false
589 > "!false" true EXPECT: true
591 > "TrUe" true EXPECT: true
592 > "FALSE" false EXPECT: false
593 > " yes" true EXPECT: true
594 > " no" false EXPECT: false
595 > "yes " true EXPECT: true
596 > "-1" true EXPECT: true
597 > "0" false EXPECT: false
598 > "1" true EXPECT: true
599 > " 0 " false EXPECT: false
600 > " 1 " true EXPECT: true
601 > "1111111111111111111" true EXPECT: true
602 > "9" true EXPECT: true
603 > " " false EXPECT: false
604 > "text" true EXPECT: true
605 > " text" true EXPECT: true
606 > "text " true EXPECT: true
607 > " text " true EXPECT: true
608 > "00" true EXPECT: true
609 > "!true" false EXPECT: false
610 > "!false" true EXPECT: true
615 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
616 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
617 > 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?=
618 > 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?=
624 > <:ab cd:> <:ab cd:>
625 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
626 > 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
636 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
637 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
638 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
639 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
640 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
641 > ${sg{abbab}{a*}{+}} =++b+b++b+
645 > Failed: missing or misplaced { or }
653 > abcde - 12345 - - xyz -
654 > Failed: failed to open /non/exist/file: No such file or directory
656 > >abcde!12345!!xyz!<
658 > # Calling a command
685 > prvs=xxxxxxxxxx=userx@test.ex
686 > prvs=xxxxxxxxxx=userx@test.ex
687 > prvs=xxxxxxxxxx=userx@test.ex
691 > Failed: prvs second argument must be a single digit
692 > Failed: prvs second argument must be a single digit
693 > Failed: prvs second argument must be a single digit
695 > # Correct checks; can't put explicit addresses in the tests, because they
696 > # will change over time.
701 > >1< >userx@test.ex< >1<
722 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
723 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
724 > Failed: missing } at end of string
725 > Failed: missing } at end of string
726 > Failed: hmac algorithm "xxx" is not recognised
727 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
728 > Failed: unknown condition "xya" inside "and{...}" condition
729 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
730 > Failed: missing } at end of string - could be header name not terminated by colon
731 > Failed: missing or misplaced { or }
732 > Failed: missing or misplaced { or } - could be header name not terminated by colon
733 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
734 > Failed: missing } at end of condition inside "or" group
735 > Failed: unknown condition "yes" inside "or{...}" condition
736 > Failed: non-digit after underscore in "substr_1_"
737 > Failed: non-digit after underscore in "substr__3"
739 > # Iterations: forany and forall
751 > Failed: unknown condition "yes" inside "forany" condition
752 > Failed: missing } at end of condition inside "forany"
765 > outer=yes item='' (unset)
770 > # Error inside nest - check message is helpful
771 > Failed: missing } at end of condition inside "forall" inside "forany" condition
774 > # Miscellaneous (for bug fixes, etc)
781 > primary_hostname: myhost.test.ex
783 > Failed: "if" failed and "fail" requested
787 > -oMa sender_host_address =
788 > sender_host_port = 0
789 > -oMaa sender_host_authenticated =
790 > -oMai authenticated_id = CALLER
791 > -oMas authenticated_sender = CALLER@myhost.test.ex
792 > -oMi interface_address =
793 > interface_port = -1
794 > -oMr received_protocol =
795 > -oMs sender_host_name =
796 > -oMt sender_ident = CALLER
798 > -oMa sender_host_address = V4NET.0.0.1
799 > sender_host_port = 1234
800 > -oMaa sender_host_authenticated = AAA
801 > -oMai authenticated_id = philip
802 > -oMas authenticated_sender = xx@yy.zz
803 > -oMi interface_address = 1.1.1.1
804 > interface_port = 99
805 > -oMr received_protocol = special
806 > -oMt sender_ident = me
808 > -oMa sender_host_address = V4NET.0.0.1
809 > sender_host_port = 1234
810 > -oMs sender_host_name = my.host.name
812 > -oMs sender_host_name =
813 > host_lookup_failed = 1
815 > -p received_protocol = special
816 > -p sender_host_name = host.name
818 > -oMa sender_host_address = V4NET.0.0.1
819 > sender_host_port = 1234
820 > -oMaa sender_host_authenticated = AAA
821 > -oMai authenticated_id = philip
822 > -oMas authenticated_sender = xx@yy.zz
823 > -oMi interface_address = 1.1.1.1
824 > interface_port = 99
825 > -oMr received_protocol = special
826 > ----> No lookup yet: No
827 > -oMs sender_host_name = ten-1.test.ex
828 > -oMt sender_ident = me
831 **** SMTP testing session as if from host V4NET.0.0.1
832 **** but without any ident (RFC 1413) callback.
833 **** This is not for real!
835 550 Administrative prohibition
\r
837 **** SMTP testing session as if from host V4NET.0.0.2
838 **** but without any ident (RFC 1413) callback.
839 **** This is not for real!
841 550 Administrative prohibition
\r
843 **** SMTP testing session as if from host V4NET.0.0.0
844 **** but without any ident (RFC 1413) callback.
845 **** This is not for real!
847 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
850 354 Enter message, ending with "." on a line by itself
\r
851 550 reply_address=<>
\r
854 354 Enter message, ending with "." on a line by itself
\r
855 550 reply_address=<a@b>
\r
858 354 Enter message, ending with "." on a line by itself
\r
859 550 reply_address=<c@d>
\r
862 354 Enter message, ending with "." on a line by itself
\r
863 550 reply_address=<>
\r
866 354 Enter message, ending with "." on a line by itself
\r
867 550 reply_address=<x@y>
\r
868 221 myhost.test.ex closing connection
\r
870 **** SMTP testing session as if from host V4NET.0.0.0
871 **** but without any ident (RFC 1413) callback.
872 **** This is not for real!
874 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
877 354 Enter message, ending with "." on a line by itself
\r
878 550 reply_address=<>
\r
879 221 myhost.test.ex closing connection
\r
881 **** SMTP testing session as if from host V4NET.0.0.0
882 **** but without any ident (RFC 1413) callback.
883 **** This is not for real!
885 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
888 354 Enter message, ending with "." on a line by itself
\r
889 550 reply_address=<>
\r
890 221 myhost.test.ex closing connection
\r