Files
zira-etc/dovecot/dovecot-mysql.conf
2021-05-24 22:18:33 +03:00

16 lines
1.0 KiB
Plaintext

driver = mysql
connect = host=localhost dbname=postfixadmin user=postfixadmin password=asdjkl123
default_pass_scheme = MD5-CRYPT
iterate_query = SELECT username AS user FROM mailbox
user_query = SELECT CONCAT('/home/vmail/',maildir) AS home, CONCAT('maildir:/home/vmail/',maildir) AS mail, 101 AS uid, 12 AS gid, CONCAT('*:bytes=',quota) AS quota_rule FROM mailbox WHERE username = '%u' AND active = 1
password_query = SELECT username AS user,password FROM mailbox WHERE username = '%u' AND active='1'
# following should all be on one line.
#password_query = SELECT username as user, password, concat('/home/vmail/', maildir) as userdb_home, concat('maildir:/home/vmail/', maildir) as userdb_mail, 101 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'
# following should all be on one line
#user_query = SELECT concat('/home/vmail/',maildir) as home, concat('maildir:/home/vmail/', maildir) as mail, 101 AS uid, 12 AS gid, CONCAT('*:messages=10000:bytes=',quota) as quota_rule FROM mailbox WHERE username = '%u' AND active = '1'