Email filters in cPanel automatically process incoming email according to rules you define.
You can block a sender or domain, detect words in the subject or body, move mail to another folder, forward it, or delete unwanted messages.
1. Choose the filter type
- Email Filters – for one mailbox.
- Global Email Filters – for the entire cPanel account.
2. Create a filter
- Open Email Filters or Global Email Filters.
- Click Create a New Filter.
- Enter a name.
- Under Rules, define what should match.
- Under Actions, define what should happen.
- Click Create.
3. Rules
You can check From, Subject, To, Reply Address, Body, headers, recipients, Spam Status and Spam Score. Common comparisons are equals, contains, begins with, ends with and matches regex.
Important: equals means an exact match. Use contains when the text may appear anywhere.
4. Examples
One sender: From → equals → ads@example.com
Whole domain: From → ends with → @example.com
Word in subject: Subject → contains → viagra
5. Multiple rules
Use OR when any rule may match and AND when all must match.
6. Actions
- Discard Message
- Redirect to Email
- Fail With Message
- Stop Processing Rules
- Deliver to Folder
- Pipe to a Program
Recommendation: If you are not completely sure the filter will never match legitimate mail, use Deliver to Folder and the Spam/Junk folder instead of Discard Message.
7. Filter order
Filters run in the order shown in Current Filters.
8. Test the filter
Use Filter Test and Test Filter to verify the rule before relying on it.
9. Troubleshooting
Check the selected field, comparison type, mailbox, whether a global filter was used, filter order and the Filter Test result.
For help, open a ticket in Moj Webicom or write to pomoc@webicom.net.