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

Top Page
Delete this message
Reply to this message
Author: Jaco Engelbrecht
Date:  
To: exim-users
Subject: Re: [exim] Result repeated and contains a newline character ?
Hi,

On Tue, Mar 27, 2007 at 02:30:06PM +0100, Philip Hazel wrote:
> On Tue, 27 Mar 2007, jaco engelbrecht wrote:
>
> > Surely the result should just be "0", not "0\n0"? What am I doing
> > wrong?
> >
> > My condition in my exim configure file:
> >
> >     2004   condition             = ${if and {\
> >     2005                                                     { or  
> > { { !eq {$header_X-Trend:}{clean} }\
> >     2006                                                               
> > { !eq {$header_X-ClamAV:}{clean} }\
> >     2007                                                            }\
> >     2008                                                     }\
> >     2009                                                     {< {${sg 
> > {$header_X-Spammark:}{\N(\d+)\.(\d+)\N}{\$1}}}  
> > {$ACL_SPAMMARK_THRESH} } \
> >     2010                                                     {match{$ 
> > {extract{1}{\:}{$ACL_SPAMMARK_FLAGS}}}{vINS}}\
> >     2011                                                   }\
> >     2012                                       }

>
> That has been horribly screwed up in the posting somehow. What are those
> numbers? Can you post the condition exactly as it appears in your file?
> What is the definition of ACL_SPAMMARK_THRESH? What release of Exim are
> you using?


(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).

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

The X-Spammark header is added by a local_scan plugin. What I noticed in the last hour or so is that bounce messages do not have the X-Spammark header present, so that's another problem that I need to solve. In my original problem I reported, the debug shows the X-Spammark header was present though, and had a value of 0.00, so it's two unrelated problems.

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} } \


Jaco

--
bje@???