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::
54 > addrss: local-part@dom.ain
55 > addrss: local-part@dom.ain
59 > addresses: ''abc@xyz' ''pqr@xyz
60 > addresses: local-part@dom.ain
61 > addresses: local-part@dom.ain+xyz@abc
62 > addresses: local-part@dom.ain:xyz@abc:p@q:r@s
65 > escape: B7\267F2\362
72 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
76 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
77 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
83 > Failed: error in expression evaluation: expecting operator (after processing "0")
86 > Failed: error in expression evaluation: expecting operator (after processing "0")
100 > expand: $primary_hostname myhost.test.ex
101 > hash: jmg monty fbWx
102 > hash: abcX abX aX X
107 > Failed: "1a2b3c4d5e6" contains an odd number of characters
108 > Failed: "1a2b3c4d5e6g" is not a hex string
109 > hex2b64:MPPJPkZDbetYunCBao7BJA==
110 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
112 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
113 > environments. Write cunning tests that produce the same output in both cases,
114 > while doing a reasonable check.
119 > Failed: argument for base62 operator is "12345x", which is not a decimal number
120 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
122 > hmac: dd97e3ba5d1a61b5006108f8c8252953
123 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
124 > md5: 77add1d5f41223d5582fca736a5cb335
125 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
126 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
127 > mask: 192.168.10.192/28
128 > mask: 192.168.10.206/32
129 > Failed: mask value too big in "192.168.10.206/33"
131 > Failed: missing mask value in "192.168.10.206"
132 > Failed: "a.b.c.d" is not an IP address
134 > lc/uc: the quick BROWN FOX
135 > length: The quick abc
138 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
144 > quote_local_part: abcd
145 > quote_local_part: O'Reilly
146 > quote_local_part: "a space"
147 > quote_local_part: ".something"
148 > quote_local_part: "something."
149 > quote_local_part: joe.bloggs
150 > quote_local_part: a!b
151 > quote_local_part: "x@y"
152 > quote_local_part: ab*cd
153 > quote_local_part: "x:y"
154 > quote_local_part: "abcd\"ef"
155 > quote_local_part: ""
156 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
162 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
170 > Failed: string "14" is not an Exim time interval in "time_eval" operator
171 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
174 > time_interval: 1w4d13h46m39s
175 > Failed: string "-1" is not a positive number in "time_interval" operator
176 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
178 > # stat is a bit tricky, but some of the fields of the aux-var directory
179 > # should be the same on all systems
183 > Failed: stat(/a/non/existent/file) failed: No such file or directory
185 > # "Operators" that have expanded arguments
187 > hash: jmg monty fbWx
188 > hash: abcX abX aX X
190 > length: The quick abc
196 > Failed: missing or misplaced { or }
197 > Failed: "nonnumber" is not a number (in "hash" expansion)
198 > Failed: Too many arguments for "hash" (max is 3)
199 > Failed: "-2" is not a positive number (in "substr" expansion)
201 > # Skipped operators
213 > Failed: absolute value of integer "4096M" is too large (overflow)
214 > Failed: absolute value of integer "4096000000" is too large (overflow)
244 > Failed: invalid integer "3z "
245 > Failed: integer expected but "a" found
255 > Failed: unknown variable "post" after "def:"
258 > Failed: missing or misplaced { or }
293 > isip: y fe80::a00:20ff:fe86:a061
294 > isip4: n fe80::a00:20ff:fe86:a061
295 > isip6: y fe80::a00:20ff:fe86:a061
303 > Failed: "if" failed and "fail" requested
312 > >x@zz.aa.bb< [] >x@zz.aa.bb<
314 > >x@xxxabc< [] >x@xxxabc<
319 > match_local_part:yes
320 > match_local_part:yes
332 > Failed: "somename" is not an IP address
340 > queue_running after or: y
341 > first_delivery after or: y
343 > # Default values for both if strings
345 > ${if eq{1}{1}} >true<
348 > # Lookups: DIR is the testing directory. In this test we can only use the
349 > # lookups that are required in all cases.
363 > Failed: "lookup" failed and "fail" requested
369 > q4: "a:b" abc continued data (make sure not key)
382 > a:b: lookup succeeded
388 > # Should give the same results as above because expansion does nothing
398 > a:b: lookup succeeded
400 > # Should fail because of no expansion
407 > # But these should succeed
412 > # Some tests of case-(in)dependence
414 > MiXeD-CD: Data found for case-dependent MiXeD-CD
415 > MixeD-CD: NOT FOUND
416 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
417 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
419 > # IP address (CIDR) lookups
421 > 1.2.3.4: data for 1.2.3.4
423 > 1.2.3.5: data for *
424 > abcd::cdab: data for abcd::cdab
425 > 192.168.1.2: data for 192.168.0.0/16
426 > 192.168.5.6: data for 192.168.0.0/16
427 > abcd:abcd:: data for abcd:abcd::/32
428 > abcd:abcd:1:: data for abcd:abcd::/32
429 > abcd:abcd::3 data for abcd:abcd::/32
430 > 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
433 > # Nested Lookups - style 1
435 > The data for key1->key2
436 > Failed: "lookup" failed and "fail" requested
438 > # Nested Lookups - style 2
440 > The data for key1->key2
443 > # Other nesting tests
447 > both-in-1,both-in-2
448 > Failed: "lookup" failed and "fail" requested
450 > # Lookup quotes for standardly expected lookups
452 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
453 > Failed: unknown lookup type "xxx"
469 > Failed: "extract" failed and "fail" requested
470 > Failed: "extract" failed and "fail" requested
481 > Failed: first argument of "extract" must not be empty
482 > Failed: first argument of "extract" must not be empty
487 > abcdea aaa xyz zbcdez
490 > abcdea abc z zzzdez
495 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
496 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
497 > Long: =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_i?= =?iso-8859-8?Q?t_will_go_over_the_75-char_limit?=
498 > Long: =?iso-8859-8?Q?_here_we_go=3A_a_string_that_is_going_to_be_encoded=3A_i?= =?iso-8859-8?Q?t_will_go_over_the_75-char_limit_by_a_long_way=3B_in_fac?= =?iso-8859-8?Q?t_this_one_will_go_over_the_150_character_limit?=
504 > <:ab cd:> <:ab cd:>
505 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
506 > 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
516 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
517 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
518 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
519 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
520 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
521 > ${sg{abbab}{a*}{+}} =++b+b++b+
525 > Failed: missing or misplaced { or }
533 > abcde - 12345 - - xyz -
534 > Failed: failed to open /non/exist/file: No such file or directory
536 > >abcde!12345!!xyz!<
538 > # Calling a command
565 > prvs=userx/xxxxxxxxxx@test.ex
566 > prvs=userx/xxxxxxxxxx@test.ex
567 > prvs=userx/xxxxxxxxxx@test.ex
571 > Failed: prvs second argument must be a single digit
572 > Failed: prvs second argument must be a single digit
573 > Failed: prvs second argument must be a single digit
575 > # Correct checks; can't put explicit addresses in the tests, because they
576 > # will change over time.
581 > >1< >userx@test.ex< >1<
602 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
603 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
604 > Failed: missing } at end of string
605 > Failed: missing } at end of string
606 > Failed: hmac algorithm "xxx" is not recognised
607 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
608 > Failed: unknown condition "xya" inside "and{...}" condition
609 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
610 > Failed: missing } at end of string - could be header name not terminated by colon
611 > Failed: missing or misplaced { or }
612 > Failed: missing or misplaced { or } - could be header name not terminated by colon
613 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
614 > Failed: missing } at end of condition inside "or" group
615 > Failed: unknown condition "yes" inside "or{...}" condition
616 > Failed: non-digit after underscore in "substr_1_"
617 > Failed: non-digit after underscore in "substr__3"
619 > # Iterations: forany and forall
631 > Failed: unknown condition "yes" inside "forany" condition
632 > Failed: missing } at end of condition inside "forany"
645 > outer=yes item='' (unset)
650 > # Error inside nest - check message is helpful
651 > Failed: missing } at end of condition inside "forall" inside "forany" condition
654 > # Miscellaneous (for bug fixes, etc)
661 > primary_hostname: myhost.test.ex
663 > Failed: "if" failed and "fail" requested
667 > -oMa sender_host_address =
668 > sender_host_port = 0
669 > -oMaa sender_host_authenticated =
670 > -oMai authenticated_id = CALLER
671 > -oMas authenticated_sender = CALLER@myhost.test.ex
672 > -oMi interface_address =
673 > interface_port = -1
674 > -oMr received_protocol =
675 > -oMs sender_host_name =
676 > -oMt sender_ident = CALLER
678 > -oMa sender_host_address = V4NET.0.0.1
679 > sender_host_port = 1234
680 > -oMaa sender_host_authenticated = AAA
681 > -oMai authenticated_id = philip
682 > -oMas authenticated_sender = xx@yy.zz
683 > -oMi interface_address = 1.1.1.1
684 > interface_port = 99
685 > -oMr received_protocol = special
686 > -oMt sender_ident = me
688 > -oMa sender_host_address = V4NET.0.0.1
689 > sender_host_port = 1234
690 > -oMs sender_host_name = my.host.name
692 > -oMs sender_host_name =
693 > host_lookup_failed = 1
695 > -p received_protocol = special
696 > -p sender_host_name = host.name
698 > -oMa sender_host_address = V4NET.0.0.1
699 > sender_host_port = 1234
700 > -oMaa sender_host_authenticated = AAA
701 > -oMai authenticated_id = philip
702 > -oMas authenticated_sender = xx@yy.zz
703 > -oMi interface_address = 1.1.1.1
704 > interface_port = 99
705 > -oMr received_protocol = special
706 > ----> No lookup yet: No
707 > -oMs sender_host_name = ten-1.test.ex
708 > -oMt sender_ident = me
711 **** SMTP testing session as if from host V4NET.0.0.1
712 **** but without any ident (RFC 1413) callback.
713 **** This is not for real!
715 550 Administrative prohibition
\r
717 **** SMTP testing session as if from host V4NET.0.0.2
718 **** but without any ident (RFC 1413) callback.
719 **** This is not for real!
721 550 Administrative prohibition
\r
723 **** SMTP testing session as if from host V4NET.0.0.0
724 **** but without any ident (RFC 1413) callback.
725 **** This is not for real!
727 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
730 354 Enter message, ending with "." on a line by itself
\r
731 550 reply_address=<>
\r
734 354 Enter message, ending with "." on a line by itself
\r
735 550 reply_address=<a@b>
\r
738 354 Enter message, ending with "." on a line by itself
\r
739 550 reply_address=<c@d>
\r
742 354 Enter message, ending with "." on a line by itself
\r
743 550 reply_address=<>
\r
746 354 Enter message, ending with "." on a line by itself
\r
747 550 reply_address=<x@y>
\r
748 221 myhost.test.ex closing connection
\r
750 **** SMTP testing session as if from host V4NET.0.0.0
751 **** but without any ident (RFC 1413) callback.
752 **** This is not for real!
754 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
757 354 Enter message, ending with "." on a line by itself
\r
758 550 reply_address=<>
\r
759 221 myhost.test.ex closing connection
\r
761 **** SMTP testing session as if from host V4NET.0.0.0
762 **** but without any ident (RFC 1413) callback.
763 **** This is not for real!
765 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
768 354 Enter message, ending with "." on a line by itself
\r
769 550 reply_address=<>
\r
770 221 myhost.test.ex closing connection
\r