mirror of
https://github.com/roles-ansible/ansible_role_rspamd.git
synced 2024-08-16 17:09:51 +02:00
update some parts of rspamd and other stuff
This commit is contained in:
parent
60802cb191
commit
00edc60e0f
10 changed files with 95 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
---
|
---
|
||||||
# should we do a version check? (recomended)
|
# should we do a version check? (recomended)
|
||||||
submodules_versioncheck: false
|
submodules_versioncheck: false
|
||||||
|
|
||||||
|
# rspamd config
|
||||||
|
rspamd__config_path: '/etc/rspamd/local.d/'
|
||||||
|
rspamd__admin_password: 'ChangeMePl3ase'
|
||||||
|
rspamd__redis_server: '127.0.0.1'
|
||||||
|
rspamd__multimap_conf_file: 'templates/multimap.conf.j2'
|
||||||
|
|
1
files/classifier-bayes.conf
Normal file
1
files/classifier-bayes.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
autolearn = true;
|
2
files/logging.inc
Normal file
2
files/logging.inc
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
type = "syslog";
|
||||||
|
level = "warning";
|
2
files/milter_headers.conf
Normal file
2
files/milter_headers.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
use = ["x-spamd-bar", "x-spam-level", "authentication-results"];
|
||||||
|
authenticated_headers = ["authentication-results"];
|
27
files/multimap.conf
Normal file
27
files/multimap.conf
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
WHITELIST_IP {
|
||||||
|
type = "ip";
|
||||||
|
map = "$CONFDIR/local.d/whitelist_ip.map";
|
||||||
|
description = "Local ip whitelist";
|
||||||
|
action = "accept";
|
||||||
|
}
|
||||||
|
|
||||||
|
WHITELIST_FROM {
|
||||||
|
type = "from";
|
||||||
|
map = "$CONFDIR/local.d/whitelist_from.map";
|
||||||
|
description = "Local from whitelist";
|
||||||
|
action = "accept";
|
||||||
|
}
|
||||||
|
|
||||||
|
BLACKLIST_IP {
|
||||||
|
type = "ip";
|
||||||
|
map = "$CONFDIR/local.d/blacklist_ip.map";
|
||||||
|
description = "Local ip blacklist";
|
||||||
|
action = "reject";
|
||||||
|
}
|
||||||
|
|
||||||
|
BLACKLIST_FROM {
|
||||||
|
type = "from";
|
||||||
|
map = "$CONFDIR/local.d/blacklist_from.map";
|
||||||
|
description = "Local from blacklist";
|
||||||
|
action = "reject";
|
||||||
|
}
|
49
tasks/configure.yml
Normal file
49
tasks/configure.yml
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
---
|
||||||
|
- name: Einstellung des Worker controllers
|
||||||
|
become: true
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: templates/worker-controller.inc.j2
|
||||||
|
dest: "{{ rspamd__config_path }}worker-controller.inc"
|
||||||
|
mode: '0640'
|
||||||
|
|
||||||
|
- name: Einstellung des logging
|
||||||
|
become: true
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: files/logging.inc
|
||||||
|
dest: "{{ rspamd__config_path }}logging.inc"
|
||||||
|
mode: '0640'
|
||||||
|
|
||||||
|
- name: milter_headers.conf
|
||||||
|
become: true
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: files/milter_headers.conf
|
||||||
|
dest: "{{ rspamd__config_path }}milter_headers.conf"
|
||||||
|
mode: '0640'
|
||||||
|
|
||||||
|
- name: milter_headers.conf
|
||||||
|
become: true
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: files/classifier-bayes.conf
|
||||||
|
dest: "{{ rspamd__config_path }}classifier-bayes.conf"
|
||||||
|
mode: '0640'
|
||||||
|
|
||||||
|
- name: Einstellug der redis.conf
|
||||||
|
become: true
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: templates/redis.conf.j2
|
||||||
|
dest: "{{ rspamd__config_path }}redis.conf"
|
||||||
|
mode: '0640'
|
||||||
|
|
||||||
|
- name: classifier-bayes.conf
|
||||||
|
become: true
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: files/classifier-bayes.conf
|
||||||
|
dest: "{{ rspamd__config_path }}classifier-bayes.conf"
|
||||||
|
mode: '0640'
|
||||||
|
|
||||||
|
- name: Einstellug der eignene black/whitelist
|
||||||
|
become: true
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ rspamd__multimap_conf_file }}"
|
||||||
|
dest: "{{ rspamd__config_path }}multimap.conf"
|
||||||
|
mode: '0640'
|
|
@ -5,3 +5,6 @@
|
||||||
- name: add apt repos and install rspamd
|
- name: add apt repos and install rspamd
|
||||||
include_tasks: packages.yml
|
include_tasks: packages.yml
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
|
- name: configure rspamd
|
||||||
|
include_tasks: configure.yml
|
||||||
|
|
1
templates/redis.conf.j2
Normal file
1
templates/redis.conf.j2
Normal file
|
@ -0,0 +1 @@
|
||||||
|
servers = "{{ rspamd__redis_server }}"
|
1
templates/worker-controller.inc.j2
Normal file
1
templates/worker-controller.inc.j2
Normal file
|
@ -0,0 +1 @@
|
||||||
|
password = "{{ _rspamd__admin_password }}"
|
|
@ -1,4 +1,6 @@
|
||||||
---
|
---
|
||||||
# versionscheck
|
# versionscheck
|
||||||
playbook_version_number: 02 # should be a integer
|
playbook_version_number: 3 # should be a integer
|
||||||
playbook_version_path: 'do1jlr.rspamd.version'
|
playbook_version_path: 'do1jlr.rspamd.version'
|
||||||
|
|
||||||
|
_rspamd__admin_password: "{{ rspamd__admin_password | password_hash('bcrypt') }}"
|
||||||
|
|
Loading…
Reference in a new issue