Re: [exim] Simple greylisting in Exim ACL.

Pàgina inicial
Delete this message
Reply to this message
Autor: David Woodhouse
Data:  
A: W B Hacker
CC: exim users
Assumpte: Re: [exim] Simple greylisting in Exim ACL.
On Fri, 2007-02-09 at 00:19 +0800, W B Hacker wrote:
>
> Seems 'not at the moment'.
>
> Background:
>
> We use the SQL : 'SELECT <SQL DB attribute> AS <dovecot variable>'
>
> ..elsewhere.
>
> Tests (so far) have show this SQL 'AS' assignment does NOT work in Exim ACL's -
> whether quoted, bracketed, or $quote_pgsl:'ed, and whether destined for either
> an acl_<variable> OR a MACRO.


Hm. I'm not sure about 'SELECT foo AS somearbitraryvariable' but we
_could_ probably make it set a variable named according to the _field_
name. So a lookup 'SELECT helo,host,expire FROM greylist where blah'
could set variables like $acl_m_helo, $acl_m_host, $acl_m_expire.

Actually that's a really bad example and we'd probably want to name them
$sql_helo, $sql_host or something like that. But the nomenclature is
unimportant. We can now do fairly arbitrary variable names based on a
common prefix, right?

I wouldn't want to do this in sqlite unless we were going to _also_ do
it the same way in the other databases.

And of course it only really works like this when there's _one_ result.
I'm happy enough to declare that it sets the variables according to the
_last_ result returned by the lookup.

Does that seem like a reasonable feature to implement?

--
dwmw2