diff options
author | clarkzjw <[email protected]> | 2023-02-08 00:40:09 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-02-08 00:40:09 -0800 |
commit | 1204730924436ef9e1c7c49c9557837f9a5ed0e8 (patch) | |
tree | 129d79dfd11245751cee6d4082ff5d2f6e941610 /ansible/roles/sieve/tasks/main.yml | |
parent | 9635ac4dedf69de5bff65785bcc16bef80b52d75 (diff) | |
download | mail-master.tar.gz |
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 }}" | ||