+driver = mysql
+connect = host=localhost dbname=postfix user=dovecot password=dovecot
+user_query = SELECT concat('/var/spool/vmail/', maildir) as home, concat('maildir:/var/spool/vmail/', maildir) as mail, 101 AS uid, 12 AS gid, concat('maildir:storage=', quota) AS quota, concat('/var/spool/vmail/', maildir) as sieve_dir, concat('/var/spool/vmail/', maildir, 'dovecot.sieve') as sieve FROM mailbox WHERE username = '%u' AND active = '1'
+password_query = SELECT username as user, password, concat('/var/spool/vmail/', maildir) as userdb_home, concat('maildir:/var/spool/vmail/', maildir) as userdb_mail, 101 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'