I'm using this passdb sql to a postgres db
passdb sql {
query = SELECT NULL AS password, 'Y' as nopassword, userid AS user \
FROM users \
WHERE addr = '%{user}' AND password = '%{password}'
}
This succeed and the addr passed in as user is [email protected] as expected
I use this userdb sql
userdb sql {
query = SELECT home, uid, gid \
FROM users \
WHERE addr = '%{user}'
# For using doveadm -A:
# iterate_query = SELECT userid AS username, domain FROM users
}
This fails because postgres receives just "foo" not "[email protected]"
as user.
maybe there is a bug in my stuff but I cannot see it. I can see the
query in the postgres log where it clearly says:
WHERE addr = 'foo'
It also logs the passdb query:
WHERE addr = '[email protected]' AND password='secret'
thanks
Terry
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]