Re: [Exim] problem with extract in system filter

Pàgina inicial
Delete this message
Reply to this message
Autor: William Thompson
Data:  
A: David Saez
CC: exim-users
Assumpte: Re: [Exim] problem with extract in system filter
> 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 ?


Have you tried:
if "${extract{1}{ }{$h_X-Spam-Score:}}" is above 8
...
...