driver = mysql
connect = host=localhost dbname=dovecot user=root
password_query = SELECT concat(userid, '@', domain) AS user, \
  password, nets AS allow_nets FROM users WHERE userid = '%n' AND domain = '%d'
user_query = SELECT concat(userid, '@', domain) AS user, home, username, uid, gid, \
  concat( mail_type, ':', home, '%d/%n:INDEX=', home, `index`, '/%d/%n:CONTROL=', home, control , '/%d/%n' ) AS mail \
  FROM users WHERE userid = '%n' AND domain = '%d'
