[Exim] on string expansion again

Top Page
Delete this message
Reply to this message
Author: Tamas TEVESZ
Date:  
To: exim-users
Subject: [Exim] on string expansion again
hi,

sorry, it looks like something is really holding me back taking a
grasp of this whole string expansion stuff.

again, i have an authenticator (with exim 3.14, yes, i know..), a
pretty simple one:

plain:
driver = plaintext
public_name = PLAIN
server_condition = ${lookup mysql{select if(count(*), "1", "0") from
auth where id = '${quote_mysql:$2}' and encrypt('${quote_mysql:$3}',
secret) = secret}}
server_set_id = $2

(the server_condition line is not wrapped in the conf, it is here
just for readability).

the query is fine. given from a mysql console, it returns expected
values. now if i try to authenticate to exim:

<< 220 event-horizon.royalcomp.hu ESMTP Exim 3.14 #1 Tue, 28 Aug 2001
15:05:33 +0200
>> EHLO foo

<< 250-event-horizon.royalcomp.hu Hello dawn.royalcomp.hu [195.70.42.152]
<< 250-SIZE
<< 250-PIPELINING
<< 250-AUTH PLAIN
<< 250 HELP
>> AUTH PLAIN AG15dXNlcm5hbWUAbXlwYXNzd29yZAA=

<< 435 Unable to authenticate at present: missing or misplaced { or }
I: Authentication failure

(this is not a session log by exim, but a session log by my tool
crafted for debugging smtp auths, essentially a 'telnet host smtp'
automated).

and for god's sake i just cannot find what curly brace could be either
missing or misplaced. or what anything else could be wrong. (btw exim
actually issues the query to the mysql server, and gets back the
expected result). i tried to put the query in quot marks as:

  server_condition = "${lookup mysql{select if(count(*), '1', '0')
    from auth where id = '${quote_mysql:$2}' and
    encrypt('${quote_mysql:$3}', secret) = secret}}"


(again, actual config line is not wrapped). the result is the very
same.

anyone to sched some light ?

thanks a lot,

--
[-]