SpamAssassin is a mail filter which attempts to identify spam using a variety of mechanisms including text analysis, Bayesian filtering, DNS blocklists, and collaborative filtering databases.
Using its rule base, it uses a wide range of heuristic tests on mail headers and body text to identify "spam", also known as unsolicited commercial email. Once identified, the mail can then be optionally tagged as spam for later filtering using the user's own mail user-agent application.
SpamAssassin typically differentiates successfully between spam and non-spam in between 95% and 100% of cases, depending on what kind of mail you get and your training of its Bayesian filter. Specifically, SpamAssassin has been shown to produce around 0.9% false negatives (spam that was missed) and around 0.1% false positives (ham incorrectly marked as spam). See the rules/STATISTICS*.txt files for more information.