summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/confs/54002
-rw-r--r--test/dnszones-src/db.test.ex2
-rw-r--r--test/log/54008
-rwxr-xr-xtest/runtest6
-rw-r--r--test/scripts/4000-scanning/40012
-rw-r--r--test/scripts/5400-cutthrough/54003
-rw-r--r--test/stdout/40018
-rw-r--r--test/stdout/54002
8 files changed, 21 insertions, 12 deletions
diff --git a/test/confs/5400 b/test/confs/5400
index 5948ce8d2..79465df80 100644
--- a/test/confs/5400
+++ b/test/confs/5400
@@ -31,7 +31,7 @@ begin routers
dns:
driver = dnslookup
- domains = localhost.test.ex : thishost.test.ex
+ domains = localhost.test.ex : localhost4.test.ex : thishost.test.ex
self = send
transport = smtp
diff --git a/test/dnszones-src/db.test.ex b/test/dnszones-src/db.test.ex
index 4ec367cc9..fec2a0d78 100644
--- a/test/dnszones-src/db.test.ex
+++ b/test/dnszones-src/db.test.ex
@@ -45,6 +45,8 @@ mx.π A V4NET.255.255.255
; A non-standard name for localhost
thishost A 127.0.0.1
+localhost4 A 127.0.0.1
+
; Something that gives both the IP and the loopback
diff --git a/test/log/5400 b/test/log/5400
index c6f366272..a72dfeead 100644
--- a/test/log/5400
+++ b/test/log/5400
@@ -46,9 +46,9 @@
1999-03-02 09:44:33 10HmbF-0005vi-00 => userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmbF-0005vi-00 => usery@special.com R=all T=smtp H=ip4.ip4.ip4.ip4 [ip4.ip4.ip4.ip4] C="250 OK"
1999-03-02 09:44:33 10HmbF-0005vi-00 Completed
-1999-03-02 09:44:33 rcpt for userx@localhost.test.ex
+1999-03-02 09:44:33 rcpt for userx@localhost4.test.ex
1999-03-02 09:44:33 rcpt for usery@thishost.test.ex
-1999-03-02 09:44:33 10HmbG-0005vi-00 >> usery@thishost.test.ex R=dns T=smtp H=localhost.test.ex [127.0.0.1] C="250 OK"
-1999-03-02 09:44:33 10HmbG-0005vi-00 >> userx@localhost.test.ex R=dns T=smtp H=localhost.test.ex [127.0.0.1] C="250 OK"
-1999-03-02 09:44:33 10HmbG-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@localhost.test.ex usery@thishost.test.ex
+1999-03-02 09:44:33 10HmbG-0005vi-00 >> usery@thishost.test.ex R=dns T=smtp H=localhost4.test.ex [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbG-0005vi-00 >> userx@localhost4.test.ex R=dns T=smtp H=localhost4.test.ex [127.0.0.1] C="250 OK"
+1999-03-02 09:44:33 10HmbG-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@localhost4.test.ex usery@thishost.test.ex
1999-03-02 09:44:33 10HmbG-0005vi-00 Completed
diff --git a/test/runtest b/test/runtest
index c6d9c729e..2baf2cafd 100755
--- a/test/runtest
+++ b/test/runtest
@@ -1325,6 +1325,9 @@ $munges =
'optional_cert_hostnames' =>
{ 'stderr' => '/in tls_verify_cert_hostnames\? no/' },
+ 'loopback' =>
+ { 'stdout' => 's/[[](127\.0\.0\.1|::1)]/[IP_LOOPBACK_ADDR]/' },
+
};
@@ -1342,7 +1345,7 @@ $munges =
# [4] TRUE if this is a log file whose deliveries must be sorted
# [5] an optional custom munge command
#
-# Arguments: Optionally, name of a custom munge to run.
+# Arguments: Optionally, name of a single custom munge to run.
# Returns: 0 if the output compared equal
# 1 if re-run needed (files may have been updated)
@@ -3405,6 +3408,7 @@ foreach $test (@test_list)
$stdout_skip = 0;
$rmfiltertest = 0;
$is_ipv6test = 0;
+ $TEST_STATE->{munge} = "";
# Remove the associative arrays used to hold checked mail files and msglogs
diff --git a/test/scripts/4000-scanning/4001 b/test/scripts/4000-scanning/4001
index 25a676e04..1dcbd1fbc 100644
--- a/test/scripts/4000-scanning/4001
+++ b/test/scripts/4000-scanning/4001
@@ -1,5 +1,7 @@
# content scan interface: f-protd
#
+munge loopback
+#
server PORT_S
<GET
<
diff --git a/test/scripts/5400-cutthrough/5400 b/test/scripts/5400-cutthrough/5400
index 79072d749..2d851a60d 100644
--- a/test/scripts/5400-cutthrough/5400
+++ b/test/scripts/5400-cutthrough/5400
@@ -1,5 +1,6 @@
# cutthrough_delivery basic operation
need_ipv4
+munge loopback
#
server PORT_S
220 ESMTP
@@ -401,7 +402,7 @@ QUIT
exim -bs
EHLO myhost.test.ex
MAIL FROM:<CALLER@myhost.test.ex>
-RCPT TO:<userx@localhost.test.ex>
+RCPT TO:<userx@localhost4.test.ex>
RCPT TO:<usery@thishost.test.ex>
DATA
diff --git a/test/stdout/4001 b/test/stdout/4001
index 40cf7a9d5..6d66c7d64 100644
--- a/test/stdout/4001
+++ b/test/stdout/4001
@@ -45,14 +45,14 @@
******** SERVER ********
Listening on port 1224 ...
-Connection request from [127.0.0.1]
+Connection request from [IP_LOOPBACK_ADDR]
<GET TESTSUITE/spool/scan/10HmaZ-0005vi-00/10HmaZ-0005vi-00.eml HTTP/1.0
<
><summary code="11">
>*eof
End of script
Listening on port 1224 ...
-Connection request from [127.0.0.1]
+Connection request from [IP_LOOPBACK_ADDR]
<GET TESTSUITE/spool/scan/10HmaX-0005vi-00/10HmaX-0005vi-00.eml HTTP/1.0
<
>
@@ -64,12 +64,12 @@ Connection request from [127.0.0.1]
>*eof
End of script
Listening on port 1224 ...
-Connection request from [127.0.0.1]
+Connection request from [IP_LOOPBACK_ADDR]
<GET TESTSUITE/spool/scan/10HmaY-0005vi-00/10HmaY-0005vi-00.eml HTTP/1.0
*sleep 3
End of script
Listening on port 1224 ...
-Connection request from [127.0.0.1]
+Connection request from [IP_LOOPBACK_ADDR]
<GET TESTSUITE/spool/scan/10HmbA-0005vi-00/10HmbA-0005vi-00.eml HTTP/1.0
*sleep 3
End of script
diff --git a/test/stdout/5400 b/test/stdout/5400
index 3452a9cc1..05f2ef037 100644
--- a/test/stdout/5400
+++ b/test/stdout/5400
@@ -489,7 +489,7 @@ EHLO myhost.test.ex
250 OK
MAIL FROM:<CALLER@myhost.test.ex>
250 Sender OK
-RCPT TO:<userx@localhost.test.ex>
+RCPT TO:<userx@localhost4.test.ex>
250 ok rcpt-1
RCPT TO:<usery@thishost.test.ex>
250 ok rcpt-2