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=
176 > Failed: argument for base32 operator is "0x1", which is not a decimal number
183 > Failed: argument for base32d operator is "ABC", which is not a base 32 number
185 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
186 > environments. Write cunning tests that produce the same output in both cases,
187 > while doing a reasonable check.
192 > Failed: argument for base62 operator is "12345x", which is not a decimal number
193 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
195 > hmac: dd97e3ba5d1a61b5006108f8c8252953
196 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
197 > md5: 77add1d5f41223d5582fca736a5cb335
198 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
199 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
200 > mask: 192.168.10.192/28
201 > mask: 192.168.10.206/32
202 > Failed: mask value too big in "192.168.10.206/33"
204 > Failed: missing mask value in "192.168.10.206"
205 > Failed: "a.b.c.d" is not an IP address
206 > ipv6denorm: 0000:0000:0000:0000:0000:0000:0000:0001
207 > ipv6denorm: fe00:0000:0000:0000:0000:0000:0000:0001
208 > ipv6denorm: 0000:0000:0000:0000:0000:ffff:c0a8:0001
209 > ipv6denorm: fe80:0000:0000:0000:0000:0000:c0a8:0001
213 > ipv6norm: 2a00:eadf::1:0
214 > ipv6norm: 2a00:eadf:0:1::
216 > ipv6norm: 2a00:2:3:4:5:6:7:8
218 > lc/uc: the quick BROWN FOX
219 > length: The quick abc
222 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
228 > quote_local_part: abcd
229 > quote_local_part: O'Reilly
230 > quote_local_part: "a space"
231 > quote_local_part: ".something"
232 > quote_local_part: "something."
233 > quote_local_part: joe.bloggs
234 > quote_local_part: a!b
235 > quote_local_part: "x@y"
236 > quote_local_part: ab*cd
237 > quote_local_part: "x:y"
238 > quote_local_part: "abcd\"ef"
239 > quote_local_part: ""
240 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
241 > 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
247 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
249 > base64: VGhlIHF1aWNrIGJyb3duIAogZm94
251 > base64d:The quick brown
260 > Failed: string "14" is not an Exim time interval in "time_eval" operator
261 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
264 > time_interval: 1w4d13h46m39s
265 > Failed: string "-1" is not a positive number in "time_interval" operator
266 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
268 > # stat is a bit tricky, but some of the fields of the aux-var directory
269 > # should be the same on all systems
273 > Failed: stat(/a/non/existent/file) failed: No such file or directory
275 > # "Operators" that have expanded arguments
277 > hash: jmg monty fbWx
278 > hash: abcX abX aX X
280 > length: The quick abc
286 > Failed: missing or misplaced { or }
287 > Failed: "nonnumber" is not a number (in "hash" expansion)
288 > Failed: Too many arguments for "hash" (max is 3)
289 > Failed: "-2" is not a positive number (in "substr" expansion)
291 > # Skipped operators
301 > # Number suffixes in conditions
308 > # >32b should work, >64b not
314 > 1 > 4611686018427387904 n
315 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
345 > Failed: invalid integer "3z "
346 > Failed: integer expected but "a" found
347 > Failed: integer expected but "${substr_2_2:65535}" found
357 > Failed: unknown variable "post" after "def:"
360 > Failed: missing or misplaced { or }
395 > isip: y fe80::a00:20ff:fe86:a061
396 > isip4: n fe80::a00:20ff:fe86:a061
397 > isip6: y fe80::a00:20ff:fe86:a061
405 > Failed: "if" failed and "fail" requested
414 > >x@zz.aa.bb< [] >x@zz.aa.bb<
416 > >x@xxxabc< [] >x@xxxabc<
421 > match_local_part:yes
422 > match_local_part:yes
434 > Failed: "somename" is not an IP address
443 > queue_running after or: y
444 > first_delivery after or: y
446 > # acl expansion condition
447 > acl if: Y:(0) [] []
448 > acl if: Y:(1) [argY] []
449 > acl if: N:(2) [argN] [arg2]
450 > Failed: error from acl "a_defer"
452 > # Default values for both if strings
454 > ${if eq{1}{1}} >true<
457 > # Lookups: DIR is the testing directory. In this test we can only use the
458 > # lookups that are required in all cases.
472 > Failed: "lookup" failed and "fail" requested
478 > q4: "a:b" abc continued data (make sure not key)
491 > a:b: lookup succeeded
497 > # Should give the same results as above because expansion does nothing
507 > a:b: lookup succeeded
509 > # Should fail because of no expansion
516 > # But these should succeed
521 > # Some tests of case-(in)dependence
523 > MiXeD-CD: Data found for case-dependent MiXeD-CD
524 > MixeD-CD: NOT FOUND
525 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
526 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
528 > # IP address (CIDR) lookups
530 > 1.2.3.4: data for 1.2.3.4
532 > 1.2.3.5: data for *
533 > abcd::cdab: data for abcd::cdab
534 > 192.168.1.2: data for 192.168.0.0/16
535 > 192.168.5.6: data for 192.168.0.0/16
536 > abcd:abcd:: data for abcd:abcd::/32
537 > abcd:abcd:1:: data for abcd:abcd::/32
538 > abcd:abcd::3 data for abcd:abcd::/32
539 > 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
542 > # Nested Lookups - style 1
544 > The data for key1->key2
545 > Failed: "lookup" failed and "fail" requested
547 > # Nested Lookups - style 2
549 > The data for key1->key2
552 > # Other nesting tests
556 > both-in-1,both-in-2
557 > Failed: "lookup" failed and "fail" requested
559 > # Lookup quotes for standardly expected lookups
561 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
562 > Failed: unknown lookup type "xxx"
578 > Failed: "extract" failed and "fail" requested
579 > Failed: "extract" failed and "fail" requested
590 > Failed: first argument of "extract" must not be empty
591 > Failed: first argument of "extract" must not be empty
596 > abcdea aaa xyz zbcdez
599 > abcdea abc z zzzdez
602 > "TrUe" true EXPECT: true
603 > "FALSE" false EXPECT: false
604 > " yes" true EXPECT: true
605 > " no" false EXPECT: false
606 > "yes " true EXPECT: true
607 > "-1" true EXPECT: true
608 > "0" false EXPECT: false
609 > "1" true EXPECT: true
610 > " 0 " false EXPECT: false
611 > " 1 " true EXPECT: true
612 > "1111111111111111111" true EXPECT: true
613 > "9" true EXPECT: true
614 > " " false EXPECT: false
615 > Failed: unrecognised boolean value "text"
616 > Failed: unrecognised boolean value "text"
617 > Failed: unrecognised boolean value "-text"
618 > Failed: unrecognised boolean value "text"
619 > Failed: unrecognised boolean value "text"
620 > "00" false EXPECT: false
621 > "!true" false EXPECT: false
622 > "!false" true EXPECT: true
624 > "TrUe" true EXPECT: true
625 > "FALSE" false EXPECT: false
626 > " yes" true EXPECT: true
627 > " no" false EXPECT: false
628 > "yes " true EXPECT: true
629 > "-1" true EXPECT: true
630 > "0" false EXPECT: false
631 > "1" true EXPECT: true
632 > " 0 " false EXPECT: false
633 > " 1 " true EXPECT: true
634 > "1111111111111111111" true EXPECT: true
635 > "9" true EXPECT: true
636 > " " false EXPECT: false
637 > "text" true EXPECT: true
638 > " text" true EXPECT: true
639 > "text " true EXPECT: true
640 > " text " true EXPECT: true
641 > "00" true EXPECT: true
642 > "!true" false EXPECT: false
643 > "!false" true EXPECT: true
648 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
649 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
650 > 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?=
651 > 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?=
657 > <:ab cd:> <:ab cd:>
658 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
659 > 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
669 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
670 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
671 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
672 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
673 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
674 > ${sg{abbab}{a*}{+}} =++b+b++b+
678 > Failed: missing or misplaced { or }
686 > abcde - 12345 - - xyz -
687 > Failed: failed to open /non/exist/file: No such file or directory
689 > >abcde!12345!!xyz!<
691 > # Calling a command
718 > prvs=xxxxxxxxxx=userx@test.ex
719 > prvs=xxxxxxxxxx=userx@test.ex
720 > prvs=xxxxxxxxxx=userx@test.ex
724 > Failed: prvs second argument must be a single digit
725 > Failed: prvs second argument must be a single digit
726 > Failed: prvs second argument must be a single digit
728 > # Correct checks; can't put explicit addresses in the tests, because they
729 > # will change over time.
734 > >1< >userx@test.ex< >1<
755 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
756 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
757 > Failed: missing } at end of string
758 > Failed: missing } at end of string
759 > Failed: hmac algorithm "xxx" is not recognised
760 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
761 > Failed: unknown condition "xya" inside "and{...}" condition
762 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
763 > Failed: missing } at end of string - could be header name not terminated by colon
764 > Failed: missing or misplaced { or }
765 > Failed: missing or misplaced { or } - could be header name not terminated by colon
766 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
767 > Failed: missing } at end of condition inside "or" group
768 > Failed: unknown condition "yes" inside "or{...}" condition
769 > Failed: non-digit after underscore in "substr_1_"
770 > Failed: non-digit after underscore in "substr__3"
772 > # Iterations: forany and forall
784 > Failed: unknown condition "yes" inside "forany" condition
785 > Failed: missing } at end of condition inside "forany"
798 > outer=yes item='' (unset)
803 > # Error inside nest - check message is helpful
804 > Failed: missing } at end of condition inside "forall" inside "forany" condition
807 > # Miscellaneous (for bug fixes, etc)
811 > # Environment access
819 > primary_hostname: myhost.test.ex
821 > Failed: "if" failed and "fail" requested
825 > -be Sender host name and address etc, all unset
826 > -oMa sender_host_address =
827 > sender_host_port = 0
828 > -oMaa sender_host_authenticated =
829 > -oMai authenticated_id = CALLER
830 > -oMas authenticated_sender = CALLER@myhost.test.ex
831 > -oMi interface_address =
832 > interface_port = -1
833 > -oMr received_protocol =
834 > -oMs sender_host_name =
835 > -oMt sender_ident = CALLER
837 > -be Sender host name and address etc, all set except host name.
838 > -oMa sender_host_address = V4NET.0.0.1
839 > sender_host_port = 1234
840 > -oMaa sender_host_authenticated = AAA
841 > -oMai authenticated_id = philip
842 > -oMas authenticated_sender = xx@yy.zz
843 > -oMi interface_address = 1.1.1.1
844 > interface_port = 99
845 > -oMr received_protocol = special
846 > -oMt sender_ident = me
848 > -be Sender host name explicitly set
849 > -oMa sender_host_address = V4NET.0.0.1
850 > sender_host_port = 1234
851 > -oMs sender_host_name = my.host.name
853 > be Sender host name lookup fails (V4NET.11.12.13 is not reverse registered)
854 > -oMs sender_host_name =
855 > host_lookup_failed = 1
857 > -be Sender host name and protocol set by Sendmail-compatible option
858 > -p received_protocol = special
859 > -p sender_host_name = host.name
861 > -be Sender host name and address etc, all set except host name
862 > -oMa sender_host_address = V4NET.0.0.1
863 > sender_host_port = 1234
864 > -oMaa sender_host_authenticated = AAA
865 > -oMai authenticated_id = philip
866 > -oMas authenticated_sender = xx@yy.zz
867 > -oMi interface_address = 1.1.1.1
868 > interface_port = 99
869 > -oMr received_protocol = special
870 > ----> No lookup yet: No
871 > -oMs sender_host_name = ten-1.test.ex
872 > -oMt sender_ident = me
875 **** SMTP testing session as if from host V4NET.0.0.1
876 **** but without any ident (RFC 1413) callback.
877 **** This is not for real!
879 550 Administrative prohibition
\r
881 **** SMTP testing session as if from host V4NET.0.0.2
882 **** but without any ident (RFC 1413) callback.
883 **** This is not for real!
885 550 Administrative prohibition
\r
887 **** SMTP testing session as if from host V4NET.0.0.0
888 **** but without any ident (RFC 1413) callback.
889 **** This is not for real!
891 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
894 354 Enter message, ending with "." on a line by itself
\r
895 550 reply_address=<>
\r
898 354 Enter message, ending with "." on a line by itself
\r
899 550 reply_address=<a@b>
\r
902 354 Enter message, ending with "." on a line by itself
\r
903 550 reply_address=<c@d>
\r
906 354 Enter message, ending with "." on a line by itself
\r
907 550 reply_address=<>
\r
910 354 Enter message, ending with "." on a line by itself
\r
911 550 reply_address=<x@y>
\r
912 221 myhost.test.ex closing connection
\r
914 **** SMTP testing session as if from host V4NET.0.0.0
915 **** but without any ident (RFC 1413) callback.
916 **** This is not for real!
918 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
921 354 Enter message, ending with "." on a line by itself
\r
922 550 reply_address=<>
\r
923 221 myhost.test.ex closing connection
\r
925 **** SMTP testing session as if from host V4NET.0.0.0
926 **** but without any ident (RFC 1413) callback.
927 **** This is not for real!
929 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
932 354 Enter message, ending with "." on a line by itself
\r
933 550 reply_address=<>
\r
934 221 myhost.test.ex closing connection
\r