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 > config_dir: TESTSUITE
10 > config_file: TESTSUITE/test-config
11 > primary_hostname: myhost.test.ex
12 > primary_hostname: myhost.test.ex
13 > qualify_domain: myhost.test.ex
14 > bounce_return_size_limit: 102400
15 > spool_directory: TESTSUITE/spool
16 > Failed: unknown variable in "${unknown}"
17 > h_subject: (should be empty)
18 > h_subject: (should be empty)
19 > Failed: unknown expansion operator "header_subject"
21 > # $message_headers should be empty
28 > # Overlong names and overbig numbers
30 > Failed: unknown variable name "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
31 > Failed: unknown variable in "${aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}"
45 > map: ::a::: ::b::: ::c::
54 > listnamed: *.aa.bb : ^\Nxxx(.*)
55 > listnamed: *.aa.bb : ^\Nxxx(.*)
56 > listnamed: V4NET.11.12.13 : iplsearch;TESTSUITE/aux-fixed/0002.iplsearch
57 > listnamed: *.aa.bb : ^\Nxxx(.*) : ;;
58 > listnamed: a : b;c : *.aa.bb : ^\Nxxx(.*) : ;; : 2001::630::212::8::204::::b664
59 > Failed: "nolist" is not a named list
60 > listnamed: *.aa.bb : ^\Nxxx(.*)
61 > Failed: "hlist" is not a domain named list
62 > Failed: bad suffix on "list" operator
74 > Failed: "extract" failed and "fail" requested
79 > sort: 10 smtp.ex.com:100 r2.ex.com:666 r99.ex.com
80 > sort: 10,smtp.ex.com:100,r2.ex.com:666,r99.ex.com
83 > # Tests with iscntrl() and illegal separators
90 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "0+") inside "reduce" item
97 > Failed: missing or misplaced { or }
98 > Failed: missing or misplaced { or }
99 > Failed: error from acl "a_nosuch"
101 > acl: (1) [person@dom.ain] []
102 > acl: (2) [firstarg] [secondarg]
103 > acl: (1) [arg with spaces] []
107 > acl: (1) [person@dom.ain] []
108 > Failed: error from acl "a_defer"
109 > acl: (2) [new arg1] [top_arg_1]
110 > acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] []
112 > addrss: local-part@dom.ain
113 > addrss: local-part@dom.ain
117 > addresses: ''abc@xyz' ''pqr@xyz
118 > addresses: local-part@dom.ain
119 > addresses: local-part@dom.ain+xyz@abc
120 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
123 > escape: B7\267F2\362
130 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
134 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
135 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
141 > Failed: error in expression evaluation: expecting operator (after processing "0")
144 > Failed: error in expression evaluation: expecting operator (after processing "0")
158 > expand: $primary_hostname myhost.test.ex
159 > hash: jmg monty fbWx
160 > hash: abcX abX aX X
165 > Failed: "1a2b3c4d5e6" contains an odd number of characters
166 > Failed: "1a2b3c4d5e6g" is not a hex string
167 > hex2b64:MPPJPkZDbetYunCBao7BJA==
168 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
170 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
171 > environments. Write cunning tests that produce the same output in both cases,
172 > while doing a reasonable check.
177 > Failed: argument for base62 operator is "12345x", which is not a decimal number
178 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
180 > hmac: dd97e3ba5d1a61b5006108f8c8252953
181 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
182 > md5: 77add1d5f41223d5582fca736a5cb335
183 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
184 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
185 > mask: 192.168.10.192/28
186 > mask: 192.168.10.206/32
187 > Failed: mask value too big in "192.168.10.206/33"
189 > Failed: missing mask value in "192.168.10.206"
190 > Failed: "a.b.c.d" is not an IP address
192 > lc/uc: the quick BROWN FOX
193 > length: The quick abc
196 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
202 > quote_local_part: abcd
203 > quote_local_part: O'Reilly
204 > quote_local_part: "a space"
205 > quote_local_part: ".something"
206 > quote_local_part: "something."
207 > quote_local_part: joe.bloggs
208 > quote_local_part: a!b
209 > quote_local_part: "x@y"
210 > quote_local_part: ab*cd
211 > quote_local_part: "x:y"
212 > quote_local_part: "abcd\"ef"
213 > quote_local_part: ""
214 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
215 > 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
221 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
229 > Failed: string "14" is not an Exim time interval in "time_eval" operator
230 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
233 > time_interval: 1w4d13h46m39s
234 > Failed: string "-1" is not a positive number in "time_interval" operator
235 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
237 > # stat is a bit tricky, but some of the fields of the aux-var directory
238 > # should be the same on all systems
242 > Failed: stat(/a/non/existent/file) failed: No such file or directory
244 > # "Operators" that have expanded arguments
246 > hash: jmg monty fbWx
247 > hash: abcX abX aX X
249 > length: The quick abc
255 > Failed: missing or misplaced { or }
256 > Failed: "nonnumber" is not a number (in "hash" expansion)
257 > Failed: Too many arguments for "hash" (max is 3)
258 > Failed: "-2" is not a positive number (in "substr" expansion)
260 > # Skipped operators
270 > # Number suffixes in conditions
277 > # >32b should work, >64b not
283 > 1 > 4611686018427387904 n
284 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
314 > Failed: invalid integer "3z "
315 > Failed: integer expected but "a" found
316 > Failed: integer expected but "${substr_2_2:65535}" found
326 > Failed: unknown variable "post" after "def:"
329 > Failed: missing or misplaced { or }
364 > isip: y fe80::a00:20ff:fe86:a061
365 > isip4: n fe80::a00:20ff:fe86:a061
366 > isip6: y fe80::a00:20ff:fe86:a061
374 > Failed: "if" failed and "fail" requested
383 > >x@zz.aa.bb< [] >x@zz.aa.bb<
385 > >x@xxxabc< [] >x@xxxabc<
390 > match_local_part:yes
391 > match_local_part:yes
403 > Failed: "somename" is not an IP address
412 > queue_running after or: y
413 > first_delivery after or: y
415 > # acl expansion condition
416 > acl if: Y:(0) [] []
417 > acl if: Y:(1) [argY] []
418 > acl if: N:(2) [argN] [arg2]
419 > Failed: error from acl "a_defer"
421 > # Default values for both if strings
423 > ${if eq{1}{1}} >true<
426 > # Lookups: DIR is the testing directory. In this test we can only use the
427 > # lookups that are required in all cases.
441 > Failed: "lookup" failed and "fail" requested
447 > q4: "a:b" abc continued data (make sure not key)
460 > a:b: lookup succeeded
466 > # Should give the same results as above because expansion does nothing
476 > a:b: lookup succeeded
478 > # Should fail because of no expansion
485 > # But these should succeed
490 > # Some tests of case-(in)dependence
492 > MiXeD-CD: Data found for case-dependent MiXeD-CD
493 > MixeD-CD: NOT FOUND
494 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
495 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
497 > # IP address (CIDR) lookups
499 > 1.2.3.4: data for 1.2.3.4
501 > 1.2.3.5: data for *
502 > abcd::cdab: data for abcd::cdab
503 > 192.168.1.2: data for 192.168.0.0/16
504 > 192.168.5.6: data for 192.168.0.0/16
505 > abcd:abcd:: data for abcd:abcd::/32
506 > abcd:abcd:1:: data for abcd:abcd::/32
507 > abcd:abcd::3 data for abcd:abcd::/32
508 > 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
511 > # Nested Lookups - style 1
513 > The data for key1->key2
514 > Failed: "lookup" failed and "fail" requested
516 > # Nested Lookups - style 2
518 > The data for key1->key2
521 > # Other nesting tests
525 > both-in-1,both-in-2
526 > Failed: "lookup" failed and "fail" requested
528 > # Lookup quotes for standardly expected lookups
530 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
531 > Failed: unknown lookup type "xxx"
547 > Failed: "extract" failed and "fail" requested
548 > Failed: "extract" failed and "fail" requested
559 > Failed: first argument of "extract" must not be empty
560 > Failed: first argument of "extract" must not be empty
565 > abcdea aaa xyz zbcdez
568 > abcdea abc z zzzdez
571 > "TrUe" true EXPECT: true
572 > "FALSE" false EXPECT: false
573 > " yes" true EXPECT: true
574 > " no" false EXPECT: false
575 > "yes " true EXPECT: true
576 > "-1" true EXPECT: true
577 > "0" false EXPECT: false
578 > "1" true EXPECT: true
579 > " 0 " false EXPECT: false
580 > " 1 " true EXPECT: true
581 > "1111111111111111111" true EXPECT: true
582 > "9" true EXPECT: true
583 > " " false EXPECT: false
584 > Failed: unrecognised boolean value "text"
585 > Failed: unrecognised boolean value "text"
586 > Failed: unrecognised boolean value "-text"
587 > Failed: unrecognised boolean value "text"
588 > Failed: unrecognised boolean value "text"
589 > "00" false EXPECT: false
590 > "!true" false EXPECT: false
591 > "!false" true EXPECT: true
593 > "TrUe" true EXPECT: true
594 > "FALSE" false EXPECT: false
595 > " yes" true EXPECT: true
596 > " no" false EXPECT: false
597 > "yes " true EXPECT: true
598 > "-1" true EXPECT: true
599 > "0" false EXPECT: false
600 > "1" true EXPECT: true
601 > " 0 " false EXPECT: false
602 > " 1 " true EXPECT: true
603 > "1111111111111111111" true EXPECT: true
604 > "9" true EXPECT: true
605 > " " false EXPECT: false
606 > "text" true EXPECT: true
607 > " text" true EXPECT: true
608 > "text " true EXPECT: true
609 > " text " true EXPECT: true
610 > "00" true EXPECT: true
611 > "!true" false EXPECT: false
612 > "!false" true EXPECT: true
617 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
618 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
619 > 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?=
620 > 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?=
626 > <:ab cd:> <:ab cd:>
627 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
628 > 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
638 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
639 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
640 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
641 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
642 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
643 > ${sg{abbab}{a*}{+}} =++b+b++b+
647 > Failed: missing or misplaced { or }
655 > abcde - 12345 - - xyz -
656 > Failed: failed to open /non/exist/file: No such file or directory
658 > >abcde!12345!!xyz!<
660 > # Calling a command
687 > prvs=xxxxxxxxxx=userx@test.ex
688 > prvs=xxxxxxxxxx=userx@test.ex
689 > prvs=xxxxxxxxxx=userx@test.ex
693 > Failed: prvs second argument must be a single digit
694 > Failed: prvs second argument must be a single digit
695 > Failed: prvs second argument must be a single digit
697 > # Correct checks; can't put explicit addresses in the tests, because they
698 > # will change over time.
703 > >1< >userx@test.ex< >1<
724 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
725 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
726 > Failed: missing } at end of string
727 > Failed: missing } at end of string
728 > Failed: hmac algorithm "xxx" is not recognised
729 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
730 > Failed: unknown condition "xya" inside "and{...}" condition
731 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
732 > Failed: missing } at end of string - could be header name not terminated by colon
733 > Failed: missing or misplaced { or }
734 > Failed: missing or misplaced { or } - could be header name not terminated by colon
735 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
736 > Failed: missing } at end of condition inside "or" group
737 > Failed: unknown condition "yes" inside "or{...}" condition
738 > Failed: non-digit after underscore in "substr_1_"
739 > Failed: non-digit after underscore in "substr__3"
741 > # Iterations: forany and forall
753 > Failed: unknown condition "yes" inside "forany" condition
754 > Failed: missing } at end of condition inside "forany"
767 > outer=yes item='' (unset)
772 > # Error inside nest - check message is helpful
773 > Failed: missing } at end of condition inside "forall" inside "forany" condition
776 > # Miscellaneous (for bug fixes, etc)
783 > primary_hostname: myhost.test.ex
785 > Failed: "if" failed and "fail" requested
789 > -oMa sender_host_address =
790 > sender_host_port = 0
791 > -oMaa sender_host_authenticated =
792 > -oMai authenticated_id = CALLER
793 > -oMas authenticated_sender = CALLER@myhost.test.ex
794 > -oMi interface_address =
795 > interface_port = -1
796 > -oMr received_protocol =
797 > -oMs sender_host_name =
798 > -oMt sender_ident = CALLER
800 > -oMa sender_host_address = V4NET.0.0.1
801 > sender_host_port = 1234
802 > -oMaa sender_host_authenticated = AAA
803 > -oMai authenticated_id = philip
804 > -oMas authenticated_sender = xx@yy.zz
805 > -oMi interface_address = 1.1.1.1
806 > interface_port = 99
807 > -oMr received_protocol = special
808 > -oMt sender_ident = me
810 > -oMa sender_host_address = V4NET.0.0.1
811 > sender_host_port = 1234
812 > -oMs sender_host_name = my.host.name
814 > -oMs sender_host_name =
815 > host_lookup_failed = 1
817 > -p received_protocol = special
818 > -p sender_host_name = host.name
820 > -oMa sender_host_address = V4NET.0.0.1
821 > sender_host_port = 1234
822 > -oMaa sender_host_authenticated = AAA
823 > -oMai authenticated_id = philip
824 > -oMas authenticated_sender = xx@yy.zz
825 > -oMi interface_address = 1.1.1.1
826 > interface_port = 99
827 > -oMr received_protocol = special
828 > ----> No lookup yet: No
829 > -oMs sender_host_name = ten-1.test.ex
830 > -oMt sender_ident = me
833 **** SMTP testing session as if from host V4NET.0.0.1
834 **** but without any ident (RFC 1413) callback.
835 **** This is not for real!
837 550 Administrative prohibition
\r
839 **** SMTP testing session as if from host V4NET.0.0.2
840 **** but without any ident (RFC 1413) callback.
841 **** This is not for real!
843 550 Administrative prohibition
\r
845 **** SMTP testing session as if from host V4NET.0.0.0
846 **** but without any ident (RFC 1413) callback.
847 **** This is not for real!
849 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
852 354 Enter message, ending with "." on a line by itself
\r
853 550 reply_address=<>
\r
856 354 Enter message, ending with "." on a line by itself
\r
857 550 reply_address=<a@b>
\r
860 354 Enter message, ending with "." on a line by itself
\r
861 550 reply_address=<c@d>
\r
864 354 Enter message, ending with "." on a line by itself
\r
865 550 reply_address=<>
\r
868 354 Enter message, ending with "." on a line by itself
\r
869 550 reply_address=<x@y>
\r
870 221 myhost.test.ex closing connection
\r
872 **** SMTP testing session as if from host V4NET.0.0.0
873 **** but without any ident (RFC 1413) callback.
874 **** This is not for real!
876 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
879 354 Enter message, ending with "." on a line by itself
\r
880 550 reply_address=<>
\r
881 221 myhost.test.ex closing connection
\r
883 **** SMTP testing session as if from host V4NET.0.0.0
884 **** but without any ident (RFC 1413) callback.
885 **** This is not for real!
887 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
890 354 Enter message, ending with "." on a line by itself
\r
891 550 reply_address=<>
\r
892 221 myhost.test.ex closing connection
\r