summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2006-09-05 13:24:10 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2006-09-05 13:24:10 +0000
commit2b1c6e3a3a41b680dcefcb87d6c373431f718607 (patch)
treef0fe3eebc393589d774a0d47c93e3b23ab5a184d /test
parent944e9e9cf011263364695ebc7698bb37b538cfe1 (diff)
(1) Update version number to 4.64. (2) Ignore callout cached information
that MAIL FROM:<> is rejected when verifying a recipient using a non-null MAIL address.
Diffstat (limited to 'test')
-rw-r--r--test/confs/053843
-rw-r--r--test/log/05384
-rw-r--r--test/rejectlog/05384
-rwxr-xr-xtest/runtest4
-rw-r--r--test/scripts/0000-Basic/053839
-rw-r--r--test/stderr/03762
-rw-r--r--test/stdout/053850
7 files changed, 143 insertions, 3 deletions
diff --git a/test/confs/0538 b/test/confs/0538
new file mode 100644
index 000000000..7f89ccc6a
--- /dev/null
+++ b/test/confs/0538
@@ -0,0 +1,43 @@
+# Exim test configuration 0538
+
+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_mail = check_mail
+acl_smtp_rcpt = check_rcpt
+
+
+# ----- ACLs -----
+
+begin acl
+
+check_mail:
+ accept sender_domains = broken.example
+ endpass
+ verify = sender/callout
+ accept
+
+check_rcpt:
+ accept verify = recipient/callout=use_sender
+
+
+# ----- Routers -----
+
+begin routers
+
+r1:
+ driver = manualroute
+ route_list = * "<= 127.0.0.1:PORT_S"
+ self = send
+ verify_only
+
+
+# End
diff --git a/test/log/0538 b/test/log/0538
new file mode 100644
index 000000000..8b63bdb9b
--- /dev/null
+++ b/test/log/0538
@@ -0,0 +1,4 @@
+1999-03-02 09:44:33 U=CALLER sender verify fail for <userx@broken.example>: response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 I'm misconfigured
+1999-03-02 09:44:33 U=CALLER rejected MAIL <userx@broken.example>: Sender verify failed
+1999-03-02 09:44:33 U=CALLER sender verify fail for <userx@broken.example>
+1999-03-02 09:44:33 U=CALLER rejected MAIL <userx@broken.example>: Sender verify failed
diff --git a/test/rejectlog/0538 b/test/rejectlog/0538
new file mode 100644
index 000000000..8b63bdb9b
--- /dev/null
+++ b/test/rejectlog/0538
@@ -0,0 +1,4 @@
+1999-03-02 09:44:33 U=CALLER sender verify fail for <userx@broken.example>: response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 I'm misconfigured
+1999-03-02 09:44:33 U=CALLER rejected MAIL <userx@broken.example>: Sender verify failed
+1999-03-02 09:44:33 U=CALLER sender verify fail for <userx@broken.example>
+1999-03-02 09:44:33 U=CALLER rejected MAIL <userx@broken.example>: Sender verify failed
diff --git a/test/runtest b/test/runtest
index 992f02915..66a0197b9 100755
--- a/test/runtest
+++ b/test/runtest
@@ -1,6 +1,6 @@
#! /usr/bin/perl -w
-# $Cambridge: exim/test/runtest,v 1.13 2006/07/26 14:39:13 ph10 Exp $
+# $Cambridge: exim/test/runtest,v 1.14 2006/09/05 13:24:10 ph10 Exp $
###############################################################################
# This is the controlling script for the "new" test suite for Exim. It should #
@@ -23,7 +23,7 @@ use Socket;
# Start by initializing some global variables
-$testversion = "4.63 (24-Jul-06)";
+$testversion = "4.64 (05-Sep-06)";
$cf = "bin/cf";
$cr = "\r";
diff --git a/test/scripts/0000-Basic/0538 b/test/scripts/0000-Basic/0538
new file mode 100644
index 000000000..c464f3bf1
--- /dev/null
+++ b/test/scripts/0000-Basic/0538
@@ -0,0 +1,39 @@
+# callout for recipient/use_sender after mail from:<> rejection
+need_ipv4
+#
+# Do a sender address verify that rejects MAIL FROM:<>
+server PORT_S
+220 Welcome
+HELO
+250 Hi
+MAIL FROM
+550 I'm misconfigured
+QUIT
+221 Bye
+****
+exim -bs
+mail from:<userx@broken.example>
+quit
+****
+# Now do a recipient verify for the same domain, with use_sender
+server PORT_S
+220 Welcome
+HELO
+250 Hi
+MAIL FROM
+250 OK
+RCPT TO
+250 OK
+QUIT
+221 Bye
+****
+exim -bs
+mail from:<userx@ok.example>
+rcpt to:<usery@broken.example>
+quit
+****
+# A final check that the cache works for sender address
+exim -bs
+mail from:<userx@broken.example>
+quit
+****
diff --git a/test/stderr/0376 b/test/stderr/0376
index f51553220..3a6367578 100644
--- a/test/stderr/0376
+++ b/test/stderr/0376
@@ -143,7 +143,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected
SMTP<< 550 REJECT MAIL FROM
SMTP>> QUIT
wrote callout cache domain record:
- result=2 postmaster=0 random=0
+ result=3 postmaster=0 random=0
LOG: MAIN REJECT
H=[V4NET.0.0.1] U=root sender verify fail for <ok@localhost>: response to "MAIL FROM:<>" from 127.0.0.1 [127.0.0.1] was: 550 REJECT MAIL FROM
LOG: MAIN REJECT
diff --git a/test/stdout/0538 b/test/stdout/0538
new file mode 100644
index 000000000..c7bd59226
--- /dev/null
+++ b/test/stdout/0538
@@ -0,0 +1,50 @@
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+550-Callback setup failed while verifying <userx@broken.example>
+550-Called: 127.0.0.1
+550-Sent: MAIL FROM:<>
+550-Response: 550 I'm misconfigured
+550-The initial connection, or a HELO or MAIL FROM:<> command was
+550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards
+550-RFC requirements, and stops you from receiving standard bounce
+550-messages. This host does not accept mail from domains whose servers
+550-refuse bounces.
+550 Sender verify failed
+221 myhost.test.ex closing connection
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 OK
+250 Accepted
+221 myhost.test.ex closing connection
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+550-Callback setup failed while verifying <userx@broken.example>
+550-(result of an earlier callout reused).
+550-The initial connection, or a HELO or MAIL FROM:<> command was
+550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards
+550-RFC requirements, and stops you from receiving standard bounce
+550-messages. This host does not accept mail from domains whose servers
+550-refuse bounces.
+550 Sender verify failed
+221 myhost.test.ex closing connection
+
+******** SERVER ********
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+220 Welcome
+HELO myhost.test.ex
+250 Hi
+MAIL FROM:<>
+550 I'm misconfigured
+QUIT
+221 Bye
+End of script
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+220 Welcome
+HELO myhost.test.ex
+250 Hi
+MAIL FROM:<userx@ok.example>
+250 OK
+RCPT TO:<usery@broken.example>
+250 OK
+QUIT
+221 Bye
+End of script