Have a look at 
http://serverfault.com/questions/257439/stop-fail2ban-stop-start-notifications 
<http://serverfault.com/questions/257439/stop-fail2ban-stop-start-notifications>
 there are several options. Perhaps this will work for you:

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




Date: Wed, 26 Oct 2016 09:02:16 +0100
From: Noel da Costa <[email protected] <mailto:[email protected]>>
Subject: Re: [Fail2ban-users] Can't disable email notifications
To: [email protected] 
<mailto:[email protected]>
Message-ID: <[email protected] 
<mailto:[email protected]>>
Content-Type: text/plain; charset="utf-8"

No reply here.
No reply on IRC.
Nothing in the docs.

Looks like it?s time to move to a different technology.



> On 24 Oct 2016, at 5:27 PM, Noel da Costa <[email protected] 
> <mailto:[email protected]>> wrote:
> 
> Hi there,
> 
> I installed fail2ban some time ago on two servers. 
> Thinking it would be useful to know when someone?s trying to hack my server I 
> enabled it to send me emails when IP?s get banned.
> That was dumb.
> Turns out someone is always trying to hack my servers? so I get thousands of 
> emails a day now.
> Not sure why I thought it would be a good idea because it?s largely useless 
> information.
> I?m drowning in useless emails.
> 
> I?ve tried disabling email notifications in the config and failed ? I can?t 
> get them to stop.
> 
> Here?s what I?ve tried?
> 
> In both jail.conf jail.local, I commented out the following lines:
> 
> # ban & send an e-mail with whois report to the destemail.
> #action_mw = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", 
> port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
>            %(mta)s-whois[name=%(__name__)s, dest="%(destemail)s", 
> protocol="%(protocol)s", chain="%(chain)s"]
> 
> # ban & send an e-mail with whois report and relevant log lines
> # to the destemail.
> #action_mwl = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", 
> port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
>             %(mta)s-whois-lines[name=%(__name__)s, dest="%(destemail)s", 
> logpath=%(logpath)s, chain="%(chain)s"]
> 
> 
> Then I did:
> 
> service fail2ban reload
> service fail2ban restart
> 
> 
> ? but the emails keep on coming.
> 
> I?ve looked at the documentation here:
> 
>       
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fail2ban.org_wiki_index.php_Main-5FPage&d=DQICAg&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=X0jL9y0sL4r4iU_qVtR3lLNo4tOL1ry_m7-psV3GejY&m=y0TkzH-xDzNPlGedY0k_yXKfE8WaRABDr59cv2ccuXA&s=XJhXiBEQzVgSeoyL15iQNEEN4DkuK6F0wTnpr4nEQUU&e=
>  
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fail2ban.org_wiki_index.php_Main-5FPage&d=DQICAg&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=X0jL9y0sL4r4iU_qVtR3lLNo4tOL1ry_m7-psV3GejY&m=y0TkzH-xDzNPlGedY0k_yXKfE8WaRABDr59cv2ccuXA&s=XJhXiBEQzVgSeoyL15iQNEEN4DkuK6F0wTnpr4nEQUU&e=>
>   
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fail2ban.org_wiki_index.php_Main-5FPage&d=DQICAg&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=X0jL9y0sL4r4iU_qVtR3lLNo4tOL1ry_m7-psV3GejY&m=y0TkzH-xDzNPlGedY0k_yXKfE8WaRABDr59cv2ccuXA&s=XJhXiBEQzVgSeoyL15iQNEEN4DkuK6F0wTnpr4nEQUU&e=
>  
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fail2ban.org_wiki_index.php_Main-5FPage&d=DQICAg&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=X0jL9y0sL4r4iU_qVtR3lLNo4tOL1ry_m7-psV3GejY&m=y0TkzH-xDzNPlGedY0k_yXKfE8WaRABDr59cv2ccuXA&s=XJhXiBEQzVgSeoyL15iQNEEN4DkuK6F0wTnpr4nEQUU&e=>
>  >
> 
> 
> ? but I really don?t understand how to use this documentation. I couldn?t 
> find anything relevant.
> 
> 
> Please help!
> 
> 
> Kind Regards,
> Noel
> 
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Fail2ban-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fail2ban-users

Reply via email to