Mailing List Archive

svn commit: r231544 [6/6] - in /spamassassin/branches/3.1: ./ rules/ t/ t/data/
Modified: spamassassin/branches/3.1/t/SATest.pm
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/SATest.pm?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/SATest.pm (original)
+++ spamassassin/branches/3.1/t/SATest.pm Thu Aug 11 17:05:47 2005
@@ -108,6 +108,9 @@
or warn "cannot copy $file to log/test_rules_copy/$base";
}

+ copy ("data/01_test_rules.cf", "log/test_rules_copy/01_test_rules.cf")
+ or warn "cannot copy data/01_test_rules.cf to log/test_rules_copy/01_test_rules.cf";
+
rmtree ("log/localrules.tmp");
mkdir ("log/localrules.tmp", 0755);


Added: spamassassin/branches/3.1/t/data/01_test_rules.cf
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/data/01_test_rules.cf?rev=231544&view=auto
==============================================================================
--- spamassassin/branches/3.1/t/data/01_test_rules.cf (added)
+++ spamassassin/branches/3.1/t/data/01_test_rules.cf Thu Aug 11 17:05:47 2005
@@ -0,0 +1,50 @@
+# Rules used in the test suite. This allows us to change the
+# main ruleset without breaking the test suite.
+
+# <@LICENSE>
+# Copyright 2004 Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# </@LICENSE>
+
+
+
+header TEST_NOREALNAME From =~ /^["\s]*\<?\S+\@\S+\>?\s*$/
+describe TEST_NOREALNAME From: does not include a real name
+score TEST_NOREALNAME 5
+
+header TEST_ENDSNUMS From:addr =~ /\D\d{8,}\@/i
+describe TEST_ENDSNUMS From: ends in many numbers
+score TEST_ENDSNUMS 5
+
+header TEST_FORGED_YAHOO_RCVD eval:check_for_forged_yahoo_received_headers()
+describe TEST_FORGED_YAHOO_RCVD 'From' yahoo.com does not match 'Received' headers
+score TEST_FORGED_YAHOO_RCVD 5
+
+uri TEST_NORMAL_HTTP_TO_IP m{^https?://\d+\.\d+\.\d+\.\d+}i
+describe TEST_NORMAL_HTTP_TO_IP Uses a dotted-decimal IP address in URL
+score TEST_NORMAL_HTTP_TO_IP 5
+
+body TEST_EXCUSE_12 /this (?:e?-?mail|message) (?:(?:has )?reached|was sent to) you in error/i
+describe TEST_EXCUSE_12 Nobody's perfect
+score TEST_EXCUSE_12 5
+
+body TEST_EXCUSE_4 /To Be Removed,? Please/i
+describe TEST_EXCUSE_4 Claims you can be removed from the list
+score TEST_EXCUSE_4 5
+
+header TEST_INVALID_DATE Date !~ /^\s*(?:(?i:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s+)?[0-3\s]?[0-9]\s+(?i:Jan|Feb|Ma[ry]|Apr|Ju[nl]|Aug|Sep|Oct|Nov|Dec)\s+(?:[12][901])?[0-9]{2}\s+[0-2]?[0-9](?:\:[0-5][0-9]){1,2}\s+(?:[AP]M\s+)?(?:[+-][0-9]{4}|UT|[A-Z]{2,3}T)(?:\s+\(.*\))?\s*$/ [if-unset: Wed, 31 Jul 2002 16:41:57 +0200]
+describe TEST_INVALID_DATE Invalid Date: header (not RFC 2822)
+score TEST_INVALID_DATE 5
+
+

Modified: spamassassin/branches/3.1/t/forged_rcvd.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/forged_rcvd.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/forged_rcvd.t (original)
+++ spamassassin/branches/3.1/t/forged_rcvd.t Thu Aug 11 17:05:47 2005
@@ -8,8 +8,8 @@

%patterns = (

-q{ INVALID_DATE }, 'invdate',
-q{ EXCUSE_4 }, 'bodyspotted',
+q{ TEST_INVALID_DATE }, 'invdate',
+q{ TEST_EXCUSE_4 }, 'bodyspotted',

);


Modified: spamassassin/branches/3.1/t/rule_names.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/rule_names.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/rule_names.t (original)
+++ spamassassin/branches/3.1/t/rule_names.t Thu Aug 11 17:05:47 2005
@@ -86,9 +86,15 @@
Content-Transfer-Encoding: 7bit

EOF
- print MAIL join("\n", @tests) . "\n\n";
+
# we are looking for random failures, but we do a deterministic
- # test to prevent too much frustration with "make test"
+ # test to prevent too much frustration with "make test".
+
+ # start off sorted
+ @tests = sort @tests;
+
+ print MAIL join("\n", @tests) . "\n\n";
+
# 25 iterations gets most hits most of the time, but 10 is large enough
for (1..10) {
print MAIL join("\n", sha1_shuffle($_, @tests)) . "\n\n";

Modified: spamassassin/branches/3.1/t/rule_types.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/rule_types.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/rule_types.t (original)
+++ spamassassin/branches/3.1/t/rule_types.t Thu Aug 11 17:05:47 2005
@@ -8,8 +8,8 @@

%patterns = (

-q{ INVALID_DATE }, 'invdate',
-q{ EXCUSE_4 }, 'bodyspotted',
+q{ TEST_INVALID_DATE }, 'invdate',
+q{ TEST_EXCUSE_4 }, 'bodyspotted',
q{ LAST_RCVD_LINE }, 'LAST_RCVD_LINE',
q{ MESSAGEID_MATCH }, 'MESSAGEID_MATCH',
q{ ENV_FROM }, 'ENV_FROM',

Modified: spamassassin/branches/3.1/t/spam.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spam.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spam.t (original)
+++ spamassassin/branches/3.1/t/spam.t Thu Aug 11 17:05:47 2005
@@ -12,9 +12,8 @@
q{ X-Spam-Status: Yes, score=}, 'status',
q{ X-Spam-Flag: YES}, 'flag',
q{ X-Spam-Level: **********}, 'stars',
-q{ FROM_ENDS_IN_NUMS }, 'endsinnums',
-q{ NO_REAL_NAME }, 'noreal',
-
+q{ TEST_ENDSNUMS }, 'endsinnums',
+q{ TEST_NOREALNAME }, 'noreal',

);


Modified: spamassassin/branches/3.1/t/spamd.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd.t (original)
+++ spamassassin/branches/3.1/t/spamd.t Thu Aug 11 17:05:47 2005
@@ -15,8 +15,8 @@
q{ X-Spam-Status: Yes, score=}, 'status',
q{ X-Spam-Flag: YES}, 'flag',
q{ X-Spam-Level: **********}, 'stars',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',
q{ This must be the very last line}, 'lastline',



Modified: spamassassin/branches/3.1/t/spamd_ldap.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_ldap.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_ldap.t (original)
+++ spamassassin/branches/3.1/t/spamd_ldap.t Thu Aug 11 17:05:47 2005
@@ -20,8 +20,8 @@
q{ X-Spam-Flag: YES}, 'flag',
q{ X-Spam-Level: **********}, 'stars',
q{ X-Spam-Foo: LDAP read}, 'ldap_config_read',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',


);

Modified: spamassassin/branches/3.1/t/spamd_maxchildren.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_maxchildren.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_maxchildren.t (original)
+++ spamassassin/branches/3.1/t/spamd_maxchildren.t Thu Aug 11 17:05:47 2005
@@ -13,8 +13,8 @@
q{ X-Spam-Status: Yes, score=}, 'status',
q{ X-Spam-Flag: YES}, 'flag',
q{ X-Spam-Level: **********}, 'stars',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',


);

Modified: spamassassin/branches/3.1/t/spamd_parallel.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_parallel.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_parallel.t (original)
+++ spamassassin/branches/3.1/t/spamd_parallel.t Thu Aug 11 17:05:47 2005
@@ -13,8 +13,8 @@
q{ X-Spam-Status: Yes, score=}, 'status',
q{ X-Spam-Flag: YES}, 'flag',
q{ X-Spam-Level: **********}, 'stars',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',


);

Modified: spamassassin/branches/3.1/t/spamd_prefork_stress.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_prefork_stress.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_prefork_stress.t (original)
+++ spamassassin/branches/3.1/t/spamd_prefork_stress.t Thu Aug 11 17:05:47 2005
@@ -39,8 +39,8 @@
q{ X-Spam-Status: Yes, score=}, 'status',
q{ X-Spam-Flag: YES}, 'flag',
q{ X-Spam-Level: **********}, 'stars',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',


);

Modified: spamassassin/branches/3.1/t/spamd_prefork_stress_2.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_prefork_stress_2.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_prefork_stress_2.t (original)
+++ spamassassin/branches/3.1/t/spamd_prefork_stress_2.t Thu Aug 11 17:05:47 2005
@@ -39,8 +39,8 @@
q{ X-Spam-Status: Yes, score=}, 'status',
q{ X-Spam-Flag: YES}, 'flag',
q{ X-Spam-Level: **********}, 'stars',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',


);

Modified: spamassassin/branches/3.1/t/spamd_prefork_stress_3.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_prefork_stress_3.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_prefork_stress_3.t (original)
+++ spamassassin/branches/3.1/t/spamd_prefork_stress_3.t Thu Aug 11 17:05:47 2005
@@ -29,8 +29,8 @@
q{ X-Spam-Status: Yes, score=}, 'status',
q{ X-Spam-Flag: YES}, 'flag',
q{ X-Spam-Level: **********}, 'stars',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',

);


Modified: spamassassin/branches/3.1/t/spamd_report.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_report.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_report.t (original)
+++ spamassassin/branches/3.1/t/spamd_report.t Thu Aug 11 17:05:47 2005
@@ -10,9 +10,9 @@

%is_spam_patterns = (

-q{ INVALID_DATE}, 'date',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_INVALID_DATE}, 'date',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',

);


Modified: spamassassin/branches/3.1/t/spamd_report_ifspam.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_report_ifspam.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_report_ifspam.t (original)
+++ spamassassin/branches/3.1/t/spamd_report_ifspam.t Thu Aug 11 17:05:47 2005
@@ -10,9 +10,9 @@

%is_spam_patterns = (

-q{ INVALID_DATE}, 'date',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_INVALID_DATE}, 'date',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',

);


Modified: spamassassin/branches/3.1/t/spamd_ssl.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_ssl.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_ssl.t (original)
+++ spamassassin/branches/3.1/t/spamd_ssl.t Thu Aug 11 17:05:47 2005
@@ -15,8 +15,8 @@
q{ X-Spam-Status: Yes, score=}, 'status',
q{ X-Spam-Flag: YES}, 'flag',
q{ X-Spam-Level: **********}, 'stars',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',
q{ This must be the very last line}, 'lastline',



Modified: spamassassin/branches/3.1/t/spamd_ssl_accept_fail.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_ssl_accept_fail.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_ssl_accept_fail.t (original)
+++ spamassassin/branches/3.1/t/spamd_ssl_accept_fail.t Thu Aug 11 17:05:47 2005
@@ -16,8 +16,8 @@
q{ X-Spam-Status: Yes, score=}, 'status',
q{ X-Spam-Flag: YES}, 'flag',
q{ X-Spam-Level: **********}, 'stars',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',
q{ This must be the very last line}, 'lastline',



Modified: spamassassin/branches/3.1/t/spamd_symbols.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_symbols.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_symbols.t (original)
+++ spamassassin/branches/3.1/t/spamd_symbols.t Thu Aug 11 17:05:47 2005
@@ -10,8 +10,8 @@

%patterns = (

-q{ FROM_ENDS_IN_NUMS, }, 'endsinnums',
-q{ NO_REAL_NAME, }, 'noreal',
+q{ TEST_ENDSNUMS, }, 'endsinnums',
+q{ TEST_NOREALNAME, }, 'noreal',


);

Modified: spamassassin/branches/3.1/t/spamd_syslog.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/spamd_syslog.t?rev=231544&r1=231543&r2=231544&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/spamd_syslog.t (original)
+++ spamassassin/branches/3.1/t/spamd_syslog.t Thu Aug 11 17:05:47 2005
@@ -14,8 +14,8 @@
q{ X-Spam-Status: Yes, score=}, 'status',
q{ X-Spam-Flag: YES}, 'flag',
q{ X-Spam-Level: **********}, 'stars',
-q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
-q{ NO_REAL_NAME}, 'noreal',
+q{ TEST_ENDSNUMS}, 'endsinnums',
+q{ TEST_NOREALNAME}, 'noreal',


);