http://www.datanet.co.uk/default.aspx http://www.datanet.co.uk/default.aspx
--------------------------------------------------------------------------
Hi Graeme,
I'm using JEdit so I can see which braces are paired etc. I've also
used the quote_mysql function, here's the current pretty version :)
${if and
{
{eq
{$h_X-spam_flag:}
{YES}
{1}
{0}
}
{$
{lookup mysql
{
SELECT DISTINCT domain FROM mail.virusscreen WHERE domain =
'${quote_mysql:$domain}' AND dumpspam = '1'
}
{$value}
{1}
{0}
}
}
}
}
all 14 pairs of braces match up
Currently gives this error:
2008-11-25 16:28:33 1L50m7-0004Pk-5F 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-Datanet_MessageScreen_malware_flag:}{YES}{1}{0}}{${lookup
mysql{SELECT DISTINCT domain FROM mail.virusscreen WHERE domain =
'${quote_mysql:$domain}' AND dumpspam = '1'}{$value}{1}{0}}}}}":
missing } at end of condition inside "and" group
-Cheers Max.
--------------------------------------------------------------------------
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 16:09:26 +0000
As someone else suggested, you should "prettify" this in an editor like
Vi, Emacs, Pico or something which understands braces. Then you'd see
that you had the right number of braces but you had one of them in the
wrong place. You need to collapse the following:
${if
and{
{
eq{$h_X-spam_flag:}
{YES}
{1}
{0}
}
{
${lookup mysql{SELECT DISTINCT domain FROM mail.virusscreen
WHERE domain = '$domain' AND dumpspam ='1'}
}
{$value}
}
}
}
Also, consider putting '$domain' in the query as '${quote_mysql:
$domain}' instead. The reasoning for that should be fairly obvious.
Graeme