Email

Create and test email filters in cPanel

Reviewed on 3 min read filtros de correo

Email filters let you create simple rules or combine several conditions to act on the messages you receive.

Examples of what you can do:

  • Create a custom spam filter that moves messages to a folder for review.
  • Redirect emails from certain senders, or containing particular words, to the right mailboxes.
  • Move certain emails to a specific folder.

Each filter combines conditions and actions. The conditions decide which messages match; the actions say what to do with them. For example, a subject containing a word can trigger delivery to another folder.

Rules allow or and and conditions. cPanel evaluates and before or, so a complex combination may not be grouped the way it looks at first glance. Split the logic into simple filters and use Test Filter with a representative message before relying on it. The test tool works on saved filters.

When a message meets the rules, cPanel runs their actions and carries on with the following filters unless Stop Processing Rules is used. Bear the order in mind so that another rule does not later move, redirect or discard the same message.

A filter called ejemplo would match if the subject contains the word Hola or the recipient is ejemplo@dominio.com. The Redirect to Email action sends the message to the address given, but does not on its own keep another copy in the original inbox. If you need both deliveries, also add Deliver to Folder pointing to INBOX. An external forward can fail because of SPF, DKIM or the receiver's policy. Use Discard Message only after testing the rule and when you deliberately want to delete the message.

Account-level filters

In Email Filters in cPanel you can define filters for specific email accounts; these filters apply only to each email account.

Global filters

In Global Email Filters, the rules apply to every message the cPanel account processes, including its different domains and addresses. Use recipient conditions if they should affect only one.

Create a rule and check its scope

In Email Filters, click Manage Filters next to the mailbox and then Create a New Filter. Give it a descriptive name, a simple condition and the action you want. To sort messages, select an existing folder with Deliver to Folder.

After saving, use Filter Test / Test Filter with a representative message that includes its headers. Test both a message that should match and one that should go through normal delivery. Read which conditions are met and which actions result; the test does not guarantee that an external provider will then accept a forwarded message.

Also review the global filters and the order in which they run. If messages go missing after a change, first check discard rules, redirects and destination folders. Editing or deleting the filter fixes its future behaviour, but does not recover messages it has already deleted.

You may also find useful

Something wrong or out of date? Tell us and we will review it.