aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-08-16 20:20:36 +0100
committerGravatar Johannes Christ <[email protected]>2024-08-17 10:45:35 +0200
commit6b128dc9b5c4ffff9214f1a0adf254f869eb052a (patch)
tree5f4a5ea2b0251faa334e31f6fcf57dd92912954d
parentAdd SASL bans to Postfix fail2ban config (diff)
Update Postfix fail2ban filter to use correct systemd unit name
-rw-r--r--ansible/roles/fail2ban/tasks/main.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/ansible/roles/fail2ban/tasks/main.yml b/ansible/roles/fail2ban/tasks/main.yml
index e6695cd..97f2190 100644
--- a/ansible/roles/fail2ban/tasks/main.yml
+++ b/ansible/roles/fail2ban/tasks/main.yml
@@ -18,6 +18,16 @@
notify:
- Reload fail2ban
+- name: Update Postfix unit name
+ lineinfile:
+ path: /etc/fail2ban/filter.d/postfix.conf
+ regexp: "^journalmatch ="
+ line: "journalmatch = [email protected]"
+ tags:
+ - role::fail2ban
+ notify:
+ - Reload fail2ban
+
- name: Enable fail2ban service
service:
name: fail2ban