Re: [exim] Subject rewriting with Exim4.6 and spamassassin 3…

Pàgina inicial
Delete this message
Reply to this message
Autor: John Hall
Data:  
A: exim-users
Assumpte: Re: [exim] Subject rewriting with Exim4.6 and spamassassin 3.1
On 12/01/06, Slawomir Orlowski (CYMPAK) <sorlowski@???> wrote:

> I have exim 4.6 and SpamAssassin 3.1 on Linux RH7.2.
>
> I have would like to have my Subject changed if e-mail contains spam
> ($spam_score >5)
>
> my configure file:
> "
> warn spam = mail:true
> message = X-Spam_score: $spam_score\n\
> X-Spam_score_int: $spam_score_int\n\
> X-Spam_bar: $spam_bar
>
> #warn message = X-New-Subject: *SpamAssassin*($spam_score) $h_Subject:
> warn message = Subject: *SpamAssassin*($spam_score) $h_Subject:
> spam = mail
> "
> Configuration like this is adding second Subject header to e-mail, insted of
> rewriting existing one.


What I do is add a header such as X-New-Subject like your
commented-out version above, and then in my system filter have:

if $h_X-New-Subject: is not "" then
       headers remove "Subject"
       headers add "Subject: $h_X-New-Subject"
       headers remove "X-New-Subject"
endif


which removes the old Subject line and replaces it with the new one
that you added in the ACL.

> I have tried adding
>
> rewrite_header subject ***SPAM***
> to /etc/mail/spamassassin/local.cf


From the bit of exim configuration you posted, it looks like you're
running SpamAssassin in your data ACL. It is my understanding that
this means messages are not piped through SpamAssassin and back into
Exim - they are passed to SA and it returns a report and a score. You
therefore can't change the message with SpamAssassin like this.

Regards,
John