commit - 1bc2ad460e9c75dc2947ebb0de7c02318b6e57d9
commit + cd37bb303ca385056144ee02820359a11663293b
blob - 600625bf6e666a010663423ea56f00f3efc0e684
blob + e185779d7e53deb6c81332606c8307bddacd802e
--- README.md
+++ README.md
$ doas pkg_add ansible
...
$ cd /tmp && mkdir ansible && cd ansible
-$ git clone https://gitlab.com/gonzalo-/ansible-role-mailserver
-Cloning into 'ansible-role-mailserver'...
-warning: redirecting to https://gitlab.com/gonzalo-/ansible-role-mailserver.git/
-remote: Counting objects: 200, done.
-remote: Total 200 (delta 0), reused 0 (delta 0)
-Receiving objects: 100% (200/200), 36.51 KiB | 1.83 MiB/s, done.
-Resolving deltas: 100% (87/87), done.
+$ cat ~/.ssh/config
+Host cvs.x61.sh
+ Port 2222
+ User anoncvs
+$ cvs -d anoncvs@cvs.x61.sh:/cvs checkout -P ansible-role-mailserver
+...
+...
+...
$ mv ansible-role-mailserver gonzalo-.mailserver
$ cat hosts
test ansible_python_interpreter=/usr/local/bin/python2.7
domain: 'foobar.com'
mail_dir: '/var/vmail'
mail_user: 'gonzalo'
- release: '6.4'
+ release: '6.5'
arch: 'amd64'
installurl_mirror: 'https://fastly.cdn.openbsd.org/pub/OpenBSD/'
pkg_path: 'https://fastly.cdn.openbsd.org/pub/OpenBSD/{{ release }}/packages/{{ arch }}/'
domain: 'foobar.com'
mail_dir: '/var/vmail'
mail_user: 'gonzalo'
- release: '6.4'
+ release: '6.5'
arch: 'amd64'
installurl_mirror: 'https://fastly.cdn.openbsd.org/pub/OpenBSD/'
pkg_path: 'https://fastly.cdn.openbsd.org/pub/OpenBSD/{{ release }}/packages/{{ arch }}/'
To enable, modify the following line in /etc/dovecot/conf.d/20-imap.conf:
```
-mail_plugins = $mail_plugins antispam
+mail_plugins = $mail_plugins imap_sieve
```
Also edit /etc/dovecot/conf.d/90-plugin.conf if you want to enable more logging
blob - 8d8d79faba078964954c415d7e6c9f752f3908b0
blob + 2c3da6cee97d0cdb288ab8595ec570ef12629d0c
--- tasks/main.yml
+++ tasks/main.yml
- template: src=10-ssl.conf.j2 dest="/etc/dovecot/conf.d/10-ssl.conf" owner="root" group="wheel" mode="0644"
- template: src=auth-static.conf.ext.j2 dest="/etc/dovecot/conf.d/auth-static.conf.ext" owner="root" group="wheel" mode="0644"
- template: src=global-default.sieve.j2 dest="/var/sieve/global-default.sieve" owner="root" group="wheel" mode="0644"
+- template: src=report-ham.sieve.j2 dest="/usr/local/lib/dovecot/sieve/report-ham.sieve" owner="root" group="wheel" mode="0644"
+- template: src=report-spam.sieve.j2 dest="/usr/local/lib/dovecot/sieve/report-spam.sieve" owner="root" group="wheel" mode="0644"
+- template: src=sa-learn-ham.sh.j2 dest="/usr/local/lib/dovecot/sieve/sa-learn-ham.sh" owner="_dovecot" group="wheel" mode="0755"
+- template: src=sa-learn-spam.sh.j2 dest="/usr/local/lib/dovecot/sieve/sa-learn-spam.sh" owner="_dovecot" group="wheel" mode="0755"
- template: src=ip_whitelist.map.j2 dest="/etc/rspamd/local.d/ip_whitelist.map" owner="root" group="wheel" mode="0644"
- template: src=multimap.conf.j2 dest="/etc/rspamd/local.d/multimap.conf" owner="root" group="wheel" mode="0644"
- template: src=whitelist.sender.domain.map.j2 dest="/etc/rspamd/local.d/whitelist.sender.domain.map" owner="root" group="wheel" mode="0644"
- name: Enable dovecot
service: name=dovecot state=started enabled=yes
+- command: /usr/local/bin/sievec /usr/local/lib/dovecot/sieve/report-ham.sieve /usr/local/lib/dovecot/sieve/report-ham.svbin
+- command: /usr/local/bin/sievec /usr/local/lib/dovecot/sieve/report-spam.sieve /usr/local/lib/dovecot/sieve/report-spam.svbin
+
- name: Enable rspamd
service: name=rspamd state=started enabled=yes