3

I am trying to configure my SpamAssassin (running in combo with amavisd) in order to lower the spam score limit assigned to emails directed to a specific domain (lower required_score only for incoming mail where the RCPT TO reads *@example.com).

Is it possible to obtain this behaviour without per-user customization of SpamAssassin for each user belonging to the specific domain?

masegaloeh
  • 17,978
  • 9
  • 56
  • 104
user49719
  • 33
  • 3

1 Answers1

2

If you use Spam Assassin with Amavisd, then amavisd don't use parameter required_score to determine spam score limit. Instead of this, amavis has three level of score here

$sa_tag_level_deflt  = 1; # 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)

You can tune this score so it match your need. Consults amavisd documentation to know explore those three settings.


Now, we focus how we can tune above numbers for particular recipient. Now you can use maps provided by Amavis, see this amavisd.conf sample.

# advanced example specifying per-recipient values using a hash lookup:
#@spam_tag_level_maps  = (\$sa_tag_level_deflt);  # this is a default
#@spam_tag2_level_maps = (
#  { 'user1@example.com' => 8.0, '.example.com' => 6.0 },
#  \$sa_tag2_level_deflt,   # catchall default
#);
#@spam_kill_level_maps = (
#  { 'user1@example.com' => 8.0, '.example.com' => 6.0 },
#  \$sa_kill_level_deflt,   # catchall default
#);
#@spam_dsn_cutoff_level_maps = (
#  { 'user1@example.com' => 10, '.example.com' => 15 },
#  \$sa_dsn_cutoff_level,   # catchall default
#);
masegaloeh
  • 17,978
  • 9
  • 56
  • 104