Re: [exim] Result repeated and contains a newline character …

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Jaco Engelbrecht
CC: exim-users
Subject: Re: [exim] Result repeated and contains a newline character ?
On Tue, 27 Mar 2007, Jaco Engelbrecht wrote:

> (Those were the line naumbers in vim, sorry. Let me reply using mutt instead...)
>
>   condition             = ${if and {\
>                                      { or { { !eq {$header_X-Trend:}{clean} }\
>                                             { !eq {$header_X-ClamAV:}{clean} }\
>                                           }\
>                                      }\
>                     {< {${sg{$header_X-Spammark:}{\N(\d+)\.(\d+)\N}{\$1}}} {$ACL_SPAMMARK_THRESH} } \
>                                      {match{${extract{1}{\:}{$ACL_SPAMMARK_FLAGS}}}{vINS}}\
>                                    }\
>                           }

>
> ACL_SPAMMARK_THRESH is the users' spam thresold (e.g. 96).


But why have you written $ACL_SPAMMARK_THRESH?
                         ^


> ${sg{$header_X-Spammark:}{\N(\d+)\.(\d+)\N}{\$1}} should return e.g.
> if given 100.00 => 100, 0.00 => 0, etc.


In simple tests, with fixed values, it does.

> For the second problem, what's the best way to check for the existance
> of the X-Spammark header, and setting it to 0 if it's not present?


> I'm currently trying:
>
>         {< {${sg{${if def:h_X-Spammark:{$h_X-Spammark:}{0.00}}}{\N(\d+)\.(\d+)\N}{\$1}}} {$ACL_SPAMMARK_THRESH} } \


if def is one solution.

You still haven't said which release of Exim.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book