How To Create Account Level Email Filtering Rules In cPanel

You can setup email filtering rules for all your email accounts easily. You can easily filtered out spam mails before they even reach to your users’ inbox.

Step 1:

  • Login into cPanel.

Step 2:

  • Click “Account Level Filtering” under the “Mail” section.


Step 3:

  • Click “Create a new filter”.

Step 4:

  • cPanel has advised users to use multiple and simple filters instead of a single, monolithic filter because Exim, the server’s mail transfer agent, handles many small rules much more efficiently than a single large rule. Hence, break your filtering rules down to as simple as you can.

Step 5:

  • Give a name to your filtering rules. Do take note, words like “rule” or “converted rule” are not usable.


If you are receiving spam emails from, add into the rules under “From” and “Equals”.


If you receive spam mails with subject headings such as “viagra” or “Earn up to $100K per month!”, add those keywords into the rules under “Subject” and “Contains”. You can choose other filtering rules such as “Equals”, “Begins with”, “Ending with” and etc.

You can create multiple filtering rules by clicking “+” sign.


Step 6:

  • Choose an action for filtered mails. “Deliver to Folder” is recommended as there are times, the emails returned a false positive and you might miss out a legitimate email.

Step 7:

  • Click “Create”.

Step 8:

  • You can now test the new email filtering rules. Perform the test by sending an email to yourself that contains keywords or phrases that will match the filtering rules. Click on “Test Filter”.


Step 9:

  • You will see a message saying the email has been filtered and delivered to the trash/spam folder.