How to Create a Spam Email Filter in cPanel
Spam emails can be a major nuisance and security risk. cPanel provides a built-in email filtering tool that allows you to automatically sort, block, or redirect emails based on custom rules. This guide will walk you through creating a spam email filter on your SKPHost account.
Types of Email Filters in cPanel
- User-Level Filters: Apply to a specific email account (e.g., info@yourdomain.com).
- Account-Level Filters: Apply to all email accounts under your cPanel.
Steps to Create a User-Level Email Filter
- Login to cPanel.
- Under the Email section, click Email Filters.
- Select the email account you want to filter and click Manage Filters.
- Click Create a New Filter.
- Enter a Filter Name (e.g., "Block Spam Offers").
- Set the Rules:
- Field: Choose what to filter (Subject, From, Body, etc.)
- Condition: Choose "contains", "begins with", "is", etc.
- Value: Enter the keyword or email address to filter (e.g., "free money", "noreply@spammer.com")
- Set the Action:
- Discard Message – Delete the email immediately.
- Redirect to Email – Forward to another address.
- Deliver to Folder – Move to a specific folder like Spam.
- Fail with Message – Reject and send an error back to sender.
- Click Save.
Steps to Create an Account-Level Filter
- In cPanel, go to Email → Global Email Filters.
- Click Create a New Filter.
- Set the same rules and actions as above.
- Click Save.
Note: Account-level filters run before user-level filters. Use them for blocking spam that affects all email accounts on your domain.
Enabling SpamAssassin
For more advanced spam protection, SKPHost also supports SpamAssassin. To enable it:
- Go to cPanel → Spam Filters.
- Toggle on Process New Emails and Mark them as Spam.
- Optionally enable Automatically Delete New Spam to auto-remove high-confidence spam.
If you continue to face issues, please open a create a request.
