Re: [exim] Simple greylisting in Exim ACL.

Top Page
Delete this message
Reply to this message
Author: Adrian Phillips
Date:  
To: exim-users
CC: jgarzik
Subject: Re: [exim] Simple greylisting in Exim ACL.
>>>>> "David" == David Woodhouse <dwmw2@???> writes:

    David> On Thu, 2007-02-08 at 09:10 +0100, Adrian Phillips wrote:
    >> One problem I had (setting up David's sqlite greylisting) was
    >> understanding that "warn condition = ${lookup" can defer on
    >> "some database error" but "set acl = ${lookup" doesn't.


    David> I've only just got round to looking at the sqlite version,
    David> which was put together by someone else based on my original
    David> evil hack with lsearch and ${run echo foo >> db.txt}.


    David> There were a few problems with it -- mostly iirc that in


Yes, I've had to hack around with it - given I've only just got it
sorted out I haven't got around to sending my changes to you yet
(which seems unecessary now you've sorted your version out - I'll see
about merging them).

    David> (Btw, is there a clever way of doing 'SELECT foo,bar,baz
    David> FROM whatever' and getting them into three separate
    David> $acl_m_foo, $acl_m_bar, $acl_m_baz variables? I can either
    David> select them and then split the single text string, or fetch
    David> them separately as I do below. Did I miss a trick?  In
    David> fact, I can't even see how to split a foo|bar|baz string
    David> and then set acl_m_foo=$1, set acl_m_bar=$2 etc., because
    David> aren't $1,$2 etc. cleared by the time you get to the next
    David> ACL modifier? You have to use them _inside_ the ${sg...}
    David> IIRC?)


I use this for something else I'm playing around with :-

   warn   set HOST_TESTS    = ${lookup sqlite \
                                {HOSTS_DB SELECT tests FROM hosts WHERE host=HOST_FIELD } \
                                {${value}}fail \
                               }


   accept condition         = ${if !def:HOST_TESTS}


   # Use eval10 in case any extract keys not in table
   warn   set DYNASTOP_RES  = ${extract{dynastop}{$HOST_TESTS}}
          set SPAMHAUS_PBL  = ${extract{spamhaus_pbl}{$HOST_TESTS}}
          set SPAMHAUS_ANY  = ${extract{spamhaus_any}{$HOST_TESTS}}


Assuming tests contains :-

dynastop="dyn" spamhaus_pbl=0 spamhaus_any=0

Can the forany/forall "thing" being discussed on the dev list be used
for handling this ?

Sincerely

Adrian Phillips

--
Who really wrote the works of William Shakespeare ?
http://www.pbs.org/wgbh/pages/frontline/shakespeare/