aboutsummaryrefslogtreecommitdiffstats
path: root/roles/mail/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/mail/tasks/main.yml')
-rw-r--r--roles/mail/tasks/main.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml
index 8191c0d..f7163fd 100644
--- a/roles/mail/tasks/main.yml
+++ b/roles/mail/tasks/main.yml
@@ -74,6 +74,42 @@
- name: opendkim - enable and start
command: rcenable milter-opendkim
+
+#
+# Dovecot
+#
+
+- name: dovecot - copy sieve filters
+ copy:
+ src: sieve/ # trailing '/' -> directory contents
+ dest: /usr/local/etc/dovecot/sieve/
+ tags: dovecot
+
+- name: dovecot - compile sieve filters
+ command: >
+ find /usr/local/etc/dovecot/sieve/
+ -name '*.sieve'
+ -exec sievec '{}' ';'
+ tags: dovecot
+
+- name: dovecot - copy passwd
+ copy:
+ src: "{{ playbook_dir }}/private/dovecot/passwd"
+ dest: /usr/local/etc/dovecot/passwd
+ group: dovecot
+ mode: 0440
+ tags: dovecot
+
+- name: opendkim - generate config file
+ template:
+ src: dovecot.conf.j2
+ dest: /usr/local/etc/dovecot/dovecot.conf
+ notify: reload-dovecot
+ tags: dovecot
+
+- name: dovecot - enable and start
+ command: rcenable dovecot
+
- name: aliases - forward root mails
lineinfile:
path: /etc/mail/aliases