Knowledgebase

How to use email filters in cPanel (account-level and global filters)

Email filters sort, redirect or delete messages automatically as they arrive. This guide explains how to use email filters in cPanel: Email Filters for a single mailbox and Global Email Filters for all mail on your account, with practical examples such as blocking a sender, moving newsletters to a folder, and forwarding invoices to accounting.

Account-level vs global filters

  • Email Filters: apply to one email address. Use these for personal rules.
  • Global Email Filters: apply to all mail delivered to your cPanel account. Use these for company-wide rules, such as blocking a spam domain for everyone.

Filters run on the server, so they work no matter which device or app you use: Outlook, phone or Roundcube webmail.

Create a filter for one mailbox

  1. Log in to cPanel (How to log in to cPanel) and open Email Filters.
  2. Click Manage Filters next to the email address.
  3. Click Create a New Filter and give it a clear Filter Name.
  4. Under Rules, choose what to check (for example From, Subject, To, Body or Any Header), the condition (such as contains, equals or begins with) and the value.
  5. Under Actions, choose what to do, for example Deliver to Folder, Redirect to Email, Fail with Message or Discard Message.
  6. Click Create.

You can add several rules (with and/or) and several actions to one filter using the + buttons.

Create a global filter

  1. In cPanel, open Global Email Filters.
  2. Click Create a New Filter and follow the same steps.
  3. Click Create. The rule now applies to all mailboxes on the account.

Practical examples

GoalRuleAction
Block a persistent senderFrom contains spammer@example.comDiscard Message or Fail with Message
Keep newsletters out of the inboxFrom contains newsletterDeliver to Folder → a "Newsletters" folder
Send invoices to accountingSubject contains InvoiceRedirect to Email → accounts@yourcompany.com
Move likely spamSpam Status begins with YesDeliver to Folder → Junk
Create the destination folder first (for example in Roundcube under Settings → Folders), so it appears in the Deliver to Folder list. Be careful with Discard Message: discarded mail is gone and the sender is not told. When in doubt, deliver to a folder instead.

Test before you rely on it

cPanel's filter pages include a Filter Test box. Paste a sample message with headers (for example From: someone@example.com and Subject: Invoice 123) and click Test Filter to see which action would run.

Common problems

  • Filter does nothing: check spelling and whether the condition is too strict. Use contains rather than equals for addresses.
  • Mail disappeared: a Discard rule may be too broad. Review all filters, including global ones.
  • Filtering spam: filters help, but spam protection and correct DNS records matter more. See Why does my email go to spam?.

Frequently asked questions

Do server filters conflict with Outlook rules?

Server filters run first, when mail arrives. Outlook rules run later and only when Outlook is open. Keep important rules on the server.

Can I filter by attachment type?

Not directly by file type. You can match text in the Body or Any Header, but results vary. Ask support for anything advanced.

Need help? Open a support ticket or message us on WhatsApp +20 127 113 3655.

  • email filters, cPanel email filters, global email filters, block sender, move email to folder, spam filter, فلترة الرسايل في cPanel

Was this answer helpful?

0 Users Found This Useful