How to stop fail2ban from re-sending old notifications after every reboot?

I have fail2ban running on my Ubuntu server 18.04.

However, every time I reboot I get flooded with thousands of fail2ban notifications from previous blocks.

How can I stop emails from being resent on every reboot?

I’ve been searching the web and can’t find a solution.


In /etc/fail2ban/jail.local Change the default action line to:

action = %(action_)s

It is probably set to action = %(action_mwl)s which tells fail2ban to ban & send mail with whois report and relevant log lines to the destination email.

While action = %(action_)s will only ban, no notifications will be sent.

1 Like

Thanks that did the trick! No more 1000’s of emails lol

1 Like