Re: [exim] Saving roundtrips to MySQL by storing previous re…

Pàgina inicial
Delete this message
Reply to this message
Autor: Jeremy Harris
Data:  
A: exim-users
Assumpte: Re: [exim] Saving roundtrips to MySQL by storing previous results in ACL variables
On 04/28/2010 08:42 PM, Ron White wrote:
> On Wed, 2010-04-28 at 20:29 +0100, Jeremy Harris wrote:
>> On 04/28/2010 04:47 PM, Ron White wrote:
>>> SELECT email,usertype,inbound,outbound FROM mailusers WHERE
>>> email='${quote_mysql:$local_part}@${quote_mysql:$domain}';
>>
>> Certainly. I do just that (with pgsql or ldap, depending). Bung it
>> all into a single acl_m_foo variable - you can have named ones
>> as well as the numbered ones these days. Pull apart later as
>> needed using ${extract.
>>
>> Cheers,
>>       Jeremy

>>
> Thanks Jeremy. I can 'split' it out with ${extract.. a big thank you for
> the nudge. One other thing. How do I actually get it into a variable to
> start with? I know it should be obvious, I know I should know how, but I
> honestly don't know how to make the initial assignment. Is it as simple
> as:
> acl_m_whatevs = SELECT x,x,x,x from
> ?
> Or is it curly brace city?
>
>
>

eg:

   require       set acl_m_tmp = \
                                 ${lookup pgsql{SELECT test_action, other_column \
                                     FROM check_content_test \
                                     WHERE test_name = 'url_check' AND uid = $acl_m_rcpt_uid\
                                 } {$value} {}}