How to Create and Manage an Email Filter in cPanel
cPanel email filters allow you to set up rules to automatically manage incoming messages. You can use them to block spam, forward emails, or sort messages into specific folders.
Accessing email filters
- Log in to your cPanel account.
- Go to the Email section and click on Email Filters.

- Next to the mailbox you want to configure, click on Manage Filters.

Creating a new filter
- Click Create a New Filter.

- Enter a filter name.
- Define one or more filter rules by choosing which part of the email to analyze (e.g., sender, subject, body, spam score, etc.).

Available parameters
| Parameter | Description |
|---|---|
| From | Sender's email address |
| Subject | Email subject |
| To | Recipient's address |
| Body | Message content |
| Spam Score | SpamAssassin spam score |
Available operators
Operators define how the parameter value is compared to your condition:
| Operator | Description |
|---|---|
| equals | Exact match |
| contains / does not contain | Includes or excludes a string |
| begins with / ends with | Checks start or end of content |
| is greater than / is less than (spam score only) | Numeric comparison for spam score |
Available actions
When a message matches the defined rules, one or more of the following actions can be applied:
| Action | Description |
|---|---|
| Discard Message | Deletes the email without notification |
| Redirect | Forwards the email to another address |
| Fail with Message | Rejects and returns an error to sender |
| Deliver to Folder | Moves email to a specific folder |
| Pipe to a Program | Sends the email to a script or application |
Activating the filter
Once you’ve defined rules and actions, click Create to activate the filter. It will be immediately applied to the selected email account.
Note: If you're using rules based on Spam Score, make sure Apache SpamAssassin is enabled from the Email section in cPanel.