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
121 > addresses: ''abc@xyz' ''pqr@xyz
122 > addresses: local-part@dom.ain
123 > addresses: local-part@dom.ain+xyz@abc
124 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
126 > Failed: output separator missing in expanding ${addresses:>}
128 > escape: B7\267F2\362
129 > excape8bit: undisturbed text tab
130 newline tab\134backslash ~tilde\177DEL\200\201.
138 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
142 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
143 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
149 > Failed: error in expression evaluation: expecting operator (after processing "0")
152 > Failed: error in expression evaluation: expecting operator (after processing "0")
166 > expand: $primary_hostname myhost.test.ex
167 > hash: jmg monty fbWx
168 > hash: abcX abX aX X
173 > Failed: "1a2b3c4d5e6" contains an odd number of characters
174 > Failed: "1a2b3c4d5e6g" is not a hex string
175 > hex2b64:MPPJPkZDbetYunCBao7BJA==
176 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
183 > Failed: argument for base32 operator is "0x1", which is not a decimal number
190 > Failed: argument for base32d operator is "ABC", which is not a base 32 number
192 > the base62 operator is actually a base36 operator in the Darwin and Cygwin
193 > environments. Write cunning tests that produce the same output in both cases,
194 > while doing a reasonable check.
199 > Failed: argument for base62 operator is "12345x", which is not a decimal number
200 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
202 > hmac: dd97e3ba5d1a61b5006108f8c8252953
203 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
204 > md5: 77add1d5f41223d5582fca736a5cb335
205 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
206 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
207 > mask: 192.168.10.192/28
208 > mask: 192.168.10.206/32
209 > Failed: mask value too big in "192.168.10.206/33"
211 > Failed: missing mask value in "192.168.10.206"
212 > Failed: "a.b.c.d" is not an IP address
213 > ipv6denorm: 0000:0000:0000:0000:0000:0000:0000:0001
214 > ipv6denorm: fe00:0000:0000:0000:0000:0000:0000:0001
215 > ipv6denorm: 0000:0000:0000:0000:0000:ffff:c0a8:0001
216 > ipv6denorm: fe80:0000:0000:0000:0000:0000:c0a8:0001
220 > ipv6norm: 2a00:eadf::1:0
221 > ipv6norm: 2a00:eadf:0:1::
223 > ipv6norm: 2a00:2:3:4:5:6:7:8
225 > lc/uc: the quick BROWN FOX
226 > length: The quick abc
229 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
235 > quote_local_part: abcd
236 > quote_local_part: O'Reilly
237 > quote_local_part: "a space"
238 > quote_local_part: ".something"
239 > quote_local_part: "something."
240 > quote_local_part: joe.bloggs
241 > quote_local_part: a!b
242 > quote_local_part: "x@y"
243 > quote_local_part: ab*cd
244 > quote_local_part: "x:y"
245 > quote_local_part: "abcd\"ef"
246 > quote_local_part: ""
247 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
248 > 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
254 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
256 > base64: VGhlIHF1aWNrIGJyb3duIAogZm94
258 > base64d:The quick brown
267 > Failed: string "14" is not an Exim time interval in "time_eval" operator
268 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
271 > time_interval: 1w4d13h46m39s
272 > Failed: string "-1" is not a positive number in "time_interval" operator
273 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
275 > # stat is a bit tricky, but some of the fields of the aux-var directory
276 > # should be the same on all systems
280 > Failed: stat(/a/non/existent/file) failed: No such file or directory
282 > # "Operators" that have expanded arguments
284 > hash: jmg monty fbWx
285 > hash: abcX abX aX X
287 > length: The quick abc
293 > Failed: Not enough arguments for 'hash' (min is 2)
294 > Failed: "nonnumber" is not a number (in "hash" expansion)
295 > Failed: Too many arguments for 'hash' (max is 3)
296 > Failed: "-2" is not a positive number (in "substr" expansion)
298 > # Skipped operators
308 > # Number suffixes in conditions
315 > # >32b should work, >64b not
321 > 1 > 4611686018427387904 n
322 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
352 > Failed: invalid integer "3z "
353 > Failed: integer expected but "a" found
354 > Failed: integer expected but "${substr_2_2:65535}" found
364 > Failed: unknown variable "post" after "def:"
367 > Failed: curly-bracket problem in conditional yes/no parsing: 'yes' part did not start with '{'
368 remaining string is ':{y}{n}}'
397 > isip: n ::1.2.3.256
405 > isip: y fe80::a00:20ff:fe86:a061
406 > isip4: n fe80::a00:20ff:fe86:a061
407 > isip6: y fe80::a00:20ff:fe86:a061
408 > isip: y fe80::1.2.3.4
416 > Failed: "if" failed and "fail" requested
425 > >x@zz.aa.bb< [] >x@zz.aa.bb<
427 > >x@xxxabc< [] >x@xxxabc<
432 > match_local_part:yes
433 > match_local_part:yes
445 > Failed: "somename" is not an IP address
454 > queue_running after or: y
455 > first_delivery after or: y
457 > # acl expansion condition
458 > acl if: Y:(0) [] []
459 > acl if: Y:(1) [argY] []
460 > acl if: N:(2) [argN] [arg2]
461 > Failed: error from acl "a_defer"
463 > # Default values for both if strings
465 > ${if eq{1}{1}} >true<
468 > # Lookups: DIR is the testing directory. In this test we can only use the
469 > # lookups that are required in all cases.
483 > Failed: "lookup" failed and "fail" requested
489 > q4: "a:b" abc continued data (make sure not key)
502 > a:b: lookup succeeded
508 > # Should give the same results as above because expansion does nothing
518 > a:b: lookup succeeded
520 > # Should fail because of no expansion
527 > # But these should succeed
532 > # Some tests of case-(in)dependence
534 > .MiXeD-CD: Data found for case-dependent MiXeD-CD
535 > .MixeD-CD: NOT FOUND
536 > .MiXeD-Ncd: Data found for case-independent MiXeD-nCD
537 > .MixeD-Ncd: Data found for case-independent MiXeD-nCD
539 > # IP address (CIDR) lookups
541 > 1.2.3.4: data for 1.2.3.4
543 > 1.2.3.5: data for *
544 > abcd::cdab: data for abcd::cdab
545 > 192.168.1.2: data for 192.168.0.0/16
546 > 192.168.5.6: data for 192.168.0.0/16
547 > abcd:abcd:: data for abcd:abcd::/32
548 > abcd:abcd:1:: data for abcd:abcd::/32
549 > abcd:abcd::3 data for abcd:abcd::/32
550 > 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
553 > # Nested Lookups - style 1
555 > The data for key1->key2
556 > Failed: "lookup" failed and "fail" requested
558 > # Nested Lookups - style 2
560 > The data for key1->key2
563 > # Other nesting tests
567 > both-in-1,both-in-2
568 > Failed: "lookup" failed and "fail" requested
570 > # Lookup quotes for standardly expected lookups
572 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
573 > Failed: unknown lookup type "xxx"
589 > Failed: "extract" failed and "fail" requested
590 > Failed: "extract" failed and "fail" requested
601 > Failed: first argument of "extract" must not be empty
602 > Failed: first argument of "extract" must not be empty
606 > Failed: missing '}' closing extract inside "map" item
611 > abcdea aaa xyz zbcdez
614 > abcdea abc z zzzdez
617 > "TrUe" true EXPECT: true
618 > "FALSE" false EXPECT: false
619 > " yes" true EXPECT: true
620 > " no" false EXPECT: false
621 > "yes " true EXPECT: true
622 > "-1" true EXPECT: true
623 > "0" false EXPECT: false
624 > "1" true EXPECT: true
625 > " 0 " false EXPECT: false
626 > " 1 " true EXPECT: true
627 > "1111111111111111111" true EXPECT: true
628 > "9" true EXPECT: true
629 > " " false EXPECT: false
630 > Failed: unrecognised boolean value "text"
631 > Failed: unrecognised boolean value "text"
632 > Failed: unrecognised boolean value "-text"
633 > Failed: unrecognised boolean value "text"
634 > Failed: unrecognised boolean value "text"
635 > "00" false EXPECT: false
636 > "!true" false EXPECT: false
637 > "!false" true EXPECT: true
639 > "TrUe" true EXPECT: true
640 > "FALSE" false EXPECT: false
641 > " yes" true EXPECT: true
642 > " no" false EXPECT: false
643 > "yes " true EXPECT: true
644 > "-1" true EXPECT: true
645 > "0" false EXPECT: false
646 > "1" true EXPECT: true
647 > " 0 " false EXPECT: false
648 > " 1 " true EXPECT: true
649 > "1111111111111111111" true EXPECT: true
650 > "9" true EXPECT: true
651 > " " false EXPECT: false
652 > "text" true EXPECT: true
653 > " text" true EXPECT: true
654 > "text " true EXPECT: true
655 > " text " true EXPECT: true
656 > "00" true EXPECT: true
657 > "!true" false EXPECT: false
658 > "!false" true EXPECT: true
663 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
664 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
665 > 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?=
666 > 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?=
672 > <:ab cd:> <:ab cd:>
673 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
674 > 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
684 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
685 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
686 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
687 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
688 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
689 > ${sg{abbab}{a*}{+}} =++b+b++b+
693 > Failed: Not enough arguments for 'readfile' (min is 1)
701 > abcde - 12345 - - xyz -
702 > Failed: failed to open /non/exist/file: No such file or directory
704 > >abcde!12345!!xyz!<
706 > # Calling a command
733 > prvs=xxxxxxxxxx=userx@test.ex
734 > prvs=xxxxxxxxxx=userx@test.ex
735 > prvs=xxxxxxxxxx=userx@test.ex
739 > Failed: prvs third argument must be a single digit
740 > Failed: prvs third argument must be a single digit
741 > Failed: prvs third argument must be a single digit
743 > # Correct checks; can't put explicit addresses in the tests, because they
744 > # will change over time.
749 > >1< >userx@test.ex< >1<
770 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
771 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
772 > Failed: missing } at end of string
773 > Failed: missing } at end of string
774 > Failed: hmac algorithm "xxx" is not recognised
775 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
776 > Failed: unknown condition "xya" inside "and{...}" condition
777 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
778 > Failed: missing } at end of string - could be header name not terminated by colon
779 > Failed: curly-bracket problem in conditional yes/no parsing: did not close with '}'
780 remaining string is ''
781 > Failed: missing or misplaced { or } - could be header name not terminated by colon
782 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
783 > Failed: missing } at end of condition inside "or" group
784 > Failed: unknown condition "yes" inside "or{...}" condition
785 > Failed: non-digit after underscore in "substr_1_"
786 > Failed: non-digit after underscore in "substr__3"
788 > # Iterations: forany and forall
800 > Failed: unknown condition "yes" inside "forany" condition
801 > Failed: missing } at end of condition inside "forany"
814 > outer=yes item='' (unset)
819 > # Error inside nest - check message is helpful
820 > Failed: missing } at end of condition inside "forall" inside "forany" condition
823 > # Miscellaneous (for bug fixes, etc)
827 > # Environment access
834 > "http://www.example.com/image/481989943"
842 > {"1":116, "2":943, "3":234}
843 > expect: {"1":116, "2":943, "3":234}
845 > {"1":116, "2":943, "3":234}
846 > expect: {"1":116, "2":943, "3":234}
854 > primary_hostname: myhost.test.ex
856 > Failed: "if" failed and "fail" requested
860 > primary_hostname: myhost.test.ex
862 > Failed: "if" failed and "fail" requested
866 > -be Sender host name and address etc, all unset
867 > -oMa sender_host_address =
868 > sender_host_port = 0
869 > -oMaa sender_host_authenticated =
870 > -oMai authenticated_id = CALLER
871 > -oMas authenticated_sender = CALLER@myhost.test.ex
872 > -oMi interface_address =
873 > interface_port = -1
874 > -oMr received_protocol =
875 > -oMs sender_host_name =
876 > -oMt sender_ident = CALLER
878 > -be Sender host name and address etc, all set except host name.
879 > -oMa sender_host_address = V4NET.0.0.1
880 > sender_host_port = 1234
881 > -oMaa sender_host_authenticated = AAA
882 > -oMai authenticated_id = philip
883 > -oMas authenticated_sender = xx@yy.zz
884 > -oMi interface_address = 1.1.1.1
885 > interface_port = 99
886 > -oMr received_protocol = special
887 > -oMt sender_ident = me
889 > -be Sender host name explicitly set
890 > -oMa sender_host_address = V4NET.0.0.1
891 > sender_host_port = 1234
892 > -oMs sender_host_name = my.host.name
894 > be Sender host name lookup fails (V4NET.11.12.13 is not reverse registered)
895 > -oMs sender_host_name =
896 > host_lookup_failed = 1
898 > -be Sender host name and protocol set by Sendmail-compatible option
899 > -p received_protocol = special
900 > -p sender_host_name = host.name
902 > -be Sender host name and address etc, all set except host name
903 > -oMa sender_host_address = V4NET.0.0.1
904 > sender_host_port = 1234
905 > -oMaa sender_host_authenticated = AAA
906 > -oMai authenticated_id = philip
907 > -oMas authenticated_sender = xx@yy.zz
908 > -oMi interface_address = 1.1.1.1
909 > interface_port = 99
910 > -oMr received_protocol = special
911 > ----> No lookup yet: No
912 > -oMs sender_host_name = ten-1.test.ex
913 > -oMt sender_ident = me
916 **** SMTP testing session as if from host V4NET.0.0.1
917 **** but without any ident (RFC 1413) callback.
918 **** This is not for real!
920 550 Administrative prohibition
\r
922 **** SMTP testing session as if from host V4NET.0.0.2
923 **** but without any ident (RFC 1413) callback.
924 **** This is not for real!
926 550 Administrative prohibition
\r
928 **** SMTP testing session as if from host V4NET.0.0.0
929 **** but without any ident (RFC 1413) callback.
930 **** This is not for real!
932 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
935 354 Enter message, ending with "." on a line by itself
\r
936 550 reply_address=<>
\r
939 354 Enter message, ending with "." on a line by itself
\r
940 550 reply_address=<a@b>
\r
943 354 Enter message, ending with "." on a line by itself
\r
944 550 reply_address=<c@d>
\r
947 354 Enter message, ending with "." on a line by itself
\r
948 550 reply_address=<>
\r
951 354 Enter message, ending with "." on a line by itself
\r
952 550 reply_address=<x@y>
\r
953 221 myhost.test.ex closing connection
\r
955 **** SMTP testing session as if from host V4NET.0.0.0
956 **** but without any ident (RFC 1413) callback.
957 **** This is not for real!
959 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
962 354 Enter message, ending with "." on a line by itself
\r
963 550 reply_address=<>
\r
964 221 myhost.test.ex closing connection
\r
966 **** SMTP testing session as if from host V4NET.0.0.0
967 **** but without any ident (RFC 1413) callback.
968 **** This is not for real!
970 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
973 354 Enter message, ending with "." on a line by itself
\r
974 550 reply_address=<>
\r
975 221 myhost.test.ex closing connection
\r