...
 
Commits (2)
......@@ -12,7 +12,7 @@ postmaster: admins
webmaster: admins
root: admins
{% if postfix_additional_admin_aliases %}
{% if postfix_additional_admin_aliases is defined and postfix_additional_admin_aliases%}
# additional admin aliases
{% for alias in postfix_additional_admin_aliases %}
{{ alias }}: admins
......
- name: restart redis
systemd:
name: redis-server
state: restarted
- name: install redis
apt:
name: redis-server
state: present
- name: configure redis
template:
src: "redis.conf.j2"
dest: "/etc/redis/redis.conf"
owner: redis
group: redis
mode: 0640
notify: restart redis
This diff is collapsed.
- name: restart rspamd
systemd:
name: rspamd
state: restarted
dependencies:
- redis
- name: install rspamd
apt:
name:
- rspamd
- unbound
state: present
- name: configure rspamd
template:
src: "{{ item }}.j2"
dest: "/etc/rspamd/local.d/{{ item }}"
with_items:
- actions.conf
- classifier-bayes.conf
- dkim_signing.conf
- milter_headers.conf
- options.inc
- redis.conf
- worker-controller.inc
notify: restart rspamd
# {{ ansible_managed }}
greylist = 5;
add_header = 10;
rewrite_subject = 14.999999;
reject = 15;
# {{ ansible_managed }}
backend = "redis";
new_schema = true;
expire = 8640000;
autolearn = true;
# {{ ansible_managed }}
domain {
c3heaven.de {
selector = "gabriel190928";
path = "/var/lib/rspamd/dkim/c3heaven.de.gabriel190928.key";
}
}
allow_hdrfrom_mismatch = true;
allow_hdrfrom_mismatch_sign_networks = true;
allow_username_mismatch = true;
use_domain = "header";
auth_only = true;
# {{ ansible_managed }}
use = ["authentication-results", "x-spamd-result", "x-rspamd-queue-id", "x-spam-level", "x-spam-status"];
# {{ ansible_managed }}
dns {
nameserver = ["127.0.0.1"];
}
# {{ ansible_managed }}
write_servers = "localhost";
read_servers = "localhost";
# {{ ansible_managed }}
password = "$2$hfr7ocqpqaecwztotq6qyuwaafmb1eao$73cn6pt897qqn9fc9xsht3prur65sjjjzrkq1p1tsufbznqmu64b";
# Install and configure rspamd and its dependencies
#
# The playbook assumes that Postfix is already installed and configure.
# Please run services-base.yml first.
- name: install and configure rspamd
hosts: all
become: yes
roles:
- rspamd
......@@ -7,3 +7,20 @@
become: yes
roles:
- users
- name: update user admin email aliases
hosts: all
become: yes
tasks:
- name: load user info
include_vars:
file: "files/users/users.yml"
name: "user_info"
- name: create aliases
template:
src: "roles/postfix/templates/aliases.j2"
dest: "/etc/aliases"
notify: newaliases
handlers:
- name: newaliases
command: newaliases