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
67 > # Tests with iscntrl() and illegal separators
74 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "0+") inside "reduce" item
81 > Failed: missing or misplaced { or }
82 > Failed: missing or misplaced { or }
83 > Failed: error from acl "a_nosuch"
85 > acl: (1) [person@dom.ain] []
86 > acl: (2) [firstarg] [secondarg]
87 > acl: (1) [arg with spaces] []
91 > acl: (1) [person@dom.ain] []
92 > Failed: error from acl "a_defer"
93 > acl: (2) [new arg1] [top_arg_1]
94 > acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] []
96 > addrss: local-part@dom.ain
97 > addrss: local-part@dom.ain
101 > addresses: ''abc@xyz' ''pqr@xyz
102 > addresses: local-part@dom.ain
103 > addresses: local-part@dom.ain+xyz@abc
104 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
107 > escape: B7\267F2\362
114 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
118 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
119 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
125 > Failed: error in expression evaluation: expecting operator (after processing "0")
128 > Failed: error in expression evaluation: expecting operator (after processing "0")
142 > expand: $primary_hostname myhost.test.ex
143 > hash: jmg monty fbWx
144 > hash: abcX abX aX X
149 > Failed: "1a2b3c4d5e6" contains an odd number of characters
150 > Failed: "1a2b3c4d5e6g" is not a hex string
151 > hex2b64:MPPJPkZDbetYunCBao7BJA==
152 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
154 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
155 > environments. Write cunning tests that produce the same output in both cases,
156 > while doing a reasonable check.
161 > Failed: argument for base62 operator is "12345x", which is not a decimal number
162 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
164 > hmac: dd97e3ba5d1a61b5006108f8c8252953
165 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
166 > md5: 77add1d5f41223d5582fca736a5cb335
167 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
168 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
169 > mask: 192.168.10.192/28
170 > mask: 192.168.10.206/32
171 > Failed: mask value too big in "192.168.10.206/33"
173 > Failed: missing mask value in "192.168.10.206"
174 > Failed: "a.b.c.d" is not an IP address
176 > lc/uc: the quick BROWN FOX
177 > length: The quick abc
180 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
186 > quote_local_part: abcd
187 > quote_local_part: O'Reilly
188 > quote_local_part: "a space"
189 > quote_local_part: ".something"
190 > quote_local_part: "something."
191 > quote_local_part: joe.bloggs
192 > quote_local_part: a!b
193 > quote_local_part: "x@y"
194 > quote_local_part: ab*cd
195 > quote_local_part: "x:y"
196 > quote_local_part: "abcd\"ef"
197 > quote_local_part: ""
198 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
199 > 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
205 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
213 > Failed: string "14" is not an Exim time interval in "time_eval" operator
214 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
217 > time_interval: 1w4d13h46m39s
218 > Failed: string "-1" is not a positive number in "time_interval" operator
219 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
221 > # stat is a bit tricky, but some of the fields of the aux-var directory
222 > # should be the same on all systems
226 > Failed: stat(/a/non/existent/file) failed: No such file or directory
228 > # "Operators" that have expanded arguments
230 > hash: jmg monty fbWx
231 > hash: abcX abX aX X
233 > length: The quick abc
239 > Failed: missing or misplaced { or }
240 > Failed: "nonnumber" is not a number (in "hash" expansion)
241 > Failed: Too many arguments for "hash" (max is 3)
242 > Failed: "-2" is not a positive number (in "substr" expansion)
244 > # Skipped operators
254 > # Number suffixes in conditions
261 > # >32b should work, >64b not
265 > 4611686018427387904 y
266 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
296 > Failed: invalid integer "3z "
297 > Failed: integer expected but "a" found
307 > Failed: unknown variable "post" after "def:"
310 > Failed: missing or misplaced { or }
345 > isip: y fe80::a00:20ff:fe86:a061
346 > isip4: n fe80::a00:20ff:fe86:a061
347 > isip6: y fe80::a00:20ff:fe86:a061
355 > Failed: "if" failed and "fail" requested
364 > >x@zz.aa.bb< [] >x@zz.aa.bb<
366 > >x@xxxabc< [] >x@xxxabc<
371 > match_local_part:yes
372 > match_local_part:yes
384 > Failed: "somename" is not an IP address
393 > queue_running after or: y
394 > first_delivery after or: y
396 > # acl expansion condition
397 > acl if: Y:(0) [] []
398 > acl if: Y:(1) [argY] []
399 > acl if: N:(2) [argN] [arg2]
400 > Failed: error from acl "a_defer"
402 > # Default values for both if strings
404 > ${if eq{1}{1}} >true<
407 > # Lookups: DIR is the testing directory. In this test we can only use the
408 > # lookups that are required in all cases.
422 > Failed: "lookup" failed and "fail" requested
428 > q4: "a:b" abc continued data (make sure not key)
441 > a:b: lookup succeeded
447 > # Should give the same results as above because expansion does nothing
457 > a:b: lookup succeeded
459 > # Should fail because of no expansion
466 > # But these should succeed
471 > # Some tests of case-(in)dependence
473 > MiXeD-CD: Data found for case-dependent MiXeD-CD
474 > MixeD-CD: NOT FOUND
475 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
476 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
478 > # IP address (CIDR) lookups
480 > 1.2.3.4: data for 1.2.3.4
482 > 1.2.3.5: data for *
483 > abcd::cdab: data for abcd::cdab
484 > 192.168.1.2: data for 192.168.0.0/16
485 > 192.168.5.6: data for 192.168.0.0/16
486 > abcd:abcd:: data for abcd:abcd::/32
487 > abcd:abcd:1:: data for abcd:abcd::/32
488 > abcd:abcd::3 data for abcd:abcd::/32
489 > 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
492 > # Nested Lookups - style 1
494 > The data for key1->key2
495 > Failed: "lookup" failed and "fail" requested
497 > # Nested Lookups - style 2
499 > The data for key1->key2
502 > # Other nesting tests
506 > both-in-1,both-in-2
507 > Failed: "lookup" failed and "fail" requested
509 > # Lookup quotes for standardly expected lookups
511 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
512 > Failed: unknown lookup type "xxx"
528 > Failed: "extract" failed and "fail" requested
529 > Failed: "extract" failed and "fail" requested
540 > Failed: first argument of "extract" must not be empty
541 > Failed: first argument of "extract" must not be empty
546 > abcdea aaa xyz zbcdez
549 > abcdea abc z zzzdez
552 > "TrUe" true EXPECT: true
553 > "FALSE" false EXPECT: false
554 > " yes" true EXPECT: true
555 > " no" false EXPECT: false
556 > "yes " true EXPECT: true
557 > Failed: unrecognised boolean value "-1"
558 > "0" false EXPECT: false
559 > "1" true EXPECT: true
560 > " 0 " false EXPECT: false
561 > " 1 " true EXPECT: true
562 > "1111111111111111111" true EXPECT: true
563 > "9" true EXPECT: true
564 > " " false EXPECT: false
565 > Failed: unrecognised boolean value "text"
566 > Failed: unrecognised boolean value "text"
567 > Failed: unrecognised boolean value "text"
568 > Failed: unrecognised boolean value "text"
569 > "00" false EXPECT: false
570 > "!true" false EXPECT: false
571 > "!false" true EXPECT: true
573 > "TrUe" true EXPECT: true
574 > "FALSE" false EXPECT: false
575 > " yes" true EXPECT: true
576 > " no" false EXPECT: false
577 > "yes " true EXPECT: true
578 > "-1" true EXPECT: true
579 > "0" false EXPECT: false
580 > "1" true EXPECT: true
581 > " 0 " false EXPECT: false
582 > " 1 " true EXPECT: true
583 > "1111111111111111111" true EXPECT: true
584 > "9" true EXPECT: true
585 > " " false EXPECT: false
586 > "text" true EXPECT: true
587 > " text" true EXPECT: true
588 > "text " true EXPECT: true
589 > " text " true EXPECT: true
590 > "00" true EXPECT: true
591 > "!true" false EXPECT: false
592 > "!false" true EXPECT: true
597 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
598 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
599 > 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?=
600 > 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?=
606 > <:ab cd:> <:ab cd:>
607 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
608 > 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
618 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
619 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
620 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
621 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
622 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
623 > ${sg{abbab}{a*}{+}} =++b+b++b+
627 > Failed: missing or misplaced { or }
635 > abcde - 12345 - - xyz -
636 > Failed: failed to open /non/exist/file: No such file or directory
638 > >abcde!12345!!xyz!<
640 > # Calling a command
667 > prvs=xxxxxxxxxx=userx@test.ex
668 > prvs=xxxxxxxxxx=userx@test.ex
669 > prvs=xxxxxxxxxx=userx@test.ex
673 > Failed: prvs second argument must be a single digit
674 > Failed: prvs second argument must be a single digit
675 > Failed: prvs second argument must be a single digit
677 > # Correct checks; can't put explicit addresses in the tests, because they
678 > # will change over time.
683 > >1< >userx@test.ex< >1<
704 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
705 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
706 > Failed: missing } at end of string
707 > Failed: missing } at end of string
708 > Failed: hmac algorithm "xxx" is not recognised
709 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
710 > Failed: unknown condition "xya" inside "and{...}" condition
711 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
712 > Failed: missing } at end of string - could be header name not terminated by colon
713 > Failed: missing or misplaced { or }
714 > Failed: missing or misplaced { or } - could be header name not terminated by colon
715 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
716 > Failed: missing } at end of condition inside "or" group
717 > Failed: unknown condition "yes" inside "or{...}" condition
718 > Failed: non-digit after underscore in "substr_1_"
719 > Failed: non-digit after underscore in "substr__3"
721 > # Iterations: forany and forall
733 > Failed: unknown condition "yes" inside "forany" condition
734 > Failed: missing } at end of condition inside "forany"
747 > outer=yes item='' (unset)
752 > # Error inside nest - check message is helpful
753 > Failed: missing } at end of condition inside "forall" inside "forany" condition
756 > # Miscellaneous (for bug fixes, etc)
763 > primary_hostname: myhost.test.ex
765 > Failed: "if" failed and "fail" requested
769 > -oMa sender_host_address =
770 > sender_host_port = 0
771 > -oMaa sender_host_authenticated =
772 > -oMai authenticated_id = CALLER
773 > -oMas authenticated_sender = CALLER@myhost.test.ex
774 > -oMi interface_address =
775 > interface_port = -1
776 > -oMr received_protocol =
777 > -oMs sender_host_name =
778 > -oMt sender_ident = CALLER
780 > -oMa sender_host_address = V4NET.0.0.1
781 > sender_host_port = 1234
782 > -oMaa sender_host_authenticated = AAA
783 > -oMai authenticated_id = philip
784 > -oMas authenticated_sender = xx@yy.zz
785 > -oMi interface_address = 1.1.1.1
786 > interface_port = 99
787 > -oMr received_protocol = special
788 > -oMt sender_ident = me
790 > -oMa sender_host_address = V4NET.0.0.1
791 > sender_host_port = 1234
792 > -oMs sender_host_name = my.host.name
794 > -oMs sender_host_name =
795 > host_lookup_failed = 1
797 > -p received_protocol = special
798 > -p sender_host_name = host.name
800 > -oMa sender_host_address = V4NET.0.0.1
801 > sender_host_port = 1234
802 > -oMaa sender_host_authenticated = AAA
803 > -oMai authenticated_id = philip
804 > -oMas authenticated_sender = xx@yy.zz
805 > -oMi interface_address = 1.1.1.1
806 > interface_port = 99
807 > -oMr received_protocol = special
808 > ----> No lookup yet: No
809 > -oMs sender_host_name = ten-1.test.ex
810 > -oMt sender_ident = me
813 **** SMTP testing session as if from host V4NET.0.0.1
814 **** but without any ident (RFC 1413) callback.
815 **** This is not for real!
817 550 Administrative prohibition
\r
819 **** SMTP testing session as if from host V4NET.0.0.2
820 **** but without any ident (RFC 1413) callback.
821 **** This is not for real!
823 550 Administrative prohibition
\r
825 **** SMTP testing session as if from host V4NET.0.0.0
826 **** but without any ident (RFC 1413) callback.
827 **** This is not for real!
829 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
832 354 Enter message, ending with "." on a line by itself
\r
833 550 reply_address=<>
\r
836 354 Enter message, ending with "." on a line by itself
\r
837 550 reply_address=<a@b>
\r
840 354 Enter message, ending with "." on a line by itself
\r
841 550 reply_address=<c@d>
\r
844 354 Enter message, ending with "." on a line by itself
\r
845 550 reply_address=<>
\r
848 354 Enter message, ending with "." on a line by itself
\r
849 550 reply_address=<x@y>
\r
850 221 myhost.test.ex closing connection
\r
852 **** SMTP testing session as if from host V4NET.0.0.0
853 **** but without any ident (RFC 1413) callback.
854 **** This is not for real!
856 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
859 354 Enter message, ending with "." on a line by itself
\r
860 550 reply_address=<>
\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