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

svn commit: rev 10025 - incubator/spamassassin/trunk/rules

Author: felicity
Date: Wed Apr 14 20:41:02 2004
New Revision: 10025

Modified:
   incubator/spamassassin/trunk/rules/20_head_tests.cf
   incubator/spamassassin/trunk/rules/70_testing.cf
Log:
reimplement ADVERT_CODE* rules

Modified: incubator/spamassassin/trunk/rules/20_head_tests.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/20_head_tests.cf	(original)
+++ incubator/spamassassin/trunk/rules/20_head_tests.cf	Wed Apr 14 20:41:02 2004
@@ -218,16 +218,6 @@
 header DATE_IN_FUTURE_96_XX	eval:check_for_shifted_date('96', 'undef')
 describe DATE_IN_FUTURE_96_XX	Date: is 96 hours or more after Received: date
 
-# REIMPLEMENT: ADVERT_CODE tests.
-#
-# ADVERT_CODE should be: match at start of subject, case insensitive, 0 or more
-# non-alphanum chars followed by "adv" and a word boundary.
-# 
-# ADVERT_CODE2: match anywhere in subject - require a word char followed by 0
-# or more any-chars, then word boundary, then a negative lookahead for the
-# string "ADV." (for some reason).  then "A" and 0 or more whitespace, "D" and
-# 0 or more whitespace, "V" and a word boundary.
-
 ###########################################################################
 # illegal characters that should be MIME encoded
 # might want to exempt users using languages that don't use Latin

Modified: incubator/spamassassin/trunk/rules/70_testing.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/70_testing.cf	(original)
+++ incubator/spamassassin/trunk/rules/70_testing.cf	Wed Apr 14 20:41:02 2004
@@ -477,3 +477,8 @@
 # looser
 uri T_BIZ_TLD_1			/^(?:https?:\/\/|mailto:)\S+\.biz(?:\/|$)/i
 uri T_BIZ_TLD_2			/\.biz(?:\/|$)/i
+
+# REIMPLEMENT: ADVERT_CODE tests.
+header T_ADVERT_CODE	Subject =~ /^[^0-9a-z]*adv(?:ert)?\b/i
+# may need a negative lookahead between in front of first \b for "ADV."
+header T_ADVERT_CODE2	Subject =~ /\w.*\bA\s*D\s*V\b/