http://spambayes.sourceforge.net
Easily the best anti-spam Ive seen. Even compared to commercial products.
Especially if you already have a bunch of junk mail sorted out to train it.
It learns REALLY well and its based on very simple statistics.
Here's most of the theory:
http://www.paulgraham.com/spam.html