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=
172 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
173 > environments. Write cunning tests that produce the same output in both cases,
174 > while doing a reasonable check.
179 > Failed: argument for base62 operator is "12345x", which is not a decimal number
180 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
182 > hmac: dd97e3ba5d1a61b5006108f8c8252953
183 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
184 > md5: 77add1d5f41223d5582fca736a5cb335
185 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
186 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
187 > mask: 192.168.10.192/28
188 > mask: 192.168.10.206/32
189 > Failed: mask value too big in "192.168.10.206/33"
191 > Failed: missing mask value in "192.168.10.206"
192 > Failed: "a.b.c.d" is not an IP address
193 > ipv6denorm: 0000:0000:0000:0000:0000:0000:0000:0001
194 > ipv6denorm: fe00:0000:0000:0000:0000:0000:0000:0001
195 > ipv6denorm: 0000:0000:0000:0000:0000:ffff:c0a8:0001
196 > ipv6denorm: fe80:0000:0000:0000:0000:0000:c0a8:0001
200 > ipv6norm: 2a00:eadf::1:0
201 > ipv6norm: 2a00:eadf:0:1::
203 > ipv6norm: 2a00:2:3:4:5:6:7:8
205 > lc/uc: the quick BROWN FOX
206 > length: The quick abc
209 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
215 > quote_local_part: abcd
216 > quote_local_part: O'Reilly
217 > quote_local_part: "a space"
218 > quote_local_part: ".something"
219 > quote_local_part: "something."
220 > quote_local_part: joe.bloggs
221 > quote_local_part: a!b
222 > quote_local_part: "x@y"
223 > quote_local_part: ab*cd
224 > quote_local_part: "x:y"
225 > quote_local_part: "abcd\"ef"
226 > quote_local_part: ""
227 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
228 > 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
234 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
236 > base64: VGhlIHF1aWNrIGJyb3duIAogZm94
238 > base64d:The quick brown
247 > Failed: string "14" is not an Exim time interval in "time_eval" operator
248 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
251 > time_interval: 1w4d13h46m39s
252 > Failed: string "-1" is not a positive number in "time_interval" operator
253 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
255 > # stat is a bit tricky, but some of the fields of the aux-var directory
256 > # should be the same on all systems
260 > Failed: stat(/a/non/existent/file) failed: No such file or directory
262 > # "Operators" that have expanded arguments
264 > hash: jmg monty fbWx
265 > hash: abcX abX aX X
267 > length: The quick abc
273 > Failed: Not enough arguments for 'hash' (min is 2)
274 > Failed: "nonnumber" is not a number (in "hash" expansion)
275 > Failed: Too many arguments for 'hash' (max is 3)
276 > Failed: "-2" is not a positive number (in "substr" expansion)
278 > # Skipped operators
288 > # Number suffixes in conditions
295 > # >32b should work, >64b not
301 > 1 > 4611686018427387904 n
302 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
332 > Failed: invalid integer "3z "
333 > Failed: integer expected but "a" found
334 > Failed: integer expected but "${substr_2_2:65535}" found
344 > Failed: unknown variable "post" after "def:"
347 > Failed: curly-bracket problem in conditional yes/no parsing: 'yes' part did not start with '{'
348 remaining string is ':{y}{n}}'
383 > isip: y fe80::a00:20ff:fe86:a061
384 > isip4: n fe80::a00:20ff:fe86:a061
385 > isip6: y fe80::a00:20ff:fe86:a061
393 > Failed: "if" failed and "fail" requested
402 > >x@zz.aa.bb< [] >x@zz.aa.bb<
404 > >x@xxxabc< [] >x@xxxabc<
409 > match_local_part:yes
410 > match_local_part:yes
422 > Failed: "somename" is not an IP address
431 > queue_running after or: y
432 > first_delivery after or: y
434 > # acl expansion condition
435 > acl if: Y:(0) [] []
436 > acl if: Y:(1) [argY] []
437 > acl if: N:(2) [argN] [arg2]
438 > Failed: error from acl "a_defer"
440 > # Default values for both if strings
442 > ${if eq{1}{1}} >true<
445 > # Lookups: DIR is the testing directory. In this test we can only use the
446 > # lookups that are required in all cases.
460 > Failed: "lookup" failed and "fail" requested
466 > q4: "a:b" abc continued data (make sure not key)
479 > a:b: lookup succeeded
485 > # Should give the same results as above because expansion does nothing
495 > a:b: lookup succeeded
497 > # Should fail because of no expansion
504 > # But these should succeed
509 > # Some tests of case-(in)dependence
511 > MiXeD-CD: Data found for case-dependent MiXeD-CD
512 > MixeD-CD: NOT FOUND
513 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
514 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
516 > # IP address (CIDR) lookups
518 > 1.2.3.4: data for 1.2.3.4
520 > 1.2.3.5: data for *
521 > abcd::cdab: data for abcd::cdab
522 > 192.168.1.2: data for 192.168.0.0/16
523 > 192.168.5.6: data for 192.168.0.0/16
524 > abcd:abcd:: data for abcd:abcd::/32
525 > abcd:abcd:1:: data for abcd:abcd::/32
526 > abcd:abcd::3 data for abcd:abcd::/32
527 > 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
530 > # Nested Lookups - style 1
532 > The data for key1->key2
533 > Failed: "lookup" failed and "fail" requested
535 > # Nested Lookups - style 2
537 > The data for key1->key2
540 > # Other nesting tests
544 > both-in-1,both-in-2
545 > Failed: "lookup" failed and "fail" requested
547 > # Lookup quotes for standardly expected lookups
549 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
550 > Failed: unknown lookup type "xxx"
566 > Failed: "extract" failed and "fail" requested
567 > Failed: "extract" failed and "fail" requested
578 > Failed: first argument of "extract" must not be empty
579 > Failed: first argument of "extract" must not be empty
583 > Failed: missing '}' closing extract inside "map" item
588 > abcdea aaa xyz zbcdez
591 > abcdea abc z zzzdez
594 > "TrUe" true EXPECT: true
595 > "FALSE" false EXPECT: false
596 > " yes" true EXPECT: true
597 > " no" false EXPECT: false
598 > "yes " true EXPECT: true
599 > "-1" true EXPECT: true
600 > "0" false EXPECT: false
601 > "1" true EXPECT: true
602 > " 0 " false EXPECT: false
603 > " 1 " true EXPECT: true
604 > "1111111111111111111" true EXPECT: true
605 > "9" true EXPECT: true
606 > " " false EXPECT: false
607 > Failed: unrecognised boolean value "text"
608 > Failed: unrecognised boolean value "text"
609 > Failed: unrecognised boolean value "-text"
610 > Failed: unrecognised boolean value "text"
611 > Failed: unrecognised boolean value "text"
612 > "00" false EXPECT: false
613 > "!true" false EXPECT: false
614 > "!false" true EXPECT: true
616 > "TrUe" true EXPECT: true
617 > "FALSE" false EXPECT: false
618 > " yes" true EXPECT: true
619 > " no" false EXPECT: false
620 > "yes " true EXPECT: true
621 > "-1" true EXPECT: true
622 > "0" false EXPECT: false
623 > "1" true EXPECT: true
624 > " 0 " false EXPECT: false
625 > " 1 " true EXPECT: true
626 > "1111111111111111111" true EXPECT: true
627 > "9" true EXPECT: true
628 > " " false EXPECT: false
629 > "text" true EXPECT: true
630 > " text" true EXPECT: true
631 > "text " true EXPECT: true
632 > " text " true EXPECT: true
633 > "00" true EXPECT: true
634 > "!true" false EXPECT: false
635 > "!false" true EXPECT: true
640 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
641 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
642 > 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?=
643 > 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?=
649 > <:ab cd:> <:ab cd:>
650 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
651 > 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
661 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
662 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
663 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
664 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
665 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
666 > ${sg{abbab}{a*}{+}} =++b+b++b+
670 > Failed: Not enough arguments for 'readfile' (min is 1)
678 > abcde - 12345 - - xyz -
679 > Failed: failed to open /non/exist/file: No such file or directory
681 > >abcde!12345!!xyz!<
683 > # Calling a command
710 > prvs=xxxxxxxxxx=userx@test.ex
711 > prvs=xxxxxxxxxx=userx@test.ex
712 > prvs=xxxxxxxxxx=userx@test.ex
716 > Failed: prvs second argument must be a single digit
717 > Failed: prvs second argument must be a single digit
718 > Failed: prvs second argument must be a single digit
720 > # Correct checks; can't put explicit addresses in the tests, because they
721 > # will change over time.
726 > >1< >userx@test.ex< >1<
747 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
748 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
749 > Failed: missing } at end of string
750 > Failed: missing } at end of string
751 > Failed: hmac algorithm "xxx" is not recognised
752 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
753 > Failed: unknown condition "xya" inside "and{...}" condition
754 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
755 > Failed: missing } at end of string - could be header name not terminated by colon
756 > Failed: curly-bracket problem in conditional yes/no parsing: did not close with '}'
757 remaining string is ''
758 > Failed: missing or misplaced { or } - could be header name not terminated by colon
759 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
760 > Failed: missing } at end of condition inside "or" group
761 > Failed: unknown condition "yes" inside "or{...}" condition
762 > Failed: non-digit after underscore in "substr_1_"
763 > Failed: non-digit after underscore in "substr__3"
765 > # Iterations: forany and forall
777 > Failed: unknown condition "yes" inside "forany" condition
778 > Failed: missing } at end of condition inside "forany"
791 > outer=yes item='' (unset)
796 > # Error inside nest - check message is helpful
797 > Failed: missing } at end of condition inside "forall" inside "forany" condition
800 > # Miscellaneous (for bug fixes, etc)
804 > # Environment access
812 > primary_hostname: myhost.test.ex
814 > Failed: "if" failed and "fail" requested
818 > -be Sender host name and address etc, all unset
819 > -oMa sender_host_address =
820 > sender_host_port = 0
821 > -oMaa sender_host_authenticated =
822 > -oMai authenticated_id = CALLER
823 > -oMas authenticated_sender = CALLER@myhost.test.ex
824 > -oMi interface_address =
825 > interface_port = -1
826 > -oMr received_protocol =
827 > -oMs sender_host_name =
828 > -oMt sender_ident = CALLER
830 > -be Sender host name and address etc, all set except host name.
831 > -oMa sender_host_address = V4NET.0.0.1
832 > sender_host_port = 1234
833 > -oMaa sender_host_authenticated = AAA
834 > -oMai authenticated_id = philip
835 > -oMas authenticated_sender = xx@yy.zz
836 > -oMi interface_address = 1.1.1.1
837 > interface_port = 99
838 > -oMr received_protocol = special
839 > -oMt sender_ident = me
841 > -be Sender host name explicitly set
842 > -oMa sender_host_address = V4NET.0.0.1
843 > sender_host_port = 1234
844 > -oMs sender_host_name = my.host.name
846 > be Sender host name lookup fails (V4NET.11.12.13 is not reverse registered)
847 > -oMs sender_host_name =
848 > host_lookup_failed = 1
850 > -be Sender host name and protocol set by Sendmail-compatible option
851 > -p received_protocol = special
852 > -p sender_host_name = host.name
854 > -be Sender host name and address etc, all set except host name
855 > -oMa sender_host_address = V4NET.0.0.1
856 > sender_host_port = 1234
857 > -oMaa sender_host_authenticated = AAA
858 > -oMai authenticated_id = philip
859 > -oMas authenticated_sender = xx@yy.zz
860 > -oMi interface_address = 1.1.1.1
861 > interface_port = 99
862 > -oMr received_protocol = special
863 > ----> No lookup yet: No
864 > -oMs sender_host_name = ten-1.test.ex
865 > -oMt sender_ident = me
868 **** SMTP testing session as if from host V4NET.0.0.1
869 **** but without any ident (RFC 1413) callback.
870 **** This is not for real!
872 550 Administrative prohibition
\r
874 **** SMTP testing session as if from host V4NET.0.0.2
875 **** but without any ident (RFC 1413) callback.
876 **** This is not for real!
878 550 Administrative prohibition
\r
880 **** SMTP testing session as if from host V4NET.0.0.0
881 **** but without any ident (RFC 1413) callback.
882 **** This is not for real!
884 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
887 354 Enter message, ending with "." on a line by itself
\r
888 550 reply_address=<>
\r
891 354 Enter message, ending with "." on a line by itself
\r
892 550 reply_address=<a@b>
\r
895 354 Enter message, ending with "." on a line by itself
\r
896 550 reply_address=<c@d>
\r
899 354 Enter message, ending with "." on a line by itself
\r
900 550 reply_address=<>
\r
903 354 Enter message, ending with "." on a line by itself
\r
904 550 reply_address=<x@y>
\r
905 221 myhost.test.ex closing connection
\r
907 **** SMTP testing session as if from host V4NET.0.0.0
908 **** but without any ident (RFC 1413) callback.
909 **** This is not for real!
911 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
914 354 Enter message, ending with "." on a line by itself
\r
915 550 reply_address=<>
\r
916 221 myhost.test.ex closing connection
\r
918 **** SMTP testing session as if from host V4NET.0.0.0
919 **** but without any ident (RFC 1413) callback.
920 **** This is not for real!
922 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
925 354 Enter message, ending with "." on a line by itself
\r
926 550 reply_address=<>
\r
927 221 myhost.test.ex closing connection
\r