dovecot at freakout.de
2012-Oct-11 13:19 UTC
[Dovecot] iterate_query does not use userdb - mail_location not found
Hi dovecot-comminity, can't get iterate_query working. doveadm cannot find mail_location which comes from userdb query. dovecot itself works fine with sql. Whats wrong? please help: [root at glen exim]# /opt/dovecot/bin/doveadm search -A mailbox Trash savedbefore 90d doveadm(uwe at mitmachnet.de): Error: user uwe at mitmachnet.de: Initialization failed: mail_location not set and autodetection failed: Mail storage autodetection failed with home=(not set) doveadm(uwe at mitmachnet.de): Error: User init failed dovecot.conf: passdb { driver = sql args = /etc/dovecot/sql.conf } userdb { driver = sql args = /etc/dovecot/sql.conf } 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 Cheers Axel
Jack Bates
2012-Oct-11 14:28 UTC
[Dovecot] iterate_query does not use userdb - mail_location not found
On 10/11/2012 8:19 AM, dovecot at 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