On 10/11/2012 8:19 AM, dovecot@freakout.de wrote:
sql.conf: driver = mysql connect = host=much dbname=toarx user=exim password=xxxxxxxx default_pass_scheme = PLAIN password_query = select user as username, password, userdb_home, userdb_mail, userdb_quota_rule from vusers where email = '%u' user_query = select user as username, userdb_home, userdb_mail, userdb_quota_rule from vusers where email = '%u' iterate_query = select email as user from vusers
Only prefetch in the password_query prefixes with userdb_. Some things such as doveadm commands and lmtp delivery don't use passdb but userdb directly. The user_query should not have the userdb_ prefix. Also, according to the wiki, iterate_query returns username, not user.
http://wiki2.dovecot.org/AuthDatabase/SQL
Jack