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
9 > primary_hostname: myhost.test.ex
10 > primary_hostname: myhost.test.ex
11 > qualify_domain: myhost.test.ex
12 > bounce_return_size_limit: 102400
13 > spool_directory: TESTSUITE/spool
14 > Failed: unknown variable in "${unknown}"
15 > h_subject: (should be empty)
16 > h_subject: (should be empty)
17 > Failed: unknown expansion operator "header_subject"
19 > # $message_headers should be empty
26 > # Overlong names and overbig numbers
28 > Failed: unknown variable name "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
29 > Failed: unknown variable in "${aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}"
43 > map: ::a::: ::b::: ::c::
52 > listnamed: *.aa.bb : ^\Nxxx(.*)
53 > listnamed: *.aa.bb : ^\Nxxx(.*)
54 > listnamed: V4NET.11.12.13 : iplsearch;TESTSUITE/aux-fixed/0002.iplsearch
55 > listnamed: *.aa.bb : ^\Nxxx(.*) : ;;
56 > listnamed: a : b;c : *.aa.bb : ^\Nxxx(.*) : ;; : 2001::630::212::8::204::::b664
57 > Failed: "nolist" is not a named list
58 > listnamed: *.aa.bb : ^\Nxxx(.*)
59 > Failed: "hlist" is not a domain named list
60 > Failed: bad suffix on "list" operator
72 > Failed: "extract" failed and "fail" requested
74 > # Tests with iscntrl() and illegal separators
81 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "0+") inside "reduce" item
88 > Failed: missing or misplaced { or }
89 > Failed: missing or misplaced { or }
90 > Failed: error from acl "a_nosuch"
92 > acl: (1) [person@dom.ain] []
93 > acl: (2) [firstarg] [secondarg]
94 > acl: (1) [arg with spaces] []
98 > acl: (1) [person@dom.ain] []
99 > Failed: error from acl "a_defer"
100 > acl: (2) [new arg1] [top_arg_1]
101 > acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] []
103 > addrss: local-part@dom.ain
104 > addrss: local-part@dom.ain
108 > addresses: ''abc@xyz' ''pqr@xyz
109 > addresses: local-part@dom.ain
110 > addresses: local-part@dom.ain+xyz@abc
111 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
114 > escape: B7\267F2\362
121 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
125 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
126 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
132 > Failed: error in expression evaluation: expecting operator (after processing "0")
135 > Failed: error in expression evaluation: expecting operator (after processing "0")
149 > expand: $primary_hostname myhost.test.ex
150 > hash: jmg monty fbWx
151 > hash: abcX abX aX X
156 > Failed: "1a2b3c4d5e6" contains an odd number of characters
157 > Failed: "1a2b3c4d5e6g" is not a hex string
158 > hex2b64:MPPJPkZDbetYunCBao7BJA==
159 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
161 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
162 > environments. Write cunning tests that produce the same output in both cases,
163 > while doing a reasonable check.
168 > Failed: argument for base62 operator is "12345x", which is not a decimal number
169 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
171 > hmac: dd97e3ba5d1a61b5006108f8c8252953
172 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
173 > md5: 77add1d5f41223d5582fca736a5cb335
174 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
175 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
176 > mask: 192.168.10.192/28
177 > mask: 192.168.10.206/32
178 > Failed: mask value too big in "192.168.10.206/33"
180 > Failed: missing mask value in "192.168.10.206"
181 > Failed: "a.b.c.d" is not an IP address
183 > lc/uc: the quick BROWN FOX
184 > length: The quick abc
187 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
193 > quote_local_part: abcd
194 > quote_local_part: O'Reilly
195 > quote_local_part: "a space"
196 > quote_local_part: ".something"
197 > quote_local_part: "something."
198 > quote_local_part: joe.bloggs
199 > quote_local_part: a!b
200 > quote_local_part: "x@y"
201 > quote_local_part: ab*cd
202 > quote_local_part: "x:y"
203 > quote_local_part: "abcd\"ef"
204 > quote_local_part: ""
205 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
206 > 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
212 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
220 > Failed: string "14" is not an Exim time interval in "time_eval" operator
221 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
224 > time_interval: 1w4d13h46m39s
225 > Failed: string "-1" is not a positive number in "time_interval" operator
226 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
228 > # stat is a bit tricky, but some of the fields of the aux-var directory
229 > # should be the same on all systems
233 > Failed: stat(/a/non/existent/file) failed: No such file or directory
235 > # "Operators" that have expanded arguments
237 > hash: jmg monty fbWx
238 > hash: abcX abX aX X
240 > length: The quick abc
246 > Failed: missing or misplaced { or }
247 > Failed: "nonnumber" is not a number (in "hash" expansion)
248 > Failed: Too many arguments for "hash" (max is 3)
249 > Failed: "-2" is not a positive number (in "substr" expansion)
251 > # Skipped operators
261 > # Number suffixes in conditions
268 > # >32b should work, >64b not
274 > 1 > 4611686018427387904 n
275 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
305 > Failed: invalid integer "3z "
306 > Failed: integer expected but "a" found
307 > Failed: integer expected but "${substr_2_2:65535}" found
317 > Failed: unknown variable "post" after "def:"
320 > Failed: missing or misplaced { or }
355 > isip: y fe80::a00:20ff:fe86:a061
356 > isip4: n fe80::a00:20ff:fe86:a061
357 > isip6: y fe80::a00:20ff:fe86:a061
365 > Failed: "if" failed and "fail" requested
374 > >x@zz.aa.bb< [] >x@zz.aa.bb<
376 > >x@xxxabc< [] >x@xxxabc<
381 > match_local_part:yes
382 > match_local_part:yes
394 > Failed: "somename" is not an IP address
403 > queue_running after or: y
404 > first_delivery after or: y
406 > # acl expansion condition
407 > acl if: Y:(0) [] []
408 > acl if: Y:(1) [argY] []
409 > acl if: N:(2) [argN] [arg2]
410 > Failed: error from acl "a_defer"
412 > # Default values for both if strings
414 > ${if eq{1}{1}} >true<
417 > # Lookups: DIR is the testing directory. In this test we can only use the
418 > # lookups that are required in all cases.
432 > Failed: "lookup" failed and "fail" requested
438 > q4: "a:b" abc continued data (make sure not key)
451 > a:b: lookup succeeded
457 > # Should give the same results as above because expansion does nothing
467 > a:b: lookup succeeded
469 > # Should fail because of no expansion
476 > # But these should succeed
481 > # Some tests of case-(in)dependence
483 > MiXeD-CD: Data found for case-dependent MiXeD-CD
484 > MixeD-CD: NOT FOUND
485 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
486 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
488 > # IP address (CIDR) lookups
490 > 1.2.3.4: data for 1.2.3.4
492 > 1.2.3.5: data for *
493 > abcd::cdab: data for abcd::cdab
494 > 192.168.1.2: data for 192.168.0.0/16
495 > 192.168.5.6: data for 192.168.0.0/16
496 > abcd:abcd:: data for abcd:abcd::/32
497 > abcd:abcd:1:: data for abcd:abcd::/32
498 > abcd:abcd::3 data for abcd:abcd::/32
499 > 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
502 > # Nested Lookups - style 1
504 > The data for key1->key2
505 > Failed: "lookup" failed and "fail" requested
507 > # Nested Lookups - style 2
509 > The data for key1->key2
512 > # Other nesting tests
516 > both-in-1,both-in-2
517 > Failed: "lookup" failed and "fail" requested
519 > # Lookup quotes for standardly expected lookups
521 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
522 > Failed: unknown lookup type "xxx"
538 > Failed: "extract" failed and "fail" requested
539 > Failed: "extract" failed and "fail" requested
550 > Failed: first argument of "extract" must not be empty
551 > Failed: first argument of "extract" must not be empty
556 > abcdea aaa xyz zbcdez
559 > abcdea abc z zzzdez
562 > "TrUe" true EXPECT: true
563 > "FALSE" false EXPECT: false
564 > " yes" true EXPECT: true
565 > " no" false EXPECT: false
566 > "yes " true EXPECT: true
567 > "-1" true EXPECT: true
568 > "0" false EXPECT: false
569 > "1" true EXPECT: true
570 > " 0 " false EXPECT: false
571 > " 1 " true EXPECT: true
572 > "1111111111111111111" true EXPECT: true
573 > "9" true EXPECT: true
574 > " " false EXPECT: false
575 > Failed: unrecognised boolean value "text"
576 > Failed: unrecognised boolean value "text"
577 > Failed: unrecognised boolean value "-text"
578 > Failed: unrecognised boolean value "text"
579 > Failed: unrecognised boolean value "text"
580 > "00" false EXPECT: false
581 > "!true" false EXPECT: false
582 > "!false" true EXPECT: true
584 > "TrUe" true EXPECT: true
585 > "FALSE" false EXPECT: false
586 > " yes" true EXPECT: true
587 > " no" false EXPECT: false
588 > "yes " true EXPECT: true
589 > "-1" true EXPECT: true
590 > "0" false EXPECT: false
591 > "1" true EXPECT: true
592 > " 0 " false EXPECT: false
593 > " 1 " true EXPECT: true
594 > "1111111111111111111" true EXPECT: true
595 > "9" true EXPECT: true
596 > " " false EXPECT: false
597 > "text" true EXPECT: true
598 > " text" true EXPECT: true
599 > "text " true EXPECT: true
600 > " text " true EXPECT: true
601 > "00" true EXPECT: true
602 > "!true" false EXPECT: false
603 > "!false" true EXPECT: true
608 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
609 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
610 > 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?=
611 > 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?=
617 > <:ab cd:> <:ab cd:>
618 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
619 > 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
629 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
630 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
631 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
632 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
633 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
634 > ${sg{abbab}{a*}{+}} =++b+b++b+
638 > Failed: missing or misplaced { or }
646 > abcde - 12345 - - xyz -
647 > Failed: failed to open /non/exist/file: No such file or directory
649 > >abcde!12345!!xyz!<
651 > # Calling a command
678 > prvs=xxxxxxxxxx=userx@test.ex
679 > prvs=xxxxxxxxxx=userx@test.ex
680 > prvs=xxxxxxxxxx=userx@test.ex
684 > Failed: prvs second argument must be a single digit
685 > Failed: prvs second argument must be a single digit
686 > Failed: prvs second argument must be a single digit
688 > # Correct checks; can't put explicit addresses in the tests, because they
689 > # will change over time.
694 > >1< >userx@test.ex< >1<
715 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
716 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
717 > Failed: missing } at end of string
718 > Failed: missing } at end of string
719 > Failed: hmac algorithm "xxx" is not recognised
720 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
721 > Failed: unknown condition "xya" inside "and{...}" condition
722 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
723 > Failed: missing } at end of string - could be header name not terminated by colon
724 > Failed: missing or misplaced { or }
725 > Failed: missing or misplaced { or } - could be header name not terminated by colon
726 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
727 > Failed: missing } at end of condition inside "or" group
728 > Failed: unknown condition "yes" inside "or{...}" condition
729 > Failed: non-digit after underscore in "substr_1_"
730 > Failed: non-digit after underscore in "substr__3"
732 > # Iterations: forany and forall
744 > Failed: unknown condition "yes" inside "forany" condition
745 > Failed: missing } at end of condition inside "forany"
758 > outer=yes item='' (unset)
763 > # Error inside nest - check message is helpful
764 > Failed: missing } at end of condition inside "forall" inside "forany" condition
767 > # Miscellaneous (for bug fixes, etc)
774 > primary_hostname: myhost.test.ex
776 > Failed: "if" failed and "fail" requested
780 > -oMa sender_host_address =
781 > sender_host_port = 0
782 > -oMaa sender_host_authenticated =
783 > -oMai authenticated_id = CALLER
784 > -oMas authenticated_sender = CALLER@myhost.test.ex
785 > -oMi interface_address =
786 > interface_port = -1
787 > -oMr received_protocol =
788 > -oMs sender_host_name =
789 > -oMt sender_ident = CALLER
791 > -oMa sender_host_address = V4NET.0.0.1
792 > sender_host_port = 1234
793 > -oMaa sender_host_authenticated = AAA
794 > -oMai authenticated_id = philip
795 > -oMas authenticated_sender = xx@yy.zz
796 > -oMi interface_address = 1.1.1.1
797 > interface_port = 99
798 > -oMr received_protocol = special
799 > -oMt sender_ident = me
801 > -oMa sender_host_address = V4NET.0.0.1
802 > sender_host_port = 1234
803 > -oMs sender_host_name = my.host.name
805 > -oMs sender_host_name =
806 > host_lookup_failed = 1
808 > -p received_protocol = special
809 > -p sender_host_name = host.name
811 > -oMa sender_host_address = V4NET.0.0.1
812 > sender_host_port = 1234
813 > -oMaa sender_host_authenticated = AAA
814 > -oMai authenticated_id = philip
815 > -oMas authenticated_sender = xx@yy.zz
816 > -oMi interface_address = 1.1.1.1
817 > interface_port = 99
818 > -oMr received_protocol = special
819 > ----> No lookup yet: No
820 > -oMs sender_host_name = ten-1.test.ex
821 > -oMt sender_ident = me
824 **** SMTP testing session as if from host V4NET.0.0.1
825 **** but without any ident (RFC 1413) callback.
826 **** This is not for real!
828 550 Administrative prohibition
\r
830 **** SMTP testing session as if from host V4NET.0.0.2
831 **** but without any ident (RFC 1413) callback.
832 **** This is not for real!
834 550 Administrative prohibition
\r
836 **** SMTP testing session as if from host V4NET.0.0.0
837 **** but without any ident (RFC 1413) callback.
838 **** This is not for real!
840 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
843 354 Enter message, ending with "." on a line by itself
\r
844 550 reply_address=<>
\r
847 354 Enter message, ending with "." on a line by itself
\r
848 550 reply_address=<a@b>
\r
851 354 Enter message, ending with "." on a line by itself
\r
852 550 reply_address=<c@d>
\r
855 354 Enter message, ending with "." on a line by itself
\r
856 550 reply_address=<>
\r
859 354 Enter message, ending with "." on a line by itself
\r
860 550 reply_address=<x@y>
\r
861 221 myhost.test.ex closing connection
\r
863 **** SMTP testing session as if from host V4NET.0.0.0
864 **** but without any ident (RFC 1413) callback.
865 **** This is not for real!
867 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
870 354 Enter message, ending with "." on a line by itself
\r
871 550 reply_address=<>
\r
872 221 myhost.test.ex closing connection
\r
874 **** SMTP testing session as if from host V4NET.0.0.0
875 **** but without any ident (RFC 1413) callback.
876 **** This is not for real!
878 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
881 354 Enter message, ending with "." on a line by itself
\r
882 550 reply_address=<>
\r
883 221 myhost.test.ex closing connection
\r