---
title: 'RuleStatistics Settings'
url: 'https://docs.danami.com/warden/settings/antispam/plugin-settings/rulestatistics'
markdown: 'https://docs.danami.com/warden/settings/antispam/plugin-settings/rulestatistics.md'
date: '2026-09-22'
description: 'Log real-time per-rule statistics for each email, allowing admins to easily analyze rule performance and identify false positives/negatives. Use rule statistics - use_rule_statistics Whether to log real-time rule statistics to the database. Default: 1 Rule statistics sync spam levels - rule_stati…'
taxonomy:
  category:
    - docs
  tag:
    - rulestatistics
---

[](#)  [ Basics ](https://docs.danami.com/warden/)     [ Settings ](https://docs.danami.com/warden/settings)     [ Antispam ](https://docs.danami.com/warden/settings/antispam)     [ Plugin Settings ](https://docs.danami.com/warden/settings/antispam/plugin-settings)      RuleStatistics Settings    

# RuleStatistics Settings

Log real-time per-rule statistics for each email, allowing admins to easily analyze rule performance and identify false positives/negatives.

**Use rule statistics** - `use_rule_statistics`
Whether to log real-time rule statistics to the database.
Default: 1

**Rule statistics sync spam levels** - `rule_statistics_sync_spam_levels`
Whether to sync the rule\_statistics\_spam\_level and rule\_statistics\_spam\_kill\_level with the server wide policy spam levels. Disabling this option allows you to set a custom spam level and spam kill level. This is useful for testing different spam levels without actually changing them under the server wide policy.
Default: 1

**Rule statistics spam level** - `rule_statistics_spam_level`
The score required for the rule to be logged as spam. This should usually match the spam level set for the server wide policy.
Default: 7

**Rule statistics spam kill level** - `rule_statistics_spam_kill_level`
The score required for the rule to be logged as spam when using the "move" or "tag" spam actions with receive spam set to "no". Any score above the spam level but below the spam\_kill\_level will be treated as "spammy". This should usually match the spam kill level set for the server wide policy. If you are not using the spam kill level then set it to match the rule\_statistics\_spam\_level.
Default: 13

**Rule statistics log rules** - `rule_statistics_log_rule`
The rule names to log statistiscs for. If no entries are added then statistics will be logged for all rules.
Default: empty

**Rule statistics ignore rules** - `rule_statistics_ignore_rule`
The rule names to ignore and not log statistics for.
Default: empty

**Rule statistics log sub-rules** - `rule_statistics_log_sub_rules`
Whether to log statistics for sub-rules (meta rules starting with double underscores). This adds a lot more database logging so it is not normally recommended to enable on busy servers.
Default: 0

---

## Navigation

- Parent: [Plugin Settings](https://docs.danami.com/warden/settings/antispam/plugin-settings.md)
- Previous: [ResourceLimits Settings](https://docs.danami.com/warden/settings/antispam/plugin-settings/resourcelimits.md)
- Next: [SH Settings](https://docs.danami.com/warden/settings/antispam/plugin-settings/sh.md)
