Seeing new and exclusive modules pop up in cPFence has become a habit for our clients—because we just keep shipping. While others are playing catch-up, we’re focused on giving server owners real tools to solve real problems. Today, we’re proud to announce our latest: the Spam AutoShield module. This powerful new addition is built to give you total spam control across your entire Enhance server environment, without breaking a sweat.
In our previous post, we covered how to upgrade Rspamd to the latest version and activate the WebUI for manual training and inspection. That’s great for power users—but let’s face it, most admins don’t have time to babysit spam filters every day.
This is where Spam AutoShield steps in.
Getting Started Is Instant—and Powerful
One of the strongest points of Spam AutoShield is how quickly you can go from “default setup” to “fully optimized spam defense.” No complex guides, no hours of manual tuning. Just run these three commands:
cpfence --activate-spam-autoshield
cpfence --configure-spam-autoshield
cpfence --rspamd-training-tool
Behind the scenes, Spam AutoShield does the heavy lifting:
- It auto-configures the tricky parts of your mail server for optimal filtering.
- It instantly trains Rspamd with over 170,000 curated spam samples to supercharge detection accuracy.
- It gets your entire server ready for serious spam control—without you writing a single custom rule.
Curious how much smarter Rspamd became? Run:
rspamc stat
You’ll see a significant jump in the Total learns
, and even more in your inbox quality.
And that’s just the beginning—Spam AutoShield gives you the tools to take full control of spam filtering across your entire server, with precision and ease. Let’s break them down.
Advanced Spam Blocking Tools Explained
These tools can be accessed quickly through your cPFence Admin UI:
cpfence --ui >> Tools & Utilities >> Spam AutoShield Tools
Block by Sender IP
Example:
cpfence --add-spam-autoshield-ip 123.123.123.123
Use Case:
Some spam operations send bulk emails from specific IP addresses. If you identify an IP consistently sending spam, block it instantly server-wide. This protects every mailbox on your server from this spammer.
Unblock:
cpfence --del-spam-autoshield-ip 123.123.123.123
Block by Email Address
Example:
cpfence --add-spam-autoshield-email [email protected]
Use Case:
Occasionally, spam emails are cleverly disguised or targeted at specific users. Blocking a specific sender email address ensures no messages from known malicious senders slip through again.
Unblock:
cpfence --del-spam-autoshield-email [email protected]
Block by Domain
Example:
cpfence --add-spam-autoshield-domain spamfactory.com
Use Case:
Some domains are notorious spam factories. Blocking an entire sending domain is highly effective when the spam sender frequently rotates sender emails but always uses the same domain.
Unblock:
cpfence --del-spam-autoshield-domain spamfactory.com
Block by Email Subject (Partial Match)
Example:
cpfence --add-spam-autoshield-subject
(You’ll be prompted to enter the spammy subject line.)
Creative Usage:
Spam emails often have repetitive subjects like “You won!” or “Urgent invoice”. This tool is flexible—it will match any email containing your entered text. For example, entering “invoice” blocks any email with subjects like “invoice”, “urgent invoice”, or “invoice payment overdue”.
Unblock:
cpfence --del-spam-autoshield-subject
Block by Top-Level Domain (TLD)
Example:
cpfence --add-spam-autoshield-tld
(You’ll be prompted to enter the TLD, e.g., .click
, .xyz
, .cyou
)
Creative Usage:
Spam often originates from obscure or cheaply available TLDs rarely used for legitimate business communications. Blocking spammy TLDs dramatically reduces inbox clutter. For instance, blocking .xyz
can immediately cut down a large percentage of incoming spam, since this TLD is heavily abused by spammers.
Unblock:
cpfence --del-spam-autoshield-tld
Reset Rspamd Training Data (Fresh Start)
cpfence --reset-rspamd-training-data
Use Case:
If your spam filter has been poorly trained or polluted with inconsistent data, sometimes a fresh start is the best way forward. Resetting clears all learned Bayesian data, allowing you to retrain with higher-quality samples, immediately boosting accuracy.
Real-Life Tips & Recommendations
- Start Broad, Refine Later:
Initially, use broad rules like spammy TLD blocking, then gradually refine your spam filter as you identify new threats. - Spot Trends Quickly:
Regularly review blocked subjects and TLDs to proactively address emerging spam campaigns. - Server-wide Protection:
Especially useful for hosting providers or large mail clusters, where spam rapidly multiplies—protecting hundreds of users in one stroke.
Ready to experience spam-free email management?
Try cPFence for free today. Activate Spam AutoShield alongside other powerful modules, including MonitorPro, ApiMachine, AutoMySQL, and WP AutoShield, and elevate your server’s protection to the next level.
Get started now, and make spam a distant memory.