Re: [exim] Router condition

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Phil Pennock
Date:  
À: Jakub Čermák
CC: exim-users
Sujet: Re: [exim] Router condition
On 2009-08-21 at 16:20 +0200, Jakub Čermák wrote:
> Ah, sorry, by " but the error is still the same" I meant the errors
> were the same except for the part with the condition.
> To avoid futher misunderstandings I uploaded the paniclog to
> http://pastebin.com/f4fc37ede - lines 9 to 12 are for the
> {eqi{$h_X-Spam-Flag}{YES}} variant.
> Could you please dig what's wrong and how to fix it from this?


First: you can use { exim -be } at a command-line, to get the ability to
test string expansions. If you have an email stored in a file called
"foo.eml" then you can use { exim -bem foo.eml } to test string
expansions with headers set from that email, so that $h_X-Spam-Flag:
will be available to you.

Next, note something which I missed in my previous mail -- it needs to
be $h_X-Spam-Flag: with the trailing colon. Without that, parsing will
get confused.

When the parsing gets confused, the error messages get misleading.

> ${if or {{eqi{$h_from:}{fred}}{eq{x}{x}}}}

true
> ${if or {{eqi{$h_from}{fred}}{eq{x}{x}}}}

Failed: missing } at end of string - could be header name not terminated by colon inside "or{...}" condition

Regards,
-Phil