33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
|
---
|
||
|
- name: Configure dovecot
|
||
|
template: src={{item}} dest=/etc/dovecot/{{item}} owner=vmail group=vmail mode=640
|
||
|
with_items:
|
||
|
- dovecot.conf
|
||
|
- dovecot-sql.conf
|
||
|
- dovecot-sql_lda.conf
|
||
|
notify: restart dovecot
|
||
|
|
||
|
# Authentification
|
||
|
- name: Download warehost-auth (TODO current copy)
|
||
|
copy: src=warehost-auth dest=/usr/local/bin/warehost-auth owner=root group=root mode=0755
|
||
|
|
||
|
- name: Configurate authentification
|
||
|
template: src=warehost-auth.conf dest=/etc/warehost/auth.conf mode=660 owner=vmail group=vmail
|
||
|
|
||
|
- name: Install warehost-auth to dovecot
|
||
|
template: src=dovecot_auth.sh dest=/etc/dovecot/warehost-auth-dovecot mode=770 owner=vmail group=vmail
|
||
|
|
||
|
# Sieve
|
||
|
- name: Create sieve folder
|
||
|
file: path=/var/lib/dovecot/sieve/ state=directory mode=770 owner=vmail group=vmail
|
||
|
|
||
|
- name: Sieve for Spamassassin
|
||
|
template: src=sieve_default dest=/var/lib/dovecot/sieve/default.sieve owner=root group=root mode=644
|
||
|
notify: restart dovecot
|
||
|
|
||
|
- name: Generate sieve
|
||
|
command: sievec /var/lib/dovecot/sieve/default.sieve creates=/var/lib/dovecot/sieve/default.svbin
|
||
|
|
||
|
- name: Enable dovecot
|
||
|
service: name=dovecot state=started enabled=yes
|