This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-role-warehost/mailserver/templates/dovecot-sql.conf

5 lines
615 B
Plaintext

# {{ ansible_managed }}
driver = pgsql
connect = host={{mail_db_host}} dbname={{mail_db_dbname}} user={{mail_db_user}} password='{{mail_db_pass}}'
user_query = SELECT CONCAT('{{mail_homedir}}/',m.login,'/') as home, CONCAT('maildir:{{mail_homedir}}/',m.login,'/') as mail, 5000 AS uid, 5000 AS gid, 'dirsize:storage=512000000' AS quota FROM host_mail m LEFT JOIN login ml on ml.id=m.login LEFT JOIN host_domain d ON m.domain=d.id LEFT JOIN host_profil p on p.id=d.profil LEFT JOIN login l on l.id=p.login WHERE ml.mail='%u' AND l.active='1' AND d.mail='1' AND d.active='1' AND m.login IS NOT NULL AND ml.active='1'