Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can't find out, how to configure spamassassin to delete all spam messages.

Currenly it's only mark messages as spam, but pass them throught IMAP to client.

How to block them from passing through to IMAP clients?

And it's blocking some of our notification messages...

-1.4 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 0.0 HTML_MESSAGE           BODY: HTML included in message
 2.4 HTML_IMAGE_ONLY_08     BODY: HTML: images with 400-800 bytes of words
 1.7 MIME_HTML_ONLY         BODY: Message only has text/html MIME parts
 1.1 HTML_MIME_NO_HTML_TAG  HTML-only message, but there is no HTML tag
 1.1 HTML_SHORT_LINK_IMG_1  HTML is very short with a linked image
-1.4 AWL                    AWL: From: address is in the auto white-list

This is what clients getting on their mails in place of our notification messages.

Any idea how to pass those messages through and how to delete incoming spam?

Thanks ;)

I have this setup:

share|improve this question

migrated from Dec 23 '10 at 20:23

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

From the SpamAssassin FAQ on this issue:

SpamAssassin itself will not delete any emails. It's only a filter which reads email in, and passes that same email out, modified in some way. If you want to delete emails, or redirect emails, you need to do it in whatever program calls SpamAssassin.

In general it's a bad idea to delete mail marked as spam because your clients won't be able to deal with false positives. Since the deletion would happen after your server has accepted the message, the sender would also not know about it being deleted, resulting in silent mail loss.

Instead you should configure your mail system to put marked mail in a "quarantine" folder, to allow your users to go through it if necessary.


BTW, you really need to rearrange your notification mail. The reason SpamAssassin marks it is because it really does look like spam:

  • TVD_SPACE_RATIO - lots of whitespace, indicative of spam or non-human message generator

  • MIME_HTML_ONLY - indicator of bulk-email software

  • HTML_MIME_NO_HTML_TAG - indicator of bulk-email software

  • HTML_IMAGE_ONLY_08 - images with little text. Major indicator of spam.

Configuring your own SpamAssassin installation to let them though would not do much good, since your users' mail filters are bound to block this as well.


This link seems to contain enough information to setup a quarantine folder for spam email using Amavis.

share|improve this answer
Thanks mate. Yea, it's a right solution. How to redirect spam messages in different mail folder? Quarantine folder in your case. – Somebody Dec 22 '10 at 13:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.