Skip to content

Reset spam-filter training

Reset learning when training is unsuitable or poisoned, or when a drastic change in spam patterns calls for fresh learning. This is separate from removing a sender block.

  1. Open Spam AutoShield → Settings.
  2. Check Apply actions to and the exact servers.
  3. Choose Reset training data, read the confirmation, and run it only when that reset is intended.
  4. Wait for each final result. Plan new training and monitor filtering afterwards.

For dataset training, follow Train spam filter. Canceling later training does not erase learning already applied.

From a root terminal on the intended mail server, run:

Terminal window
cpfence --reset-rspamd-training-data

The command asks whether to permanently delete Redis database 0. Confirm its ownership and arrange a usable Redis backup first if recovery is required. Answer y or yes only when this server’s complete reset is intended; press Enter or answer N to cancel.

Read the final output. A Redis or authentication error is not a completed reset; review the cause before trying again. The command acts on this server, not the WebUI’s Apply actions to selection.