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: acl "a_bad" did not accept
85 > acl: (1) [person@dom.ain] []
86 > acl: (2) [firstarg] [secondarg]
87 > acl: (1) [arg with spaces] []
90 > Failed: acl "a_deny" did not accept
91 > Failed: acl "a_deny" did not accept
92 > acl: (1) [1] [] (1) [2] [] (1) [3] [] (1) [4] []
94 > addrss: local-part@dom.ain
95 > addrss: local-part@dom.ain
99 > addresses: ''abc@xyz' ''pqr@xyz
100 > addresses: local-part@dom.ain
101 > addresses: local-part@dom.ain+xyz@abc
102 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
105 > escape: B7\267F2\362
112 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
116 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
117 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
123 > Failed: error in expression evaluation: expecting operator (after processing "0")
126 > Failed: error in expression evaluation: expecting operator (after processing "0")
140 > expand: $primary_hostname myhost.test.ex
141 > hash: jmg monty fbWx
142 > hash: abcX abX aX X
147 > Failed: "1a2b3c4d5e6" contains an odd number of characters
148 > Failed: "1a2b3c4d5e6g" is not a hex string
149 > hex2b64:MPPJPkZDbetYunCBao7BJA==
150 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
152 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
153 > environments. Write cunning tests that produce the same output in both cases,
154 > while doing a reasonable check.
159 > Failed: argument for base62 operator is "12345x", which is not a decimal number
160 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
162 > hmac: dd97e3ba5d1a61b5006108f8c8252953
163 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
164 > md5: 77add1d5f41223d5582fca736a5cb335
165 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
166 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
167 > mask: 192.168.10.192/28
168 > mask: 192.168.10.206/32
169 > Failed: mask value too big in "192.168.10.206/33"
171 > Failed: missing mask value in "192.168.10.206"
172 > Failed: "a.b.c.d" is not an IP address
174 > lc/uc: the quick BROWN FOX
175 > length: The quick abc
178 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
184 > quote_local_part: abcd
185 > quote_local_part: O'Reilly
186 > quote_local_part: "a space"
187 > quote_local_part: ".something"
188 > quote_local_part: "something."
189 > quote_local_part: joe.bloggs
190 > quote_local_part: a!b
191 > quote_local_part: "x@y"
192 > quote_local_part: ab*cd
193 > quote_local_part: "x:y"
194 > quote_local_part: "abcd\"ef"
195 > quote_local_part: ""
196 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
202 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
210 > Failed: string "14" is not an Exim time interval in "time_eval" operator
211 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
214 > time_interval: 1w4d13h46m39s
215 > Failed: string "-1" is not a positive number in "time_interval" operator
216 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
218 > # stat is a bit tricky, but some of the fields of the aux-var directory
219 > # should be the same on all systems
223 > Failed: stat(/a/non/existent/file) failed: No such file or directory
225 > # "Operators" that have expanded arguments
227 > hash: jmg monty fbWx
228 > hash: abcX abX aX X
230 > length: The quick abc
236 > Failed: missing or misplaced { or }
237 > Failed: "nonnumber" is not a number (in "hash" expansion)
238 > Failed: Too many arguments for "hash" (max is 3)
239 > Failed: "-2" is not a positive number (in "substr" expansion)
241 > # Skipped operators
251 > # Number suffixes in conditions
258 > # >32b should work, >64b not
262 > 4611686018427387904 y
263 > Failed: absolute value of integer "46116860184273879040" is too large (overflow)
293 > Failed: invalid integer "3z "
294 > Failed: integer expected but "a" found
304 > Failed: unknown variable "post" after "def:"
307 > Failed: missing or misplaced { or }
342 > isip: y fe80::a00:20ff:fe86:a061
343 > isip4: n fe80::a00:20ff:fe86:a061
344 > isip6: y fe80::a00:20ff:fe86:a061
352 > Failed: "if" failed and "fail" requested
361 > >x@zz.aa.bb< [] >x@zz.aa.bb<
363 > >x@xxxabc< [] >x@xxxabc<
368 > match_local_part:yes
369 > match_local_part:yes
381 > Failed: "somename" is not an IP address
390 > queue_running after or: y
391 > first_delivery after or: y
393 > # Default values for both if strings
395 > ${if eq{1}{1}} >true<
398 > # Lookups: DIR is the testing directory. In this test we can only use the
399 > # lookups that are required in all cases.
413 > Failed: "lookup" failed and "fail" requested
419 > q4: "a:b" abc continued data (make sure not key)
432 > a:b: lookup succeeded
438 > # Should give the same results as above because expansion does nothing
448 > a:b: lookup succeeded
450 > # Should fail because of no expansion
457 > # But these should succeed
462 > # Some tests of case-(in)dependence
464 > MiXeD-CD: Data found for case-dependent MiXeD-CD
465 > MixeD-CD: NOT FOUND
466 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
467 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
469 > # IP address (CIDR) lookups
471 > 1.2.3.4: data for 1.2.3.4
473 > 1.2.3.5: data for *
474 > abcd::cdab: data for abcd::cdab
475 > 192.168.1.2: data for 192.168.0.0/16
476 > 192.168.5.6: data for 192.168.0.0/16
477 > abcd:abcd:: data for abcd:abcd::/32
478 > abcd:abcd:1:: data for abcd:abcd::/32
479 > abcd:abcd::3 data for abcd:abcd::/32
480 > 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
483 > # Nested Lookups - style 1
485 > The data for key1->key2
486 > Failed: "lookup" failed and "fail" requested
488 > # Nested Lookups - style 2
490 > The data for key1->key2
493 > # Other nesting tests
497 > both-in-1,both-in-2
498 > Failed: "lookup" failed and "fail" requested
500 > # Lookup quotes for standardly expected lookups
502 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
503 > Failed: unknown lookup type "xxx"
519 > Failed: "extract" failed and "fail" requested
520 > Failed: "extract" failed and "fail" requested
531 > Failed: first argument of "extract" must not be empty
532 > Failed: first argument of "extract" must not be empty
537 > abcdea aaa xyz zbcdez
540 > abcdea abc z zzzdez
543 > "TrUe" true EXPECT: true
544 > "FALSE" false EXPECT: false
545 > " yes" true EXPECT: true
546 > " no" false EXPECT: false
547 > "yes " true EXPECT: true
548 > Failed: unrecognised boolean value "-1"
549 > "0" false EXPECT: false
550 > "1" true EXPECT: true
551 > " 0 " false EXPECT: false
552 > " 1 " true EXPECT: true
553 > "1111111111111111111" true EXPECT: true
554 > "9" true EXPECT: true
555 > " " false EXPECT: false
556 > Failed: unrecognised boolean value "text"
557 > Failed: unrecognised boolean value "text"
558 > Failed: unrecognised boolean value "text"
559 > Failed: unrecognised boolean value "text"
560 > "00" false EXPECT: false
561 > "!true" false EXPECT: false
562 > "!false" true EXPECT: true
564 > "TrUe" true EXPECT: true
565 > "FALSE" false EXPECT: false
566 > " yes" true EXPECT: true
567 > " no" false EXPECT: false
568 > "yes " true EXPECT: true
569 > "-1" true EXPECT: true
570 > "0" false EXPECT: false
571 > "1" true EXPECT: true
572 > " 0 " false EXPECT: false
573 > " 1 " true EXPECT: true
574 > "1111111111111111111" true EXPECT: true
575 > "9" true EXPECT: true
576 > " " false EXPECT: false
577 > "text" true EXPECT: true
578 > " text" true EXPECT: true
579 > "text " true EXPECT: true
580 > " text " true EXPECT: true
581 > "00" true EXPECT: true
582 > "!true" false EXPECT: false
583 > "!false" true EXPECT: true
588 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
589 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
590 > 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?=
591 > 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?=
597 > <:ab cd:> <:ab cd:>
598 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
599 > 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
609 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
610 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
611 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
612 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
613 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
614 > ${sg{abbab}{a*}{+}} =++b+b++b+
618 > Failed: missing or misplaced { or }
626 > abcde - 12345 - - xyz -
627 > Failed: failed to open /non/exist/file: No such file or directory
629 > >abcde!12345!!xyz!<
631 > # Calling a command
658 > prvs=xxxxxxxxxx=userx@test.ex
659 > prvs=xxxxxxxxxx=userx@test.ex
660 > prvs=xxxxxxxxxx=userx@test.ex
664 > Failed: prvs second argument must be a single digit
665 > Failed: prvs second argument must be a single digit
666 > Failed: prvs second argument must be a single digit
668 > # Correct checks; can't put explicit addresses in the tests, because they
669 > # will change over time.
674 > >1< >userx@test.ex< >1<
695 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
696 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
697 > Failed: missing } at end of string
698 > Failed: missing } at end of string
699 > Failed: hmac algorithm "xxx" is not recognised
700 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
701 > Failed: unknown condition "xya" inside "and{...}" condition
702 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
703 > Failed: missing } at end of string - could be header name not terminated by colon
704 > Failed: missing or misplaced { or }
705 > Failed: missing or misplaced { or } - could be header name not terminated by colon
706 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
707 > Failed: missing } at end of condition inside "or" group
708 > Failed: unknown condition "yes" inside "or{...}" condition
709 > Failed: non-digit after underscore in "substr_1_"
710 > Failed: non-digit after underscore in "substr__3"
712 > # Iterations: forany and forall
724 > Failed: unknown condition "yes" inside "forany" condition
725 > Failed: missing } at end of condition inside "forany"
738 > outer=yes item='' (unset)
743 > # Error inside nest - check message is helpful
744 > Failed: missing } at end of condition inside "forall" inside "forany" condition
747 > # Miscellaneous (for bug fixes, etc)
754 > primary_hostname: myhost.test.ex
756 > Failed: "if" failed and "fail" requested
760 > -oMa sender_host_address =
761 > sender_host_port = 0
762 > -oMaa sender_host_authenticated =
763 > -oMai authenticated_id = CALLER
764 > -oMas authenticated_sender = CALLER@myhost.test.ex
765 > -oMi interface_address =
766 > interface_port = -1
767 > -oMr received_protocol =
768 > -oMs sender_host_name =
769 > -oMt sender_ident = CALLER
771 > -oMa sender_host_address = V4NET.0.0.1
772 > sender_host_port = 1234
773 > -oMaa sender_host_authenticated = AAA
774 > -oMai authenticated_id = philip
775 > -oMas authenticated_sender = xx@yy.zz
776 > -oMi interface_address = 1.1.1.1
777 > interface_port = 99
778 > -oMr received_protocol = special
779 > -oMt sender_ident = me
781 > -oMa sender_host_address = V4NET.0.0.1
782 > sender_host_port = 1234
783 > -oMs sender_host_name = my.host.name
785 > -oMs sender_host_name =
786 > host_lookup_failed = 1
788 > -p received_protocol = special
789 > -p sender_host_name = host.name
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 > ----> No lookup yet: No
800 > -oMs sender_host_name = ten-1.test.ex
801 > -oMt sender_ident = me
804 **** SMTP testing session as if from host V4NET.0.0.1
805 **** but without any ident (RFC 1413) callback.
806 **** This is not for real!
808 550 Administrative prohibition
\r
810 **** SMTP testing session as if from host V4NET.0.0.2
811 **** but without any ident (RFC 1413) callback.
812 **** This is not for real!
814 550 Administrative prohibition
\r
816 **** SMTP testing session as if from host V4NET.0.0.0
817 **** but without any ident (RFC 1413) callback.
818 **** This is not for real!
820 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
823 354 Enter message, ending with "." on a line by itself
\r
824 550 reply_address=<>
\r
827 354 Enter message, ending with "." on a line by itself
\r
828 550 reply_address=<a@b>
\r
831 354 Enter message, ending with "." on a line by itself
\r
832 550 reply_address=<c@d>
\r
835 354 Enter message, ending with "." on a line by itself
\r
836 550 reply_address=<>
\r
839 354 Enter message, ending with "." on a line by itself
\r
840 550 reply_address=<x@y>
\r
841 221 myhost.test.ex closing connection
\r
843 **** SMTP testing session as if from host V4NET.0.0.0
844 **** but without any ident (RFC 1413) callback.
845 **** This is not for real!
847 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
850 354 Enter message, ending with "." on a line by itself
\r
851 550 reply_address=<>
\r
852 221 myhost.test.ex closing connection
\r
854 **** SMTP testing session as if from host V4NET.0.0.0
855 **** but without any ident (RFC 1413) callback.
856 **** This is not for real!
858 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
861 354 Enter message, ending with "." on a line by itself
\r
862 550 reply_address=<>
\r
863 221 myhost.test.ex closing connection
\r