From 1204730924436ef9e1c7c49c9557837f9a5ed0e8 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Wed, 8 Feb 2023 00:40:09 -0800 Subject: fork https://github.com/mattsta/mailweb --- ansible/roles/sieve/tasks/main.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ansible/roles/sieve/tasks/main.yml (limited to 'ansible/roles/sieve') 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 @@ +--- +- name: copy user sieves to user vmail homedirs + copy: + src: "sieve/{{ item.username }}.sieve" + dest: "/var/mail/vhosts/{{item.domain}}/{{item.user}}/sieve/" + mode: 0600 + owner: vmail + group: vmail + loop: "{{ sieve.users }}" + + # dovecot only reads .dovecot.sieve symlink in each users's virtual homedir +- name: create active sieve symlinks for dovecot users + file: + state: link + src: "/var/mail/vhosts/{{item.domain}}/{{item.user}}/sieve/{{ item.username }}.sieve" + dest: "/var/mail/vhosts/{{item.domain}}/{{item.user}}/.dovecot.sieve" + owner: vmail + group: vmail + force: yes + loop: "{{ sieve.users }}" -- cgit v1.2.3