Re: [exim] Struggling with condition= syntax

Pàgina inicial
Delete this message
Reply to this message
Autor: Tony Finch
Data:  
A: Chris Shucksmith
CC: Exim users list
Assumpte: Re: [exim] Struggling with condition= syntax
On Tue, 25 Apr 2006, Chris Shucksmith wrote:
>
> I am trying to interpret several header values in the condition= line of
> a router. I'm having real problems with curly braces and subsequently
> Exim fails to start. If anyone can spot the error I would appreciate
> your guidance.


I think all you are missing is a \ on the first line.

The way I would format it is as follows. I vary the cuddliness of the
brackets in a systematic way, so that inner conditions stand out, and
so that double nestings pair up.

condition = ${if or{{ def:header_X-Spam-Flag: } \
                    { def:header_X-Amavis-Alert: } \
                    { and{{ def:header_X-Merlot-Blacklisted: } \
                          { def:header_X-Spam-Level: } \
                          { >{$header_X-Spam-Level}{1.5} }} }} \
                 {yes} {no} }


This is much more complicated than I allow string expansions to get.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}