diff options
Diffstat (limited to 'ansible/roles/sieve/tasks/main.yml')
-rw-r--r-- | ansible/roles/sieve/tasks/main.yml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ansible/roles/sieve/tasks/main.yml b/ansible/roles/sieve/tasks/main.yml new file mode 100644 index 0000000..1be8729 --- /dev/null +++ b/ansible/roles/sieve/tasks/main.yml | |||
@@ -0,0 +1,20 @@ | |||
1 | --- | ||
2 | - name: copy user sieves to user vmail homedirs | ||
3 | copy: | ||
4 | src: "sieve/{{ item.username }}.sieve" | ||
5 | dest: "/var/mail/vhosts/{{item.domain}}/{{item.user}}/sieve/" | ||
6 | mode: 0600 | ||
7 | owner: vmail | ||
8 | group: vmail | ||
9 | loop: "{{ sieve.users }}" | ||
10 | |||
11 | # dovecot only reads .dovecot.sieve symlink in each users's virtual homedir | ||
12 | - name: create active sieve symlinks for dovecot users | ||
13 | file: | ||
14 | state: link | ||
15 | src: "/var/mail/vhosts/{{item.domain}}/{{item.user}}/sieve/{{ item.username }}.sieve" | ||
16 | dest: "/var/mail/vhosts/{{item.domain}}/{{item.user}}/.dovecot.sieve" | ||
17 | owner: vmail | ||
18 | group: vmail | ||
19 | force: yes | ||
20 | loop: "{{ sieve.users }}" | ||