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
316 > Failed: unknown variable "post" after "def:"
319 > Failed: missing or misplaced { or }
354 > isip: y fe80::a00:20ff:fe86:a061
355 > isip4: n fe80::a00:20ff:fe86:a061
356 > isip6: y fe80::a00:20ff:fe86:a061
364 > Failed: "if" failed and "fail" requested
373 > >x@zz.aa.bb< [] >x@zz.aa.bb<
375 > >x@xxxabc< [] >x@xxxabc<
380 > match_local_part:yes
381 > match_local_part:yes
393 > Failed: "somename" is not an IP address
402 > queue_running after or: y
403 > first_delivery after or: y
405 > # acl expansion condition
406 > acl if: Y:(0) [] []
407 > acl if: Y:(1) [argY] []
408 > acl if: N:(2) [argN] [arg2]
409 > Failed: error from acl "a_defer"
411 > # Default values for both if strings
413 > ${if eq{1}{1}} >true<
416 > # Lookups: DIR is the testing directory. In this test we can only use the
417 > # lookups that are required in all cases.
431 > Failed: "lookup" failed and "fail" requested
437 > q4: "a:b" abc continued data (make sure not key)
450 > a:b: lookup succeeded
456 > # Should give the same results as above because expansion does nothing
466 > a:b: lookup succeeded
468 > # Should fail because of no expansion
475 > # But these should succeed
480 > # Some tests of case-(in)dependence
482 > MiXeD-CD: Data found for case-dependent MiXeD-CD
483 > MixeD-CD: NOT FOUND
484 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
485 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
487 > # IP address (CIDR) lookups
489 > 1.2.3.4: data for 1.2.3.4
491 > 1.2.3.5: data for *
492 > abcd::cdab: data for abcd::cdab
493 > 192.168.1.2: data for 192.168.0.0/16
494 > 192.168.5.6: data for 192.168.0.0/16
495 > abcd:abcd:: data for abcd:abcd::/32
496 > abcd:abcd:1:: data for abcd:abcd::/32
497 > abcd:abcd::3 data for abcd:abcd::/32
498 > 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
501 > # Nested Lookups - style 1
503 > The data for key1->key2
504 > Failed: "lookup" failed and "fail" requested
506 > # Nested Lookups - style 2
508 > The data for key1->key2
511 > # Other nesting tests
515 > both-in-1,both-in-2
516 > Failed: "lookup" failed and "fail" requested
518 > # Lookup quotes for standardly expected lookups
520 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
521 > Failed: unknown lookup type "xxx"
537 > Failed: "extract" failed and "fail" requested
538 > Failed: "extract" failed and "fail" requested
549 > Failed: first argument of "extract" must not be empty
550 > Failed: first argument of "extract" must not be empty
555 > abcdea aaa xyz zbcdez
558 > abcdea abc z zzzdez
561 > "TrUe" true EXPECT: true
562 > "FALSE" false EXPECT: false
563 > " yes" true EXPECT: true
564 > " no" false EXPECT: false
565 > "yes " true EXPECT: true
566 > "-1" true EXPECT: true
567 > "0" false EXPECT: false
568 > "1" true EXPECT: true
569 > " 0 " false EXPECT: false
570 > " 1 " true EXPECT: true
571 > "1111111111111111111" true EXPECT: true
572 > "9" true EXPECT: true
573 > " " false EXPECT: false
574 > Failed: unrecognised boolean value "text"
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 > "00" false EXPECT: false
580 > "!true" false EXPECT: false
581 > "!false" true EXPECT: true
583 > "TrUe" true EXPECT: true
584 > "FALSE" false EXPECT: false
585 > " yes" true EXPECT: true
586 > " no" false EXPECT: false
587 > "yes " true EXPECT: true
588 > "-1" true EXPECT: true
589 > "0" false EXPECT: false
590 > "1" true EXPECT: true
591 > " 0 " false EXPECT: false
592 > " 1 " true EXPECT: true
593 > "1111111111111111111" true EXPECT: true
594 > "9" true EXPECT: true
595 > " " false EXPECT: false
596 > "text" true EXPECT: true
597 > " text" true EXPECT: true
598 > "text " true EXPECT: true
599 > " text " true EXPECT: true
600 > "00" true EXPECT: true
601 > "!true" false EXPECT: false
602 > "!false" true EXPECT: true
607 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
608 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
609 > 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?=
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_by_a_long_way=3B_in?= =?iso-8859-8?Q?_fact_this_one_will_go_over_the_150_character_limit?=
616 > <:ab cd:> <:ab cd:>
617 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
618 > 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
628 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
629 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
630 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
631 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
632 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
633 > ${sg{abbab}{a*}{+}} =++b+b++b+
637 > Failed: missing or misplaced { or }
645 > abcde - 12345 - - xyz -
646 > Failed: failed to open /non/exist/file: No such file or directory
648 > >abcde!12345!!xyz!<
650 > # Calling a command
677 > prvs=xxxxxxxxxx=userx@test.ex
678 > prvs=xxxxxxxxxx=userx@test.ex
679 > prvs=xxxxxxxxxx=userx@test.ex
683 > Failed: prvs second argument must be a single digit
684 > Failed: prvs second argument must be a single digit
685 > Failed: prvs second argument must be a single digit
687 > # Correct checks; can't put explicit addresses in the tests, because they
688 > # will change over time.
693 > >1< >userx@test.ex< >1<
714 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
715 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
716 > Failed: missing } at end of string
717 > Failed: missing } at end of string
718 > Failed: hmac algorithm "xxx" is not recognised
719 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
720 > Failed: unknown condition "xya" inside "and{...}" condition
721 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
722 > Failed: missing } at end of string - could be header name not terminated by colon
723 > Failed: missing or misplaced { or }
724 > Failed: missing or misplaced { or } - could be header name not terminated by colon
725 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
726 > Failed: missing } at end of condition inside "or" group
727 > Failed: unknown condition "yes" inside "or{...}" condition
728 > Failed: non-digit after underscore in "substr_1_"
729 > Failed: non-digit after underscore in "substr__3"
731 > # Iterations: forany and forall
743 > Failed: unknown condition "yes" inside "forany" condition
744 > Failed: missing } at end of condition inside "forany"
757 > outer=yes item='' (unset)
762 > # Error inside nest - check message is helpful
763 > Failed: missing } at end of condition inside "forall" inside "forany" condition
766 > # Miscellaneous (for bug fixes, etc)
773 > primary_hostname: myhost.test.ex
775 > Failed: "if" failed and "fail" requested
779 > -oMa sender_host_address =
780 > sender_host_port = 0
781 > -oMaa sender_host_authenticated =
782 > -oMai authenticated_id = CALLER
783 > -oMas authenticated_sender = CALLER@myhost.test.ex
784 > -oMi interface_address =
785 > interface_port = -1
786 > -oMr received_protocol =
787 > -oMs sender_host_name =
788 > -oMt sender_ident = CALLER
790 > -oMa sender_host_address = V4NET.0.0.1
791 > sender_host_port = 1234
792 > -oMaa sender_host_authenticated = AAA
793 > -oMai authenticated_id = philip
794 > -oMas authenticated_sender = xx@yy.zz
795 > -oMi interface_address = 1.1.1.1
796 > interface_port = 99
797 > -oMr received_protocol = special
798 > -oMt sender_ident = me
800 > -oMa sender_host_address = V4NET.0.0.1
801 > sender_host_port = 1234
802 > -oMs sender_host_name = my.host.name
804 > -oMs sender_host_name =
805 > host_lookup_failed = 1
807 > -p received_protocol = special
808 > -p sender_host_name = host.name
810 > -oMa sender_host_address = V4NET.0.0.1
811 > sender_host_port = 1234
812 > -oMaa sender_host_authenticated = AAA
813 > -oMai authenticated_id = philip
814 > -oMas authenticated_sender = xx@yy.zz
815 > -oMi interface_address = 1.1.1.1
816 > interface_port = 99
817 > -oMr received_protocol = special
818 > ----> No lookup yet: No
819 > -oMs sender_host_name = ten-1.test.ex
820 > -oMt sender_ident = me
823 **** SMTP testing session as if from host V4NET.0.0.1
824 **** but without any ident (RFC 1413) callback.
825 **** This is not for real!
827 550 Administrative prohibition
\r
829 **** SMTP testing session as if from host V4NET.0.0.2
830 **** but without any ident (RFC 1413) callback.
831 **** This is not for real!
833 550 Administrative prohibition
\r
835 **** SMTP testing session as if from host V4NET.0.0.0
836 **** but without any ident (RFC 1413) callback.
837 **** This is not for real!
839 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
842 354 Enter message, ending with "." on a line by itself
\r
843 550 reply_address=<>
\r
846 354 Enter message, ending with "." on a line by itself
\r
847 550 reply_address=<a@b>
\r
850 354 Enter message, ending with "." on a line by itself
\r
851 550 reply_address=<c@d>
\r
854 354 Enter message, ending with "." on a line by itself
\r
855 550 reply_address=<>
\r
858 354 Enter message, ending with "." on a line by itself
\r
859 550 reply_address=<x@y>
\r
860 221 myhost.test.ex closing connection
\r
862 **** SMTP testing session as if from host V4NET.0.0.0
863 **** but without any ident (RFC 1413) callback.
864 **** This is not for real!
866 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
869 354 Enter message, ending with "." on a line by itself
\r
870 550 reply_address=<>
\r
871 221 myhost.test.ex closing connection
\r
873 **** SMTP testing session as if from host V4NET.0.0.0
874 **** but without any ident (RFC 1413) callback.
875 **** This is not for real!
877 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
880 354 Enter message, ending with "." on a line by itself
\r
881 550 reply_address=<>
\r
882 221 myhost.test.ex closing connection
\r