How do I block unsolicited emails in cPanel? You can block or unblock email based on their characteristics or content.
This can be performed by defining a Block List (BL) or an Allow List (AL).
While our servers are configured to reduce to almost the junk mails that your mail account receive, the fact is that spams have sadly become part of our online existence .
To block unsolicited mail, either use BoxTrapper if available, or Apache SpamAssassin
Apache SpamAssassin is an email utility that examines incoming email and tests for spam characteristics. It uses Bayesian spam filtering and network tests to screen incoming email.
This results in an overall score that Apache SpamAssassin uses to determine whether it should discard a message. For more information, visit the Apache SpamAssassin website.
Note: if you experience trouble when you use BoxTrapper and Apache SpamAssassin together, please contact our web hosting support team for more information about your server’s configuration.
Enabling or disabling Apache SpamAssassin
(Home >> Email >> Apache SpamAssassin).
The Apache SpamAssassin interface displays the current status of the feature.
- To enable Apache SpamAssassin, click Enable Apache SpamAssassin™.
- To disable Apache SpamAssassin, click Disable Apache SpamAssassin™.
Apache SpamAssassin spam auto-delete
The Spam Auto-Delete feature automatically deletes messages that meet or exceed the spam score limit.
- To enable this feature, select the desired minimum spam score and click Auto-Delete Spam. This setting defaults to 5.
- To disable this feature, click Disable Auto-Delete Spam.
Note: if you enable this feature and a message that is not spam meets or exceeds the defined score, you may lose that email. Make certain to properly configure Apache SpamAssassin before you use this feature.
To redirect spam from your email inbox, if this option is not available, create a spam email filter.
Click Enable Spam Box to cause Exim to create a spam
folder the next time that you receive spam mail.
- Exim sends all of the mail that Apache SpamAssassin marks as spam to this folder.
- This feature preserves mail that the system may mistakenly classify as spam mail.
After you enable this feature, click Clear Spam Box to delete the messages in the spam box.
Warning: If you check your mail through a POP3 client, access and empty your spam box with the username youraddress@example.com/spam
and your email account password. If you do not delete email in the spam box frequently, spam may accumulate and cause you to reach your email account quota.
You cannot use this method to access other folders on your account. Some webmail clients may require additional steps. If you are unsure whether you use POP3 or IMAP to receive mail, you can find this information in your email application’s Preferences interface.
Apache SpamAssassin™ configuration
- Click Configure Apache SpamAssassin™ to update Apache SpamAssassin’s configuration.
- Click Save to store your changes.
- To add more than five addresses to the blacklist or whitelist, enter addresses in the first five text boxes and click Save. Additional text boxes will appear.
- When you add addresses to the blacklist or whitelist, use
*
as a wildcard to represent multiple characters and?
to represent a single-character wildcard. The following examples demonstrate how to properly use wildcards in the blacklist:user@example.com
– Blacklists or whitelists a single email address.*@example.com
– Blacklists or whitelists all of the addresses atexample.com
.?ser@example.com
– Blacklists or whitelists a single character in an address atexample.com
(for example,user@example.com
, but notAuser@example.com
).