spamassassin: Initial version of role

This commit is contained in:
Timo Makinen 2020-09-24 17:36:18 +00:00
parent 2db1a47b1a
commit a70fb0ae43
3 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,9 @@
# These values can be overridden by editing ~/.spamassassin/user_prefs.cf
# (see spamassassin(1) for details)
# These should be safe assumptions and allow for simple visual sifting
# without risking lost emails.
required_hits 5
report_safe 0
rewrite_header Subject [SPAM]

View file

@ -0,0 +1,6 @@
---
- name: restart spamassassin
service:
name: spamassassin
state: restarted

View file

@ -0,0 +1,21 @@
---
- name: install packages
package:
name: spamassassin
state: installed
- name: copy local config
copy:
dest: /etc/mail/spamassassin/local.cf
src: local.cf
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
notify: restart spamassassin
- name: enable service
service:
name: spamassassin
enabled: true
state: started