Docs Home Return to Homepage
Get Started Login

How to Sort Incoming Email With Filters in cPanel

Last updated Changelog

On this page

An email filter checks every new message for one email address and acts on the ones that match. For example, it can file every invoice into its own folder, forward messages from your accountant, or delete newsletters you never read. In this example we file every email with Invoice in its subject into an Invoices folder for jane@cpanel.cranedemo.com.

Note: Spam is handled before your filters, by MXFilter. For spam rules that cover your whole domain, see Create a filter rule in MXFilter.

Before you start

To file messages into a folder, create the folder first. Log in to Webmail as that email address, open Settings › Folders and add it.

Steps

  1. Log in to cPanel and click Email Filters in the Email section.

    The cPanel home page with Email Filters highlighted in the Email section

  2. Find the email address and click Manage Filters next to it.

    Filters by Users with Manage Filters highlighted for jane@cpanel.cranedemo.com

  3. Click Create a New Filter.

    Edit Filters for jane@cpanel.cranedemo.com with Create a New Filter highlighted

  4. Fill in the filter:

    • Filter Name: anything that helps you recognise it, such as Invoices.
    • Rules: what to look for. We chose Subject, contains and typed Invoice. Click + to add more rules.
    • Actions: what to do with a match. We chose Deliver to Folder, clicked Browse and picked Invoices.

    Then click Create.

    Filter Name Invoices, the rule Subject contains Invoice and the action Deliver to Folder /.Invoices, with Create highlighted

  5. Your filter is listed under Current Filters. It works on new mail from now on. Use Edit to change it or Delete to remove it.

    Current Filters showing Invoices with Edit and Delete

We tested this filter with two real emails. “Invoice 1042 from Crane Demo Supplies” went straight into Invoices, and “Lunch on Friday?” stayed in the inbox.

Useful actions

Action What it does
Deliver to Folder Moves the message into a folder of that mailbox.
Redirect to Email Sends the message on to another address.
Discard Message Deletes the message without telling the sender.
Fail With Message Rejects the message and sends your text back to the sender.
Stop Processing Rules Skips the filters below this one.

Tip: Global Email Filters, next to Email Filters, works the same way but applies to every email address on your account.

Troubleshooting

Problem What to do
My folder isn’t in the Browse list Create it in Webmail first, then open the filter again.
Messages already in my inbox weren’t moved Filters only act on new mail as it arrives. Move older messages yourself in Webmail.
The filter catches the wrong emails Make the rule stricter. For example, use begins with instead of contains, or add a second rule with +.
Nothing is filtered Check you added the filter to the right email address. Rules are run from the top down, so a filter above it with Stop Processing Rules can stop it.

Snagged on something? Contact support and we’ll get you sorted.

Snagged on something?

Our sysadmins answer tickets around the clock.