Defining your own blocking lists
Creating your own blocking lists
You can create your own blocking lists to prevent spam from entering your site. These documents work similar to the rules.SubjectBlock document: rules.MailRules uses them to cue Internet Services to perform specific actions (add spam scores, NDN sender, and so on) based on tests according to mail content. However, blocking lists go one step
further; they check numerous fields in a mail message instead of just the "Subject" field.
You can create your own lists for
• objectionable words and phrases
• X-Mailers (programs used by spammers)
• busted mailers (non-spam mailers that don't add a Message-ID header to a message)
• IP addresses
• virus subject names
• virus attachment names.
How to create lists documents
As with all rules documents, lists documents must reside in the Filters folder (in the Internet Services folder on the administrator's Desktop) and have a unique name prefixed with the word 'lists'. For example,
• lists.myreallybadlist
• lists.mymoderatelybadlist
• lists.questionablebadlist
How the rules.MailRules file uses lists files
The default rules.MailRules file contains rules to test the content of message fields against the content of your blocking files. These include the rules.SubjectBlock, rules.AttachmentBlock, and all 'lists' files. This how Internet Services checks the rules and filter documents:
By default, the Filters folder contains basic 'lists' documents that work with hard-coded rules in the rules.MailRules document to block different types of spam. For example, the lists.VirusNetskySubject and the lists.VirusNetskyAttachment documents are called by this rule in the rules.MailRules document:
@: IF (@length($attname) && @InWordList("lists.VirusNetskySubject", $Subject) && @InWordList("lists.VirusNetskyAttachment", $attname)) NDN 550 "No worms allowed"
This rule states that if Internet Services detects a subject that is entered in the lists.VirusNetskySubject file or an attachment name that is entered in the lists.VirusNetskyAttachment file, it will NDN (with text) the offending sender. The Filters folder contains other default 'lists' documents similarly cued by corresponding mail rules.
If you create your own unique lists, you must make sure there is a corresponding mail rule in the rules.MailRules file. You can either modify an existing rule or create your own rules. For example, if you create these lists in your Filters folder
• lists.myreallybadlist, which adds 100 points to the spam level
• lists.mymoderatelybadlist, which adds 50 points to the spam level
• lists.myquestionablelist, which adds 25 points to the spam level
Subject: IF (@inwordlist("lists.myreallybadlist", $subject)) SET $spamlevel += 100 AND $spamtests += "SUBJECT_IN_LIST;"
Subject: IF (@inwordlist("lists.mymoderatelybadlist", $subject)) SET $spamlevel += 50 AND $spamtests += "SUBJECT_IN_LIST2;"
Subject: IF (@inwordlist("lists.myquestionablelist", $subject)) SET $spamlevel += 25 AND $spamtests += "SUBJECT_IN_LIST3;".
If you want to fine tune the spam levels for your site, you can do so on the Mail Rules subtab on the Basic Internet Setup form or directly in the rules.MailRules file.
|