# Mercury/32 Basic Content Control rule file.
# Copyright (c) 2002-2003, David Harris; portions copyright (c) 2002 David Kocmoud.
# For information on the syntax and format of this file, please consult
# the "Content control" section of the Mercury/32 Help file.
# This set of rules is intended to catch a wide range of unwanted mail
# messages where the content is commercial or sexual in nature. It works
# quite well (at the time of writing anyway) but you will almost certainly
# want or need to adjust it over time to deal with the specific types of
# content you want to filter. This rule set is designed to be used with a
# definition where the trigger weight is set to 50.
# Note that many of the rules in this file have negative weights: this is
# a useful way of "promoting" a message that might otherwise be detected
# as having unacceptable content.
# Check for "Lazy HTML", almost always a sure sign of spam
if Test "LazyHTML strict" weight 51 tag "Message contains Lazy HTML"
if Test "HasIFrame" weight 51 tag "Probable iFrame virus attack"
# Check for excessive numbers of HTML comments
if Test "HTMLComments 10" weight 51 tag "Too many HTML comments"
# Check for an unreasonable number of spaces in the subject
if Subject matches "* +*" weight 51
# Check for unreasonable numbers of high-bit characters - a fairly
# reliable sign of unreadable Asian spam.
if Test "Garbage 25" weight 51
# Give a small weight to messages containing URLs in the .BIZ TLD
if body matches "*http:*.biz*" weight 15
# Check for all variations of "viagra" and similar products in subject and body
# Note that the "obfuscated" keyword, which is used to trap doctored versions of
# trigger words like "vi@gra", can be abbreviated to "ob".
if subject contains "viagra" obfuscated weight 51
if subject contains "viapro" ob weight 51