Author: Tamas TEVESZ Date: To: Philip Hazel CC: exim-users Subject: Re: [Exim] on string expansion again
On Wed, 29 Aug 2001, Philip Hazel wrote:
> exim -d9 -bd -oX 2525
not much else :S
here's the debug stuff:
[...]
search_find: file="NULL"
key="select if(count(*), "1", "0") from auth where id =
'censored' and encrypt('censored', secret) = secret" partial=-1
LRU list:
internal_search_find: file="NULL"
type=mysql key="select if(count(*), "1", "0") from auth where id =
'censored' and encrypt('censored', secret) = secret"
database lookup required for select if(count(*), "1", "0") from auth
where id = 'censored' and encrypt('censored', secret) = secret
MYSQL query: select if(count(*), "1", "0") from auth where id =
'censored' and encrypt('censored', secret) = secret
MYSQL using cached connection for /foo/foo/foo
lookup yielded: 1
plain authenticator:
$1 =
$2 = censored
$3 = censored
expansion failed: missing or misplaced { or }
435 Unable to authenticate at present: missing or misplaced { or }
LOG: 0 MAIN REJECT
Authentication failed for dawn.royalcomp.hu (foo) [195.70.42.152]:
435 Unable to authenticate at present: missing or misplaced { or }
the authenticator (right now this is the only one in):
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
this works too. now i'm stuck (well, not 'for good' yet, as this
is a 3.14 here so there's plenty of upgrade pathes, it's just that i
don't really like touching some critical systems [even though i know
it'll be all right]).
looks like it wiil have to happen, just out of curiosity: Philip, has
there been any change between 3.14 and 3.33 that could in any way
affect this ? i don't remember, but i'm going to check the changelog
right now)
actually one more thing (this was just a blind guess, but might
indicate something to the more qualified):
# exim -be > ${lookup mysql{select if(count(*), "1", "0") from auth where id = '${quote_mysql:$2}' and encrypt('${quote_mysql:$3}', secret) = secret}}
Failed: missing or misplaced { or } > $version_number $compile_number 3.14 1 >
# exim -be > ${lookup mysql{select if(count(*), "1", "0") from auth where id = '${quote_mysql:$2}' and encrypt('${quote_mysql:$3}', secret) = secret}}
Failed: lookup of "select if(count(*), "1", "0") from auth where id =
'' and encrypt('', secret) = secret" gave DEFER: MYSQL: query failed:
Table 'mail.auth' doesn't exist > $version_number $build_number Failed: unknown variable name "build_number" > $version_number $compile_number 3.22 1 >
hm. this to me indicates there is something bad in 3.14 - i'll have to
upgrade.