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
132 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
136 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
137 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
143 > Failed: error in expression evaluation: expecting operator (after processing "0")
146 > Failed: error in expression evaluation: expecting operator (after processing "0")
160 > expand: $primary_hostname myhost.test.ex
161 > hash: jmg monty fbWx
162 > hash: abcX abX aX X
167 > Failed: "1a2b3c4d5e6" contains an odd number of characters
168 > Failed: "1a2b3c4d5e6g" is not a hex string
169 > hex2b64:MPPJPkZDbetYunCBao7BJA==
170 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
177 > Failed: argument for base32 operator is "0x1", which is not a decimal number
184 > Failed: argument for base32d operator is "ABC", which is not a base 32 number
186 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
187 > environments. Write cunning tests that produce the same output in both cases,
188 > while doing a reasonable check.
193 > Failed: argument for base62 operator is "12345x", which is not a decimal number
194 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
196 > hmac: dd97e3ba5d1a61b5006108f8c8252953
197 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
198 > md5: 77add1d5f41223d5582fca736a5cb335
199 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
200 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
201 > mask: 192.168.10.192/28
202 > mask: 192.168.10.206/32
203 > Failed: mask value too big in "192.168.10.206/33"
205 > Failed: missing mask value in "192.168.10.206"
206 > Failed: "a.b.c.d" is not an IP address
207 > ipv6denorm: 0000:0000:0000:0000:0000:0000:0000:0001
208 > ipv6denorm: fe00:0000:0000:0000:0000:0000:0000:0001
209 > ipv6denorm: 0000:0000:0000:0000:0000:ffff:c0a8:0001
210 > ipv6denorm: fe80:0000:0000:0000:0000:0000:c0a8:0001
214 > ipv6norm: 2a00:eadf::1:0
215 > ipv6norm: 2a00:eadf:0:1::
217 > ipv6norm: 2a00:2:3:4:5:6:7:8
219 > lc/uc: the quick BROWN FOX
220 > length: The quick abc
223 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
229 > quote_local_part: abcd
230 > quote_local_part: O'Reilly
231 > quote_local_part: "a space"
232 > quote_local_part: ".something"
233 > quote_local_part: "something."
234 > quote_local_part: joe.bloggs
235 > quote_local_part: a!b
236 > quote_local_part: "x@y"
237 > quote_local_part: ab*cd
238 > quote_local_part: "x:y"
239 > quote_local_part: "abcd\"ef"
240 > quote_local_part: ""
241 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
242 > 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
248 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
250 > base64: VGhlIHF1aWNrIGJyb3duIAogZm94
252 > base64d:The quick brown
261 > Failed: string "14" is not an Exim time interval in "time_eval" operator
262 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
265 > time_interval: 1w4d13h46m39s
266 > Failed: string "-1" is not a positive number in "time_interval" operator
267 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
269 > # stat is a bit tricky, but some of the fields of the aux-var directory
270 > # should be the same on all systems
274 > Failed: stat(/a/non/existent/file) failed: No such file or directory
276 > # "Operators" that have expanded arguments
278 > hash: jmg monty fbWx
279 > hash: abcX abX aX X
281 > length: The quick abc
287 > Failed: Not enough arguments for 'hash' (min is 2)
288 > Failed: "nonnumber" is not a number (in "hash" expansion)
289 > Failed: Too many arguments for 'hash' (max is 3)
290 > Failed: "-2" is not a positive number (in "substr" expansion)
292 > # Skipped operators
302 > # Number suffixes in conditions
309 > # >32b should work, >64b not
315 > 1 > 4611686018427387904 n
316 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
346 > Failed: invalid integer "3z "
347 > Failed: integer expected but "a" found
348 > Failed: integer expected but "${substr_2_2:65535}" found
358 > Failed: unknown variable "post" after "def:"
361 > Failed: curly-bracket problem in conditional yes/no parsing: 'yes' part did not start with '{'
362 remaining string is ':{y}{n}}'
397 > isip: y fe80::a00:20ff:fe86:a061
398 > isip4: n fe80::a00:20ff:fe86:a061
399 > isip6: y fe80::a00:20ff:fe86:a061
407 > Failed: "if" failed and "fail" requested
416 > >x@zz.aa.bb< [] >x@zz.aa.bb<
418 > >x@xxxabc< [] >x@xxxabc<
423 > match_local_part:yes
424 > match_local_part:yes
436 > Failed: "somename" is not an IP address
445 > queue_running after or: y
446 > first_delivery after or: y
448 > # acl expansion condition
449 > acl if: Y:(0) [] []
450 > acl if: Y:(1) [argY] []
451 > acl if: N:(2) [argN] [arg2]
452 > Failed: error from acl "a_defer"
454 > # Default values for both if strings
456 > ${if eq{1}{1}} >true<
459 > # Lookups: DIR is the testing directory. In this test we can only use the
460 > # lookups that are required in all cases.
474 > Failed: "lookup" failed and "fail" requested
480 > q4: "a:b" abc continued data (make sure not key)
493 > a:b: lookup succeeded
499 > # Should give the same results as above because expansion does nothing
509 > a:b: lookup succeeded
511 > # Should fail because of no expansion
518 > # But these should succeed
523 > # Some tests of case-(in)dependence
525 > MiXeD-CD: Data found for case-dependent MiXeD-CD
526 > MixeD-CD: NOT FOUND
527 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
528 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
530 > # IP address (CIDR) lookups
532 > 1.2.3.4: data for 1.2.3.4
534 > 1.2.3.5: data for *
535 > abcd::cdab: data for abcd::cdab
536 > 192.168.1.2: data for 192.168.0.0/16
537 > 192.168.5.6: data for 192.168.0.0/16
538 > abcd:abcd:: data for abcd:abcd::/32
539 > abcd:abcd:1:: data for abcd:abcd::/32
540 > abcd:abcd::3 data for abcd:abcd::/32
541 > 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
544 > # Nested Lookups - style 1
546 > The data for key1->key2
547 > Failed: "lookup" failed and "fail" requested
549 > # Nested Lookups - style 2
551 > The data for key1->key2
554 > # Other nesting tests
558 > both-in-1,both-in-2
559 > Failed: "lookup" failed and "fail" requested
561 > # Lookup quotes for standardly expected lookups
563 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
564 > Failed: unknown lookup type "xxx"
580 > Failed: "extract" failed and "fail" requested
581 > Failed: "extract" failed and "fail" requested
592 > Failed: first argument of "extract" must not be empty
593 > Failed: first argument of "extract" must not be empty
597 > Failed: missing '}' closing extract inside "map" item
602 > abcdea aaa xyz zbcdez
605 > abcdea abc z zzzdez
608 > "TrUe" true EXPECT: true
609 > "FALSE" false EXPECT: false
610 > " yes" true EXPECT: true
611 > " no" false EXPECT: false
612 > "yes " true EXPECT: true
613 > "-1" true EXPECT: true
614 > "0" false EXPECT: false
615 > "1" true EXPECT: true
616 > " 0 " false EXPECT: false
617 > " 1 " true EXPECT: true
618 > "1111111111111111111" true EXPECT: true
619 > "9" true EXPECT: true
620 > " " false EXPECT: false
621 > Failed: unrecognised boolean value "text"
622 > Failed: unrecognised boolean value "text"
623 > Failed: unrecognised boolean value "-text"
624 > Failed: unrecognised boolean value "text"
625 > Failed: unrecognised boolean value "text"
626 > "00" false EXPECT: false
627 > "!true" false EXPECT: false
628 > "!false" true EXPECT: true
630 > "TrUe" true EXPECT: true
631 > "FALSE" false EXPECT: false
632 > " yes" true EXPECT: true
633 > " no" false EXPECT: false
634 > "yes " true EXPECT: true
635 > "-1" true EXPECT: true
636 > "0" false EXPECT: false
637 > "1" true EXPECT: true
638 > " 0 " false EXPECT: false
639 > " 1 " true EXPECT: true
640 > "1111111111111111111" true EXPECT: true
641 > "9" true EXPECT: true
642 > " " false EXPECT: false
643 > "text" true EXPECT: true
644 > " text" true EXPECT: true
645 > "text " true EXPECT: true
646 > " text " true EXPECT: true
647 > "00" true EXPECT: true
648 > "!true" false EXPECT: false
649 > "!false" true EXPECT: true
654 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
655 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
656 > 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?=
657 > 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?=
663 > <:ab cd:> <:ab cd:>
664 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
665 > 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
675 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
676 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
677 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
678 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
679 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
680 > ${sg{abbab}{a*}{+}} =++b+b++b+
684 > Failed: Not enough arguments for 'readfile' (min is 1)
692 > abcde - 12345 - - xyz -
693 > Failed: failed to open /non/exist/file: No such file or directory
695 > >abcde!12345!!xyz!<
697 > # Calling a command
724 > prvs=xxxxxxxxxx=userx@test.ex
725 > prvs=xxxxxxxxxx=userx@test.ex
726 > prvs=xxxxxxxxxx=userx@test.ex
730 > Failed: prvs second argument must be a single digit
731 > Failed: prvs second argument must be a single digit
732 > Failed: prvs second argument must be a single digit
734 > # Correct checks; can't put explicit addresses in the tests, because they
735 > # will change over time.
740 > >1< >userx@test.ex< >1<
761 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
762 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
763 > Failed: missing } at end of string
764 > Failed: missing } at end of string
765 > Failed: hmac algorithm "xxx" is not recognised
766 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
767 > Failed: unknown condition "xya" inside "and{...}" condition
768 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
769 > Failed: missing } at end of string - could be header name not terminated by colon
770 > Failed: curly-bracket problem in conditional yes/no parsing: did not close with '}'
771 remaining string is ''
772 > Failed: missing or misplaced { or } - could be header name not terminated by colon
773 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
774 > Failed: missing } at end of condition inside "or" group
775 > Failed: unknown condition "yes" inside "or{...}" condition
776 > Failed: non-digit after underscore in "substr_1_"
777 > Failed: non-digit after underscore in "substr__3"
779 > # Iterations: forany and forall
791 > Failed: unknown condition "yes" inside "forany" condition
792 > Failed: missing } at end of condition inside "forany"
805 > outer=yes item='' (unset)
810 > # Error inside nest - check message is helpful
811 > Failed: missing } at end of condition inside "forall" inside "forany" condition
814 > # Miscellaneous (for bug fixes, etc)
818 > # Environment access
826 > primary_hostname: myhost.test.ex
828 > Failed: "if" failed and "fail" requested
832 > -be Sender host name and address etc, all unset
833 > -oMa sender_host_address =
834 > sender_host_port = 0
835 > -oMaa sender_host_authenticated =
836 > -oMai authenticated_id = CALLER
837 > -oMas authenticated_sender = CALLER@myhost.test.ex
838 > -oMi interface_address =
839 > interface_port = -1
840 > -oMr received_protocol =
841 > -oMs sender_host_name =
842 > -oMt sender_ident = CALLER
844 > -be Sender host name and address etc, all set except host name.
845 > -oMa sender_host_address = V4NET.0.0.1
846 > sender_host_port = 1234
847 > -oMaa sender_host_authenticated = AAA
848 > -oMai authenticated_id = philip
849 > -oMas authenticated_sender = xx@yy.zz
850 > -oMi interface_address = 1.1.1.1
851 > interface_port = 99
852 > -oMr received_protocol = special
853 > -oMt sender_ident = me
855 > -be Sender host name explicitly set
856 > -oMa sender_host_address = V4NET.0.0.1
857 > sender_host_port = 1234
858 > -oMs sender_host_name = my.host.name
860 > be Sender host name lookup fails (V4NET.11.12.13 is not reverse registered)
861 > -oMs sender_host_name =
862 > host_lookup_failed = 1
864 > -be Sender host name and protocol set by Sendmail-compatible option
865 > -p received_protocol = special
866 > -p sender_host_name = host.name
868 > -be Sender host name and address etc, all set except host name
869 > -oMa sender_host_address = V4NET.0.0.1
870 > sender_host_port = 1234
871 > -oMaa sender_host_authenticated = AAA
872 > -oMai authenticated_id = philip
873 > -oMas authenticated_sender = xx@yy.zz
874 > -oMi interface_address = 1.1.1.1
875 > interface_port = 99
876 > -oMr received_protocol = special
877 > ----> No lookup yet: No
878 > -oMs sender_host_name = ten-1.test.ex
879 > -oMt sender_ident = me
882 **** SMTP testing session as if from host V4NET.0.0.1
883 **** but without any ident (RFC 1413) callback.
884 **** This is not for real!
886 550 Administrative prohibition
\r
888 **** SMTP testing session as if from host V4NET.0.0.2
889 **** but without any ident (RFC 1413) callback.
890 **** This is not for real!
892 550 Administrative prohibition
\r
894 **** SMTP testing session as if from host V4NET.0.0.0
895 **** but without any ident (RFC 1413) callback.
896 **** This is not for real!
898 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
901 354 Enter message, ending with "." on a line by itself
\r
902 550 reply_address=<>
\r
905 354 Enter message, ending with "." on a line by itself
\r
906 550 reply_address=<a@b>
\r
909 354 Enter message, ending with "." on a line by itself
\r
910 550 reply_address=<c@d>
\r
913 354 Enter message, ending with "." on a line by itself
\r
914 550 reply_address=<>
\r
917 354 Enter message, ending with "." on a line by itself
\r
918 550 reply_address=<x@y>
\r
919 221 myhost.test.ex closing connection
\r
921 **** SMTP testing session as if from host V4NET.0.0.0
922 **** but without any ident (RFC 1413) callback.
923 **** This is not for real!
925 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
928 354 Enter message, ending with "." on a line by itself
\r
929 550 reply_address=<>
\r
930 221 myhost.test.ex closing connection
\r
932 **** SMTP testing session as if from host V4NET.0.0.0
933 **** but without any ident (RFC 1413) callback.
934 **** This is not for real!
936 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
939 354 Enter message, ending with "." on a line by itself
\r
940 550 reply_address=<>
\r
941 221 myhost.test.ex closing connection
\r