Amavis / spamassassin setup, how to disable quarantine and get default spamassassin behavior back?

I've set up my first mail server that uses amavis. First off, I don't really see the point in amavis if I don't care about viruses. I don't use clamav as it's a huge RAM hog. SpamAssassin has worked just fine before on its own without amavis.

Just this morning I caught some emails stuck in something called a quarantine (amavis feature). I don't know how to disable the quarantine feature entirely. I'm wondering how to get back the default SpamAssassin behavior where it does nothing more than add ***** SPAM <score> ***** to the subject line, and drops it into my inbox.

Server details: Debian 7.5, postfix 2.9.6, amavisd-new 2.7.1, spamassassin 3.3.2.


Solution 1:

You should put this options on your /etc/amavis/conf.d/50-user file:

$sa_tag_level_deflt  = -999; # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 6.2;  # add 'spam detected' headers at that level
$sa_kill_level_deflt = 6.9;  # triggers spam evasive actions (e.g. blocks mail)
$sa_spam_subject_tag = '**Spam**';

Configure the SPAM confidence level to the ones accordingly to your needs.

If you don't want to manage your score levels, you can set the quarantine directories to undefined ones. To do this add those lines in the same file:

$clean_quarantine_to      = undef;      # local quarantine
$virus_quarantine_to      = undef;      # traditional local quarantine
$banned_quarantine_to     = undef;      # local quarantine
$bad_header_quarantine_to = undef;      # local quarantine
$spam_quarantine_to       = undef;      # local quarantine

If you want to check the information or take a look at additional information here's the Quarantine block on the AMaViS website: http://www.amavis.org/amavisd-new-docs.html#quarantine

Solution 2:

The best solution I found was simply to put this in /etc/amavis/conf.d/50-user:

$final_spam_destiny=D_PASS;
$final_virus_destiny=D_PASS;

This way bad e-mails are either marked SPAM or INFECTED, but still delivered to the users, without being rejected, blocked nor quarantined.

See AMAVIS documentation