You might check out
crm114. It's commonly used for spam, but can be directed at other stuff as well, like information firewalling. It's installable in Debian:
Description: versatile classifier for e-mail and other data
CRM114, the Controllable Regex Mutilator, is a system to examine incoming
e-mail, system log streams, data files, or other data streams, and to sort,
filter, or alter the incoming files or data streams however the user
desires. Criteria for categorization of data can be by satisfaction of
regular expressions, by sparse binary polynomial matching with a Bayesian
Chain Rule evaluator, or by other means.
CRM114 is not just another drop-in spam-filtering system; its Sparse
Binary Polynomial Hashing methods give it the power to develop highly
accurate Bayesian filters on very little training.
CRM114 is compatible with SpamAssassin or other spam-flagging software; it
can also be pipelined in front of or behind procmail. CRM114 is also useful
as a syslog or firewall log filter, to flag up important events but ignore
the ones that aren't meaningful.
For mail filtering, installing metamail or mew-bin packages is
recommended in order to have tools to decode MIME attachments.