Bogofilter is a trainable email spam detector.

Bogofilter takes an email message or other text on standard input, parses it
into words, does a statistical check against databases of "good" and "bad"
words, and returns a status code indicating whether or not the message is spam.
Bogofilter decodes base64 or quoted-printable encoded texts and ignores non-text
attachments and HTML comments.

The supported database backends are LMDB, Kyoto Cabinet and SQLite3, and
for a while still Berkeley DB.  The upstream version would theoretically 
also support QDBM and Tokyo Cabinet, but these are not currently available
as FreeBSD ports.
