ansible-role-mailserver/templates/dovecot/dovecot-sql.conf.ext

10 lines
746 B
Plaintext

driver = {{ mailserver_db_type }}
connect = host={{ mailserver_db_host }} dbname={{ mailserver_db_name }} user={{ mailserver_db_user }} password={{ mailserver_db_password }}
default_pass_scheme = SHA512-CRYPT
iterate_query = SELECT username AS user FROM mailbox
user_query = SELECT '/srv/mail/mailboxes/%d/%n' as home, 'maildir:/srv/mail/mailboxes/%d/%n/Maildir' as mail, 5000 AS uid, 5000 AS gid, concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username = '%u' AND active = '1'
password_query = SELECT username as user, password, '/srv/mail/mailboxes/%d/%n' as userdb_home, 'maildir:/srv/mail/mailboxes/%d/%n/Maildir' as userdb_mail, 5000 as userdb_uid, 5000 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'