
SpamAssassin is a very powerful and fully configurable spam filter with numerous features including automatic white-listing, RBL testing, Bayesian analysis, header and body text analysis. It is designed to be called from a user's .procmail or .forward file, but can also be integrated into a Mail Transport Agent (MTA).
If you use spamassassin on a moderately high-volume mail server, you may which to consider installing the spamc and spamd packages, which provide a daemonized variant of spamassassin that avoids the need to start a full perl runtime for each message processed.