|
|
HOME >
CHAPTER 12
Chapter
12; Rules
Rules are the building blocks of
SpamAssassin. Every test performed on a message is based upon a
rule, with an associated score. Rules were covered briefly in
Chapter 7.
User-definable rules are based on a Perl regular expression, also
called a regex. Some knowledge of
regexes is required to write new rules. There are many good sources
of information on Perl regular expressions. The standard Perl
distribution contains a quick-start document on regular expressions,
a longer regular expressions tutorial, and a syntax definition. To
access these, use the
perldoc
command:
$ perldoc perlrequick
$ perldoc perlretut
$ perldoc perlre
Other sources of regular expression material include most beginners'
books on Perl. An Internet search for 'Perl regular expressions
tutorial' will bring up many suitable pages. No prior knowledge of
Perl regexes is assumed in this book.
There are several different types of rules in SpamAssassin:
|
Rule Type |
Description |
|
body |
A rule that searches for a
regex in the body of an email. It also searches the
Subject:
header of an email. |
|
header |
A rule that searches for a
regex in the headers of an email. |
|
meta |
A rule that is a
combination of other rules. |
|
full |
A rule that searches for a
regex anywhere within the email body. This is run before
SpamAssassin performs decoding of the email. |
|
uri |
SpamAssassin detects web
links, and passes them through uri rules. These rules
still take the form of a regex, and are described and
scored in the same way. |
|
rawbody
|
Similar to a body rule,
but also searches any HTML tags. |
|
 |
|
 |
| |
Paperback,
220 pages
Released: Sept 2004
ISBN: 1904811124
Author: Alistair McDonald |
|
|
|
|
|
Intro
1. Introducing Spam
2. Spam and Anti-Spam
Techniques
3. Open Relays
4. Protecting Email Addresses
5. Detecting Spam
6. Installing SpamAssassin
7. Configuration Files
8. Using SpamAssassin
9. Bayesian Filtering

10. Look and Feel
11. Network Tests 
12. Rules
13. Improving Filtering
14. Performance
15. Housekeeping and Reporting
16. Building an Anti-Spam Gateway
17. Email Clients
18. Choosing other Spam Tools
Appendix A
Index
|
 |
|

View the book details
on PacktPub.com
|
 |