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 > addrss: local-part@dom.ain
82 > addrss: local-part@dom.ain
86 > addresses: ''abc@xyz' ''pqr@xyz
87 > addresses: local-part@dom.ain
88 > addresses: local-part@dom.ain+xyz@abc
89 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
92 > escape: B7\267F2\362
99 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
103 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
104 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
110 > Failed: error in expression evaluation: expecting operator (after processing "0")
113 > Failed: error in expression evaluation: expecting operator (after processing "0")
127 > expand: $primary_hostname myhost.test.ex
128 > hash: jmg monty fbWx
129 > hash: abcX abX aX X
134 > Failed: "1a2b3c4d5e6" contains an odd number of characters
135 > Failed: "1a2b3c4d5e6g" is not a hex string
136 > hex2b64:MPPJPkZDbetYunCBao7BJA==
137 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
139 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
140 > environments. Write cunning tests that produce the same output in both cases,
141 > while doing a reasonable check.
146 > Failed: argument for base62 operator is "12345x", which is not a decimal number
147 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
149 > hmac: dd97e3ba5d1a61b5006108f8c8252953
150 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
151 > md5: 77add1d5f41223d5582fca736a5cb335
152 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
153 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
154 > mask: 192.168.10.192/28
155 > mask: 192.168.10.206/32
156 > Failed: mask value too big in "192.168.10.206/33"
158 > Failed: missing mask value in "192.168.10.206"
159 > Failed: "a.b.c.d" is not an IP address
161 > lc/uc: the quick BROWN FOX
162 > length: The quick abc
165 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
171 > quote_local_part: abcd
172 > quote_local_part: O'Reilly
173 > quote_local_part: "a space"
174 > quote_local_part: ".something"
175 > quote_local_part: "something."
176 > quote_local_part: joe.bloggs
177 > quote_local_part: a!b
178 > quote_local_part: "x@y"
179 > quote_local_part: ab*cd
180 > quote_local_part: "x:y"
181 > quote_local_part: "abcd\"ef"
182 > quote_local_part: ""
183 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
189 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
197 > Failed: string "14" is not an Exim time interval in "time_eval" operator
198 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
201 > time_interval: 1w4d13h46m39s
202 > Failed: string "-1" is not a positive number in "time_interval" operator
203 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
205 > # stat is a bit tricky, but some of the fields of the aux-var directory
206 > # should be the same on all systems
210 > Failed: stat(/a/non/existent/file) failed: No such file or directory
212 > # "Operators" that have expanded arguments
214 > hash: jmg monty fbWx
215 > hash: abcX abX aX X
217 > length: The quick abc
223 > Failed: missing or misplaced { or }
224 > Failed: "nonnumber" is not a number (in "hash" expansion)
225 > Failed: Too many arguments for "hash" (max is 3)
226 > Failed: "-2" is not a positive number (in "substr" expansion)
228 > # Skipped operators
238 > # Number suffixes in conditions
245 > # >32b should work, >64b not
249 > 4611686018427387904 y
250 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
280 > Failed: invalid integer "3z "
281 > Failed: integer expected but "a" found
291 > Failed: unknown variable "post" after "def:"
294 > Failed: missing or misplaced { or }
329 > isip: y fe80::a00:20ff:fe86:a061
330 > isip4: n fe80::a00:20ff:fe86:a061
331 > isip6: y fe80::a00:20ff:fe86:a061
339 > Failed: "if" failed and "fail" requested
348 > >x@zz.aa.bb< [] >x@zz.aa.bb<
350 > >x@xxxabc< [] >x@xxxabc<
355 > match_local_part:yes
356 > match_local_part:yes
368 > Failed: "somename" is not an IP address
377 > queue_running after or: y
378 > first_delivery after or: y
380 > # Default values for both if strings
382 > ${if eq{1}{1}} >true<
385 > # Lookups: DIR is the testing directory. In this test we can only use the
386 > # lookups that are required in all cases.
400 > Failed: "lookup" failed and "fail" requested
406 > q4: "a:b" abc continued data (make sure not key)
419 > a:b: lookup succeeded
425 > # Should give the same results as above because expansion does nothing
435 > a:b: lookup succeeded
437 > # Should fail because of no expansion
444 > # But these should succeed
449 > # Some tests of case-(in)dependence
451 > MiXeD-CD: Data found for case-dependent MiXeD-CD
452 > MixeD-CD: NOT FOUND
453 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
454 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
456 > # IP address (CIDR) lookups
458 > 1.2.3.4: data for 1.2.3.4
460 > 1.2.3.5: data for *
461 > abcd::cdab: data for abcd::cdab
462 > 192.168.1.2: data for 192.168.0.0/16
463 > 192.168.5.6: data for 192.168.0.0/16
464 > abcd:abcd:: data for abcd:abcd::/32
465 > abcd:abcd:1:: data for abcd:abcd::/32
466 > abcd:abcd::3 data for abcd:abcd::/32
467 > 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
470 > # Nested Lookups - style 1
472 > The data for key1->key2
473 > Failed: "lookup" failed and "fail" requested
475 > # Nested Lookups - style 2
477 > The data for key1->key2
480 > # Other nesting tests
484 > both-in-1,both-in-2
485 > Failed: "lookup" failed and "fail" requested
487 > # Lookup quotes for standardly expected lookups
489 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
490 > Failed: unknown lookup type "xxx"
506 > Failed: "extract" failed and "fail" requested
507 > Failed: "extract" failed and "fail" requested
518 > Failed: first argument of "extract" must not be empty
519 > Failed: first argument of "extract" must not be empty
524 > abcdea aaa xyz zbcdez
527 > abcdea abc z zzzdez
530 > "TrUe" true EXPECT: true
531 > "FALSE" false EXPECT: false
532 > " yes" true EXPECT: true
533 > " no" false EXPECT: false
534 > "yes " true EXPECT: true
535 > Failed: unrecognised boolean value "-1"
536 > "0" false EXPECT: false
537 > "1" true EXPECT: true
538 > " 0 " false EXPECT: false
539 > " 1 " true EXPECT: true
540 > "1111111111111111111" true EXPECT: true
541 > "9" true EXPECT: true
542 > " " false EXPECT: false
543 > Failed: unrecognised boolean value "text"
544 > Failed: unrecognised boolean value "text"
545 > Failed: unrecognised boolean value "text"
546 > Failed: unrecognised boolean value "text"
547 > "00" false EXPECT: false
548 > "!true" false EXPECT: false
549 > "!false" true EXPECT: true
551 > "TrUe" true EXPECT: true
552 > "FALSE" false EXPECT: false
553 > " yes" true EXPECT: true
554 > " no" false EXPECT: false
555 > "yes " true EXPECT: true
556 > "-1" true EXPECT: true
557 > "0" false EXPECT: false
558 > "1" true EXPECT: true
559 > " 0 " false EXPECT: false
560 > " 1 " true EXPECT: true
561 > "1111111111111111111" true EXPECT: true
562 > "9" true EXPECT: true
563 > " " false EXPECT: false
564 > "text" true EXPECT: true
565 > " text" true EXPECT: true
566 > "text " true EXPECT: true
567 > " text " true EXPECT: true
568 > "00" true EXPECT: true
569 > "!true" false EXPECT: false
570 > "!false" true EXPECT: true
575 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
576 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
577 > 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?=
578 > 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?=
584 > <:ab cd:> <:ab cd:>
585 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
586 > 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
596 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
597 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
598 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
599 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
600 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
601 > ${sg{abbab}{a*}{+}} =++b+b++b+
605 > Failed: missing or misplaced { or }
613 > abcde - 12345 - - xyz -
614 > Failed: failed to open /non/exist/file: No such file or directory
616 > >abcde!12345!!xyz!<
618 > # Calling a command
645 > prvs=xxxxxxxxxx=userx@test.ex
646 > prvs=xxxxxxxxxx=userx@test.ex
647 > prvs=xxxxxxxxxx=userx@test.ex
651 > Failed: prvs second argument must be a single digit
652 > Failed: prvs second argument must be a single digit
653 > Failed: prvs second argument must be a single digit
655 > # Correct checks; can't put explicit addresses in the tests, because they
656 > # will change over time.
661 > >1< >userx@test.ex< >1<
682 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
683 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
684 > Failed: missing } at end of string
685 > Failed: missing } at end of string
686 > Failed: hmac algorithm "xxx" is not recognised
687 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
688 > Failed: unknown condition "xya" inside "and{...}" condition
689 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
690 > Failed: missing } at end of string - could be header name not terminated by colon
691 > Failed: missing or misplaced { or }
692 > Failed: missing or misplaced { or } - could be header name not terminated by colon
693 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
694 > Failed: missing } at end of condition inside "or" group
695 > Failed: unknown condition "yes" inside "or{...}" condition
696 > Failed: non-digit after underscore in "substr_1_"
697 > Failed: non-digit after underscore in "substr__3"
699 > # Iterations: forany and forall
711 > Failed: unknown condition "yes" inside "forany" condition
712 > Failed: missing } at end of condition inside "forany"
725 > outer=yes item='' (unset)
730 > # Error inside nest - check message is helpful
731 > Failed: missing } at end of condition inside "forall" inside "forany" condition
734 > # Miscellaneous (for bug fixes, etc)
741 > primary_hostname: myhost.test.ex
743 > Failed: "if" failed and "fail" requested
747 > -oMa sender_host_address =
748 > sender_host_port = 0
749 > -oMaa sender_host_authenticated =
750 > -oMai authenticated_id = CALLER
751 > -oMas authenticated_sender = CALLER@myhost.test.ex
752 > -oMi interface_address =
753 > interface_port = -1
754 > -oMr received_protocol =
755 > -oMs sender_host_name =
756 > -oMt sender_ident = CALLER
758 > -oMa sender_host_address = V4NET.0.0.1
759 > sender_host_port = 1234
760 > -oMaa sender_host_authenticated = AAA
761 > -oMai authenticated_id = philip
762 > -oMas authenticated_sender = xx@yy.zz
763 > -oMi interface_address = 1.1.1.1
764 > interface_port = 99
765 > -oMr received_protocol = special
766 > -oMt sender_ident = me
768 > -oMa sender_host_address = V4NET.0.0.1
769 > sender_host_port = 1234
770 > -oMs sender_host_name = my.host.name
772 > -oMs sender_host_name =
773 > host_lookup_failed = 1
775 > -p received_protocol = special
776 > -p sender_host_name = host.name
778 > -oMa sender_host_address = V4NET.0.0.1
779 > sender_host_port = 1234
780 > -oMaa sender_host_authenticated = AAA
781 > -oMai authenticated_id = philip
782 > -oMas authenticated_sender = xx@yy.zz
783 > -oMi interface_address = 1.1.1.1
784 > interface_port = 99
785 > -oMr received_protocol = special
786 > ----> No lookup yet: No
787 > -oMs sender_host_name = ten-1.test.ex
788 > -oMt sender_ident = me
791 **** SMTP testing session as if from host V4NET.0.0.1
792 **** but without any ident (RFC 1413) callback.
793 **** This is not for real!
795 550 Administrative prohibition
\r
797 **** SMTP testing session as if from host V4NET.0.0.2
798 **** but without any ident (RFC 1413) callback.
799 **** This is not for real!
801 550 Administrative prohibition
\r
803 **** SMTP testing session as if from host V4NET.0.0.0
804 **** but without any ident (RFC 1413) callback.
805 **** This is not for real!
807 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
810 354 Enter message, ending with "." on a line by itself
\r
811 550 reply_address=<>
\r
814 354 Enter message, ending with "." on a line by itself
\r
815 550 reply_address=<a@b>
\r
818 354 Enter message, ending with "." on a line by itself
\r
819 550 reply_address=<c@d>
\r
822 354 Enter message, ending with "." on a line by itself
\r
823 550 reply_address=<>
\r
826 354 Enter message, ending with "." on a line by itself
\r
827 550 reply_address=<x@y>
\r
828 221 myhost.test.ex closing connection
\r
830 **** SMTP testing session as if from host V4NET.0.0.0
831 **** but without any ident (RFC 1413) callback.
832 **** This is not for real!
834 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
837 354 Enter message, ending with "." on a line by itself
\r
838 550 reply_address=<>
\r
839 221 myhost.test.ex closing connection
\r
841 **** SMTP testing session as if from host V4NET.0.0.0
842 **** but without any ident (RFC 1413) callback.
843 **** This is not for real!
845 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
848 354 Enter message, ending with "." on a line by itself
\r
849 550 reply_address=<>
\r
850 221 myhost.test.ex closing connection
\r