Re: [Exim] problem with extract in system filter

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Kirill Miazine
Ημερομηνία:  
Προς: David Saez
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] problem with extract in system filter
David Saez wrote:
>
> I'm trying to extract the score from the X-Spam-Score: header using:
>
> if ${extract{1}{ }{$h_X-Spam-Score:}} is above 8
> then
>         headers add "New-Subject: [SPAM] $h_subject:"
>         headers remove subject
>         neaders add "Subject: $h_new-subject:"
>         headers remove new-subject
> endif

>
> where X-Spam-Score: header is like:
>
>     X-Spam-Score: 11.3 (+++++++++++)

>
> but i get the error
>
> 2003-04-03 20:22:07 1919Lf-0007Xa-JR Error in system filter:
> unrecognized condition word "}{$h_X-Spam-Score:}}" near line 3 of filter
> file
>
> if i enclose the space in double quotes i get a similar error, what
> i'm doing wrong ?


if "${extract{1}{ }{$h_X-Spam-Score:}}" is above 8

Or better:

if $h_x-spam-score: contains "++++++++" then
    headers add "Subject: [SPAM] $h_subject:"
    headers remove subject
endif


--
Kirill Miazine, Stud. Jur.
Faculty of Law, University of Oslo