Re: [exim] Condition problem.

Góra strony
Delete this message
Reply to this message
Autor: W B Hacker
Data:  
Dla: exim users
Temat: Re: [exim] Condition problem.
Max Lock wrote:
> http://www.datanet.co.uk/default.aspx http://www.datanet.co.uk/default.aspx
>
> --------------------------------------------------------------------------
>
> Hi folks,
>
> Just wondering if anyone can help me with a router condition that's not
> behaving. The condition is the following.
>
> condition = ${if and{{eq{$h_X-spam_flag:}{YES}{1}{0}}{${lookup
> mysql{MYSQL_Q_DROPSPAM}{1}{0}}}}}
>
> It's used in a router to decide whether to forward or blackhole spam. I
> keep getting the following error.
>
> 2008-11-25 12:33:36 1L4x6e-0003v8-3j failed to expand condition "${if
> and{{eq{$h_X-spam_flag:}{YES}{1}{0}}{${lookup mysql{SELECT DISTINCT
> domain FROM mail.virusscreen WHERE domain = '$domain' AND dumpspam =
> '1'}{1}{0}}}}}" for spam_blackhole_route router: missing } at end of
> condition inside "and" group
>
> I've matched up the braces and I can't see where one could be missing?
>
> -Cheers Max.


Aside from wanting to do it the hardest way possible [1], are you also
asking a boolean result of a boolean field (I can only guess what your
field types are..) then also wanting to compare it (again) when not
required? [2]

HTH,

Bill


[1] For contrast:

db_quarantine:
   driver     = accept
   transport  = db_quarantine_delivery
   condition  = "${if def:header_X-Junk:{1}{0}}"



[2] You do not appear to be specifying a $domain or $local_part or any
other selector in the MySQL SELECT call.

Ergo it would seem the MYSQL_Q_DROPSPAM only ever has one value.

If so, why call it at all?

If NOT, how do you select *which* value?