✉️ Setting Up User-Specific Email Filters in cPanel
This guide provides instructions for creating custom email filters that apply only to a specific mailbox or user, allowing precise control over how incoming messages are handled, such as blocking spam or automatically routing messages to folders.
Step 1: Accessing the Filtering Tool
- Log in to your cPanel account.
- Navigate to the Mail section and click on the User Level Filtering link.
Step 2: Selecting the Target Mailbox
- Locate the specific email address (user) you wish to apply the new filter to. Click on the Manage Filters link situated next to that user's name.
- On the next page, click the Create a New Filter button.
Step 3: Defining the Filter Rules
- Enter a descriptive name for your filter. Then, define the filter rules. A rule consists of two parts: the condition and the action. For instance, to block spam, you might set the condition to search for the phrase "Free Money" within the subject line.
- Select the corresponding action. Common actions include:
- **Discard Message:** Deletes the email without notifying the sender. (Useful for hard spam blocking)
- **Redirect to Email:** Sends the message to a different email address.
- **Deliver to Folder:** Automatically moves the email to a specific folder in the mailbox.
- **Fail with Message:** Rejects the email and sends a bounce-back error to the sender.
Step 4: Activation and Review
- Once your filter rule is complete, click the Activate button to apply the filter immediately.
Troubleshooting and Expert Advice
Custom filters can be powerful, but improper setup can lead to missed legitimate emails. Use these tips to ensure your filters work correctly:
Filter Order and Priority
Filters are processed in the order they appear on the Manage Filters page. If an email meets the criteria of a filter higher on the list, the action for that filter will be executed, and no subsequent filters will be checked. Therefore, you should always place critical filters (like spam blocking) at the top, and less crucial routing rules below them. You can typically use the interface to adjust the order of the filters if needed.
Testing Your Rules
Before relying on a new filter, especially one that uses the Discard or Fail action, test it thoroughly. Most cPanel installations include a Filter Test section where you can paste a sample email message and see exactly which filter rules are triggered and what the final action will be. This prevents accidental deletion of important mail.
General vs. User Level
Remember that these are User Level Filters. If you need a rule to apply to every single email address on your domain (e.g., blocking known malicious senders globally), you should use the Global Email Filters tool, which is located separately in the Mail section of cPanel. Avoid creating redundant rules across both levels, as they can sometimes conflict.