Re: [Exim] removing unwanted incoming headers

Top Page
Delete this message
Reply to this message
Author: Andreas Metzler
Date:  
To: exim-users
Subject: Re: [Exim] removing unwanted incoming headers
On Sat, Oct 04, 2003 at 08:39:47PM +0100, Dirk Koopman wrote:
> A lot of the messages that I get from my secondaries seem to be filtered
> using spamassassin or similar. The trouble is they seem to use an old
> version.
>
> Can I remove the incoming X-Spam headers before passing to my version of
> exiscan 4.24. The idea being that the headers that I end up with can be
> relied on.


> system_filter only seems to work after exiscan has done its stuff so
> that doesn't seem to hit the spot...


[...]

Two untested ideas:
Instead of adding your X-Spam header in the acl with
warn message = X-Spam-Score: $spam_score ($spam_bar)
     condition = ${if <{$message_size}{80k}{1}{0}}
     spam = nobody:true


use

warn set acl_m0 = X-Spam-Score: $spam_score ($spam_bar)
     condition = ${if <{$message_size}{80k}{1}{0}}
     spam = nobody:true


and use this in the system filter
if first_delivery then
headers remove X-Spam-Score
headers add $acl_m0
endif

Afaict this might do what you want, i.e. guarantee that there is only
one X-Spam-Score-header and that it is generated by _your_
spamassassin.

However I don't know for sure if the combination of headers remove/add
in the system filters works as I think it does, the manual does not
say it clearly afaict, you'll have to try. If this does not work, a
dummy router might do the trick

add_xspam:
    driver = redirect
    domains = +local_domains
    headers_add = $acl_m0
    headers_remove = X-Spam-Score
    data = $local_part@$domain


            cu andreas