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/dovecot/handlers | |
parent | 9635ac4dedf69de5bff65785bcc16bef80b52d75 (diff) | |
download | mail-1204730924436ef9e1c7c49c9557837f9a5ed0e8.tar.gz |
Diffstat (limited to 'ansible/roles/dovecot/handlers')
-rw-r--r-- | ansible/roles/dovecot/handlers/main.yml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ansible/roles/dovecot/handlers/main.yml b/ansible/roles/dovecot/handlers/main.yml new file mode 100644 index 0000000..dda7930 --- /dev/null +++ b/ansible/roles/dovecot/handlers/main.yml | |||
@@ -0,0 +1,31 @@ | |||
1 | --- | ||
2 | - name: restart dovecot | ||
3 | service: | ||
4 | name: dovecot | ||
5 | state: restarted | ||
6 | |||
7 | - name: reload dovecot | ||
8 | service: | ||
9 | name: dovecot | ||
10 | state: reloaded | ||
11 | |||
12 | # We intentionally don't have a "creates:" guard on the resieve handlers | ||
13 | # because if they get called we need to re-run them on any changes of | ||
14 | # the underlying script itself regardless whether the result .svbin | ||
15 | # already exists or not. | ||
16 | - name: resieve spam | ||
17 | command: sievec report-spam.sieve | ||
18 | args: | ||
19 | chdir: /etc/dovecot/sieve | ||
20 | |||
21 | - name: resieve ham | ||
22 | command: sievec report-ham.sieve | ||
23 | args: | ||
24 | chdir: /etc/dovecot/sieve | ||
25 | |||
26 | - name: resieve spam mover | ||
27 | command: sievec 10-rspamd.sieve | ||
28 | args: | ||
29 | chdir: /etc/dovecot/sieve-before.d | ||
30 | creates: 10-rspamd.svbin | ||
31 | |||