SpamAssassin’s main strength is its ability to score messages for their likelihood to be spam. The set of rules distributed with SpamAssassin is located by default in /usr/local/share/spamassassin. The rules are covered here to give you a taste of how the scoring engine works. SpamAssassin rules should be changed only after fully understanding the ramifications of modifying them.
A rule is a test that determines the spam score of a message. Rules can act on various parts of the message, including the full message and headers, headers only, body only, etc. Rules can be positive (definitely spam) or negative (definitely legitimate email) and can be fractional. An example rule is given in the “Privileged Parameters” ...