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
18 > Failed: unknown variable in "${unknown}"
19 > h_subject: (should be empty)
20 > h_subject: (should be empty)
21 > Failed: unknown expansion operator "header_subject"
23 > # $message_headers should be empty
30 > # Overlong names and overbig numbers
32 > Failed: unknown variable name "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
33 > Failed: unknown variable in "${aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}"
47 > map: ::a::: ::b::: ::c::
56 > listnamed: *.aa.bb : ^\Nxxx(.*)
57 > listnamed: *.aa.bb : ^\Nxxx(.*)
58 > listnamed: V4NET.11.12.13 : iplsearch;TESTSUITE/aux-fixed/0002.iplsearch
59 > listnamed: *.aa.bb : ^\Nxxx(.*) : ;;
60 > listnamed: a : b;c : *.aa.bb : ^\Nxxx(.*) : ;; : 2001::630::212::8::204::::b664
61 > Failed: "nolist" is not a named list
62 > listnamed: *.aa.bb : ^\Nxxx(.*)
63 > Failed: "hlist" is not a domain named list
64 > Failed: bad suffix on "list" operator
76 > Failed: "listextract" failed and "fail" requested
81 > sort: 10 smtp.ex.com:100 r2.ex.com:666 r99.ex.com
82 > sort: 10,smtp.ex.com:100,r2.ex.com:666,r99.ex.com
85 > # Tests with iscntrl() and illegal separators
92 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "0+") inside "reduce" item
99 > Failed: Not enough arguments for 'acl' (min is 1)
100 > Failed: Not enough arguments for 'acl' (min is 1)
101 > Failed: error from acl "a_nosuch"
103 > acl: (1) [person@dom.ain] []
104 > acl: (2) [firstarg] [secondarg]
105 > acl: (1) [arg with spaces] []
109 > acl: (1) [person@dom.ain] []
110 > Failed: error from acl "a_defer"
111 > acl: (2) [new arg1] [top_arg_1]
112 > acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] []
114 > addrss: local-part@dom.ain
115 > addrss: local-part@dom.ain
119 > addresses: ''abc@xyz' ''pqr@xyz
120 > addresses: local-part@dom.ain
121 > addresses: local-part@dom.ain+xyz@abc
122 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
125 > escape: B7\267F2\362
126 > excape8bit: undisturbed text tab
127 newline tab\134backslash ~tilde\177DEL\200\201.
135 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
139 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
140 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
146 > Failed: error in expression evaluation: expecting operator (after processing "0")
149 > Failed: error in expression evaluation: expecting operator (after processing "0")
163 > expand: $primary_hostname myhost.test.ex
164 > hash: jmg monty fbWx
165 > hash: abcX abX aX X
170 > Failed: "1a2b3c4d5e6" contains an odd number of characters
171 > Failed: "1a2b3c4d5e6g" is not a hex string
172 > hex2b64:MPPJPkZDbetYunCBao7BJA==
173 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
180 > Failed: argument for base32 operator is "0x1", which is not a decimal number
187 > Failed: argument for base32d operator is "ABC", which is not a base 32 number
189 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
190 > environments. Write cunning tests that produce the same output in both cases,
191 > while doing a reasonable check.
196 > Failed: argument for base62 operator is "12345x", which is not a decimal number
197 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
199 > hmac: dd97e3ba5d1a61b5006108f8c8252953
200 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
201 > md5: 77add1d5f41223d5582fca736a5cb335
202 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
203 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
204 > mask: 192.168.10.192/28
205 > mask: 192.168.10.206/32
206 > Failed: mask value too big in "192.168.10.206/33"
208 > Failed: missing mask value in "192.168.10.206"
209 > Failed: "a.b.c.d" is not an IP address
210 > ipv6denorm: 0000:0000:0000:0000:0000:0000:0000:0001
211 > ipv6denorm: fe00:0000:0000:0000:0000:0000:0000:0001
212 > ipv6denorm: 0000:0000:0000:0000:0000:ffff:c0a8:0001
213 > ipv6denorm: fe80:0000:0000:0000:0000:0000:c0a8:0001
217 > ipv6norm: 2a00:eadf::1:0
218 > ipv6norm: 2a00:eadf:0:1::
220 > ipv6norm: 2a00:2:3:4:5:6:7:8
222 > lc/uc: the quick BROWN FOX
223 > length: The quick abc
226 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
232 > quote_local_part: abcd
233 > quote_local_part: O'Reilly
234 > quote_local_part: "a space"
235 > quote_local_part: ".something"
236 > quote_local_part: "something."
237 > quote_local_part: joe.bloggs
238 > quote_local_part: a!b
239 > quote_local_part: "x@y"
240 > quote_local_part: ab*cd
241 > quote_local_part: "x:y"
242 > quote_local_part: "abcd\"ef"
243 > quote_local_part: ""
244 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
245 > 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
251 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
253 > base64: VGhlIHF1aWNrIGJyb3duIAogZm94
255 > base64d:The quick brown
264 > Failed: string "14" is not an Exim time interval in "time_eval" operator
265 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
268 > time_interval: 1w4d13h46m39s
269 > Failed: string "-1" is not a positive number in "time_interval" operator
270 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
272 > # stat is a bit tricky, but some of the fields of the aux-var directory
273 > # should be the same on all systems
277 > Failed: stat(/a/non/existent/file) failed: No such file or directory
279 > # "Operators" that have expanded arguments
281 > hash: jmg monty fbWx
282 > hash: abcX abX aX X
284 > length: The quick abc
290 > Failed: Not enough arguments for 'hash' (min is 2)
291 > Failed: "nonnumber" is not a number (in "hash" expansion)
292 > Failed: Too many arguments for 'hash' (max is 3)
293 > Failed: "-2" is not a positive number (in "substr" expansion)
295 > # Skipped operators
305 > # Number suffixes in conditions
312 > # >32b should work, >64b not
318 > 1 > 4611686018427387904 n
319 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
349 > Failed: invalid integer "3z "
350 > Failed: integer expected but "a" found
351 > Failed: integer expected but "${substr_2_2:65535}" found
361 > Failed: unknown variable "post" after "def:"
364 > Failed: curly-bracket problem in conditional yes/no parsing: 'yes' part did not start with '{'
365 remaining string is ':{y}{n}}'
400 > isip: y fe80::a00:20ff:fe86:a061
401 > isip4: n fe80::a00:20ff:fe86:a061
402 > isip6: y fe80::a00:20ff:fe86:a061
410 > Failed: "if" failed and "fail" requested
419 > >x@zz.aa.bb< [] >x@zz.aa.bb<
421 > >x@xxxabc< [] >x@xxxabc<
426 > match_local_part:yes
427 > match_local_part:yes
439 > Failed: "somename" is not an IP address
448 > queue_running after or: y
449 > first_delivery after or: y
451 > # acl expansion condition
452 > acl if: Y:(0) [] []
453 > acl if: Y:(1) [argY] []
454 > acl if: N:(2) [argN] [arg2]
455 > Failed: error from acl "a_defer"
457 > # Default values for both if strings
459 > ${if eq{1}{1}} >true<
462 > # Lookups: DIR is the testing directory. In this test we can only use the
463 > # lookups that are required in all cases.
477 > Failed: "lookup" failed and "fail" requested
483 > q4: "a:b" abc continued data (make sure not key)
496 > a:b: lookup succeeded
502 > # Should give the same results as above because expansion does nothing
512 > a:b: lookup succeeded
514 > # Should fail because of no expansion
521 > # But these should succeed
526 > # Some tests of case-(in)dependence
528 > MiXeD-CD: Data found for case-dependent MiXeD-CD
529 > MixeD-CD: NOT FOUND
530 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
531 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
533 > # IP address (CIDR) lookups
535 > 1.2.3.4: data for 1.2.3.4
537 > 1.2.3.5: data for *
538 > abcd::cdab: data for abcd::cdab
539 > 192.168.1.2: data for 192.168.0.0/16
540 > 192.168.5.6: data for 192.168.0.0/16
541 > abcd:abcd:: data for abcd:abcd::/32
542 > abcd:abcd:1:: data for abcd:abcd::/32
543 > abcd:abcd::3 data for abcd:abcd::/32
544 > 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
547 > # Nested Lookups - style 1
549 > The data for key1->key2
550 > Failed: "lookup" failed and "fail" requested
552 > # Nested Lookups - style 2
554 > The data for key1->key2
557 > # Other nesting tests
561 > both-in-1,both-in-2
562 > Failed: "lookup" failed and "fail" requested
564 > # Lookup quotes for standardly expected lookups
566 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
567 > Failed: unknown lookup type "xxx"
583 > Failed: "extract" failed and "fail" requested
584 > Failed: "extract" failed and "fail" requested
595 > Failed: first argument of "extract" must not be empty
596 > Failed: first argument of "extract" must not be empty
600 > Failed: missing '}' closing extract inside "map" item
605 > abcdea aaa xyz zbcdez
608 > abcdea abc z zzzdez
611 > "TrUe" true EXPECT: true
612 > "FALSE" false EXPECT: false
613 > " yes" true EXPECT: true
614 > " no" false EXPECT: false
615 > "yes " true EXPECT: true
616 > "-1" true EXPECT: true
617 > "0" false EXPECT: false
618 > "1" true EXPECT: true
619 > " 0 " false EXPECT: false
620 > " 1 " true EXPECT: true
621 > "1111111111111111111" true EXPECT: true
622 > "9" true EXPECT: true
623 > " " false EXPECT: false
624 > Failed: unrecognised boolean value "text"
625 > Failed: unrecognised boolean value "text"
626 > Failed: unrecognised boolean value "-text"
627 > Failed: unrecognised boolean value "text"
628 > Failed: unrecognised boolean value "text"
629 > "00" false EXPECT: false
630 > "!true" false EXPECT: false
631 > "!false" true EXPECT: true
633 > "TrUe" true EXPECT: true
634 > "FALSE" false EXPECT: false
635 > " yes" true EXPECT: true
636 > " no" false EXPECT: false
637 > "yes " true EXPECT: true
638 > "-1" true EXPECT: true
639 > "0" false EXPECT: false
640 > "1" true EXPECT: true
641 > " 0 " false EXPECT: false
642 > " 1 " true EXPECT: true
643 > "1111111111111111111" true EXPECT: true
644 > "9" true EXPECT: true
645 > " " false EXPECT: false
646 > "text" true EXPECT: true
647 > " text" true EXPECT: true
648 > "text " true EXPECT: true
649 > " text " true EXPECT: true
650 > "00" true EXPECT: true
651 > "!true" false EXPECT: false
652 > "!false" true EXPECT: true
657 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
658 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
659 > 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?=
660 > 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?=
666 > <:ab cd:> <:ab cd:>
667 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
668 > 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
678 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
679 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
680 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
681 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
682 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
683 > ${sg{abbab}{a*}{+}} =++b+b++b+
687 > Failed: Not enough arguments for 'readfile' (min is 1)
695 > abcde - 12345 - - xyz -
696 > Failed: failed to open /non/exist/file: No such file or directory
698 > >abcde!12345!!xyz!<
700 > # Calling a command
727 > prvs=xxxxxxxxxx=userx@test.ex
728 > prvs=xxxxxxxxxx=userx@test.ex
729 > prvs=xxxxxxxxxx=userx@test.ex
733 > Failed: prvs second argument must be a single digit
734 > Failed: prvs second argument must be a single digit
735 > Failed: prvs second argument must be a single digit
737 > # Correct checks; can't put explicit addresses in the tests, because they
738 > # will change over time.
743 > >1< >userx@test.ex< >1<
764 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
765 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
766 > Failed: missing } at end of string
767 > Failed: missing } at end of string
768 > Failed: hmac algorithm "xxx" is not recognised
769 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
770 > Failed: unknown condition "xya" inside "and{...}" condition
771 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
772 > Failed: missing } at end of string - could be header name not terminated by colon
773 > Failed: curly-bracket problem in conditional yes/no parsing: did not close with '}'
774 remaining string is ''
775 > Failed: missing or misplaced { or } - could be header name not terminated by colon
776 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
777 > Failed: missing } at end of condition inside "or" group
778 > Failed: unknown condition "yes" inside "or{...}" condition
779 > Failed: non-digit after underscore in "substr_1_"
780 > Failed: non-digit after underscore in "substr__3"
782 > # Iterations: forany and forall
794 > Failed: unknown condition "yes" inside "forany" condition
795 > Failed: missing } at end of condition inside "forany"
808 > outer=yes item='' (unset)
813 > # Error inside nest - check message is helpful
814 > Failed: missing } at end of condition inside "forall" inside "forany" condition
817 > # Miscellaneous (for bug fixes, etc)
821 > # Environment access
829 > primary_hostname: myhost.test.ex
831 > Failed: "if" failed and "fail" requested
835 > -be Sender host name and address etc, all unset
836 > -oMa sender_host_address =
837 > sender_host_port = 0
838 > -oMaa sender_host_authenticated =
839 > -oMai authenticated_id = CALLER
840 > -oMas authenticated_sender = CALLER@myhost.test.ex
841 > -oMi interface_address =
842 > interface_port = -1
843 > -oMr received_protocol =
844 > -oMs sender_host_name =
845 > -oMt sender_ident = CALLER
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 > -oMt sender_ident = me
858 > -be Sender host name explicitly set
859 > -oMa sender_host_address = V4NET.0.0.1
860 > sender_host_port = 1234
861 > -oMs sender_host_name = my.host.name
863 > be Sender host name lookup fails (V4NET.11.12.13 is not reverse registered)
864 > -oMs sender_host_name =
865 > host_lookup_failed = 1
867 > -be Sender host name and protocol set by Sendmail-compatible option
868 > -p received_protocol = special
869 > -p sender_host_name = host.name
871 > -be Sender host name and address etc, all set except host name
872 > -oMa sender_host_address = V4NET.0.0.1
873 > sender_host_port = 1234
874 > -oMaa sender_host_authenticated = AAA
875 > -oMai authenticated_id = philip
876 > -oMas authenticated_sender = xx@yy.zz
877 > -oMi interface_address = 1.1.1.1
878 > interface_port = 99
879 > -oMr received_protocol = special
880 > ----> No lookup yet: No
881 > -oMs sender_host_name = ten-1.test.ex
882 > -oMt sender_ident = me
885 **** SMTP testing session as if from host V4NET.0.0.1
886 **** but without any ident (RFC 1413) callback.
887 **** This is not for real!
889 550 Administrative prohibition
\r
891 **** SMTP testing session as if from host V4NET.0.0.2
892 **** but without any ident (RFC 1413) callback.
893 **** This is not for real!
895 550 Administrative prohibition
\r
897 **** SMTP testing session as if from host V4NET.0.0.0
898 **** but without any ident (RFC 1413) callback.
899 **** This is not for real!
901 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
904 354 Enter message, ending with "." on a line by itself
\r
905 550 reply_address=<>
\r
908 354 Enter message, ending with "." on a line by itself
\r
909 550 reply_address=<a@b>
\r
912 354 Enter message, ending with "." on a line by itself
\r
913 550 reply_address=<c@d>
\r
916 354 Enter message, ending with "." on a line by itself
\r
917 550 reply_address=<>
\r
920 354 Enter message, ending with "." on a line by itself
\r
921 550 reply_address=<x@y>
\r
922 221 myhost.test.ex closing connection
\r
924 **** SMTP testing session as if from host V4NET.0.0.0
925 **** but without any ident (RFC 1413) callback.
926 **** This is not for real!
928 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
931 354 Enter message, ending with "." on a line by itself
\r
932 550 reply_address=<>
\r
933 221 myhost.test.ex closing connection
\r
935 **** SMTP testing session as if from host V4NET.0.0.0
936 **** but without any ident (RFC 1413) callback.
937 **** This is not for real!
939 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
942 354 Enter message, ending with "." on a line by itself
\r
943 550 reply_address=<>
\r
944 221 myhost.test.ex closing connection
\r