Email filters are the one mailbox feature people set up in a hurry and regret at leisure. A rule that files invoices into a folder is wonderful; a rule that discards anything with "invoice" in the subject is a bad month. This is how to create them in both panels we install, and the two habits that keep them safe.
What a filter is
Every filter is a condition and an action. The condition looks at the From address, the To address, the Subject, the body, or any header, and matches on contains, equals, begins with, or a regular expression. The action delivers the message to a folder, forwards it, discards it, or hands it to a script. Filters run in order, top to bottom, on each incoming message.
cPanel: two places to look
cPanel has filters at two levels. Global Email Filters apply to every mailbox on the cPanel account; use them for rules the whole domain shares, such as sending everything from a noisy monitoring address to a folder. Email Filters apply to one mailbox; use them for personal rules.
To create a per-mailbox filter:
- Log in to cPanel and open Email Filters under the Email section.
- Next to the mailbox, click Manage Filters, then Create a New Filter.
- Give it a name you will recognise in a year.
- Under Rules, pick the field (From, Subject, Body, Any Header, To) and the match (contains, matches regex, begins with). Add a second rule with "and" or "or" if you need it.
- Under Actions, choose Deliver to folder and pick the folder, or Redirect to email, or Discard Message. Add a second action if you want both to file and to forward.
- Activate, then use Filter Test on the same page: paste a sample message and see which filters fire.
Global filters are the same form, one level up, under Global Email Filters.
Plesk: per mailbox, and Sieve underneath
In Plesk, open Mail, click the mailbox, and use the Spam Filter tab for the junk threshold and the Auto-Reply tab for out-of-office replies. For true filters on a Linux server, Plesk uses Sieve through the webmail client: open Roundcube from the mailbox, go to Settings, Filters, and create a rule with the same condition-and-action shape. Plesk on Windows uses the mail server's own rules; ask us which mail server your Plesk runs if you are not sure.
Forwarding without conditions is simpler: Mail, the mailbox, Forwarding tab, add the address.
Rules that work
Send automated reports to a folder by matching the From address exactly. File client mail by matching the client's domain in the From field with "contains". Flag anything with "urgent" in the subject by delivering to a folder named Urgent, not by forwarding to your phone, which trains you to ignore it. Forward a shared mailbox to two colleagues by two Redirect actions on one filter.
Two habits
Never start with Discard. File the message to a folder called Review for a week. When the folder contains only what you expected, change the action to Discard.
Test with a real message. Send yourself an email that should match and one that should not. cPanel's Filter Test does this without sending; in Plesk, send the test messages.
Mistakes we see on support
A regex with an unescaped dot that matches far more than intended. A "contains" rule on Body that catches signatures. A discard rule that also catches bounce messages, so the sender never learns their mail failed. Two filters that both move the message, so it ends up in the second folder and nobody looks there. Keep the list short, name every rule, and review it when something goes missing.
Questions we get asked
Can I filter before the mail reaches the server? No; filters run on delivery. Spam scoring happens first, then your filters.
Do filters work with mail clients like Outlook? Yes. Server-side filters act before the client ever sees the message, which is the advantage over Outlook rules that only run when Outlook is open.
Can a filter forward to an external address? Yes, with Redirect in cPanel or Forwarding in Plesk. Check the destination accepts the forwarded mail; some providers reject forwarded spam.
Where do discarded messages go? Nowhere. That is why the Review-folder habit exists.
Is this the same on a VPS and on shared hosting? The same screens. On a URLStart VPS, cPanel or Plesk is an add-on and the mailboxes are yours alone.



