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::
55 > # Check for extract corrupting reduce's
58 > listnamed: *.aa.bb : ^\Nxxx(.*)
59 > listnamed: *.aa.bb : ^\Nxxx(.*)
60 > listnamed: V4NET.11.12.13 : iplsearch;TESTSUITE/aux-fixed/0002.iplsearch
61 > listnamed: *.aa.bb : ^\Nxxx(.*) : ;;
62 > listnamed: a : b;c : *.aa.bb : ^\Nxxx(.*) : ;; : 2001::630::212::8::204::::b664
63 > Failed: "nolist" is not a named list
64 > listnamed: *.aa.bb : ^\Nxxx(.*)
65 > Failed: "hlist" is not a domain named list
66 > Failed: bad suffix on "list" operator
78 > Failed: "listextract" failed and "fail" requested
83 > sort: 10 smtp.ex.com:100 r2.ex.com:666 r99.ex.com
84 > sort: 10,smtp.ex.com:100,r2.ex.com:666,r99.ex.com
87 > # Tests with iscntrl() and illegal separators
94 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "0+") inside "reduce" item
101 > Failed: Not enough arguments for 'acl' (min is 1)
102 > Failed: Not enough arguments for 'acl' (min is 1)
103 > Failed: error from acl "a_nosuch"
105 > acl: (1) [person@dom.ain] []
106 > acl: (2) [firstarg] [secondarg]
107 > acl: (1) [arg with spaces] []
111 > acl: (1) [person@dom.ain] []
112 > Failed: error from acl "a_defer"
113 > acl: (2) [new arg1] [top_arg_1]
114 > acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] []
116 > addrss: local-part@dom.ain
117 > addrss: local-part@dom.ain
118 > addrss: local-part@dom.ain
119 > addrss: local-part@dom.ain
120 > addrss: local-part@dom.ain
121 > addrss: local-part.dot-atom@dom.ain
122 > addrss: local-part@dom.ain
127 > addresses: ''abc@xyz' ''pqr@xyz
128 > addresses: local-part@dom.ain
129 > addresses: local-part@dom.ain+xyz@abc
130 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
132 > Failed: output separator missing in expanding ${addresses:>}
134 > escape: B7\267F2\362
135 > excape8bit: undisturbed text tab
136 newline tab\134backslash ~tilde\177DEL\200\201.
144 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
148 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
149 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
155 > Failed: error in expression evaluation: expecting operator (after processing "0")
158 > Failed: error in expression evaluation: expecting operator (after processing "0")
172 > expand: $primary_hostname myhost.test.ex
173 > hash: jmg monty fbWx
174 > hash: abcX abX aX X
179 > Failed: "1a2b3c4d5e6" contains an odd number of characters
180 > Failed: "1a2b3c4d5e6g" is not a hex string
181 > hex2b64:MPPJPkZDbetYunCBao7BJA==
182 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
189 > Failed: argument for base32 operator is "0x1", which is not a decimal number
196 > Failed: argument for base32d operator is "ABC", which is not a base 32 number
198 > the base62 operator is actually a base36 operator in the Darwin and Cygwin
199 > environments. Write cunning tests that produce the same output in both cases,
200 > while doing a reasonable check.
205 > Failed: argument for base62 operator is "12345x", which is not a decimal number
206 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
208 > hmac: dd97e3ba5d1a61b5006108f8c8252953
209 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
210 > md5: 77add1d5f41223d5582fca736a5cb335
211 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
212 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
213 > mask: 192.168.10.192/28
214 > mask: 192.168.10.206/32
215 > Failed: mask value too big in "192.168.10.206/33"
217 > Failed: missing mask value in "192.168.10.206"
218 > Failed: "a.b.c.d" is not an IP address
219 > ipv6denorm: 0000:0000:0000:0000:0000:0000:0000:0001
220 > ipv6denorm: fe00:0000:0000:0000:0000:0000:0000:0001
221 > ipv6denorm: 0000:0000:0000:0000:0000:ffff:c0a8:0001
222 > ipv6denorm: fe80:0000:0000:0000:0000:0000:c0a8:0001
226 > ipv6norm: 2a00:eadf::1:0
227 > ipv6norm: 2a00:eadf:0:1::
229 > ipv6norm: 2a00:2:3:4:5:6:7:8
231 > lc/uc: the quick BROWN FOX
232 > length: The quick abc
236 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
242 > quote_local_part: abcd
243 > quote_local_part: O'Reilly
244 > quote_local_part: "a space"
245 > quote_local_part: ".something"
246 > quote_local_part: "something."
247 > quote_local_part: joe.bloggs
248 > quote_local_part: a!b
249 > quote_local_part: "x@y"
250 > quote_local_part: ab*cd
251 > quote_local_part: "x:y"
252 > quote_local_part: "abcd\"ef"
253 > quote_local_part: ""
254 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
255 > 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
261 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
263 > base64: VGhlIHF1aWNrIGJyb3duIAogZm94
265 > base64d:The quick brown
274 > Failed: string "14" is not an Exim time interval in "time_eval" operator
275 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
278 > time_interval: 1w4d13h46m39s
279 > Failed: string "-1" is not a positive number in "time_interval" operator
280 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
282 > # stat is a bit tricky, but some of the fields of the aux-var directory
283 > # should be the same on all systems
287 > Failed: stat(/a/non/existent/file) failed: No such file or directory
289 > # "Operators" that have expanded arguments
291 > hash: jmg monty fbWx
292 > hash: abcX abX aX X
294 > length: The quick abc
300 > Failed: Not enough arguments for 'hash' (min is 2)
301 > Failed: "nonnumber" is not a number (in "hash" expansion)
302 > Failed: Too many arguments for 'hash' (max is 3)
303 > Failed: "-2" is not a positive number (in "substr" expansion)
305 > # Skipped operators
315 > # Number suffixes in conditions
322 > # >32b should work, >64b not
328 > 1 > 4611686018427387904 n
329 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
359 > Failed: invalid integer "3z "
360 > Failed: integer expected but "a" found
361 > Failed: integer expected but "${substr_2_2:65535}" found
371 > Failed: unknown variable "post" after "def:"
374 > Failed: curly-bracket problem in conditional yes/no parsing: 'yes' part did not start with '{'
375 remaining string is ':{y}{n}}'
404 > isip: n ::1.2.3.256
412 > isip: y fe80::a00:20ff:fe86:a061
413 > isip4: n fe80::a00:20ff:fe86:a061
414 > isip6: y fe80::a00:20ff:fe86:a061
415 > isip: y fe80::1.2.3.4
423 > Failed: "if" failed and "fail" requested
432 > >x@zz.aa.bb< [] >x@zz.aa.bb<
434 > >x@xxxabc< [] >x@xxxabc<
439 > match_local_part:yes
440 > match_local_part:yes
452 > Failed: "somename" is not an IP address
461 > queue_running after or: y
462 > first_delivery after or: y
464 > # acl expansion condition
465 > acl if: Y:(0) [] []
466 > acl if: Y:(1) [argY] []
467 > acl if: N:(2) [argN] [arg2]
468 > Failed: error from acl "a_defer"
470 > # Default values for both if strings
472 > ${if eq{1}{1}} >true<
475 > # Lookups: DIR is the testing directory. In this test we can only use the
476 > # lookups that are required in all cases.
490 > Failed: "lookup" failed and "fail" requested
496 > q4: "a:b" abc continued data (make sure not key)
509 > a:b: lookup succeeded
515 > # Should give the same results as above because expansion does nothing
525 > a:b: lookup succeeded
527 > # Should fail because of no expansion
534 > # But these should succeed
539 > # Some tests of case-(in)dependence
541 > .MiXeD-CD: Data found for case-dependent MiXeD-CD
542 > .MixeD-CD: NOT FOUND
543 > .MiXeD-Ncd: Data found for case-independent MiXeD-nCD
544 > .MixeD-Ncd: Data found for case-independent MiXeD-nCD
546 > # IP address (CIDR) lookups
548 > 1.2.3.4: data for 1.2.3.4
550 > 1.2.3.5: data for *
551 > abcd::cdab: data for abcd::cdab
552 > 192.168.1.2: data for 192.168.0.0/16
553 > 192.168.5.6: data for 192.168.0.0/16
554 > abcd:abcd:: data for abcd:abcd::/32
555 > abcd:abcd:1:: data for abcd:abcd::/32
556 > abcd:abcd::3 data for abcd:abcd::/32
557 > 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
560 > # Nested Lookups - style 1
562 > The data for key1->key2
563 > Failed: "lookup" failed and "fail" requested
565 > # Nested Lookups - style 2
567 > The data for key1->key2
570 > # Other nesting tests
574 > both-in-1,both-in-2
575 > Failed: "lookup" failed and "fail" requested
577 > # Lookup quotes for standardly expected lookups
579 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
580 > Failed: unknown lookup type "xxx"
596 > Failed: "extract" failed and "fail" requested
597 > Failed: "extract" failed and "fail" requested
608 > Failed: first argument of "extract" must not be empty
609 > Failed: first argument of "extract" must not be empty
613 > Failed: missing '}' closing extract inside "map" item
618 > abcdea aaa xyz zbcdez
621 > abcdea abc z zzzdez
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 > Failed: unrecognised boolean value "text"
638 > Failed: unrecognised boolean value "text"
639 > Failed: unrecognised boolean value "-text"
640 > Failed: unrecognised boolean value "text"
641 > Failed: unrecognised boolean value "text"
642 > "00" false EXPECT: false
643 > "!true" false EXPECT: false
644 > "!false" true EXPECT: true
646 > "TrUe" true EXPECT: true
647 > "FALSE" false EXPECT: false
648 > " yes" true EXPECT: true
649 > " no" false EXPECT: false
650 > "yes " true EXPECT: true
651 > "-1" true EXPECT: true
652 > "0" false EXPECT: false
653 > "1" true EXPECT: true
654 > " 0 " false EXPECT: false
655 > " 1 " true EXPECT: true
656 > "1111111111111111111" true EXPECT: true
657 > "9" true EXPECT: true
658 > " " false EXPECT: false
659 > "text" true EXPECT: true
660 > " text" true EXPECT: true
661 > "text " true EXPECT: true
662 > " text " true EXPECT: true
663 > "00" true EXPECT: true
664 > "!true" false EXPECT: false
665 > "!false" true EXPECT: true
670 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
671 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
672 > 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?=
673 > 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?=
679 > <:ab cd:> <:ab cd:>
680 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
681 > 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
691 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
692 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
693 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
694 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
695 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
696 > ${sg{abbab}{a*}{+}} =++b+b++b+
700 > Failed: Not enough arguments for 'readfile' (min is 1)
708 > abcde - 12345 - - xyz -
709 > Failed: failed to open /non/exist/file: No such file or directory
711 > >abcde!12345!!xyz!<
713 > # Calling a command
740 > prvs=xxxxxxxxxx=userx@test.ex
741 > prvs=xxxxxxxxxx=userx@test.ex
742 > prvs=xxxxxxxxxx=userx@test.ex
746 > Failed: prvs third argument must be a single digit
747 > Failed: prvs third argument must be a single digit
748 > Failed: prvs third argument must be a single digit
750 > # Correct checks; can't put explicit addresses in the tests, because they
751 > # will change over time.
756 > >1< >userx@test.ex< >1<
777 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
778 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
779 > Failed: missing } at end of string
780 > Failed: missing } at end of string
781 > Failed: hmac algorithm "xxx" is not recognised
782 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
783 > Failed: unknown condition "xya" inside "and{...}" condition
784 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
785 > Failed: missing } at end of string - could be header name not terminated by colon
786 > Failed: curly-bracket problem in conditional yes/no parsing: did not close with '}'
787 remaining string is ''
788 > Failed: missing or misplaced { or } - could be header name not terminated by colon
789 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
790 > Failed: missing } at end of condition inside "or" group
791 > Failed: unknown condition "yes" inside "or{...}" condition
792 > Failed: non-digit after underscore in "substr_1_"
793 > Failed: non-digit after underscore in "substr__3"
795 > # Iterations: forany and forall
807 > Failed: unknown condition "yes" inside "forany" condition
808 > Failed: missing } at end of condition inside "forany"
821 > outer=yes item='' (unset)
826 > # Error inside nest - check message is helpful
827 > Failed: missing } at end of condition inside "forall" inside "forany" condition
830 > # Miscellaneous (for bug fixes, etc)
834 > # Environment access
841 > "http://www.example.com/image/481989943"
849 > {"1":116, "2":943, "3":234}
850 > expect: {"1":116, "2":943, "3":234}
852 > {"1":116, "2":943, "3":234}
853 > expect: {"1":116, "2":943, "3":234}
861 > primary_hostname: myhost.test.ex
863 > Failed: "if" failed and "fail" requested
867 > primary_hostname: myhost.test.ex
869 > Failed: "if" failed and "fail" requested
873 > -be Sender host name and address etc, all unset
874 > -oMa sender_host_address =
875 > sender_host_port = 0
876 > -oMaa sender_host_authenticated =
877 > -oMai authenticated_id = CALLER
878 > -oMas authenticated_sender = CALLER@myhost.test.ex
879 > -oMi interface_address =
880 > interface_port = -1
881 > -oMr received_protocol =
882 > -oMs sender_host_name =
883 > -oMt sender_ident = CALLER
885 > -be Sender host name and address etc, all set except host name.
886 > -oMa sender_host_address = V4NET.0.0.1
887 > sender_host_port = 1234
888 > -oMaa sender_host_authenticated = AAA
889 > -oMai authenticated_id = philip
890 > -oMas authenticated_sender = xx@yy.zz
891 > -oMi interface_address = 1.1.1.1
892 > interface_port = 99
893 > -oMr received_protocol = special
894 > -oMt sender_ident = me
896 > -be Sender host name explicitly set
897 > -oMa sender_host_address = V4NET.0.0.1
898 > sender_host_port = 1234
899 > -oMs sender_host_name = my.host.name
901 > be Sender host name lookup fails (V4NET.11.12.13 is not reverse registered)
902 > -oMs sender_host_name =
903 > host_lookup_failed = 1
905 > -be Sender host name and protocol set by Sendmail-compatible option
906 > -p received_protocol = special
907 > -p sender_host_name = host.name
909 > -be Sender host name and address etc, all set except host name
910 > -oMa sender_host_address = V4NET.0.0.1
911 > sender_host_port = 1234
912 > -oMaa sender_host_authenticated = AAA
913 > -oMai authenticated_id = philip
914 > -oMas authenticated_sender = xx@yy.zz
915 > -oMi interface_address = 1.1.1.1
916 > interface_port = 99
917 > -oMr received_protocol = special
918 > ----> No lookup yet: No
919 > -oMs sender_host_name = ten-1.test.ex
920 > -oMt sender_ident = me
923 **** SMTP testing session as if from host V4NET.0.0.1
924 **** but without any ident (RFC 1413) callback.
925 **** This is not for real!
927 550 Administrative prohibition
\r
929 **** SMTP testing session as if from host V4NET.0.0.2
930 **** but without any ident (RFC 1413) callback.
931 **** This is not for real!
933 550 Administrative prohibition
\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
946 354 Enter message, ending with "." on a line by itself
\r
947 550 reply_address=<a@b>
\r
950 354 Enter message, ending with "." on a line by itself
\r
951 550 reply_address=<c@d>
\r
954 354 Enter message, ending with "." on a line by itself
\r
955 550 reply_address=<>
\r
958 354 Enter message, ending with "." on a line by itself
\r
959 550 reply_address=<x@y>
\r
960 221 myhost.test.ex closing connection
\r
962 **** SMTP testing session as if from host V4NET.0.0.0
963 **** but without any ident (RFC 1413) callback.
964 **** This is not for real!
966 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
969 354 Enter message, ending with "." on a line by itself
\r
970 550 reply_address=<>
\r
971 221 myhost.test.ex closing connection
\r
973 **** SMTP testing session as if from host V4NET.0.0.0
974 **** but without any ident (RFC 1413) callback.
975 **** This is not for real!
977 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
980 354 Enter message, ending with "." on a line by itself
\r
981 550 reply_address=<>
\r
982 221 myhost.test.ex closing connection
\r