Commit 371d9f5b authored by Lars Beckers's avatar Lars Beckers

dovecot: refactor spam scripts for usage with virtual users

parent dd82925e
......@@ -29,3 +29,4 @@ dovecot_dsync_host_attribute: ansible_host
dovecot_content_filter: false
dovecot_spam_folder: Spam
dovecot_spam_user: "${1}" # debian-spamd
......@@ -70,7 +70,7 @@
- name: ensure the global spam filter and learning sieve script have correct permissions
file:
state: present
state: file
path: "/var/lib/dovecot/sieve.d/{{ item }}"
mode: '0640'
owner: dovecot
......@@ -86,8 +86,8 @@
- mail
- name: ensure scripts for learning spam are present
copy:
src: "{{ item }}"
template:
src: "{{ item }}.j2"
dest: "/var/lib/dovecot/sieve.d/{{ item }}"
mode: '0750'
owner: dovecot
......
#!/bin/sh
# you can also use tcp/ip here, consult spamc(1)
exec /usr/bin/spamc -u ${1} -L ham -C report
exec /usr/bin/spamc -u {{ dovecot_spam_user }} -L ham -C report
#!/bin/sh
# you can also use tcp/ip here, consult spamc(1)
exec /usr/bin/spamc -u ${1} -L spam -C report
exec /usr/bin/spamc -u {{ dovecot_spam_user }} -L spam -C report
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment