[prev in list] [next in list] [prev in thread] [next in thread] 

List:       spamassassin-users
Subject:    Re: tagging based on score level
From:       Kelson <kelson () speed ! net>
Date:       2006-11-29 17:38:47
Message-ID: 456DC5A7.3060401 () speed ! net
[Download RAW message or body]

beast wrote:
> Is it possible to make different tag for a different score/classes, for 
> example:
> 
> high: [SPAM!!!]  if score > 50
> medium: [SPAM!!]  if score between 20 - 50
> low: [SPAM]  if score between treshold - 20

Depends on how you're calling SpamAssassin and whether SA is doing the 
markup or the calling program is.

I don't think SA has this functionality itself, but if you're calling it 
with a program like MIMEDefang or Amavisd-new, you have a lot more 
flexibility.

With MIMEDefang, for instance, you would do something like this in 
filter_end after calling SpamAssassin.  ($hits is the message's score, 
$req is the spam threshold)

if ($hits >= 50) {
	action_change_header("Subject", "[SPAM!!!] $Subject");
}
elsif ($hits >= 20) {
	action_change_header("Subject", "[SPAM!!] $Subject");
}
elsif ($hits >= $req) {
	action_change_header("Subject", "[SPAM] $Subject");
}

-- 
Kelson Vibber
SpeedGate Communications <www.speed.net>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic