You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by do...@apache.org on 2005/12/19 03:26:36 UTC

svn commit: r357615 - in /spamassassin/trunk/t: data/nice/spf1 data/nice/spf2 data/spam/spf1 data/spam/spf2 data/spam/spf3 spf.t

Author: dos
Date: Sun Dec 18 18:25:58 2005
New Revision: 357615

URL: http://svn.apache.org/viewcvs?rev=357615&view=rev
Log:
bug 4685: modify SPF regression tests to use dnsbltest.spamassassin.org
bug 4661: add SPF regression tests to test various trusted/internal network configurations

Added:
    spamassassin/trunk/t/data/nice/spf2
Modified:
    spamassassin/trunk/t/data/nice/spf1
    spamassassin/trunk/t/data/spam/spf1
    spamassassin/trunk/t/data/spam/spf2
    spamassassin/trunk/t/data/spam/spf3
    spamassassin/trunk/t/spf.t

Modified: spamassassin/trunk/t/data/nice/spf1
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/data/nice/spf1?rev=357615&r1=357614&r2=357615&view=diff
==============================================================================
--- spamassassin/trunk/t/data/nice/spf1 (original)
+++ spamassassin/trunk/t/data/nice/spf1 Sun Dec 18 18:25:58 2005
@@ -1,5 +1,5 @@
 Return-Path: <ne...@dnsbltest.spamassassin.org>
-Received: from bugzilla.spamassassin.org (bugzilla.spamassassin.org [64.142.3.173]) by amgod.boxhost.net (Postfix) with SMTP id B9B2931016D for <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org [64.142.3.173]) by amgod.boxhost.net (Postfix) with SMTP id B9B2931016D for <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
 Received: by proxy.google.com with SMTP id so1951389 for <jm...@jmason.org>; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
 Received: by abbulk2 with SMTP id mr733125; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
 Message-ID: <10...@persist.google.com>

Added: spamassassin/trunk/t/data/nice/spf2
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/data/nice/spf2?rev=357615&view=auto
==============================================================================
--- spamassassin/trunk/t/data/nice/spf2 (added)
+++ spamassassin/trunk/t/data/nice/spf2 Sun Dec 18 18:25:58 2005
@@ -0,0 +1,23 @@
+Return-Path: <ne...@dnsbltest.spamassassin.org>
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org [65.214.43.157]) by dnsbltest.spamassassin.org (Postfix) with SMTP id B9B2931016D for <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org [64.142.3.173]) by amgod.boxhost.net (Postfix) with SMTP id B9B2931016D for <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: by proxy.google.com with SMTP id so1951389 for <jm...@jmason.org>; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
+Received: by abbulk2 with SMTP id mr733125; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
+Message-ID: <10...@persist.google.com>
+Date: Tue, 10 Feb 2004 10:14:01 -0800 (PST)
+From: newsalerts-noreply@dnsbltest.spamassassin.org
+To: jm-google-news-alerts@jmason.org
+Subject: Google News Alert - spamassassin
+MIME-Version: 1.0
+Content-Type: text/plain; charset="ISO-8859-1";
+
+SWSOFT Unveils Plesk 7, Deployed by 1&1
+Web Host Industry Review - USA
+... The software also features a newly designed Windows XP-like user interface,
+is equipped SpamAssassin, an open source anti-spam tool, and includes
+"Application ...
+<http://thewhir.com/marketwatch/sws021004.cfm>
+See all stories on this topic:
+<http://news.google.com/news?hl=en&lr=&ie=UTF-8&oe=utf8&client=google&num=30&newsc
+lusterurl=http://thewhir.com/marketwatch/sws021004.cfm>
+

Modified: spamassassin/trunk/t/data/spam/spf1
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/data/spam/spf1?rev=357615&r1=357614&r2=357615&view=diff
==============================================================================
--- spamassassin/trunk/t/data/spam/spf1 (original)
+++ spamassassin/trunk/t/data/spam/spf1 Sun Dec 18 18:25:58 2005
@@ -1,5 +1,5 @@
 Return-Path: <ne...@dnsbltest.spamassassin.org>
-Received: from bugzilla.spamassassin.org (bugzilla.spamassassin.org [65.214.43.157]) by amgod.boxhost.net (Postfix) with SMTP id B9B2931016D for <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org [65.214.43.157]) by amgod.boxhost.net (Postfix) with SMTP id B9B2931016D for <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
 Received: by proxy.google.com with SMTP id so1951389 for <jm...@jmason.org>; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
 Received: by abbulk2 with SMTP id mr733125; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
 Message-ID: <10...@persist.google.com>

Modified: spamassassin/trunk/t/data/spam/spf2
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/data/spam/spf2?rev=357615&r1=357614&r2=357615&view=diff
==============================================================================
--- spamassassin/trunk/t/data/spam/spf2 (original)
+++ spamassassin/trunk/t/data/spam/spf2 Sun Dec 18 18:25:58 2005
@@ -1,5 +1,5 @@
 Return-Path: <ne...@dnsbltest.spamassassin.org>
-Received: from bugzilla.spamassassin.org (bugzilla.spamassassin.org [65.214.43.156]) by amgod.boxhost.net (Postfix) with SMTP id B9B2931016D for <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org [65.214.43.156]) by amgod.boxhost.net (Postfix) with SMTP id B9B2931016D for <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
 Received: by proxy.google.com with SMTP id so1951389 for <jm...@jmason.org>; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
 Received: by abbulk2 with SMTP id mr733125; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
 Message-ID: <10...@persist.google.com>

Modified: spamassassin/trunk/t/data/spam/spf3
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/data/spam/spf3?rev=357615&r1=357614&r2=357615&view=diff
==============================================================================
--- spamassassin/trunk/t/data/spam/spf3 (original)
+++ spamassassin/trunk/t/data/spam/spf3 Sun Dec 18 18:25:58 2005
@@ -1,5 +1,5 @@
 Return-Path: <ne...@dnsbltest.spamassassin.org>
-Received: from bugzilla.spamassassin.org (bugzilla.spamassassin.org [65.214.43.155]) by amgod.boxhost.net (Postfix) with SMTP id B9B2931016D for <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
+Received: from dnsbltest.spamassassin.org (dnsbltest.spamassassin.org [65.214.43.155]) by amgod.boxhost.net (Postfix) with SMTP id B9B2931016D for <jm...@jmason.org>; Tue, 10 Feb 2004 18:18:49 +0000 (GMT)
 Received: by proxy.google.com with SMTP id so1951389 for <jm...@jmason.org>; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
 Received: by abbulk2 with SMTP id mr733125; Tue, 10 Feb 2004 10:14:01 -0800 (PST)
 Message-ID: <10...@persist.google.com>

Modified: spamassassin/trunk/t/spf.t
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/spf.t?rev=357615&r1=357614&r2=357615&view=diff
==============================================================================
--- spamassassin/trunk/t/spf.t (original)
+++ spamassassin/trunk/t/spf.t Sun Dec 18 18:25:58 2005
@@ -19,7 +19,7 @@
 
 BEGIN {
   
-  plan tests => (DO_RUN ? 8 : 0);
+  plan tests => (DO_RUN ? 28 : 0);
 
 };
 
@@ -69,3 +69,150 @@
 
 sarun ("-t < data/spam/spf3", \&patterns_run_cb);
 ok_all_patterns();
+
+
+# Test using an assortment of trusted and internal network definitions
+
+# 9-10: Trusted networks contain first header.
+
+tstprefs("
+clear_trusted_networks
+clear_internal_networks
+trusted_networks 65.214.43.157
+always_trust_envelope_sender 1
+");
+
+%patterns = (
+    q{ SPF_HELO_PASS }, 'helo_pass',
+    q{ SPF_PASS }, 'pass',
+);
+
+sarun ("-t < data/nice/spf2", \&patterns_run_cb);
+ok_all_patterns();
+
+
+# 11-12: Internal networks contain first header.
+#	 Trusted networks not defined.
+
+tstprefs("
+clear_trusted_networks
+clear_internal_networks
+internal_networks 65.214.43.157
+always_trust_envelope_sender 1
+");
+
+%patterns = (
+    q{ SPF_HELO_PASS }, 'helo_pass',
+    q{ SPF_PASS }, 'pass',
+);
+
+sarun ("-t < data/nice/spf2", \&patterns_run_cb);
+ok_all_patterns();
+
+
+# 13-14: Internal networks contain first header.
+#	 Trusted networks contain some other IP.
+
+tstprefs("
+clear_trusted_networks
+clear_internal_networks
+trusted_networks 1.2.3.4
+internal_networks 65.214.43.157
+always_trust_envelope_sender 1
+");
+
+%patterns = (
+    q{ SPF_HELO_NEUTRAL }, 'helo_neutral',
+    q{ SPF_NEUTRAL }, 'neutral',
+);
+
+sarun ("-t < data/nice/spf2", \&patterns_run_cb);
+ok_all_patterns();
+
+
+# 15-16: Trusted+Internal networks contain first header.
+
+tstprefs("
+clear_trusted_networks
+clear_internal_networks
+trusted_networks 65.214.43.157
+internal_networks 65.214.43.157
+always_trust_envelope_sender 1
+");
+
+%patterns = (
+    q{ SPF_HELO_PASS }, 'helo_pass',
+    q{ SPF_PASS }, 'pass',
+);
+
+sarun ("-t < data/nice/spf2", \&patterns_run_cb);
+ok_all_patterns();
+
+
+# 17-18: Trusted networks contain first and second header.
+#	 Internal networks contain first header.
+
+tstprefs("
+clear_trusted_networks
+clear_internal_networks
+trusted_networks 65.214.43.157 64.142.3.173
+internal_networks 65.214.43.157
+always_trust_envelope_sender 1
+");
+
+%patterns = (
+    q{ SPF_HELO_PASS }, 'helo_pass',
+    q{ SPF_PASS }, 'pass',
+);
+
+sarun ("-t < data/nice/spf2", \&patterns_run_cb);
+ok_all_patterns();
+
+
+# 19-26: Trusted networks contain first and second header.
+#	 Internal networks contain first and second header.
+
+tstprefs("
+clear_trusted_networks
+clear_internal_networks
+trusted_networks 65.214.43.157 64.142.3.173
+internal_networks 65.214.43.157 64.142.3.173
+always_trust_envelope_sender 1
+");
+
+%anti_patterns = (
+    q{ SPF_HELO_PASS }, 'helo_pass',
+    q{ SPF_HELO_FAIL }, 'helo_fail',
+    q{ SPF_HELO_SOFTFAIL }, 'helo_softfail',
+    q{ SPF_HELO_NEUTRAL }, 'helo_neutral',
+    q{ SPF_PASS }, 'pass',
+    q{ SPF_FAIL }, 'fail',
+    q{ SPF_SOFTFAIL }, 'softfail',
+    q{ SPF_NEUTRAL }, 'neutral',
+);
+%patterns = ();
+
+sarun ("-t < data/nice/spf2", \&patterns_run_cb);
+ok_all_patterns();
+
+
+# 27-28: Trusted networks contain first header.
+#	 Internal networks contain first and second header.
+
+tstprefs("
+clear_trusted_networks
+clear_internal_networks
+trusted_networks 65.214.43.157
+internal_networks 65.214.43.157 64.142.3.173
+always_trust_envelope_sender 1
+");
+
+%anti_patterns = ();
+%patterns = (
+    q{ SPF_HELO_PASS }, 'helo_pass',
+    q{ SPF_PASS }, 'pass',
+);
+
+sarun ("-t < data/nice/spf2", \&patterns_run_cb);
+ok_all_patterns();
+