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}"
35 > addrss: local-part@dom.ain
36 > addrss: local-part@dom.ain
39 > escape: B7\267F2\362
46 > Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "")
50 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3")
51 > Failed: error in expression evaluation: expecting operator (after processing "-2 - -3")
57 > Failed: error in expression evaluation: expecting operator (after processing "0")
60 > Failed: error in expression evaluation: expecting operator (after processing "0")
74 > expand: $primary_hostname myhost.test.ex
75 > hash: jmg monty fbWx
81 > Failed: "1a2b3c4d5e6" contains an odd number of characters
82 > Failed: "1a2b3c4d5e6g" is not a hex string
83 > hex2b64:MPPJPkZDbetYunCBao7BJA==
84 > hex2b64:ztcfpyNSMb7Tg/rP3EHE3cwi7PE=
86 > The base62 operator is actually a base36 operator in the Darwin and Cygwin
87 > environments. Write cunning tests that produce the same output in both cases,
88 > while doing a reasonable check.
93 > Failed: argument for base62 operator is "12345x", which is not a decimal number
94 > Failed: argument for base62d operator is "0003D7.", which is not a base 36/62 number
96 > hmac: dd97e3ba5d1a61b5006108f8c8252953
97 > hmac: 0210cf9d274b53f1550f657c378b29e8bfed1064
98 > md5: 77add1d5f41223d5582fca736a5cb335
99 > sha1: DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
100 > sha1: A9993E364706816ABA3E25717850C26C9CD0D89D
101 > mask: 192.168.10.192/28
102 > mask: 192.168.10.206/32
103 > Failed: mask value too big in "192.168.10.206/33"
105 > Failed: missing mask value in "192.168.10.206"
106 > Failed: "a.b.c.d" is not an IP address
108 > lc/uc: the quick BROWN FOX
109 > length: The quick abc
112 > quote: aZ09_.-Q "ab*cd" "abcd\"ef"
118 > quote_local_part: abcd
119 > quote_local_part: O'Reilly
120 > quote_local_part: "a space"
121 > quote_local_part: ".something"
122 > quote_local_part: "something."
123 > quote_local_part: joe.bloggs
124 > quote_local_part: a!b
125 > quote_local_part: "x@y"
126 > quote_local_part: ab*cd
127 > quote_local_part: "x:y"
128 > quote_local_part: "abcd\"ef"
129 > quote_local_part: ""
130 > rxquote:aZ09\_\,\-Q ab\*cd abcd\"ef
136 > str2b64:VGhlIHF1aWNrIGJyb3duIAogZm94
144 > Failed: string "14" is not an Exim time interval in "time_eval" operator
145 > Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
148 > time_interval: 1w4d13h46m39s
149 > Failed: string "-1" is not a positive number in "time_interval" operator
150 > Failed: string "rhubarb" is not a positive number in "time_interval" operator
152 > # stat is a bit tricky, but some of the fields of the aux-var directory
153 > # should be the same on all systems
157 > Failed: stat(/a/non/existent/file) failed: No such file or directory
159 > # "Operators" that have expanded arguments
161 > hash: jmg monty fbWx
162 > hash: abcX abX aX X
164 > length: The quick abc
170 > Failed: missing or misplaced { or }
171 > Failed: "nonnumber" is not a number (in "hash" expansion)
172 > Failed: Too many arguments for "hash" (max is 3)
173 > Failed: "-2" is not a positive number (in "substr" expansion)
175 > # Skipped operators
187 > Failed: absolute value of integer "4096M" is too large (overflow)
188 > Failed: absolute value of integer "4096000000" is too large (overflow)
218 > Failed: invalid integer "3z "
219 > Failed: integer expected but "a" found
229 > Failed: unknown variable "post" after "def:"
232 > Failed: missing or misplaced { or }
267 > isip: y fe80::a00:20ff:fe86:a061
268 > isip4: n fe80::a00:20ff:fe86:a061
269 > isip6: y fe80::a00:20ff:fe86:a061
277 > Failed: "if" failed and "fail" requested
286 > >x@zz.aa.bb< [] >x@zz.aa.bb<
288 > >x@xxxabc< [] >x@xxxabc<
293 > match_local_part:yes
294 > match_local_part:yes
306 > Failed: "somename" is not an IP address
314 > queue_running after or: y
315 > first_delivery after or: y
317 > # Default values for both if strings
319 > ${if eq{1}{1}} >true<
322 > # Lookups: DIR is the testing directory. In this test we can only use the
323 > # lookups that are required in all cases.
337 > Failed: "lookup" failed and "fail" requested
343 > q4: "a:b" abc continued data (make sure not key)
356 > a:b: lookup succeeded
362 > # Should give the same results as above because expansion does nothing
372 > a:b: lookup succeeded
374 > # Should fail because of no expansion
381 > # But these should succeed
386 > # Some tests of case-(in)dependence
388 > MiXeD-CD: Data found for case-dependent MiXeD-CD
389 > MixeD-CD: NOT FOUND
390 > MiXeD-Ncd: Data found for case-independent MiXeD-nCD
391 > MixeD-Ncd: Data found for case-independent MiXeD-nCD
393 > # IP address (CIDR) lookups
395 > 1.2.3.4: data for 1.2.3.4
397 > 1.2.3.5: data for *
398 > abcd::cdab: data for abcd::cdab
399 > 192.168.1.2: data for 192.168.0.0/16
400 > 192.168.5.6: data for 192.168.0.0/16
401 > abcd:abcd:: data for abcd:abcd::/32
402 > abcd:abcd:1:: data for abcd:abcd::/32
403 > abcd:abcd::3 data for abcd:abcd::/32
404 > 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
407 > # Nested Lookups - style 1
409 > The data for key1->key2
410 > Failed: "lookup" failed and "fail" requested
412 > # Nested Lookups - style 2
414 > The data for key1->key2
417 > # Other nesting tests
421 > both-in-1,both-in-2
422 > Failed: "lookup" failed and "fail" requested
424 > # Lookup quotes for standardly expected lookups
426 > lsearch !@#$%^&*()_-+=|\~`1234567890{[}]qwertyuiop:;"'asdfghjkl<,>.?/zxcvbnm
427 > Failed: unknown lookup type "xxx"
443 > Failed: "extract" failed and "fail" requested
444 > Failed: "extract" failed and "fail" requested
455 > Failed: first argument of "extract" must not be empty
456 > Failed: first argument of "extract" must not be empty
461 > abcdea aaa xyz zbcdez
464 > abcdea abc z zzzdez
469 > <:abcd:> =?iso-8859-8?Q?=3C=3Aabcd=3A=3E?=
470 > <:ab cd:> =?iso-8859-8?Q?=3C=3Aab_cd=3A=3E?=
471 > 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?=
472 > 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?=
478 > <:ab cd:> <:ab cd:>
479 > Long: here we go: a string that is going to be encoded: it will go over the 75-char limit
480 > 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
490 > ${sg{abcdefabcdef}{abc}{xyz}} =xyzdefxyzdef
491 > ${sg{ab:xy::z}{:}{::}} =ab::xy::::z
492 > ${sg{abcdefabcdef}{(..)[^c]}{>$1<}} =a><><><ef
493 > ${sg{abcdefabcdef}{(..)[^c]}{>\$1<}} =a>bc<>ef<>bc<ef
494 > ${sg{abcdefabcdef}{(..)[^c]}{>\N$1\N<}}=a>bc<>ef<>bc<ef
495 > ${sg{abbab}{a*}{+}} =++b+b++b+
499 > Failed: missing or misplaced { or }
507 > abcde - 12345 - - xyz -
508 > Failed: failed to open /non/exist/file: No such file or directory
510 > >abcde!12345!!xyz!<
512 > # Calling a command
539 > prvs=userx/xxxxxxxxxx@test.ex
540 > prvs=userx/xxxxxxxxxx@test.ex
541 > prvs=userx/xxxxxxxxxx@test.ex
545 > Failed: prvs second argument must be a single digit
546 > Failed: prvs second argument must be a single digit
547 > Failed: prvs second argument must be a single digit
549 > # Correct checks; can't put explicit addresses in the tests, because they
550 > # will change over time.
555 > >1< >userx@test.ex< >1<
576 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
577 > Failed: "${tod_log" is not a known operator (or a } is missing in a variable reference)
578 > Failed: missing } at end of string
579 > Failed: missing } at end of string
580 > Failed: hmac algorithm "xxx" is not recognised
581 > Failed: each subcondition inside an "and{...}" condition must be in its own {}
582 > Failed: unknown condition "xya" inside "and{...}" condition
583 > Failed: condition name expected, but found "${lookup{x}lsear" inside "and{...}" condition
584 > Failed: missing } at end of string - could be header name not terminated by colon
585 > Failed: missing or misplaced { or }
586 > Failed: missing or misplaced { or } - could be header name not terminated by colon
587 > Failed: each subcondition inside an "or{...}" condition must be in its own {}
588 > Failed: missing } at end of condition inside "or" group
589 > Failed: unknown condition "yes" inside "or{...}" condition
590 > Failed: non-digit after underscore in "substr_1_"
591 > Failed: non-digit after underscore in "substr__3"
593 > # Iterations: forany and forall
605 > Failed: unknown condition "yes" inside "forany" condition
606 > Failed: missing } at end of condition inside "forany"
619 > outer=yes item='' (unset)
624 > # Error inside nest - check message is helpful
625 > Failed: missing } at end of condition inside "forall" inside "forany" condition
628 > # Miscellaneous (for bug fixes, etc)
635 > primary_hostname: myhost.test.ex
637 > Failed: "if" failed and "fail" requested
641 > -oMa sender_host_address =
642 > sender_host_port = 0
643 > -oMaa sender_host_authenticated =
644 > -oMai authenticated_id = CALLER
645 > -oMas authenticated_sender = CALLER@myhost.test.ex
646 > -oMi interface_address =
647 > interface_port = -1
648 > -oMr received_protocol =
649 > -oMs sender_host_name =
650 > -oMt sender_ident = CALLER
652 > -oMa sender_host_address = V4NET.0.0.1
653 > sender_host_port = 1234
654 > -oMaa sender_host_authenticated = AAA
655 > -oMai authenticated_id = philip
656 > -oMas authenticated_sender = xx@yy.zz
657 > -oMi interface_address = 1.1.1.1
658 > interface_port = 99
659 > -oMr received_protocol = special
660 > -oMt sender_ident = me
662 > -oMa sender_host_address = V4NET.0.0.1
663 > sender_host_port = 1234
664 > -oMs sender_host_name = my.host.name
666 > -oMs sender_host_name =
667 > host_lookup_failed = 1
669 > -p received_protocol = special
670 > -p sender_host_name = host.name
672 > -oMa sender_host_address = V4NET.0.0.1
673 > sender_host_port = 1234
674 > -oMaa sender_host_authenticated = AAA
675 > -oMai authenticated_id = philip
676 > -oMas authenticated_sender = xx@yy.zz
677 > -oMi interface_address = 1.1.1.1
678 > interface_port = 99
679 > -oMr received_protocol = special
680 > ----> No lookup yet: No
681 > -oMs sender_host_name = ten-1.test.ex
682 > -oMt sender_ident = me
685 **** SMTP testing session as if from host V4NET.0.0.1
686 **** but without any ident (RFC 1413) callback.
687 **** This is not for real!
689 550 Administrative prohibition
\r
691 **** SMTP testing session as if from host V4NET.0.0.2
692 **** but without any ident (RFC 1413) callback.
693 **** This is not for real!
695 550 Administrative prohibition
\r
697 **** SMTP testing session as if from host V4NET.0.0.0
698 **** but without any ident (RFC 1413) callback.
699 **** This is not for real!
701 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
704 354 Enter message, ending with "." on a line by itself
\r
705 550 reply_address=<>
\r
708 354 Enter message, ending with "." on a line by itself
\r
709 550 reply_address=<a@b>
\r
712 354 Enter message, ending with "." on a line by itself
\r
713 550 reply_address=<c@d>
\r
716 354 Enter message, ending with "." on a line by itself
\r
717 550 reply_address=<>
\r
720 354 Enter message, ending with "." on a line by itself
\r
721 550 reply_address=<x@y>
\r
722 221 myhost.test.ex closing connection
\r
724 **** SMTP testing session as if from host V4NET.0.0.0
725 **** but without any ident (RFC 1413) callback.
726 **** This is not for real!
728 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
731 354 Enter message, ending with "." on a line by itself
\r
732 550 reply_address=<>
\r
733 221 myhost.test.ex closing connection
\r
735 **** SMTP testing session as if from host V4NET.0.0.0
736 **** but without any ident (RFC 1413) callback.
737 **** This is not for real!
739 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
\r
742 354 Enter message, ending with "." on a line by itself
\r
743 550 reply_address=<>
\r
744 221 myhost.test.ex closing connection
\r