2023-03-20 20:01:04 +01:00
|
|
|
---
|
2023-09-23 08:19:13 +02:00
|
|
|
- name: "Fail2ban | Copy jail file"
|
2023-03-20 20:01:04 +01:00
|
|
|
ansible.builtin.copy:
|
|
|
|
src: files/fail2ban/postfix-sasl.conf
|
|
|
|
dest: "{{ fail2ban_jail_dir }}/postfix-sasl.conf"
|
|
|
|
mode: "0644"
|
|
|
|
notify: reload fail2ban
|
|
|
|
|
2023-09-23 08:19:13 +02:00
|
|
|
- name: "Fail2ban | Copy SASL filter"
|
2023-03-20 20:01:04 +01:00
|
|
|
ansible.builtin.copy:
|
|
|
|
src: files/fail2ban/postfix-sasl.local
|
|
|
|
dest: "{{ fail2ban_filter_dir }}/postfix-sasl.local"
|
|
|
|
mode: "0644"
|
|
|
|
notify: reload fail2ban
|
|
|
|
|
|
|
|
- name: "Fail2ban | Setup SASL logging"
|
2023-09-23 08:19:13 +02:00
|
|
|
ansible.builtin.copy:
|
|
|
|
src: rsyslog.d/mail-sasl.conf
|
|
|
|
dest: /etc/rsyslog.d/mail-sasl.conf
|
|
|
|
mode: "0644"
|
2023-03-20 20:01:04 +01:00
|
|
|
notify: restart rsyslog
|
|
|
|
|
|
|
|
- name: "Fail2ban | Setup logrotate"
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: mail-sasl.j2
|
|
|
|
dest: /etc/logrotate.d/mail-sasl
|
|
|
|
mode: "0644"
|