SpamAssassin is a highly accurate open source spam filter.

There are two major components to the SpamAssassin filtering system: a set of rules which match various properties of an e-mail (e.g., whether it mentiones stock alerts or Nigerian banks), and a set of weights for each rule. The weights are assigned automatically, by analyzing various real-world mail spools. So SpamAssassin is essentially an adaptive system--the rules are periodically recalibrated, and whether a given property is good or bad may change over time.

SpamAssassin also includes an "auto whitelist", which supposedly learns to recognize your most frequent correspondents.

There're probably some chewy ideas in here for an evolutionary biologist--spam filtering involves an arms race between the spammers and the mail administrators of the world, and the most advanced spam filters are beginning to resemble immune systems.

(If you're a Debian user, type apt-get install spamassassin spamc libnet-dns-perl razor and take a look at the setup instructions. If you want to use spamd, try using the --max-children 10 argument; it will save you a lot of grief.)