dist: Copy fail2ban configuration from wiki

This commit is contained in:
fox.cpp 2019-09-19 19:42:56 +03:00
parent 2e9a0ea818
commit 8e8fee2b6b
No known key found for this signature in database
GPG key ID: E76D97CCEDE90B6C
5 changed files with 14 additions and 0 deletions

7
dist/README.md vendored
View file

@ -15,3 +15,10 @@ the system to a bare minimum. Subset of these options makes it impossible for
privileged authentication helper binaries to gain required permissions, so you privileged authentication helper binaries to gain required permissions, so you
may have to disable it when using system account-based authentication with may have to disable it when using system account-based authentication with
maddy running as a unprivilieged user. maddy running as a unprivilieged user.
## fail2ban configuration
Configuration files for use with fail2ban. Assume either `backend = systemd` specified
in system-wide configuration or log file written to /var/log/maddy/maddy.log.
See https://github.com/foxcpp/maddy/wiki/fail2ban-configuration for details.

2
dist/fail2ban/filter.d/maddy vendored Normal file
View file

@ -0,0 +1,2 @@
[Definition]
failregex = authentication failed for (.+) \(from <HOST>:[0-9]+\)

5
dist/fail2ban/jail.d/maddy vendored Normal file
View file

@ -0,0 +1,5 @@
[maddy]
enabled = true
port = 143,993,587,465,25
filter = maddy
logpath = /var/log/maddy/maddy.log