> ## Documentation Index
> Fetch the complete documentation index at: https://speedypage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Email filters

> How to create email filter rules in cPanel to sort, redirect, or delete incoming messages.

Email filters let you create rules that automatically act on incoming messages. You can sort mail into folders, forward specific messages, discard unwanted email, or trigger custom actions — all based on conditions like the sender, subject, or message content.

## Create a filter

<Steps>
  <Step title="Open Email Filters">
    Log in to cPanel through your [client area](https://my.speedypage.com) or at `yourdomain.com/cpanel`. Go to **Email** and click **Email Filters**.
  </Step>

  <Step title="Choose the account">
    Click **Manage Filters** next to the email account you want to add a filter to.
  </Step>

  <Step title="Create a new filter">
    Click **Create a New Filter**. Enter a name for the filter.
  </Step>

  <Step title="Set the rules">
    Define one or more conditions. Each condition has three parts:

    * **Field** — what part of the message to check (e.g. From, Subject, To, Body)
    * **Operator** — how to match (e.g. equals, contains, matches regex, begins with)
    * **Value** — the text to match against

    If you add multiple conditions, choose whether **all** rules must match or **any** rule can match.
  </Step>

  <Step title="Set the action">
    Choose what happens when a message matches:

    * **Deliver to folder** — move the message to a specific mailbox folder
    * **Redirect to email** — send the message to another address
    * **Discard message** — delete the message without delivering it
    * **Fail with message** — reject the message and return an error to the sender

    You can add multiple actions to a single filter.
  </Step>

  <Step title="Save the filter">
    Click **Create**.
  </Step>
</Steps>

## Common filter examples

**Sort newsletters into a folder** — Set the condition to **To** contains `+newsletters` (if you use plus addressing) or **From** contains the sender's domain. Set the action to **Deliver to folder** and choose or create a folder.

**Forward messages from a specific sender** — Set **From** equals the sender's email address. Set the action to **Redirect to email** and enter the destination address.

**Discard messages with a keyword in the subject** — Set **Subject** contains the keyword. Set the action to **Discard message**.

<Tip>
  Use several small, focused filters rather than one large filter with many conditions. The mail server handles multiple simple filters more efficiently.
</Tip>

## Change filter order

Filters run in the order they appear in the **Current Filters** list. New filters are added to the bottom. Drag and drop filters to reorder them.

## Edit a filter

Click **Edit** next to the filter name, make your changes, and click **Save**.

## Delete a filter

Click **Delete** next to the filter name, then confirm.

## Test a filter

Under the **Current Filters** list, paste a sample email message into the **Filter Test** box and click **Test Filter**. The results show which conditions matched and what action the filter would take.
