On 12/2/2009 7:06 AM, Walter Breno wrote:
Hi!
I'm using postfix with mailscanner to integrate spamassassin and clamav,
but when spamassassin score a message as spam the subject of the message
is chagnged to {Spam?} subject and i want to send every message that
spamassasin mark directly to the spam folder.
PS.: i'm using cyrus-sasl
We use Dovecot as our LDA along with server-side sieve scripts to
auto-sort messages that score above N into an IMAP Junk folder.
Client-side, it's generally pretty easy to do something similar.
Thunderbird already has a checkbox in Account Options that lets it trust
SA headers (under Junk settings). In other mail clients, you're going
to have to write a rule that looks for X-SpamFlag being equal to "YES".
(Either way, SA just marks the message with the X-Spam-* headers and
leaves the rest of the handling up to the mail server or the email
client. So you may need to ask on the Cyrus mailing list as to exactly
how to do server-side sorting.)
The sieve script might look something like (it only moves messages where
the score is >= 10.0, and avoids the negative sign problem by also
checking X-Spam-Flag):
require ["comparator-i;ascii-numeric","fileinto","relational"];
if allof (
header :contains "X-Spam-Flag" "YES",
header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-Score"]
["10"]
) {
fileinto "Junk";
stop;
}