Email filtering in cPanel gives you precise control over how incoming messages are handled — automatically sorting, forwarding, deleting, or redirecting emails based on criteria you define. Combined with catch-all addresses (which capture messages sent to any address at your domain, even if a specific mailbox does not exist), email filters let you build a smart, automated email workflow without any third-party tools.

This guide covers the complete process of setting up catch-all email addresses and custom email filters in cPanel, with practical examples for common business scenarios. Whether you are managing a single domain or multiple email accounts on MassiveGRID's high-availability cPanel hosting, these features help you stay organized and responsive.

Understanding Catch-All Email Addresses

A catch-all (also called a default address) is a rule that captures all emails sent to your domain that do not match an existing mailbox or forwarder. For example, if someone sends an email to randomname@yourdomain.com and you do not have a mailbox or forwarder for "randomname," the catch-all determines what happens to that message.

Why Use a Catch-All?

Setting Up a Catch-All in cPanel

  1. Log into cPanel and navigate to Email > Default Address (or Catch-All)
  2. Select your domain from the dropdown
  3. Choose how to handle unrouted messages:
    • Forward to Email Address — Delivers catch-all messages to a specific mailbox (most common)
    • Discard with error to sender (at SMTP time) — Bounces the message with an error. This is the default and recommended setting if you do not need a catch-all.
    • Pipe to a Program — Passes the message to a script for custom processing
  4. Click Change to save your settings

Catch-All Best Practices

Warning: Catch-all addresses attract significant spam. Spammers routinely send messages to random addresses at known domains (dictionary attacks), and a catch-all captures all of these. This can fill your mailbox with junk and potentially cause storage issues.

To mitigate spam when using a catch-all:

Understanding Email Filters in cPanel

cPanel provides two levels of email filtering:

1. Account-Level Filters (User Filters)

These filters apply to a specific email account. Each email account can have its own set of filters that process incoming messages in order. Access these through Email > Email Filters.

2. Global Filters

These filters apply to all email accounts on your cPanel account, processing messages before account-level filters. Access these through Email > Global Email Filters. Global filters are useful for domain-wide rules, like blocking messages from known spam domains.

Creating Email Filters: Step by Step

Step 1: Access the Filter Interface

Navigate to Email > Email Filters. Select the email account you want to create filters for and click Manage Filters.

Step 2: Create a New Filter

Click Create a New Filter. You will see three sections:

Step 3: Define Rules

Each rule consists of three parts: a header field, a comparison operator, and a value.

Header fields you can filter on:

Comparison operators include: equals, matches regex, contains, does not contain, begins with, ends with, does not begin with, does not end with, does not match, is above (for numeric), is not above, is below, is not below.

You can add multiple rules and specify whether all rules must match (AND logic) or any rule can match (OR logic).

Step 4: Define Actions

Available actions when rules match:

Action Description
Discard Message Silently delete the message (no bounce to sender)
Redirect to Email Forward the message to another address
Fail with Message Bounce the message with a custom error
Stop Processing Rules Prevent subsequent filters from acting on this message
Deliver to Folder Move the message to a specific IMAP folder
Pipe to a Program Pass the message to a script for processing

Practical Filter Examples

Example 1: Sort Invoices into a Billing Folder

Filter name: "Sort invoices"

Example 2: Forward Messages from a Specific Client

Filter name: "Forward VIP client"

Example 3: Auto-Delete Specific Spam Patterns

Filter name: "Block known spam"

Example 4: Filter Mailing List Messages

Filter name: "Mailing list folder"

Example 5: High Spam Score Auto-Delete

Filter name: "Delete high spam"

Combining Filters with Forwarding and Autoresponders

Email filters work in combination with forwarders and autoresponders to create powerful email automation. The processing order is:

  1. Global email filters process first
  2. Account-level email filters process second
  3. Forwarders execute
  4. Autoresponders trigger

This means you can use filters to prevent certain messages from being forwarded or triggering autoresponders. For example, create a filter that discards messages from mailing lists before they reach the autoresponder — preventing your vacation message from replying to every list email.

Advanced Filtering with Apache SpamAssassin

cPanel includes Apache SpamAssassin, which scores every incoming message based on hundreds of rules. Each message receives a numeric spam score — the higher the score, the more likely it is spam. You can enable SpamAssassin in Email > Spam Filters and set a threshold score (default is 5.0).

Once SpamAssassin is enabled, you can use the Spam Status and Spam Bar header fields in email filters for more granular control than SpamAssassin's default behavior provides. For example, you might let SpamAssassin tag messages with a score of 5+ as spam (delivered to spam folder) but use a filter to silently discard messages with a score of 10+ (almost certainly junk).

Filter Management Tips

Properly configured email filters, combined with catch-all addresses and DNS authentication, give you enterprise-grade email management on MassiveGRID's high-availability cPanel hosting. For a foundational overview of email management in cPanel, see our cPanel email accounts setup guide.

Frequently Asked Questions

What is the difference between account-level and global email filters?

Global filters apply to all email accounts on your cPanel hosting and process before account-level filters. Account-level filters apply only to a specific email account. Use global filters for domain-wide rules (like blocking spam from a specific domain) and account-level filters for individual mailbox organization (like sorting messages into folders).

Can I use regular expressions (regex) in email filters?

Yes. cPanel email filters support the "matches regex" comparison operator, which lets you use regular expressions for complex pattern matching. For example, you can match email addresses from multiple subdomains of the same company or match subject lines that follow a specific pattern. Regex filters are powerful but can be tricky to debug — test them carefully.

Will a catch-all address increase the spam I receive?

Yes, significantly. Spammers regularly send messages to random addresses at known domains, and a catch-all captures all of these. If you enable a catch-all, pair it with email filters to automatically discard obvious spam, and forward the remaining messages to a dedicated monitoring mailbox rather than your primary inbox.

How many email filters can I create per account?

cPanel does not impose a hard limit on the number of filters per account. However, each filter adds processing time to incoming messages. For most business use cases, 20–50 filters per account is practical without noticeable performance impact. If you need hundreds of rules, consider using SpamAssassin's custom rules or server-side Sieve scripts for better performance.

Can I export or import email filters between cPanel accounts?

cPanel does not provide a built-in export/import feature for email filters. However, filters are stored as Exim filter rules or Sieve scripts in your account's home directory. An experienced administrator can copy these files between accounts. If you are migrating to a new cPanel host, a full cPanel backup and restore will preserve your email filters along with everything else.