Using SpamAssassin Headers on cPanel

Once SpamAssassin is enabled, you can easily set an Email Filter to clear out your spam…

Filter: Any Header that matches regex "X-Spam-Score: ([2][1-9]|[3-6][0-9])"
Destination: "spam_holding_account@yourdomain"
Filter: Any Header that matches regex "X-Spam-Score: ([7-9][0-9]|[1-9][0-9]{2,})"
Destination: "Discard"

Unlike the other options shown in the email filtering, this actually does the job without freezing up. Using the score numbers (and not regex) fails when there are no SpamAssassin headers present in an email.

Last updated on