The Spam AutoShield module in cPFence is designed to give you full control over spam filtering across your entire Enhance cluster. It provides a powerful set of tools that allow you to block emails based on IPs, sender addresses, domains, subject lines, and even top-level domains (TLDs).
Access Spam AutoShield Tools (WebUI Method)


- Open the cPFence WebUI on your Main Control Panel server.
- From the left menu, go to Tools & Utilities and click on Spam AutoShield Tools.
- You’ll see 12 available tools, including activation, training, IP blocking, domain blocking, and more.
- Click any button to execute its action. Each tool affects all servers in your Enhance cluster.
All changes are applied immediately across your mail infrastructure, and the UI helps you manage everything without needing manual CLI entries.
Command Line (CLI) Method
- SSH into your Enhance server.
- Run the following commands depending on your needs:
- Activate & Configure:
cpfence --activate-spam-autoshield cpfence --configure-spam-autoshield cpfence --rspamd-training-tool - Block by IP:
cpfence --add-spam-autoshield-ip 123.123.123.123 - Unblock IP:
cpfence --del-spam-autoshield-ip 123.123.123.123 - Block by Email:
cpfence --add-spam-autoshield-email [email protected] - Unblock Email:
cpfence --del-spam-autoshield-email [email protected] - Block by Domain:
cpfence --add-spam-autoshield-domain spamdomain.com - Unblock Domain:
cpfence --del-spam-autoshield-domain spamdomain.com - Block by Subject:
(You will be prompted to enter the partial subject line to block)cpfence --add-spam-autoshield-subject - Unblock Subject:
cpfence --del-spam-autoshield-subject - Block by TLD:
(You will be prompted to enter the TLD likecpfence --add-spam-autoshield-tld.xyzor.click) - Unblock TLD:
cpfence --del-spam-autoshield-tld - Reset Rspamd Training Data:
cpfence --reset-rspamd-training-data
- Activate & Configure:
You can run rspamc stat to check statistics and confirm that training data has been loaded successfully.
Need Further Assistance?
Visit our Knowledgebase or contact our support team for help.
