When you receive an email on your hosting, it is analysed by **SpamAssassin** to determine whether it is SPAM or not.

## How to find out why it was flagged as SPAM

1. Open the source code of the email to view the headers. [Here we explain how to view the headers of an email](../hosting/ver-cabeceras-email).
2. Look for the **X-Spam-Report** section: you will see all the tests SpamAssassin ran on that email. Each test has three parts:
   - Score
   - Variable (rule name)
   - Description

![X-Spam-Report header with the rule details](/api/help/media/175ed931-df6a-4e65-a546-a7b50d953584)

3. By default, the total score for an email to be considered **SPAM is 5**. In the example image, the email was flagged as SPAM because it reached a score of 6.4.
4. In that example, the **SPF_SOFTFAIL** variable alone contributed 5 points. This particular error happens because the sender sent the email from an IP not authorised in their SPF record.

:::info
If it is a legitimate email, the fix is on the sender's side: they should ask their hosting company to correct their SPF record.
:::

## Marking senders as legitimate (whitelist)

You can mark a sender's emails as legitimate so the server never flags them as SPAM:

1. In cPanel, open the **"Spam Filters"** option.
2. Scroll down to **"Additional Configurations"**.
3. Add the sender's address under **"Whitelist"**.

## Raising the score threshold

You can also raise the *threshold* so emails are only flagged as SPAM when they reach a higher score:

![Adjusting the SPAM score threshold in cPanel](/api/help/media/12730544-e4e7-4fe1-a2d4-c36c56242c43)
