"SpamAssassin is a rule-based spam identification tool.
It's written in Perl, and there are several ways of using it: You
can call a client program, spamassassin, and have it determine
whether a given message is likely to be spam; you can do
essentially the same thing but use a client/server approach so that
your client isn't always loading and parsing the rules each time
mail comes; or, finally, you can use a Perl module interface to
filter spam from a Perl program.
SpamAssassin is extremely configurable; you can select which
rules you want to use, change the way the rules contribute to a
piece of mail's "spam score," and add your own rules. We'll look at
some of these features later in the article. First, how do we get
SpamAssassin installed and start using it?
If you're using Debian Linux or one of the BSDs, then this
couldn't be easier: just install the appropriate package using apt
or the ports tree respectively. (The BSD port is called
Those less fortunate will have to download the latest version of
SpamAssassin, and install it themselves."