Introduction

Spam emails can consume server resources, clutter inboxes, and increase security risks. cPanel provides several built-in email security features, including SpamAssassin, email filtering, and default address management, to help reduce unwanted emails and improve email security. This guide explains how to configure SpamAssassin and related email protection settings in cPanel.


Prerequisites

  • Access to your cPanel account
  • Email services are configured for your domain

Implementation

Step 1

Log in to your cPanel account.


Step 2

Click on the Mail icon to access the Mail Manager.


Step 3

Click Default Address.

If the default address is not set, click Set Default Address and enter:

:blackhole:

Click Change to save the setting.

Note: Do not use :fail:, as this generates bounce messages that consume additional server resources.


Step 4

Return to the Mail section and click SpamAssassin.


Step 5

Click Enable SpamAssassin.


Step 6

After the change is processed, click Go Back to return to the SpamAssassin menu.


Step 7

Click Configure SpamAssassin.


Step 8

Change the rewrite_subject value to:

1

This setting modifies the email subject line to indicate that a message has been identified as spam.


Step 9

Click Save.

Once the changes are applied, click Go Back to return to the SpamAssassin menu.


Step 10

Click “Go Back” again to return to the Mail Manager.


Step 11

Click Email Filtering.


Step 12

Click Add Filter.


Step 13

Create a new filter with the following settings:

  • Filter Name: Yes
  • Rule: SpamAssassin Spam Header
  • Condition: Begins With

Step 14

Click Activate to enable the filter.


Step 15

After the filter is created, click Go Back to return to the Filter Maintenance screen.


Step 16

Log out of cPanel.


Conclusion

By configuring the default address, enabling SpamAssassin, and creating email filters, you can significantly reduce unwanted emails and improve the security of your email accounts. These settings help identify and manage spam more effectively while minimizing unnecessary server resource usage.

Leave a Reply