: add postgrey, treat spamd as milter

This commit is contained in:
VC
2024-07-05 11:53:49 +02:00
parent 66fc316071
commit 6eb1f4e470
9 changed files with 86 additions and 4 deletions

View File

@@ -0,0 +1,28 @@
# spamass-milt startup defaults
# OPTIONS are passed directly to spamass-milter.
# man spamass-milter for details
# Non-standard configuration notes:
# See README.Debian if you use the -x option with sendmail
# You should not pass the -d option in OPTIONS; use SOCKET for that.
# Default, use the spamass-milter user as the default user, ignore
# messages from localhost
OPTIONS="-u spamass-milter -i 127.0.0.1"
# Reject emails with spamassassin scores > 15.
OPTIONS="${OPTIONS} -r 15"
# Do not modify Subject:, Content-Type: or body.
#OPTIONS="${OPTIONS} -m"
######################################
# If /usr/sbin/postfix is executable, the following are set by
# default. You can override them by uncommenting and changing them
# here.
######################################
# SOCKET="/var/spool/postfix/spamass/spamass.sock"
# SOCKETOWNER="postfix:postfix"
# SOCKETMODE="0660"
######################################

View File

@@ -4,3 +4,8 @@
ansible.builtin.service:
name: spamd
state: restarted
- name: Restart spamass-milter
ansible.builtin.service:
name: spamass-milter
state: restarted

View File

@@ -6,10 +6,11 @@
state: present
loop:
- spamassassin
- spamass-milter
- libmail-dkim-perl
- libmail-spf-perl
- name: Put configuration files
- name: Put configuration files for spamassassin
ansible.builtin.copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
@@ -17,5 +18,16 @@
loop:
- {src: "./files/local.cf", dest: "/etc/spamassassin/local.cf"}
- {src: "./files/spamassassin", dest: "/etc/default/spamassassin"}
- {src: "./files/spamass-milter", dest: "/etc/default/spamass-milter"}
notify:
- Restart spamassassin
- Restart spamass-milter
- name: Ensure that spam services are up
ansible.builtin.service:
name: "{{ item }}"
enabled: true
state: started
loop:
- spamass-milter
- spamd