New Customers: 50% OFF Your First Month on All VPS Servers & Web Hosting Plans!

How to manage email filters in cPanel

Email filters in cPanel let you sort incoming mail by rules you define. You can create filters for a single mailbox or apply them globally to all mailboxes on your account. This guide covers creating, editing, deleting and testing filters, plus arranging them in the right order.

HostworldWeb hosting & cPanel 3 min read Updated 24 Sep 2026

In cPanel, use Email Filters for a single mailbox or Global Email Filters for all mailboxes on the account. Create, edit or delete rules on those pages, then use Test Filter and arrange the order of rules so they run as you expect.

Before you start

  • You need cPanel access. Log in to portal.hostworld.uk, open your hosting service, then use the Login to cPanel single sign on. If that fails with “Action Failed Unable to auto‑login.”, open a support ticket.
  • Decide scope. Use Email Filters to affect one mailbox. Use Global Email Filters to affect every mailbox on the cPanel account.

Step 1: Open the filters screen

In cPanel, choose one of the following:

  • Email Filters. Click Manage Filters next to the mailbox you want to change.
  • Global Email Filters. This manages account‑level rules that apply to all addresses on the account.

Alternative: if you are in Webmail for a mailbox, click Email Filters there to go straight to that mailbox’s filter list.

Step 2: Create, edit or delete a filter

  • Create: click Create a New Filter. Name the filter, add one or more rules, choose an action, then Create.
  • Edit: click Edit next to a filter, change the rules or actions, then Save.
  • Delete: click Delete next to a filter, then confirm.
  • Test: use Test Filter on the same page to see a trace of what would match and what delivery action would occur. Prefer testing before enabling destructive actions.

Notes on rules and actions:

  • Rule fields include From, Subject, To, Reply Address, Body, Any Header, Any Recipient, Has Not Been Previously Delivered, Is an Error Message, List ID, Spam Status, Spam Bar and Spam Score. You cannot filter on BCC because recipients do not receive that header.
  • Comparisons include equals, contains, does not contain, begins with, ends with, does not begin, does not end, matches regex and does not match. Spam Score supports is above, is not above, is below and is not below. If you use regex, remember it is PCRE and backslashes are interpreted by Exim, so escape them as needed.
  • Combine multiple rules with Match all of the following or Match any of the following. cPanel evaluates and before or. Verify complex logic with Test Filter.
  • Actions include Deliver to Folder, Redirect to Email, Fail With Message, Discard Message and Stop Processing Rules. Pipe to a Program may appear if allowed. Program paths are relative to your home directory, the script must be 0700, and any output will cause a bounce.

Step 3: Set order and verify

  • Order: in the Current Filters list, rules run from top to bottom. New filters are appended at the end. Drag and drop to change order.
  • Verification: use Test Filter again after reordering. While validating a new rule, use Deliver to Folder rather than Discard Message to avoid losing mail.
  • Forwarding: if you use Redirect to Email and you want to keep a local copy, add a second action Deliver to Folder and choose INBOX.

If it does not work

  • No match on BCC: BCC is not available for filtering. Use To, Any Recipient or header‑based logic that is present on the delivered message.
  • Global rule not firing: if Default Address is set to discard with an error at SMTP time, those messages bypass filters entirely. Change Default Address if you need filters to see unrouted mail.
  • Mail forwards with no local copy: add Deliver to Folder as an additional action to INBOX alongside Redirect to Email.

What next

For a deeper walk‑through of rule fields, spam scoring and worked examples, see our fuller guide to email filters in cPanel. If you prefer to manage email on your own server, our London VPS gives you full control. If you need hands‑on help, open a support ticket and we will take a look.

Common questions

What is the difference between Email Filters and Global Email Filters in cPanel?

Email Filters apply rules to a single mailbox. Global Email Filters apply the same rules to every mailbox on your cPanel account.

Can I filter emails based on the BCC header?

No. BCC headers are not available for filtering because recipients do not receive that header. Use To, Any Recipient or other header-based logic instead.

What actions can I apply to filtered emails?

Actions include Deliver to Folder, Redirect to Email, Fail With Message, Discard Message and Stop Processing Rules. Pipe to a Program may be available depending on your account settings.

How do I test a filter before enabling it?

Use the Test Filter option on the same page. It shows a trace of what would match and what delivery action would occur.

What order do email filters run in?

Filters run from top to bottom in the Current Filters list. You can drag and drop to reorder them. New filters are added at the end.

How do I forward an email but keep a local copy?

Add two actions: Redirect to Email and Deliver to Folder. Choose INBOX for the local copy.