O'Reilly logo

SpamAssassin by Alistair McDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required