From dce980ddb127a470b188fd6efbfb8ddb5b0fe315 Mon Sep 17 00:00:00 2001 From: ene Date: Sat, 25 Mar 2023 14:00:29 +0100 Subject: Feat(system/services/fail2ban): Add dovecot jail This should reduce the log spam even further. --- system/services/fail2ban/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/system/services/fail2ban/default.nix b/system/services/fail2ban/default.nix index 949b486..5aee097 100644 --- a/system/services/fail2ban/default.nix +++ b/system/services/fail2ban/default.nix @@ -17,5 +17,14 @@ multipliers = "2 4 16 128 256"; maxtime = "72h"; }; + jails = { + dovecot = '' + # block IPs which failed to log-in + # aggressive mode add blocking for aborted connections + enabled = true + filter = dovecot[mode=aggressive] + maxretry = 2 + ''; + }; }; } -- cgit 1.4.1