How to automatically delete emails marked as spam by SpamAssassin?

Spam Box

You can enable spam box from the SpamAssassin configuration screen in cpanel, and regularly check the spam box for any false positives. You can clear (empty) that spambox from the cpanel if it only gets spam. You will need to regularly clear the spambox or it can fill up your hosting space.

Or

Filter Spam Marked Emails

Login to your cpanel, go to Mail and then Email Filter screen. Create a filter rule like this:

Select "Any header" that "contains" the string "X-Spam-Level: *****" (without quotes)

The result is this:

$message_headers contains "X-Spam-Level: *****"

Each * represents spam assassin score. 5 is a default value for spam assassin to consider that email a spam.

Note: In the new cpanel release coming up soon, the headers may change. So please check the headers of a spam marked message and create the filter from your control panel appropriately.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How can I check my email through my web browser (webmail)?

To access webmail goto:http://www.your_domain.com/webmail/orhttp://www.your_domain.com:2095/Use...

Can I change MX record(s) for a domain?

There are couple of scenarios involving MX records.1. You want all emails for your domain to go...

How do I setup an email auto responder?

1. Login to your control panel (http://www.your_domain.com:2082)2. Select "Setup...

How do I create a POP Email account?

1. Login to your control panel (http://www.your_domain.com:2082)2. Select "Add/Remove POP Email...

What is an email auto responder?

Email auto responders will automatically send a customized auto response (that you compose) to...