Enabling Spam Assassin

This commit is contained in:
2026-08-10 21:06:33 -05:00
parent fca5c83e4d
commit e6daee8d1e
6 changed files with 54 additions and 0 deletions
@@ -0,0 +1,5 @@
# spamass-milter configuration
# -p: specify the socket (inet port 8894)
# -r 15: reject messages with a spam score >= 15 with a 550 SMTP error
# -m: disable modification of the Subject: header
EXTRA_FLAGS="-m -r 15 -p inet:8894@localhost"
@@ -0,0 +1,5 @@
# spamass-milter configuration
# -p: specify the socket (inet port 8894)
# -r 15: reject messages with a spam score >= 15 with a 550 SMTP error
# -m: disable modification of the Subject: header
EXTRA_FLAGS="-m -r 15 -p inet:8894@localhost"
@@ -0,0 +1,5 @@
# spamass-milter configuration
# -p: specify the socket (inet port 8894)
# -r 15: reject messages with a spam score >= 15 with a 550 SMTP error
# -m: disable modification of the Subject: header
EXTRA_FLAGS="-m -r 15 -p inet:8894@localhost"
@@ -9,6 +9,10 @@ milter_list:
hostname: localhost hostname: localhost
port: '8893' port: '8893'
protocol: inet protocol: inet
- description: SpamAssassin
hostname: localhost
port: '8894'
protocol: inet
package_list: package_list:
- name: opendkim - name: opendkim
state: present state: present
@@ -54,6 +58,12 @@ service_list:
- enabled: 'yes' - enabled: 'yes'
name: postfix-copytls.timer name: postfix-copytls.timer
state: started state: started
- enabled: 'yes'
name: spamassassin.service
state: started
- enabled: 'yes'
name: spamass-milter.service
state: started
template_list: template_list:
- dest: /etc/postfix/dynamicmaps.cf.d/ldap - dest: /etc/postfix/dynamicmaps.cf.d/ldap
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
@@ -136,3 +146,6 @@ template_list:
- dest: /usr/lib/systemd/system/postfix-copytls.timer - dest: /usr/lib/systemd/system/postfix-copytls.timer
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/postfix-copytls.timer' }}/usr/lib/systemd/system/postfix-copytls.timer'
- dest: /etc/sysconfig/spamass-milter
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/sysconfig/spamass-milter'
@@ -9,6 +9,10 @@ milter_list:
hostname: localhost hostname: localhost
port: '8893' port: '8893'
protocol: inet protocol: inet
- description: SpamAssassin
hostname: localhost
port: '8894'
protocol: inet
package_list: package_list:
- name: opendkim - name: opendkim
state: present state: present
@@ -54,6 +58,12 @@ service_list:
- enabled: 'yes' - enabled: 'yes'
name: postfix-copytls.timer name: postfix-copytls.timer
state: started state: started
- enabled: 'yes'
name: spamassassin.service
state: started
- enabled: 'yes'
name: spamass-milter.service
state: started
template_list: template_list:
- dest: /etc/postfix/dynamicmaps.cf.d/ldap - dest: /etc/postfix/dynamicmaps.cf.d/ldap
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
@@ -136,3 +146,6 @@ template_list:
- dest: /usr/lib/systemd/system/postfix-copytls.timer - dest: /usr/lib/systemd/system/postfix-copytls.timer
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/postfix-copytls.timer' }}/usr/lib/systemd/system/postfix-copytls.timer'
- dest: /etc/sysconfig/spamass-milter
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/sysconfig/spamass-milter'
@@ -9,6 +9,10 @@ milter_list:
hostname: localhost hostname: localhost
port: '8893' port: '8893'
protocol: inet protocol: inet
- description: SpamAssassin
hostname: localhost
port: '8894'
protocol: inet
package_list: package_list:
- name: opendkim - name: opendkim
state: present state: present
@@ -54,6 +58,12 @@ service_list:
- enabled: 'yes' - enabled: 'yes'
name: postfix-copytls.timer name: postfix-copytls.timer
state: started state: started
- enabled: 'yes'
name: spamassassin.service
state: started
- enabled: 'yes'
name: spamass-milter.service
state: started
template_list: template_list:
- dest: /etc/postfix/dynamicmaps.cf.d/ldap - dest: /etc/postfix/dynamicmaps.cf.d/ldap
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
@@ -136,3 +146,6 @@ template_list:
- dest: /usr/lib/systemd/system/postfix-copytls.timer - dest: /usr/lib/systemd/system/postfix-copytls.timer
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"] src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/usr/lib/systemd/system/postfix-copytls.timer' }}/usr/lib/systemd/system/postfix-copytls.timer'
- dest: /etc/sysconfig/spamass-milter
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
}}/etc/sysconfig/spamass-milter'