You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2004/03/16 03:41:25 UTC

svn commit: rev 9506 - in incubator/spamassassin/trunk: . rules

Author: jm
Date: Mon Mar 15 18:41:24 2004
New Revision: 9506

Added:
   incubator/spamassassin/trunk/rules/25_hashcash.cf
Modified:
   incubator/spamassassin/trunk/MANIFEST
   incubator/spamassassin/trunk/rules/25_uribl.cf
   incubator/spamassassin/trunk/rules/50_scores.cf
   incubator/spamassassin/trunk/rules/70_testing.cf
Log:
Hashcash moved to main ruleset.  Scores may need manual tweaking

Modified: incubator/spamassassin/trunk/MANIFEST
==============================================================================
--- incubator/spamassassin/trunk/MANIFEST	(original)
+++ incubator/spamassassin/trunk/MANIFEST	Mon Mar 15 18:41:24 2004
@@ -320,3 +320,4 @@
 t/rcvd_parser.t
 rules/init.pre
 t/hashcash.t
+rules/25_hashcash.cf

Added: incubator/spamassassin/trunk/rules/25_hashcash.cf
==============================================================================
--- (empty file)
+++ incubator/spamassassin/trunk/rules/25_hashcash.cf	Mon Mar 15 18:41:24 2004
@@ -0,0 +1,52 @@
+# SpamAssassin - Hashcash rules
+#
+# Please don't modify this file as your changes will be overwritten with
+# the next update. Use @@LOCAL_RULES_DIR@@/local.cf instead.
+# See 'perldoc Mail::SpamAssassin::Conf' for details.
+#
+# <@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>
+#
+###########################################################################
+
+# Requires the Mail::SpamAssassin::Plugin::Hashcash plugin be loaded.
+
+ifplugin Mail::SpamAssassin::Plugins::Hashcash
+
+header HASHCASH_20            eval:check_hashcash_value('20', '21')
+header HASHCASH_21            eval:check_hashcash_value('21', '22')
+header HASHCASH_22            eval:check_hashcash_value('22', '23')
+header HASHCASH_23            eval:check_hashcash_value('23', '24')
+header HASHCASH_24            eval:check_hashcash_value('24', '25')
+header HASHCASH_25            eval:check_hashcash_value('25', '26')
+header HASHCASH_HIGH          eval:check_hashcash_value('26', '9999')
+tflags HASHCASH_20            nice userconf
+tflags HASHCASH_21            nice userconf
+tflags HASHCASH_22            nice userconf
+tflags HASHCASH_23            nice userconf
+tflags HASHCASH_24            nice userconf
+tflags HASHCASH_25            nice userconf
+tflags HASHCASH_HIGH          nice userconf
+
+# This should NOT be a high score; it's possible for this to happen if
+# a mail is sent to a list, and CC'd to you.   However, if it does fire,
+# it'll cancel out the hashcash "bonus" rule.
+#
+header HASHCASH_2SPEND        eval:check_hashcash_double_spend()
+describe HASHCASH_2SPEND      HashCash token already spent in another mail
+score HASHCASH_2SPEND         0.1
+
+endif   # Mail::SpamAssassin::Plugins::Hashcash

Modified: incubator/spamassassin/trunk/rules/25_uribl.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/25_uribl.cf	(original)
+++ incubator/spamassassin/trunk/rules/25_uribl.cf	Mon Mar 15 18:41:24 2004
@@ -27,6 +27,8 @@
 # which lists the zones to look up in advance.  The rules will
 # not hit unless each rule has a corresponding 'uridnsbl' line.
 
+ifplugin Mail::SpamAssassin::Plugins::URIDNSBL
+
 # URI-DNSBL lookups can take a *maximum* of this many seconds past the
 # normal DNSBL lookups.
 uridnsbl_timeout	2
@@ -46,4 +48,6 @@
 #header		URIBL_SORBS	eval:check_uridnsbl('URIBL_SORBS')
 #describe	URIBL_SORBS	Contains a URL listed in the SORBS blocklist
 #tflags		URIBL_SORBS	net
+
+endif   # Mail::SpamAssassin::Plugins::URIDNSBL
 

Modified: incubator/spamassassin/trunk/rules/50_scores.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/50_scores.cf	(original)
+++ incubator/spamassassin/trunk/rules/50_scores.cf	Mon Mar 15 18:41:24 2004
@@ -931,3 +931,16 @@
 score BAYES_80 0 0 2.442 1.657
 score BAYES_90 0 0 2.454 2.101
 score BAYES_99 0 0 5.400 5.400
+
+#
+# Hashcash
+#
+
+score HASHCASH_20             -0.5
+score HASHCASH_21             -0.7
+score HASHCASH_22             -1.0
+score HASHCASH_23             -2.0
+score HASHCASH_24             -3.0
+score HASHCASH_25             -4.0
+score HASHCASH_HIGH           -5.0
+

Modified: incubator/spamassassin/trunk/rules/70_testing.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/70_testing.cf	(original)
+++ incubator/spamassassin/trunk/rules/70_testing.cf	Mon Mar 15 18:41:24 2004
@@ -85,32 +85,6 @@
 header __YAHOO_BEGINNING	Message-ID =~ /<\S+(?:\.\S+|\.\S+\.\S+\.\S+)\@/
 meta T_FORGED_YAHOO_MSGID	(__YAHOO_MSGID && !__YAHOO_BEGINNING)
 
-header T_HASHCASH_20		eval:check_hashcash_value('20', '21')
-header T_HASHCASH_21		eval:check_hashcash_value('21', '22')
-header T_HASHCASH_22		eval:check_hashcash_value('22', '23')
-header T_HASHCASH_23		eval:check_hashcash_value('23', '24')
-header T_HASHCASH_24		eval:check_hashcash_value('24', '25')
-header T_HASHCASH_25		eval:check_hashcash_value('25', '26')
-header T_HASHCASH_26		eval:check_hashcash_value('26', '9999')
-tflags T_HASHCASH_20		nice
-tflags T_HASHCASH_21		nice
-tflags T_HASHCASH_22		nice
-tflags T_HASHCASH_23		nice
-tflags T_HASHCASH_24		nice
-tflags T_HASHCASH_25		nice
-tflags T_HASHCASH_26		nice
-score T_HASHCASH_20		-0.5
-score T_HASHCASH_21		-0.7
-score T_HASHCASH_22		-1.0
-score T_HASHCASH_23		-2.0
-score T_HASHCASH_24		-3.0
-score T_HASHCASH_25		-4.0
-score T_HASHCASH_26		-5.0
-
-header T_HASHCASH_2SPEND	eval:check_hashcash_double_spend()
-describe T_HASHCASH_2SPEND	HashCash token already spent in another mail
-score T_HASHCASH_2SPEND		0.1
-
 # Altavista.com's Greg Connor gconnor at nekodojo.org says 'they never send
 # mail'; <2423209050.1071572609@[172.23.65.45]>, Tue, 16 Dec 2003 11:03:29
 # -0800, on the spf-discuss at v2.listbox.com mailing list.  Let's see