[Dovecot] Need help with SQL queries after updating to 1.0a3
Timo Sirainen
tss at iki.fi
Sun Oct 16 18:56:44 EEST 2005
On Mon, 2005-10-10 at 14:50 -0400, Jonathan Vanasco wrote:
> password_query = SELECT local_part || '@' || domain as user,
> password FROM accounts WHERE local_part = '%n' AND domain = '%d' AND
> active = 'Y' ;
>
> but i can't get things to work with the user query
>
> user_query = SELECT home_dir AS home, uid, gid FROM accounts
> WHERE local_part = '%n' AND domain = '%d' ;
..
> Oct 11 11:53:37 rsrr1 dovecot: auth(default): passdb(test@
> mydomain.com,209.73.1.130): passdb didn't return userdb entries
> Oct 11 11:53:37 rsrr1 dovecot: auth(default): userdb(test@
> mydomain.com,209.73.1.130): user not found from userdb
Looks like you're using passdb as userdb (BTW. I just renamed that to
prefetch userdb, the passdb name for it was too confusing). If you
really want to use that, you'll have to make password_query return all
the fields, as http://wiki.dovecot.org/moin.cgi/AuthSpecials explains.
The easiest way to fix this however would be to use sql as the userdb.
So you'd have something like:
passdb sql {
args = /etc/dovecot.conf
}
userdb sql {
args = /etc/dovecot.conf
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20051016/24aece1a/attachment.pgp
More information about the dovecot
mailing list