Too much emails from fail2ban
I set up fail2ban on my Ubuntu server and specified an email address for notifications. I only want to be informed when a host is banned, but currently I get way to much emails with messages like
Hi, The jail apache-auth has been started successfully /stopped. Regards, Fail2Ban
How can I suppress this kind of notifications?
Solution 1:
Comment out the actions in /etc/fail2ban/actions.d/mail.conf
and replace them with an empty action:
#actionstart = printf %%b "Hi,\n
# The jail <name> has been started successfully.\n
# Regards,\n
# Fail2Ban"|mail -s "[Fail2Ban] <name>: started on `uname -n`" <dest>
actionstart =
#actionstop = printf %%b "Hi,\n [...]
actionstop =