Email Filters¶
Email filters within cPanel are extremely powerful filters/actions that can execute tasks on incoming emails to your domain names. Filters can be configured to help you automate email-related actions you find yourself performing manually.
You should review the steps below. If you find yourself confused, you can look at some of the email filter examples we have.
Configuring an email filter¶
cPanel's email filters are a powerful tool for managing your email accounts, helping you sort and organize incoming emails based on specific criteria. These filters can be used to automatically sort emails into folders, delete spam, forward emails, and perform various other actions.
Here's a step-by-step guide on how to use cPanel email filters:
- Login to cPanel
- Navigate to either
Global Email Filters
orFilters
. Global applies to all accounts, andFilters
allows you to add individual filters. - Choose or Create an Email Account to Filter, select the email account you wish to create filters for.
- Create a New Filter
- Set Filter Criteria:
- Name: Name your filter for easy identification.
- Rules: Define the rules for your filter. This involves specifying what the system should look for in incoming emails. For example, you can filter emails based on:
- Sender's address
- Subject line
- Body content
- Specific words or phrases
- Spam Status
-
You can configure multiple rules to ensure a message matches.
-
Choose Actions for the Filter:
- Decide what action to take when an email meets your criteria. Options include:
- Discard message: Delete it.
- Redirect to Email: Forward it to another email address
- Fail with message: Prevent it from delivering, and respond with a message.
- Stop processing rules: If it meets certain criteria, prevent it from being filtered.
- Move the email to a specific folder: Allows you to move the message based on criteria.
- Pipe to a program: Advanced Pipe it to a script or program.
- Decide what action to take when an email meets your criteria. Options include:
-
You can choose one or more actions for each filter.
-
Save the Filter: Hit save, and the filter will now be active.
- After setting the criteria and actions, save the filter.
-
It will now be active for the selected email account.
-
Test the Filter: (Optional but Recommended): To ensure your filter is working as intended, you can send a test email that meets the criteria of your filter.
Note
Filters can also be added to individual accounts via webmail. Adding them within webmail adds it to only that single account.
Email Filter Examples¶
Moving all spam to the Junk folder¶
Here's an example filter that we configured to move all messages labeled SPAM to another folder: