From 90aa42b6830acd2d920f6688a3db0d9642dc1453 Mon Sep 17 00:00:00 2001 From: Josh Steadmon Date: Thu, 20 Jun 2019 19:09:04 -0700 Subject: [PATCH] fail2ban: fix dovecot filter's journalmatch The dovecot filter config distributed with fail2ban watches for log entries with a journalmatch filter of "_SYSTEMD_UNIT=dovecot.service", but NixOS's Dovecot runs as dovecot2.service. Fix the journalmatch config to match NixOS's Dovecot. --- pkgs/tools/security/fail2ban/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/security/fail2ban/default.nix b/pkgs/tools/security/fail2ban/default.nix index 6b1d8e6c4f88..296080cbd8e7 100644 --- a/pkgs/tools/security/fail2ban/default.nix +++ b/pkgs/tools/security/fail2ban/default.nix @@ -21,6 +21,9 @@ pythonPackages.buildPythonApplication { --replace /usr/sbin/sendmail sendmail \ --replace /usr/bin/whois whois done + + substituteInPlace config/filter.d/dovecot.conf \ + --replace dovecot.service dovecot2.service ''; doCheck = false;