Fix new tests so they run on sesame. exim-4_62
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Fri, 28 Apr 2006 13:46:36 +0000 (13:46 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Fri, 28 Apr 2006 13:46:36 +0000 (13:46 +0000)
15 files changed:
test/confs/0533
test/confs/0534 [deleted file]
test/confs/2202 [new file with mode: 0644]
test/log/0533 [new file with mode: 0644]
test/log/0534 [deleted file]
test/mail/0533.mbox [new file with mode: 0644]
test/mail/0533.mbox2 [new file with mode: 0644]
test/mail/0534.mbox [deleted file]
test/mail/0534.mbox2 [deleted file]
test/runtest
test/scripts/0000-Basic/0533
test/scripts/0000-Basic/0534 [deleted file]
test/scripts/2200-dnsdb/2202 [new file with mode: 0644]
test/stderr/2202 [new file with mode: 0644]
test/stdout/2202 [new file with mode: 0644]

index 8727cc3fb4b4550faf3066db4b84e1e488c7bb5e..941994396fe462fe8afa115753d2354525859b23 100644 (file)
@@ -1,7 +1,5 @@
 # Exim test configuration 0533
 
-CONNECTCOND=
-
 exim_path = EXIM_PATH
 host_lookup_order = bydns
 primary_hostname = myhost.test.ex
@@ -13,18 +11,40 @@ gecos_name = CALLER_NAME
 
 # ----- Main settings -----
 
-acl_smtp_rcpt = rcpt
-dns_again_means_nonexist = *
-disable_ipv6
 
-# ----- ACL -----
 
-begin acl
+# ----- Routers -----
+
+begin routers
+
+r1:
+  driver = redirect
+  local_part_prefix = file-
+  local_part_suffix = =*
+  data = DIR/test-mail/${substr_1:$local_part_suffix}
+  file_transport = t1
+
+r2:
+  driver = redirect
+  local_part_prefix = pipe-
+  local_part_suffix = =*
+  data = |${substr_1:$local_part_suffix}
+  pipe_transport = t2
+
+
+# ----- Transports -----
+
+begin transports
+
+t1:
+  driver = appendfile
+  envelope_to_add
+  user = CALLER
+  batch_max = 10
 
-rcpt:
-  accept hosts = +ignore_unknown : \
-    *.$sender_address_domain : \
-    $sender_address_domain : \
-    ${lookup dnsdb{>:defer_never,mxh=$sender_address_domain}}
+t2:
+  driver = pipe
+  user = CALLER
+  batch_max = 10
 
 # End
diff --git a/test/confs/0534 b/test/confs/0534
deleted file mode 100644 (file)
index 5e83476..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# Exim test configuration 0534
-
-exim_path = EXIM_PATH
-host_lookup_order = bydns
-primary_hostname = myhost.test.ex
-rfc1413_query_timeout = 0s
-spool_directory = DIR/spool
-log_file_path = DIR/spool/log/%slog
-gecos_pattern = ""
-gecos_name = CALLER_NAME
-
-# ----- Main settings -----
-
-
-
-# ----- Routers -----
-
-begin routers
-
-r1:
-  driver = redirect
-  local_part_prefix = file-
-  local_part_suffix = =*
-  data = DIR/test-mail/${substr_1:$local_part_suffix}
-  file_transport = t1
-
-r2:
-  driver = redirect
-  local_part_prefix = pipe-
-  local_part_suffix = =*
-  data = |${substr_1:$local_part_suffix}
-  pipe_transport = t2
-
-
-# ----- Transports -----
-
-begin transports
-
-t1:
-  driver = appendfile
-  envelope_to_add
-  user = CALLER
-  batch_max = 10
-
-t2:
-  driver = pipe
-  user = CALLER
-  batch_max = 10
-
-# End
diff --git a/test/confs/2202 b/test/confs/2202
new file mode 100644 (file)
index 0000000..a004578
--- /dev/null
@@ -0,0 +1,30 @@
+# Exim test configuration 2202
+
+CONNECTCOND=
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+rfc1413_query_timeout = 0s
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = rcpt
+dns_again_means_nonexist = *
+disable_ipv6
+
+# ----- ACL -----
+
+begin acl
+
+rcpt:
+  accept hosts = +ignore_unknown : \
+    *.$sender_address_domain : \
+    $sender_address_domain : \
+    ${lookup dnsdb{>:defer_never,mxh=$sender_address_domain}}
+
+# End
diff --git a/test/log/0533 b/test/log/0533
new file mode 100644 (file)
index 0000000..c59e48e
--- /dev/null
@@ -0,0 +1,9 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmaX-0005vi-00 => |TESTSUITE/bin/../bin/iefbr14 <pipe-userz=TESTSUITE/bin/../bin/iefbr14@test.ex> R=r2 T=t2
+1999-03-02 09:44:33 10HmaX-0005vi-00 => |TESTSUITE/bin/iefbr14 <pipe-usery=TESTSUITE/bin/iefbr14@test.ex> R=r2 T=t2
+1999-03-02 09:44:33 10HmaX-0005vi-00 -> |TESTSUITE/bin/iefbr14 <pipe-userx=TESTSUITE/bin/iefbr14@test.ex> R=r2 T=t2
+1999-03-02 09:44:33 10HmaX-0005vi-00 => TESTSUITE/test-mail/mbox2 <file-usera=mbox2@test.ex> R=r1 T=t1
+1999-03-02 09:44:33 10HmaX-0005vi-00 -> TESTSUITE/test-mail/mbox2 <file-userz=mbox2@test.ex> R=r1 T=t1
+1999-03-02 09:44:33 10HmaX-0005vi-00 => TESTSUITE/test-mail/mbox <file-usery=mbox@test.ex> R=r1 T=t1
+1999-03-02 09:44:33 10HmaX-0005vi-00 -> TESTSUITE/test-mail/mbox <file-userx=mbox@test.ex> R=r1 T=t1
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
diff --git a/test/log/0534 b/test/log/0534
deleted file mode 100644 (file)
index c59e48e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss
-1999-03-02 09:44:33 10HmaX-0005vi-00 => |TESTSUITE/bin/../bin/iefbr14 <pipe-userz=TESTSUITE/bin/../bin/iefbr14@test.ex> R=r2 T=t2
-1999-03-02 09:44:33 10HmaX-0005vi-00 => |TESTSUITE/bin/iefbr14 <pipe-usery=TESTSUITE/bin/iefbr14@test.ex> R=r2 T=t2
-1999-03-02 09:44:33 10HmaX-0005vi-00 -> |TESTSUITE/bin/iefbr14 <pipe-userx=TESTSUITE/bin/iefbr14@test.ex> R=r2 T=t2
-1999-03-02 09:44:33 10HmaX-0005vi-00 => TESTSUITE/test-mail/mbox2 <file-usera=mbox2@test.ex> R=r1 T=t1
-1999-03-02 09:44:33 10HmaX-0005vi-00 -> TESTSUITE/test-mail/mbox2 <file-userz=mbox2@test.ex> R=r1 T=t1
-1999-03-02 09:44:33 10HmaX-0005vi-00 => TESTSUITE/test-mail/mbox <file-usery=mbox@test.ex> R=r1 T=t1
-1999-03-02 09:44:33 10HmaX-0005vi-00 -> TESTSUITE/test-mail/mbox <file-userx=mbox@test.ex> R=r1 T=t1
-1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
diff --git a/test/mail/0533.mbox b/test/mail/0533.mbox
new file mode 100644 (file)
index 0000000..26716f5
--- /dev/null
@@ -0,0 +1,12 @@
+From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999
+Envelope-to: file-usery=mbox@test.ex,
+ file-userx=mbox@test.ex
+Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
+Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+A test message.
+
diff --git a/test/mail/0533.mbox2 b/test/mail/0533.mbox2
new file mode 100644 (file)
index 0000000..4d2c754
--- /dev/null
@@ -0,0 +1,12 @@
+From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999
+Envelope-to: file-usera=mbox2@test.ex,
+ file-userz=mbox2@test.ex
+Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
+Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+A test message.
+
diff --git a/test/mail/0534.mbox b/test/mail/0534.mbox
deleted file mode 100644 (file)
index 26716f5..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999
-Envelope-to: file-usery=mbox@test.ex,
- file-userx=mbox@test.ex
-Received: from CALLER by myhost.test.ex with local (Exim x.yz)
-       (envelope-from <CALLER@myhost.test.ex>)
-       id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
-Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
-From: CALLER_NAME <CALLER@myhost.test.ex>
-Date: Tue, 2 Mar 1999 09:44:33 +0000
-
-A test message.
-
diff --git a/test/mail/0534.mbox2 b/test/mail/0534.mbox2
deleted file mode 100644 (file)
index 4d2c754..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999
-Envelope-to: file-usera=mbox2@test.ex,
- file-userz=mbox2@test.ex
-Received: from CALLER by myhost.test.ex with local (Exim x.yz)
-       (envelope-from <CALLER@myhost.test.ex>)
-       id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
-Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
-From: CALLER_NAME <CALLER@myhost.test.ex>
-Date: Tue, 2 Mar 1999 09:44:33 +0000
-
-A test message.
-
index 91b64e8e970910d00ffe5331cc26e98f7c06c833..397ea474d49bf72aaade097c2feebd5838548491 100755 (executable)
@@ -1,6 +1,6 @@
 #! /usr/bin/perl -w
 
-# $Cambridge: exim/test/runtest,v 1.9 2006/04/25 14:02:30 ph10 Exp $
+# $Cambridge: exim/test/runtest,v 1.10 2006/04/28 13:46:36 ph10 Exp $
 
 ###############################################################################
 # This is the controlling script for the "new" test suite for Exim. It should #
@@ -526,6 +526,8 @@ while(<IN>)
   s/host\s\Q$parm_ipv6\E\s\[\Q$parm_ipv6\E\]/host ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6 [ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6]/;
   s/\b\Q$parm_ipv4\E\b/ip4.ip4.ip4.ip4/g;
   s/\b\Q$parm_ipv6\E\b/ip6:ip6:ip6:ip6:ip6:ip6:ip6:ip6/g;
+  s/\b\Q$parm_ipv4r\E\b/ip4-reverse/g;
+  s/\b\Q$parm_ipv6r\E\b/ip6-reverse/g;
 
 
   # ======== Test network IP addresses ========
@@ -2404,6 +2406,24 @@ else
 print "IPv4 address is $parm_ipv4\n";
 print "IPv6 address is $parm_ipv6\n";
 
+# For munging test output, we need the reversed IP addresses.
+
+$parm_ipv4r = ($parm_ipv4 !~ /^\d/)? "" :
+  join(".", reverse(split /\./, $parm_ipv4));
+
+$parm_ipv6r = "";
+if ($parm_ipv6 =~ /^[\da-f]/)
+  {
+  my(@comps) = split /:/, $parm_ipv6;
+  my(@nibbles);
+  foreach $comp (@comps)
+    {
+    push @nibbles, sprintf("%lx", hex($comp) >> 8);
+    push @nibbles, sprintf("%lx", hex($comp) & 0xff);
+    }
+  $parm_ipv6r = join(".", reverse(@nibbles));
+  }
+
 # Find the host name, fully qualified.
 
 chomp($temp = `hostname`);
index 0f0651d6ffed38c3a916a631948eb7f9bf2d1f4a..0e039601c5f6826baf630ad4f59182d88ec8b68b 100644 (file)
@@ -1,6 +1,10 @@
-# dns_again_means_nonexist
-exim -d -bh HOSTIPV4
-mail from:<xx@cioce.test.again.dns>
-rcpt to:<a@b>
-quit
+# Batch_max when redirecting to a mailbox or a pipe
+exim -odi file-userx=mbox@test.ex \
+          file-usery=mbox@test.ex \
+          file-userz=mbox2@test.ex \
+          file-usera=mbox2@test.ex \
+          pipe-userx=DIR/bin/iefbr14@test.ex \
+          pipe-usery=DIR/bin/iefbr14@test.ex \
+          pipe-userz=DIR/bin/../bin/iefbr14@test.ex  
+A test message.
 ****
diff --git a/test/scripts/0000-Basic/0534 b/test/scripts/0000-Basic/0534
deleted file mode 100644 (file)
index 0e03960..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-# Batch_max when redirecting to a mailbox or a pipe
-exim -odi file-userx=mbox@test.ex \
-          file-usery=mbox@test.ex \
-          file-userz=mbox2@test.ex \
-          file-usera=mbox2@test.ex \
-          pipe-userx=DIR/bin/iefbr14@test.ex \
-          pipe-usery=DIR/bin/iefbr14@test.ex \
-          pipe-userz=DIR/bin/../bin/iefbr14@test.ex  
-A test message.
-****
diff --git a/test/scripts/2200-dnsdb/2202 b/test/scripts/2200-dnsdb/2202
new file mode 100644 (file)
index 0000000..0f0651d
--- /dev/null
@@ -0,0 +1,6 @@
+# dns_again_means_nonexist
+exim -d -bh HOSTIPV4
+mail from:<xx@cioce.test.again.dns>
+rcpt to:<a@b>
+quit
+****
diff --git a/test/stderr/2202 b/test/stderr/2202
new file mode 100644 (file)
index 0000000..ddbdfb6
--- /dev/null
@@ -0,0 +1,73 @@
+Exim version x.yz ....
+changed uid/gid: forcing real = effective
+  uid=uuuu gid=CALLER_GID pid=pppp
+configuration file is TESTSUITE/test-config
+admin user
+changed uid/gid: privilege not needed
+  uid=EXIM_UID gid=EXIM_GID pid=pppp
+originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
+sender address = CALLER@myhost.test.ex
+sender_fullhost = [ip4.ip4.ip4.ip4]
+sender_rcvhost = [ip4.ip4.ip4.ip4]
+host in hosts_connection_nolog? no (option unset)
+LOG: smtp_connection MAIN
+  SMTP connection from [ip4.ip4.ip4.ip4]
+host in host_lookup? no (option unset)
+set_process_info: pppp handling incoming connection from [ip4.ip4.ip4.ip4]
+host in host_reject_connection? no (option unset)
+host in sender_unqualified_hosts? no (option unset)
+host in recipient_unqualified_hosts? no (option unset)
+host in helo_verify_hosts? no (option unset)
+host in helo_try_verify_hosts? no (option unset)
+host in helo_accept_junk_hosts? no (option unset)
+SMTP>> 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+smtp_setup_msg entered
+SMTP<< mail from:<xx@cioce.test.again.dns>
+SMTP>> 250 OK
+SMTP<< rcpt to:<a@b>
+using ACL "rcpt"
+processing "accept"
+check hosts = +ignore_unknown : *.$sender_address_domain : $sender_address_domain : ${lookup dnsdb{>:defer_never,mxh=$sender_address_domain}}
+search_open: dnsdb "NULL"
+search_find: file="NULL"
+  key=">:defer_never,mxh=cioce.test.again.dns" partial=-1 affix=NULL starflags=0
+LRU list:
+internal_search_find: file="NULL"
+  type=dnsdb key=">:defer_never,mxh=cioce.test.again.dns"
+database lookup required for >:defer_never,mxh=cioce.test.again.dns
+dnsdb key: cioce.test.again.dns
+Return from DNS lookup of cioce.test.again.dns (MX) faked for testing
+DNS lookup of cioce.test.again.dns (MX) gave TRY_AGAIN
+cioce.test.again.dns in dns_again_means_nonexist? yes (matched "*")
+cioce.test.again.dns is in dns_again_means_nonexist: returning DNS_NOMATCH
+lookup failed
+sender host name required, to match against *.cioce.test.again.dns
+looking up host name for ip4.ip4.ip4.ip4
+DNS lookup of ip4-reverse.in-addr.arpa (PTR) using fakens
+DNS lookup of ip4-reverse.in-addr.arpa (PTR) succeeded
+IP address lookup yielded the.local.host.name
+using host_fake_gethostbyname for the.local.host.name (IPv4)
+DNS lookup of the.local.host.name (A) using fakens
+DNS lookup of the.local.host.name (A) succeeded
+MUNGED: ::1 will be omitted in what follows
+get[host|ipnode]byname[2] looked up these IP addresses:
+  name=the.local.host.name address=ip4.ip4.ip4.ip4
+checking addresses for the.local.host.name
+  ip4.ip4.ip4.ip4 OK
+sender_fullhost = the.local.host.name [ip4.ip4.ip4.ip4]
+sender_rcvhost = the.local.host.name ([ip4.ip4.ip4.ip4])
+cioce.test.again.dns in dns_again_means_nonexist? yes (matched "*")
+cioce.test.again.dns is in dns_again_means_nonexist: returning HOST_FIND_FAILED
+failed to find IP address for cioce.test.again.dns: item ignored by +ignore_unknown
+host in "+ignore_unknown : *.cioce.test.again.dns : cioce.test.again.dns : "? no (end of list)
+accept: condition test failed
+end of ACL "rcpt": implicit DENY
+SMTP>> 550 Administrative prohibition
+LOG: MAIN REJECT
+  H=the.local.host.name [ip4.ip4.ip4.ip4] F=<xx@cioce.test.again.dns> rejected RCPT <a@b>
+SMTP<< quit
+SMTP>> 221 myhost.test.ex closing connection
+LOG: smtp_connection MAIN
+  SMTP connection from the.local.host.name [ip4.ip4.ip4.ip4] closed by QUIT
+search_tidyup called
+>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>>
diff --git a/test/stdout/2202 b/test/stdout/2202
new file mode 100644 (file)
index 0000000..bcb3fa2
--- /dev/null
@@ -0,0 +1,9 @@
+
+**** SMTP testing session as if from host ip4.ip4.ip4.ip4
+**** but without any ident (RFC 1413) callback.
+**** This is not for real!
+
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+550 Administrative prohibition\r
+221 myhost.test.ex closing connection\r