Max Lock wrote:
> http://www.datanet.co.uk/default.aspx http://www.datanet.co.uk/default.aspx
>
> --------------------------------------------------------------------------
> nope :(
>
> that failed too.
Why don't you re-write it such that the SQL call is not even *made*
unless the header is present?
Essentially what I did by using the header *alone* to select a router.
The *transport* asociated with that router made the SQL call.
Or NOT.
It is still a logical AND. Just displaced in time.
Simpler code.
Easier debug, path alteration, general maintenance
Fewer demands on resources.
*many years* of stable production use.
Bill
>
> 2008-11-25 17:36:05 1L51pM-0004n9-46 H=mailfeed.datanet.co.uk
> [80.68.32.18] F=<max.lock@???> temporarily rejected after
> DATA: failed to expand ACL string "${if and{ {eq
> {$h_X-spam_flag:}{YES}{1}{0}}{eq ${lookup mysql{SELECT DISTINCT domain
> FROM mail.virusscreen WHERE domain = '${quote_mysql:$domain}' AND
> dumpspam = '1'}}{1}{1}{0}}} }": missing } at end of condition inside
> "and" group
>
> Thanks again!
>
> -Max.
>
BTW ..
Not to put too fine a point on it - but is it guaranteed all of the time
that there will *exist* the werewithal to feed both parts of the test?
Or might there be cases where either the header is absent or there is no
matching SQL record - or BOTH?
... when a clause goes unresolvable, the machinery tends to natter on
about curly braces when that is not the real issue...
>
>
> --------------------------------------------------------------------------
> Max Lock - Senior Systems Administrator
> Datanet - Hosting & Connectivity
> 0845 130 6010
> 0845 130 6020
> mailto:Max.Lock@datanet.co.uk
> http://www.datanet.co.uk/
> Registered Office: DATANET.CO.UK Limited, Aspen House, Barley Way, Ancells Business Park, Fleet, Hampshire, GU51 2UT Registered in England - No. 3214053
> Providing Internet Solutions for Business since 1996, Datanet, over 12 years of excellence in service, support and IP solutions
> http://www.datanet.co.uk/awards_and_affiliates.aspx
> http://www.datanet.co.uk/datacentre_diary.aspx
>
> -----Original Message-----
>
> From: Graeme Fowler <graeme@???>
> To: exim users <exim-users@???>
> Subject: Re: [exim] Condition problem.
> Date: Tue, 25 Nov 2008 17:10:01 +0000
>
>
> I've gone back to your original post, moved a brace to the right place
> and added a logic check on the second part of the "and" group.
>
> ${if
> and{
> {eq
> {$h_X-spam_flag:}
> {YES}
> {1}
> {0}
> }
> {eq
> ${lookup mysql{MYSQL_Q_DROPSPAM}}
> {1}
> {1}
> {0}
> }
> }
> }
>
> The fact you were missing a test - "eq" - on the second section made the
> whole thing rather misleading, but as a lookup could return a statement
> in itself the statement was syntactically correct *before* expansion.
>
> Graeme
>
>