Stop fail2ban stop/start notifications
Have a look in the action.d/mail.conf
or action.d/sendmail.conf
which control the mail for start/stop/ban.
To fix this on Fail2Ban v0.9.1 (from the epel repository) on CentOS 7 (RHEL 7) you can override the sendmail start and stop actions (set them to nothing) in /etc/fail2ban/action.d/sendmail-common.local. I create this file by running these commands as root:
cat << EOF >> /etc/fail2ban/action.d/sendmail-common.local
# Override the Fail2Ban defaults in sendmail-common.conf with these entries
[Definition]
# Disable email notifications of jails stopping or starting
actionstart =
actionstop =
EOF
cat /etc/fail2ban/action.d/sendmail-common.local
Its not necessary to fix this in any file.
It depends on your configuration in jail.conf
.
If you configured mta = sendmail
, you can narrow the files action.d/sendmail-*
.
Then you have to look at your action = %(action_*)s
.
If you configured
"action_": comment "actionstart" & "actionstop" in action.d/sendmail.conf
"action_mw": comment ... in action.d/sendmail-whois.conf
"action_mwl": comment ... in action.d/sendmail-whois-lines.conf
If you configured mta to "mail", then just change sendmail to mail and configure the specific file.
Dont forget to restart after commenting the file!