Re: [exim] Condition problem.

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Ian Eiloart
Date:  
À: Max Lock, exim-users
Sujet: Re: [exim] Condition problem.


--On 25 November 2008 12:38:04 +0000 Max Lock <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}}}}}


Hard to read like that. Please repost a prettified version, and tell us
what the macros are, eg:

 ${if and{
            {eq{$h_X-spam_flag:}{YES}{1}{0}}   <<<<-- what's this? you've 
given four arguments to eq, haven't you?
            {
                ${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.
>
> --------------------------------------------------------------------------
> 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
>




--
Ian Eiloart
IT Services, University of Sussex
x3148