dovecot: first config-files

This commit is contained in:
genofire 2020-07-22 21:37:04 +02:00
parent 8303673e3a
commit 263a5e7799
4 changed files with 51 additions and 0 deletions

View File

@ -4,3 +4,31 @@
name: name:
- dovecot - dovecot
- pigeonhole - pigeonhole
- name: dovecot create config folder
file:
path: "{{ item }}"
state: directory
mode: '0755'
with_items:
- /etc/dovecot
- /etc/dovecot/conf.d
- name: take default dovecot config
copy:
remote_src: yes
src: "/usr/share/doc/dovecot/example-config/{{ item }}"
dest: "/etc/dovecot/{{ item }}"
with_items:
- conf.d/auth-sql.conf.ext
- name: dovecot config
template:
src: "dovecot/{{ item }}"
dest: "/etc/dovecot/{{ item }}"
with_items:
- dovecot-sql.conf.ext
- dovecot.conf
- conf.d/10-auth.conf

View File

@ -0,0 +1,3 @@
#auth_master_user_separator = *
auth_mechanisms = plain login
!include auth-sql.conf.ext

View File

@ -0,0 +1,9 @@
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'

View File

@ -0,0 +1,11 @@
!include_try /usr/share/dovecot/protocols.d/*.protocol
protocols = imap lmtp sieve
dict {
# Enable quota dictionnary
quota = {{ mailserver_db_type }}:/etc/dovecot/dovecot-dict-sql.conf.ext
#expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}
!include conf.d/*.conf
!include_try local.conf