summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2006-10-03 15:11:22 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2006-10-03 15:11:22 +0000
commitd6f6e0dc45e55bf5edd4c16e2b360ab2031d5468 (patch)
treefd2323d173241079d7f73749730bb123b3d3ac40 /test
parente6f6568e74c9aeb07d8cb02ecb1d997284eb885f (diff)
Michael Deutschmann's patch for getting TXT from a specific list when
a match is found on a merged list.
Diffstat (limited to 'test')
-rw-r--r--test/confs/01394
-rw-r--r--test/dnszones-src/db.test.ex7
-rw-r--r--test/log/01393
-rw-r--r--test/mail/0139.userx14
-rw-r--r--test/scripts/0000-Basic/01398
-rw-r--r--test/stderr/013934
-rw-r--r--test/stdout/01398
7 files changed, 75 insertions, 3 deletions
diff --git a/test/confs/0139 b/test/confs/0139
index 3c4db8535..cd9433a92 100644
--- a/test/confs/0139
+++ b/test/confs/0139
@@ -11,6 +11,7 @@ gecos_name = CALLER_NAME
# ----- Main settings -----
domainlist local_domains = exim.test.ex
+trusted_users = CALLER
acl_smtp_rcpt = check_recipient
acl_smtp_mail = check_mail
@@ -23,6 +24,9 @@ check_mail:
warn dnslists = rbl4.test.ex&0.0.0.6
warn dnslists = rbl4.test.ex&127.0.0.3
warn dnslists = rbl4.test.ex!&0.0.0.7
+ add_header = DNSlist: $dnslist_domain $dnslist_text
+ warn dnslists = rbl5.test.ex,rbl4.test.ex=127.0.0.128
+ add_header = DNSlist: $dnslist_domain $dnslist_text
accept
check_recipient:
diff --git a/test/dnszones-src/db.test.ex b/test/dnszones-src/db.test.ex
index 8ac35367e..b269d5856 100644
--- a/test/dnszones-src/db.test.ex
+++ b/test/dnszones-src/db.test.ex
@@ -1,4 +1,4 @@
-; $Cambridge: exim/test/dnszones-src/db.test.ex,v 1.4 2006/04/18 11:13:19 ph10 Exp $
+; $Cambridge: exim/test/dnszones-src/db.test.ex,v 1.5 2006/10/03 15:11:22 ph10 Exp $
; This is a testing zone file for use when testing DNS handling in Exim. This
; is a fake zone of no real use - hence no SOA record. The zone name is
@@ -176,6 +176,11 @@ recurse.test.ex A V4NET.99.0.2
20.12.11.V4NET.rbl4 A 127.0.0.6
21.12.11.V4NET.rbl4 A 127.0.0.7
+22.12.11.V4NET.rbl4 A 127.0.0.128
+ TXT "This is a test blacklisting4 message"
+
+22.12.11.V4NET.rbl5 A 127.0.0.1
+ TXT "This is a test blacklisting5 message"
1.13.13.V4NET.rbl CNAME non-exist.test.ex.
2.13.13.V4NET.rbl A 127.0.0.1
diff --git a/test/log/0139 b/test/log/0139
new file mode 100644
index 000000000..c6f94cb9f
--- /dev/null
+++ b/test/log/0139
@@ -0,0 +1,3 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= postmaster@exim.test.ex H=[V4NET.11.12.22] U=CALLER P=smtp S=sss
+1999-03-02 09:44:33 10HmaX-0005vi-00 => userx <userx@exim.test.ex> R=localuser T=local_delivery
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
diff --git a/test/mail/0139.userx b/test/mail/0139.userx
new file mode 100644
index 000000000..f527841d2
--- /dev/null
+++ b/test/mail/0139.userx
@@ -0,0 +1,14 @@
+From postmaster@exim.test.ex Tue Mar 02 09:44:33 1999
+Return-path: <postmaster@exim.test.ex>
+Envelope-to: userx@exim.test.ex
+Delivery-date: Tue, 2 Mar 1999 09:44:33 +0000
+Received: from [V4NET.11.12.22] (ident=CALLER)
+ by the.local.host.name with smtp (Exim x.yz)
+ (envelope-from <postmaster@exim.test.ex>)
+ id 10HmaX-0005vi-00
+ for userx@exim.test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+DNSlist: rbl4.test.ex This is a test blacklisting4 message
+DNSlist: rbl5.test.ex This is a test blacklisting5 message
+
+test data
+
diff --git a/test/scripts/0000-Basic/0139 b/test/scripts/0000-Basic/0139
index 6d613a7ca..4cd168e18 100644
--- a/test/scripts/0000-Basic/0139
+++ b/test/scripts/0000-Basic/0139
@@ -24,4 +24,12 @@ exim -bh V4NET.11.12.21
mail from:<postmaster@exim.test.ex>
quit
****
+exim -odi -bs -oMa V4NET.11.12.22
+mail from:<postmaster@exim.test.ex>
+rcpt to:<userx@exim.test.ex>
+data
+test data
+.
+quit
+****
no_msglog_check
diff --git a/test/stderr/0139 b/test/stderr/0139
index 011047452..14cdd0647 100644
--- a/test/stderr/0139
+++ b/test/stderr/0139
@@ -28,6 +28,13 @@
>>> DNS lookup for 14.12.11.V4NET.rbl4.test.ex failed
>>> => that means V4NET.11.12.14 is not listed at rbl4.test.ex
>>> warn: condition test failed
+>>> processing "warn"
+>>> check dnslists = rbl5.test.ex,rbl4.test.ex=127.0.0.128
+>>> DNS list check: rbl5.test.ex,rbl4.test.ex=127.0.0.128
+>>> using result of previous DNS lookup
+>>> DNS lookup for 14.12.11.V4NET.rbl4.test.ex failed
+>>> => that means V4NET.11.12.14 is not listed at rbl4.test.ex
+>>> warn: condition test failed
>>> processing "accept"
>>> accept: condition test succeeded
>>> using ACL "check_recipient"
@@ -111,7 +118,7 @@
>>> exim.test.ex in "+local_domains"? yes (matched "+local_domains")
>>> accept: condition test succeeded
>>> host in ignore_fromline_hosts? no (option unset)
-LOG: 10HmaX-0005vi-00 <= postmaster@exim.test.ex H=[V4NET.11.12.14] P=smtp S=sss
+LOG: 10HmaY-0005vi-00 <= postmaster@exim.test.ex H=[V4NET.11.12.14] P=smtp S=sss
>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? no (option unset)
>>> host in host_reject_connection? no (option unset)
@@ -142,6 +149,13 @@ LOG: 10HmaX-0005vi-00 <= postmaster@exim.test.ex H=[V4NET.11.12.14] P=smtp S=sss
>>> DNS lookup for 15.12.11.V4NET.rbl4.test.ex failed
>>> => that means V4NET.11.12.15 is not listed at rbl4.test.ex
>>> warn: condition test failed
+>>> processing "warn"
+>>> check dnslists = rbl5.test.ex,rbl4.test.ex=127.0.0.128
+>>> DNS list check: rbl5.test.ex,rbl4.test.ex=127.0.0.128
+>>> using result of previous DNS lookup
+>>> DNS lookup for 15.12.11.V4NET.rbl4.test.ex failed
+>>> => that means V4NET.11.12.15 is not listed at rbl4.test.ex
+>>> warn: condition test failed
>>> processing "accept"
>>> accept: condition test succeeded
>>> using ACL "check_recipient"
@@ -191,7 +205,17 @@ LOG: H=[V4NET.11.12.15] F=<postmaster@exim.test.ex> rejected RCPT <userx@exim.te
>>> using result of previous DNS lookup
>>> DNS lookup for 20.12.11.V4NET.rbl4.test.ex succeeded (yielding 127.0.0.6)
>>> => that means V4NET.11.12.20 is listed at rbl4.test.ex
+>>> check add_header = DNSlist: $dnslist_domain $dnslist_text
+>>> = DNSlist: rbl4.test.ex
>>> warn: condition test succeeded
+>>> processing "warn"
+>>> check dnslists = rbl5.test.ex,rbl4.test.ex=127.0.0.128
+>>> DNS list check: rbl5.test.ex,rbl4.test.ex=127.0.0.128
+>>> using result of previous DNS lookup
+>>> DNS lookup for 20.12.11.V4NET.rbl4.test.ex succeeded (yielding 127.0.0.6)
+>>> => but we are not accepting this block class because
+>>> => there was no match for =127.0.0.128
+>>> warn: condition test failed
>>> processing "accept"
>>> accept: condition test succeeded
>>> host in hosts_connection_nolog? no (option unset)
@@ -225,5 +249,13 @@ LOG: H=[V4NET.11.12.15] F=<postmaster@exim.test.ex> rejected RCPT <userx@exim.te
>>> => but we are not accepting this block class because
>>> => there was an exclude match for &0.0.0.7
>>> warn: condition test failed
+>>> processing "warn"
+>>> check dnslists = rbl5.test.ex,rbl4.test.ex=127.0.0.128
+>>> DNS list check: rbl5.test.ex,rbl4.test.ex=127.0.0.128
+>>> using result of previous DNS lookup
+>>> DNS lookup for 21.12.11.V4NET.rbl4.test.ex succeeded (yielding 127.0.0.7)
+>>> => but we are not accepting this block class because
+>>> => there was no match for =127.0.0.128
+>>> warn: condition test failed
>>> processing "accept"
>>> accept: condition test succeeded
diff --git a/test/stdout/0139 b/test/stdout/0139
index 748852cce..011f2d4fb 100644
--- a/test/stdout/0139
+++ b/test/stdout/0139
@@ -8,7 +8,7 @@
250 Accepted
250 Accepted
354 Enter message, ending with "." on a line by itself
-250 OK id=10HmaX-0005vi-00
+250 OK id=10HmaY-0005vi-00
**** SMTP testing: that is not a real message id!
@@ -44,3 +44,9 @@
220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250 OK
221 the.local.host.name closing connection
+220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmaX-0005vi-00
+221 the.local.host.name closing connection