Rulestats.pm - A SpamAssassin Rule Statistics Plugin

This is a SpamAssassin plugin which stores, on a rule by rule basis, the number of spam emails that each SpamAssassin rule fired on.

The number of legitimate emails that the rule fired on and the maximum and minimum scores of emails that each rule fired on. System administrators should find this very useful as it will provide an immediate insight into the accuracy and suitability of each rule that is used, based on other rules.

There are several SpamAssassin rule-based analysis projects currently available but most of them seem to work by analysing the logs that SpamAssassin generates. This plugin does not work in this way; it hooks into SpamAssassin’s checking code and writes the statistics directly to a MySQL database, offering real-time accurate statistics which do not rely on log file parsing or analysis.