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

Pàgina inicial
Delete this message
Reply to this message
Autor: Jakob Hirsch
Data:  
A: jaco engelbrecht
CC: exim-users
Assumpte: Re: [exim] Result repeated and contains a newline character ?
Quoting jaco engelbrecht:
> 08:52:54 31741 expanding: ${sg{$header_X-Spammark:}{\N(\d+)\.(\d+)\N} 
> {\$1}}
> 08:52:54 31741    result: 0
> 08:52:54 31741 0


> Can anyone also please confirm if it's normal to print the result and
> a newline when testing with "-be"?


The reason for that is just several lines above:

> 08:52:54 31741 expanding: $header_X-Spammark:
> 08:52:54 31741    result: 0.00
> 08:52:54 31741 0.00


You X-Spammark header obviously contains "0.00\n0.00" (just as your
X-ClamAV contains "clean\nclean"). ${sg...} seems to operate on every
line seperately, just like
Don't know why this isn't in the spec (Philip?).

You should fix that. An ugly workaround would be like

> ${sg {100.0\n100.0} {\N(?s)(\d+).*\N} {\$1}}

100