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/tasks/dovecot.yml

33 lines
1.1 KiB
YAML
Raw Normal View History

2016-11-25 00:04:34 +01:00
---
- 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