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.
-- 
<[EMAIL PROTECTED]>   <[EMAIL PROTECTED]>   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}}

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to