Filter Inbound Mail for a Domain

Here's how to set up a server-side filter to delete new mail that comes in that hasn't been scanned by our service. This won't affect existing mail in your account, only new messages that come in.

  1. Log into the cPanel account that has the domain that is using our anti-spam service.
  2. Select Global Email Filters (not the separate Email Filters item) from the Email section.


  3. Click the Create a New Filter button.
  4. Filters created here affect all domains assigned to this cPanel account, so the exact filter you set up will be different depending on your situation:
    1. If you only have a single domain assigned to this cPanel account and you don't plan to have any others added in the future, go to step 5.
    2. If you have more than one domain assigned to this cPanel account and you don't have our anti-spam filter service activated for all domains, go to step 6.
    3. If you have more than one domain assigned to this cPanel account, but you have our inbound anti-spam service activated for all of those domains and plan to keep it that way, go to step 5.
  5. Fill out the Rules and Actions as follows if you have a single domain or want the rule to apply to all domains in your cPanel account.


    1. Enter a descriptive name in the Filter Name text field. This name will only be displayed in cPanel. Make sure the filter name doesn't match any other global filters you set up previously.
    2. For the first Rule select Any Header from the first drop-down field
    3. Select does not contain from the second drop-down field
    4. Carefully type or paste in the following into the text field at the end of the rule:

      X-Spampanel-Class
    5. Select and from the drop-down field to the right of the rule (next to the + and - buttons).
    6. Click the + button on the right of this rule to add another rule.
    7. For the next Rule select Has Not Been Previously Delivered.
    8. Under the Actions section, select Discard Message.
    9. Click Create to save this filter and have it apply immediately.
    10. The process is complete. Do not follow the other steps below.
  6. Fill out the Rules and Actions as follows if you have more than one domain and don't want the filter to apply to all domains in your cPanel account.


    1. Enter a descriptive name in the Filter Name text field. This name will only be displayed in cPanel. Make sure the filter name doesn't match any other global filters you set up previously.
    2. For the first Rule select Any Header from the first drop-down field.
    3. Select does not contain from the second drop-down field.
    4. Carefully type or paste in the following into the text field at the end of the rule:

      X-Spampanel-Class
    5. Select and from the drop-down field to the right of the rule (next to the + and - buttons).
    6. Click the + button on the right of this rule to add another rule.
    7. For the next Rule select To from the first drop-down field.
    8. Select contains from the next drop-down field.
    9. In the text field at the end of this rule, carefully enter the domain name of the domain we're filtering through our anti-spam service.
    10. Select and from the drop-down field to the right of the rule (next to the + and - buttons).
    11. Click the + button on the right of this rule to add another rule.
    12. For the final Rule select Has Not Been Previously Delivered.
    13. Under the Actions section, select Discard Message.
    14. Click Create to save this filter and have it apply immediately.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Set Up Email Forwarders in cPanel

Log in to your cPanel: www.YOURDOMAIN.com/cpanel Click on "Forwarders" under the Mail section....

Why emails go to spam and what to do

Have you ever had one of your emails marked as spam? According to statistics, 80% of all sent...

How to transfer emails to cPanel mail account using Outlook

In order to transfer the emails from the old mail provider to us, the following conditions are to...