mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 13:23:11 +01:00
26 lines
473 B
Nix
26 lines
473 B
Nix
|
{ ... }:
|
||
|
{
|
||
|
services.fail2ban = {
|
||
|
enable = true;
|
||
|
bantime = "10m";
|
||
|
bantime-increment = {
|
||
|
enable = true;
|
||
|
};
|
||
|
jails = {
|
||
|
dovecot = ''
|
||
|
enabled = true
|
||
|
# aggressive mode add blocking for aborted connections
|
||
|
filter = dovecot[mode=aggressive]
|
||
|
bantime = 10m
|
||
|
maxretry = 3
|
||
|
'';
|
||
|
postfix = ''
|
||
|
enabled = true
|
||
|
filter = postfix[mode=aggressive]
|
||
|
maxretry = 3
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
}
|
||
|
|