With Email filtering In cPanel, you can automatically process incoming messages for a specific email account according to defined rules.
For example, you can move messages from a specific sender to a folder, process emails with certain terms in the subject line, or automatically sort out unwanted messages.
In this guide, we will show you step by step how to create an email filter in CURIAWEB, define conditions and actions, manage existing filters, and safely test new rules.
Important: A misconfigured filter rule can also catch desired emails. Therefore, start with a narrowly defined rule if possible and test it before having messages automatically deleted or discarded.
What is an email filter? #
An email filter checks incoming messages based on certain conditions and performs a defined action upon a match.
Simplified, a filter consists of two parts:
If this condition is met → execute this action.
A simple example would be:
Subject contains "Rechnung" → Deliver message to a specific folder
Or:
Sender contains "@beispiel.ch" → Process message according to a defined rule
This can be used to automate recurring tasks in email processing.
Distinguish between account-based and global email filters #
cPanel distinguishes between Email filtering and global email filters.
The area Email filter serves to manage rules for a specific email account.
Global email filters, on the other hand, apply at a higher level to emails for the cPanel account.
Practical Tip: If a rule only affects a specific mailbox, you should create it there as an account-based email filter if possible. Global rules have a much broader scope.
We treat the global filters separately under Using Global Email Filters in cPanel.
1. Open email filters in cPanel #
Log in to your CURIAWEB cPanel.
Scroll to the section on the homepage Email and click on Email filter.
cPanel will then show you the existing email accounts or the options for managing their filters.
2. Select desired email account #
Search for the email account for which you want to create a filter rule.
For example:
info@deine-domain.ch
Open the filter management feature for this account.
Attention: Check the complete email address. An account-related filter for
info@deine-domain.chdoes not automatically apply to other mailboxes in your domain.
3. Create new filter #
Click the button in filter management to Creating a new filter.
Now you can define a name, the filter conditions, and the desired action.
4. Assign a meaningful filter name #
Give the filter a name that will allow you to immediately recognize what it is used for later.
Instead of an unhelpful name like:
Filter 1
is for example:
Sort invoices
or:
Messages from Beispiel AG
Much easier to understand.
This becomes especially important if you use multiple filters later.
5. Select the first filter condition #
In the next step, you determine which part of an email should be checked.
Depending on the cPanel configuration, various criteria are available. These may include, for example:
- From or sender
- Subject
- To and respectively recipient
- Return address
- Text or message content
- certain header information
- spam-related values
You can see the specific options available to you directly in the filter management of your cPanel.
6. Select comparison operator #
Based on the message component to be checked, you determine, how the entered value is to be compared.
Depending on the selected criterion, different operators may be offered, for example, analogously:
- equals
- contains
- does not contain
- starts with
- ends with
- matches a regular expression
The available operators may vary depending on the selected criterion.
„Equals or contains? #
This difference is particularly important for working filters.
With equals you require a correspondingly exact match.
With contains Is it sufficient if the specified value occurs within the tested field?.
For example, if you want to capture all messages whose subject contains the word Invoice contains, a corresponding Contains rule is usually more flexible than a condition that only accepts an exact identical subject.
Practical Tip: Before saving, consider whether your rule should be exact or flexible. Conditions that are too narrow will miss messages, while conditions that are too broad may capture many more emails than intended.
7. Enter value for the condition #
Now enter the value to filter by.
For a rule that identifies messages based on the subject line, this could be, for example:
Invoice
For a rule based on a specific sender, a full address could be used:
buchhaltung@beispiel.ch
Check spelling and operator used carefully.
Set action for found messages #
After you have defined the condition, you determine what should happen with a matching message.
Depending on the configuration, cPanel can offer various actions.
This may include, for example, delivering a message to a folder, forwarding or redirecting it, deleting a message, or other processing actions.
Important: Choose a destructive action like discarding only if your filter condition is reliable enough. Otherwise, a rule that is too broad may remove legitimate emails.
Deliver message to a specific folder #
One practical and relatively safe way to use this feature is to automatically sort messages into a specific email folder.
With this, you can, for example, send emails with the subject Invoice file in a designated folder.
If the corresponding action is available in your cPanel configuration, you must specify the destination folder correctly.
The technical folder name may depend on the view you see later in Webmail or your email client. Therefore, use the folder specification expected by cPanel or your mail account.
10. Save filter #
Check again before saving:
- the filter name
- the email field to be checked
- the comparison operator
- the comparative value
- the desired action
Then save the filter using the corresponding button.
The rule should then appear in the filter overview of this email account.
Be sure to test the filters #
After creation, you shouldn't simply assume that the rule works exactly as intended.
Send a test message that clearly fulfills the defined condition.
For example, if your filter is set to:
Subject contains "Invoice"
should respond, send a message with a subject like:
Invoice Test 2026
Then check if the specified action was executed.
12. Also take a negative test #
A good filter test does not consist of just one message that needs to be detected.
Also send a message to which the rule not may apply.
If your filter for the word Invoice respond in the subject line, you could, for example, send a second message with the following subject line:
General Inquiry
This message should not be processed due to the billing rule.
Practical Tip: Always test both sides: one message must trigger the filter, and another must not trigger it. Only then will you know if your condition is sufficiently precise.
Use multiple conditions in a filter #
For more complex rules, you can combine multiple conditions.
It is crucial here how these conditions are logically linked to one another.
Simply put, there are two important variants:
AND: Several conditions must be met simultaneously.
OR: It is sufficient if one of the conditions is met.
Example of an AND rule #
You only want to filter messages if they come from a specific sender and at the same time the word Invoice included in the subject line.
Simplified:
Sender = buchhaltung@beispiel.ch AND Subject contains Invoice
A message from a different sender with the subject line „Invoice“ would not meet this combination.
Example of an OR rule #
You want to detect messages when the subject is either Invoice or Credit memo contains.
Simplified:
Subject contains invoice OR subject contains credit note
In this case, either of the two conditions is sufficient.
Attention: An incorrect combination of AND and OR can significantly alter the scope of a rule. Therefore, when dealing with multiple conditions, check particularly carefully which messages are actually supposed to be captured.
Use multiple actions #
Depending on the filter configuration, multiple actions can be added to a rule.
This can be useful, for example, when a message needs to be delivered to a specific location and additional processing is to be performed as well.
However, the more complex a filter becomes, the more important a controlled test is.
For simple requirements, a clear rule is often easier to maintain than a large filter construct with many conditions and actions.
Observe filter order #
If multiple filters are set up for an email account, their order can be relevant for processing.
A very general rule may already react to a message before a more specific rule ordered later can achieve the desired effect.
Therefore, when using multiple filters, check not only each individual rule, but also their order.
Practical Tip: Specific rules should be intentionally ordered before very general rules. If, after adding a new filter, existing rules suddenly behave differently, the filter order is one of the first things you should check.
Why filters should be kept as simple as possible #
A filter rule that you can still understand immediately even months later is easier to maintain and safer to modify.
When you combine a large number of conditions, regular expressions, and different actions in a single rule, the probability of unexpected results increases.
If necessary, break down complex requirements into multiple clearly named filters.
Only use regular expressions if you understand them #
cPanel can support regular expressions for certain filter conditions.
This allows for the definition of very flexible patterns. At the same time, even small errors can cause a rule not to apply at all or to apply much more broadly than expected.
For simple filtering tasks, operators like contains, starts with or ends with mostly easier to understand.
Attention: Don't use a regular expression just because the option is there. For email filters, a simple, understandable rule is often the better solution.
Create filter based on sender #
If messages from a specific sender should be handled specially, you can use the sender as a condition.
For example, a very specific rule can check a complete email address:
buchhaltung@beispiel.ch
A broader rule, on the other hand, could react to a part of the sender information.
The broader the condition is formulated, the more important it is to check whether this unintentionally captures other senders.
Sender address is not a secure proof of identity #
A filter rule based on the visible sender is suitable for organizing emails, but should not be considered a security mechanism.
Sender information of emails can be manipulated or forged.
A rule like:
Sender contains chef@deine-domain.ch
therefore does not automatically mean that the message in question is actually trustworthy.
Safety: Use email filters to sort and process messages, but not as the sole proof of a sender's identity.
Create filter based on subject #
Subject rules are suitable, for example, for recurring automated messages with a consistent subject line.
Please note, however, that senders can change their subject lines and legitimate messages may contain similar terms.
A rule like:
Subject contains "Invoice"
is therefore significantly less risky for automatic sorting into a folder than for the immediate deletion of every matching message.
Do not fight spam solely with simple word filters #
It is tempting to automatically delete unwanted messages based on individual words in the subject line.
However, this can lead to wrong decisions because the same words can also appear in legitimate emails.
Special spam filters are available in cPanel for actual spam detection.
We show how to configure these at Configure spam filter in cPanel.
Filters and spam filters are not the same #
A standard email filter processes messages based on rules you define yourself.
A spam filter, on the other hand, evaluates messages based on various spam characteristics and corresponding inspection mechanisms.
Both functions can complement each other, but they fulfill different tasks.
For example, a standard filter is great for organizing specific messages, while general detection of unwanted emails is better handled by dedicated spam filters.
Message deletion or discarding filter #
When cPanel offers discarding or deleting a message as an action, you should use this feature with extreme caution.
Such an action can make sense if a message can be identified very clearly. However, if the conditions are formulated too broadly, there is a risk that desired e-mails will be lost.
Recommendation: If you want to test a new filter rule first, use a non-destructive action if possible. Observe the results and only switch to discard later when you are sure the rule is working reliably.
Use filter for forwarding #
Depending on the available actions, matching messages can also be redirected or forwarded to another address.
However, if all messages from a specific address should generally go to another mailbox, standard email forwarding is usually simpler and clearer.
We will show the facility at Set up email forwarding in cPanel.
Edit existing filter #
If you want to modify an existing rule, open:
Email → Email filter
Select the relevant email account and open its filter management.
Find the desired filter and select the edit function.
Then change the required conditions or actions and save the rule.
After every significant change, you should test the filter again with appropriate test messages.
Delete filters #
If a rule is no longer needed, you can remove it in the filter management of the email account in question.
Check the name and conditions of the filter before deleting so you do not accidentally remove the wrong rule.
Deleting a filter does not automatically delete the corresponding email account.
Filter not working #
If a message is not processed as expected, check the filter condition first.
Check in particular:
- Is the filter set up on the correct email account?
- Is the correct message field being checked?
- Does the comparison operator match the desired rule?
- Is the comparison value written correctly?
- Are several conditions correctly linked together?
- Are there other filters that also react to the message?
Then test again with a message whose content you know exactly.
Filter captures too many messages #
If a filter also processes emails that should not actually be affected, the condition is probably too general.
For example, instead of just:
Subject contains "Order"
to use, depending on the use case, an additional condition for the sender or another unique value may be useful.
The more precise a rule is, the lower the risk of unwanted matches.
Filter captures too few messages #
If a rule detects only a portion of the desired messages, it may be formulated too strictly.
An exact comparison can fail, for example, if a subject line changes slightly.
In this case, check whether a more flexible comparison like contains better fits the actual message pattern.
An expected message has disappeared #
If an expected message does not appear in the inbox and filters are set up for the mailbox, you should include these rules in your troubleshooting.
Check especially filters that move, redirect, or discard messages into other folders.
If it is unclear whether the message even reached the server or how it was processed, you can also use cPanel's Track Delivery.
We show the procedure at Track email delivery in cPanel.
E-mail filters and default address #
The default address and email filters perform different tasks.
The default address determines how messages sent to non-existent recipients of a domain are handled.
Email filters, on the other hand, process messages based on defined criteria.
We explain how to deal with unknown recipients at Default Address in cPanel: Catch-All and Unknown Recipients.
When should you use global email filters? #
If a rule should not only affect a single mailbox, but emails at the account level, global email filters may be an option.
Because their scope is larger, such rules must be created with particular care.
If only info@deine-domain.ch is supposed to be affected, an account-related filter is usually easier to oversee.
We will cover global filters in the next article under Using Global Email Filters in cPanel.
Best practice for new filters #
First, define as precisely as possible which messages you want to capture. Then, choose a simple condition and, if possible, start with a non-destructive action.
Then test at least one message that must be recognized and one message that must explicitly not be recognized.
Only when the behavior is reliable should you expand a rule or employ a destructive action.
Basic rule: Filter first, test, and only consider automatic deletion afterward. When it comes to email rules, a slightly more cautious configuration is better than a rule that removes important messages unnoticed.
Summary #
You can find account-related email filters in your CURIAWEB cPanel under Email → Email filter.
First, select the desired email account and then create a filter with a meaningful name. Define which part of a message should be checked, set the appropriate comparison operator and the value to search for, and then select the desired action.
When dealing with multiple conditions, you must pay special attention to the logical combination using AND or OR. If there are multiple filters, their order can also be relevant.
You should always check new rules with matching and non-matching test messages. You should only use delete or discard actions when you are certain that the filter condition reliably captures only the desired messages.
Global email filters are available for rules that go beyond a single mailbox. We will cover these in the next article.