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
10 > config_dir: TESTSUITE
11 > config_file: TESTSUITE/test-config
12 > primary_hostname: myhost.test.ex
13 > primary_hostname: myhost.test.ex
14 > qualify_domain: myhost.test.ex
15 > bounce_return_size_limit: 102400
16 > spool_directory: TESTSUITE/spool
17 > Failed: unknown variable in "${unknown}"
18 > h_subject: (should be empty)
19 > h_subject: (should be empty)
20 > Failed: unknown expansion operator "header_subject"
22 > # $message_headers should be empty
29 > # Overlong names and overbig numbers
31 > Failed: unknown variable name "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
32 > Failed: unknown variable in "${aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}"
46 > map: ::a::: ::b::: ::c::
55 > listnamed: *.aa.bb : ^\Nxxx(.*)
56 > listnamed: *.aa.bb : ^\Nxxx(.*)
57 > listnamed: V4NET.11.12.13 : iplsearch;TESTSUITE/aux-fixed/0002.iplsearch
58 > listnamed: *.aa.bb : ^\Nxxx(.*) : ;;
59 > listnamed: a : b;c : *.aa.bb : ^\Nxxx(.*) : ;; : 2001::630::212::8::204::::b664
60 > Failed: "nolist" is not a named list
61 > listnamed: *.aa.bb : ^\Nxxx(.*)
62 > Failed: "hlist" is not a domain named list
63 > Failed: bad suffix on "list" operator
75 > Failed: "listextract" failed and "fail" requested
80 > sort: 10 smtp.ex.com:100 r2.ex.com:666 r99.ex.com
81 > sort: 10,smtp.ex.com:100,r2.ex.com:666,r99.ex.com
84 > # Tests with iscntrl() and illegal separators
91 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "0+") inside "reduce" item
98 > Failed: missing or misplaced { or }
99 > Failed: missing or misplaced { or }
100 > Failed: error from acl "a_nosuch"
102 > acl: (1) [person@dom.ain] []
103 > acl: (2) [firstarg] [secondarg]
104 > acl: (1) [arg with spaces] []
108 > acl: (1) [person@dom.ain] []
109 > Failed: error from acl "a_defer"
110 > acl: (2) [new arg1] [top_arg_1]
111 > acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] []
113 > addrss: local-part@dom.ain
114 > addrss: local-part@dom.ain
118 > addresses: ''abc@xyz' ''pqr@xyz
119 > addresses: local-part@dom.ain
120 > addresses: local-part@dom.ain+xyz@abc
121 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
124 > escape: B7\267F2\362
131 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
135 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
136 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
142 > Failed: error in expression evaluation: expecting operator (after processing "0")
145 > Failed: error in expression evaluation: expecting operator (after processing "0")
159 > expand: $primary_hostname myhost.test.ex
160 > hash: jmg monty fbWx
161 > hash: abcX abX aX X
166 > Failed: "1a2b3c4d5e6" contains an odd number of characters
167 > Failed: "1a2b3c4d5e6g" is not a hex string
168 > hex2b64:MPPJPkZDbetYunCBao7BJA==
169 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
171 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
172 > environments. Write cunning tests that produce the same output in both cases,
173 > while doing a reasonable check.
178 > Failed: argument for base62 operator is "12345x", which is not a decimal number
179 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
181 > hmac: dd97e3ba5d1a61b5006108f8c8252953
182 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
183 > md5: 77add1d5f41223d5582fca736a5cb335
184 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
185 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
186 > mask: 192.168.10.192/28
187 > mask: 192.168.10.206/32
188 > Failed: mask value too big in "192.168.10.206/33"
190 > Failed: missing mask value in "192.168.10.206"
191 > Failed: "a.b.c.d" is not an IP address
192 > ipv6denorm: 0000:0000:0000:0000:0000:0000:0000:0001
193 > ipv6denorm: fe00:0000:0000:0000:0000:0000:0000:0001
194 > ipv6denorm: 0000:0000:0000:0000:0000:ffff:c0a8:0001
195 > ipv6denorm: fe80:0000:0000:0000:0000:0000:c0a8:0001
199 > ipv6norm: 2a00:eadf::1:0
200 > ipv6norm: 2a00:eadf:0:1::
202 > ipv6norm: 2a00:2:3:4:5:6:7:8
204 > lc/uc: the quick BROWN FOX
205 > length: The quick abc
208 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
214 > quote_local_part: abcd
215 > quote_local_part: O'Reilly
216 > quote_local_part: "a space"
217 > quote_local_part: ".something"
218 > quote_local_part: "something."
219 > quote_local_part: joe.bloggs
220 > quote_local_part: a!b
221 > quote_local_part: "x@y"
222 > quote_local_part: ab*cd
223 > quote_local_part: "x:y"
224 > quote_local_part: "abcd\"ef"
225 > quote_local_part: ""
226 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
227 > 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
233 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
235 > base64: VGhlIHF1aWNrIGJyb3duIAogZm94
237 > base64d:The quick brown
246 > Failed: string "14" is not an Exim time interval in "time_eval" operator
247 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
250 > time_interval: 1w4d13h46m39s
251 > Failed: string "-1" is not a positive number in "time_interval" operator
252 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
254 > # stat is a bit tricky, but some of the fields of the aux-var directory
255 > # should be the same on all systems
259 > Failed: stat(/a/non/existent/file) failed: No such file or directory
261 > # "Operators" that have expanded arguments
263 > hash: jmg monty fbWx
264 > hash: abcX abX aX X
266 > length: The quick abc
272 > Failed: missing or misplaced { or }
273 > Failed: "nonnumber" is not a number (in "hash" expansion)
274 > Failed: Too many arguments for "hash" (max is 3)
275 > Failed: "-2" is not a positive number (in "substr" expansion)
277 > # Skipped operators
287 > # Number suffixes in conditions
294 > # >32b should work, >64b not
300 > 1 > 4611686018427387904 n
301 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
331 > Failed: invalid integer "3z "
332 > Failed: integer expected but "a" found
333 > Failed: integer expected but "${substr_2_2:65535}" found
343 > Failed: unknown variable "post" after "def:"
346 > Failed: missing or misplaced { or }
381 > isip: y fe80::a00:20ff:fe86:a061
382 > isip4: n fe80::a00:20ff:fe86:a061
383 > isip6: y fe80::a00:20ff:fe86:a061
391 > Failed: "if" failed and "fail" requested
400 > >x@zz.aa.bb< [] >x@zz.aa.bb<
402 > >x@xxxabc< [] >x@xxxabc<
407 > match_local_part:yes
408 > match_local_part:yes
420 > Failed: "somename" is not an IP address
429 > queue_running after or: y
430 > first_delivery after or: y
432 > # acl expansion condition
433 > acl if: Y:(0) [] []
434 > acl if: Y:(1) [argY] []
435 > acl if: N:(2) [argN] [arg2]
436 > Failed: error from acl "a_defer"
438 > # Default values for both if strings
440 > ${if eq{1}{1}} >true<
443 > # Lookups: DIR is the testing directory. In this test we can only use the
444 > # lookups that are required in all cases.
458 > Failed: "lookup" failed and "fail" requested
464 > q4: "a:b" abc continued data (make sure not key)
477 > a:b: lookup succeeded
483 > # Should give the same results as above because expansion does nothing
493 > a:b: lookup succeeded
495 > # Should fail because of no expansion
502 > # But these should succeed
507 > # Some tests of case-(in)dependence
509 > MiXeD-CD: Data found for case-dependent MiXeD-CD
510 > MixeD-CD: NOT FOUND
511 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
512 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
514 > # IP address (CIDR) lookups
516 > 1.2.3.4: data for 1.2.3.4
518 > 1.2.3.5: data for *
519 > abcd::cdab: data for abcd::cdab
520 > 192.168.1.2: data for 192.168.0.0/16
521 > 192.168.5.6: data for 192.168.0.0/16
522 > abcd:abcd:: data for abcd:abcd::/32
523 > abcd:abcd:1:: data for abcd:abcd::/32
524 > abcd:abcd::3 data for abcd:abcd::/32
525 > 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
528 > # Nested Lookups - style 1
530 > The data for key1->key2
531 > Failed: "lookup" failed and "fail" requested
533 > # Nested Lookups - style 2
535 > The data for key1->key2
538 > # Other nesting tests
542 > both-in-1,both-in-2
543 > Failed: "lookup" failed and "fail" requested
545 > # Lookup quotes for standardly expected lookups
547 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
548 > Failed: unknown lookup type "xxx"
564 > Failed: "extract" failed and "fail" requested
565 > Failed: "extract" failed and "fail" requested
576 > Failed: first argument of "extract" must not be empty
577 > Failed: first argument of "extract" must not be empty
582 > abcdea aaa xyz zbcdez
585 > abcdea abc z zzzdez
588 > "TrUe" true EXPECT: true
589 > "FALSE" false EXPECT: false
590 > " yes" true EXPECT: true
591 > " no" false EXPECT: false
592 > "yes " true EXPECT: true
593 > "-1" true EXPECT: true
594 > "0" false EXPECT: false
595 > "1" true EXPECT: true
596 > " 0 " false EXPECT: false
597 > " 1 " true EXPECT: true
598 > "1111111111111111111" true EXPECT: true
599 > "9" true EXPECT: true
600 > " " false EXPECT: false
601 > Failed: unrecognised boolean value "text"
602 > Failed: unrecognised boolean value "text"
603 > Failed: unrecognised boolean value "-text"
604 > Failed: unrecognised boolean value "text"
605 > Failed: unrecognised boolean value "text"
606 > "00" false EXPECT: false
607 > "!true" false EXPECT: false
608 > "!false" true EXPECT: true
610 > "TrUe" true EXPECT: true
611 > "FALSE" false EXPECT: false
612 > " yes" true EXPECT: true
613 > " no" false EXPECT: false
614 > "yes " true EXPECT: true
615 > "-1" true EXPECT: true
616 > "0" false EXPECT: false
617 > "1" true EXPECT: true
618 > " 0 " false EXPECT: false
619 > " 1 " true EXPECT: true
620 > "1111111111111111111" true EXPECT: true
621 > "9" true EXPECT: true
622 > " " false EXPECT: false
623 > "text" true EXPECT: true
624 > " text" true EXPECT: true
625 > "text " true EXPECT: true
626 > " text " true EXPECT: true
627 > "00" true EXPECT: true
628 > "!true" false EXPECT: false
629 > "!false" true EXPECT: true
634 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
635 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
636 > 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?=
637 > 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?=
643 > <:ab cd:> <:ab cd:>
644 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
645 > 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
655 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
656 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
657 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
658 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
659 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
660 > ${sg{abbab}{a*}{+}} =++b+b++b+
664 > Failed: missing or misplaced { or }
672 > abcde - 12345 - - xyz -
673 > Failed: failed to open /non/exist/file: No such file or directory
675 > >abcde!12345!!xyz!<
677 > # Calling a command
704 > prvs=xxxxxxxxxx=userx@test.ex
705 > prvs=xxxxxxxxxx=userx@test.ex
706 > prvs=xxxxxxxxxx=userx@test.ex
710 > Failed: prvs second argument must be a single digit
711 > Failed: prvs second argument must be a single digit
712 > Failed: prvs second argument must be a single digit
714 > # Correct checks; can't put explicit addresses in the tests, because they
715 > # will change over time.
720 > >1< >userx@test.ex< >1<
741 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
742 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
743 > Failed: missing } at end of string
744 > Failed: missing } at end of string
745 > Failed: hmac algorithm "xxx" is not recognised
746 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
747 > Failed: unknown condition "xya" inside "and{...}" condition
748 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
749 > Failed: missing } at end of string - could be header name not terminated by colon
750 > Failed: missing or misplaced { or }
751 > Failed: missing or misplaced { or } - could be header name not terminated by colon
752 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
753 > Failed: missing } at end of condition inside "or" group
754 > Failed: unknown condition "yes" inside "or{...}" condition
755 > Failed: non-digit after underscore in "substr_1_"
756 > Failed: non-digit after underscore in "substr__3"
758 > # Iterations: forany and forall
770 > Failed: unknown condition "yes" inside "forany" condition
771 > Failed: missing } at end of condition inside "forany"
784 > outer=yes item='' (unset)
789 > # Error inside nest - check message is helpful
790 > Failed: missing } at end of condition inside "forall" inside "forany" condition
793 > # Miscellaneous (for bug fixes, etc)
797 > # Environment access
805 > primary_hostname: myhost.test.ex
807 > Failed: "if" failed and "fail" requested
811 > -be Sender host name and address etc, all unset
812 > -oMa sender_host_address =
813 > sender_host_port = 0
814 > -oMaa sender_host_authenticated =
815 > -oMai authenticated_id = CALLER
816 > -oMas authenticated_sender = CALLER@myhost.test.ex
817 > -oMi interface_address =
818 > interface_port = -1
819 > -oMr received_protocol =
820 > -oMs sender_host_name =
821 > -oMt sender_ident = CALLER
823 > -be Sender host name and address etc, all set except host name.
824 > -oMa sender_host_address = V4NET.0.0.1
825 > sender_host_port = 1234
826 > -oMaa sender_host_authenticated = AAA
827 > -oMai authenticated_id = philip
828 > -oMas authenticated_sender = xx@yy.zz
829 > -oMi interface_address = 1.1.1.1
830 > interface_port = 99
831 > -oMr received_protocol = special
832 > -oMt sender_ident = me
834 > -be Sender host name explicitly set
835 > -oMa sender_host_address = V4NET.0.0.1
836 > sender_host_port = 1234
837 > -oMs sender_host_name = my.host.name
839 > be Sender host name lookup fails (V4NET.11.12.13 is not reverse registered)
840 > -oMs sender_host_name =
841 > host_lookup_failed = 1
843 > -be Sender host name and protocol set by Sendmail-compatible option
844 > -p received_protocol = special
845 > -p sender_host_name = host.name
847 > -be Sender host name and address etc, all set except host name
848 > -oMa sender_host_address = V4NET.0.0.1
849 > sender_host_port = 1234
850 > -oMaa sender_host_authenticated = AAA
851 > -oMai authenticated_id = philip
852 > -oMas authenticated_sender = xx@yy.zz
853 > -oMi interface_address = 1.1.1.1
854 > interface_port = 99
855 > -oMr received_protocol = special
856 > ----> No lookup yet: No
857 > -oMs sender_host_name = ten-1.test.ex
858 > -oMt sender_ident = me
861 **** SMTP testing session as if from host V4NET.0.0.1
862 **** but without any ident (RFC 1413) callback.
863 **** This is not for real!
865 550 Administrative prohibition
\r
867 **** SMTP testing session as if from host V4NET.0.0.2
868 **** but without any ident (RFC 1413) callback.
869 **** This is not for real!
871 550 Administrative prohibition
\r
873 **** SMTP testing session as if from host V4NET.0.0.0
874 **** but without any ident (RFC 1413) callback.
875 **** This is not for real!
877 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
880 354 Enter message, ending with "." on a line by itself
\r
881 550 reply_address=<>
\r
884 354 Enter message, ending with "." on a line by itself
\r
885 550 reply_address=<a@b>
\r
888 354 Enter message, ending with "." on a line by itself
\r
889 550 reply_address=<c@d>
\r
892 354 Enter message, ending with "." on a line by itself
\r
893 550 reply_address=<>
\r
896 354 Enter message, ending with "." on a line by itself
\r
897 550 reply_address=<x@y>
\r
898 221 myhost.test.ex closing connection
\r
900 **** SMTP testing session as if from host V4NET.0.0.0
901 **** but without any ident (RFC 1413) callback.
902 **** This is not for real!
904 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
907 354 Enter message, ending with "." on a line by itself
\r
908 550 reply_address=<>
\r
909 221 myhost.test.ex closing connection
\r
911 **** SMTP testing session as if from host V4NET.0.0.0
912 **** but without any ident (RFC 1413) callback.
913 **** This is not for real!
915 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
918 354 Enter message, ending with "." on a line by itself
\r
919 550 reply_address=<>
\r
920 221 myhost.test.ex closing connection
\r