# How to set up cPanel Spam Filters (SpamAssassin): Spam Box, threshold score, blacklist and whitelist

https://www.gyrohosting.com/en/knowledgebase/article/cpanel-spam-filters-blacklist-whitelist

- **What you will learn**: How to use cPanel's **Spam Filters** tool (Apache SpamAssassin) to mark spam, move it to a separate folder (**Spam Box**), adjust how strict the filter is with the **threshold score**, and add specific senders to the **whitelist** or **blacklist**.
- **Time**: 10 minutes

## 1. How does the spam filter work?

SpamAssassin gives every email arriving at the server a **spam score**. If the score is equal to or higher than the **threshold score** (5 by default), the message is treated as spam. Then the action you chose is applied:

| Setting | What it does | Our advice |
| --- | --- | --- |
| **Process New Emails and Mark them as Spam** | Marks spam (adds header information) | On |
| **Spam Box** | Moves spam to a separate folder named `spam` | On |
| **Auto-Delete** | Permanently deletes spam without showing it | Off |

> **Note**
> 
> Spam Filters settings apply to **all** email addresses on your hosting account together.

## 2. Turn on the spam filter and Spam Box

1. On the cPanel home page, open **Spam Filters** in the **Email** section.

![The Spam Filters tool is in the Email section of the cPanel home page.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B29-01-en.webp)

1. Turn on **Process New Emails and Mark them as Spam**.
2. Turn on **Move New Spam to a Separate Folder (Spam Box)**. Spam now goes to the `spam` folder instead of the inbox.
3. Leave **Automatically Delete New Spam (Auto-Delete)** off. cPanel recommends Spam Box on the same page: you can recover a message wrongly marked as spam from Spam Box, but not one that was deleted automatically.

![Three switches: mark spam, move it to the Spam Box folder, and delete it automatically.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B29-02-en.webp)

## 3. Adjust how strict the filter is (threshold score)

1. Click the **Spam Threshold Score** link on the overview page.
2. Choose a value from the **Spam Threshold Score (required_score)** list:
  - **Aggressive, Many False Positives (1):** Very strict; normal mail also lands in spam.
  - **Recommended for Well-Tested Servers (4)**
  - **Default (5):** The right choice for most users.
  - **Recommended For Internet service providers (8)**
  - **Passive, Only Very Obvious Spam (10):** Only very obvious spam.
  - **Custom:** Your own value.
3. Click **Update Scoring Options**.

![The lower the threshold, the stricter the filter; the default is 5.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B29-03-en.webp)

> **Tip**
> 
> The **lower** the score, the **stricter** the filter. If spam still reaches the inbox, go from 5 down to 4; if important mail lands in spam, stay at 5 and whitelist the senders.

## 4. Check and empty the Spam Box folder

1. On the overview, click **Configure Spam Box Settings**.
2. The **Clear Spam Box** section shows how much space the spam folder uses. This folder fills up quickly and counts toward your mailbox quota.
3. To empty it, use **Empty the Spam Box folder for "…"** (the main account) or **Empty all Spam Box folders** (all email addresses).

![You can empty the Spam Box folder here.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B29-04-en.webp)

You will see the spam folder in Webmail or Outlook next to your other folders, named **spam** (B22). Before emptying it, take a look inside to make sure no legitimate mail ended up there.

## 5. Whitelist and blacklist

These lists are in the section that opens when you click **Show Additional Configurations** on the overview.

**Whitelist (always allow)**

1. Click **Edit Spam Whitelist Settings**.
2. Add a row with **Add A New "whitelist_from" Item**.
3. Type an address you trust (`muhasebe@example.com`) or a whole domain (`*@example.com`).
4. Click **Update Whitelist (whitelist_from)**.

![Mail from an address or domain on the whitelist is never treated as spam.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B29-05-en.webp)

**Blacklist (never allow)**

1. Go back to the overview and click **Edit Spam Blacklist Settings**.
2. Add a row with **Add A New "blacklist_from" Item** and type the address you do not want (for example `kampanya@example.net`).
3. Click **Update Blacklist (blacklist_from)**.

![Mail from an address on the blacklist is always treated as spam.](https://www.gyrohosting.com/resources/uploads/bilgi-merkezi/B29-06-en.webp)

> **Caution**
> 
> Do not whitelist your own domain (`*@ornekfirma.com`) or large services such as Gmail. Spammers often forge the sender address, and forged mail would then get past the filter too.

## 6. Check

1. On the overview, confirm the first two switches are on and Auto-Delete is off.
2. After a few days, look at the **spam** folder in Webmail; spam should collect there and your inbox should be cleaner.
3. Mail from a whitelisted sender should land in the inbox.

## 7. Common problems

| Symptom | Cause | Fix |
| --- | --- | --- |
| Spam is still in the inbox | Spam Box is off, or the score is below the threshold | Turn on Spam Box; lower the threshold to 4; blacklist the sender. |
| Important mail is in the spam folder | The threshold is too low, or the sender's domain settings are incomplete | Raise the threshold to 5; whitelist the sender. |
| Mail never shows up | Auto-Delete is on | Turn off Auto-Delete; deleted mail does not come back. |
| The mailbox fills up quickly | The spam folder keeps growing | Empty Spam Box regularly (B28). |
| A blacklisted sender still gets through | The sender uses different addresses | Add the whole domain (`*@example.net`). |
| The spam folder does not appear in Outlook | The folder is not subscribed | Refresh the folder list in Outlook; the account must use IMAP (B23). |

## 8. Frequently asked questions

**Are Spam Filters set separately for each email address?**

No. The settings apply to all addresses on the hosting account together. For per-person rules you can use the filters in Webmail (B22).

**Spam Box or Auto-Delete?**

Spam Box. You can only recover a message wrongly marked as spam from Spam Box.

**What threshold score should I use?**

5 for most users. If spam complaints continue, try 4; values from 1 to 3 also catch normal mail.

**Can I use a wildcard (*) in the whitelist?**

Yes. `*@example.com` covers every address on that domain.

**Does the spam folder count toward my quota?**

Yes. The spam folder is part of the mailbox; empty it regularly.

**My outgoing mail lands in spam at the recipient. Will these settings help?**

No; Spam Filters only filter mail coming to you. For your outgoing mail, check your SPF, DKIM and DMARC records (B27).

> **Did you know?**
> 
> If email is your team's main communication tool and the number of addresses keeps growing, take a look at Business Mail, a separate product from hosting email, in guide G01.

## Related guides

- B27: Keep mail out of spam: SPF, DKIM and DMARC
- B28: Mailbox full
- B22: Logging in to Webmail and using Roundcube
- B26: Email forwarders and autoresponders
- B30: My email was not delivered: Track Delivery
