6

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.

CaptSaltyJack
  • 628
  • 2
  • 13
  • 34

2 Answers2

8

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

Vinícius Ferrão
  • 5,400
  • 10
  • 52
  • 91
  • This doesn't turn off quarantine though. I never want quarantine on, I just want the spam messages to get their subject tagged and delivered to the inbox as they normally would. – CaptSaltyJack Jul 20 '14 at 18:09
  • On the $sa_kill_level_deflt = 6.9 put a score so high that will never be trigged to put on quarantine. Adjust the tags on the $sa_tag2_level_deflt. – Vinícius Ferrão Jul 20 '14 at 18:09
  • Ok, I'll try that. Should `$sa_tag2_level_deflt` match SpamAssassin's `required_score` value? – CaptSaltyJack Jul 20 '14 at 18:12
  • I've added more info. Choose the method that will do better for you. – Vinícius Ferrão Jul 20 '14 at 18:13
  • Thanks! So, does it make sense to always have the `required_score` value in `/etc/spamassassin/local.cf` match the value of `$sa_tag2_level_deflt`? Or is spamassassin's `required_score` value not even relevant? (upon thinking about it more, I think this is the case.. spamassassin is only being used to return a score, not judge whether something is spam or not) – CaptSaltyJack Jul 20 '14 at 19:15
  • Yep, the score setting should be done in AMaViS. Spamassassin will on test the messages for you. – Vinícius Ferrão Jul 20 '14 at 19:17
  • Thank you, your answers are awesome and have been quite helpful! – CaptSaltyJack Jul 20 '14 at 19:26
7

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

user1604240
  • 171
  • 1
  • 2
  • In particular "for these actions to have any effect, mail must be allowed to be delivered to a recipient;" – ychaouche Nov 08 '17 at 14:49