driver = mysql
connect = host=localhost dbname=postfixadmin user=postfixadmin password=ViNkLVnAfdGn

# Default password scheme.
# depends on your $CONF['encrypt'] setting:
# md5crypt  -> MD5-CRYPT
# md5       -> PLAIN-MD5
# cleartext -> PLAIN
default_pass_scheme = MD5-CRYPT

# Query to retrieve password. user can be used to retrieve username in other
# formats also.

password_query = SELECT username AS user,password FROM mailbox WHERE username = '%u' AND active='1'

# Query to retrieve user information.

#user_query = SELECT maildir, 107 AS uid, 115 AS gid FROM mailbox WHERE username = '%u' AND active='1'
user_query = SELECT maildir, 1000 AS uid, 1000 AS gid, CONCAT('dict:storage=',floor(quota/1000),' proxy::quota') as quota FROM mailbox WHERE username = '%u' AND active='1'
