On 10/26/2016 10:02 AM, Noel da Costa wrote:

>> 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"]
>>
>>

This feature is pretty well documented in the jail.conf file[0]. The action
you're looking for is apparently this one:

# The simplest action to take: ban only
action_ = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s",
port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]

If you follow instructions in this section, you will eventually see this:

# Choose default action.  To change, just override value of 'action' with the
# interpolation to the chosen action shortcut (e.g.  action_mw, action_mwl, etc)
in jail.local
# globally (section [DEFAULT]) or per specific section
action = %(action_)s

According to these information, the only step you need to do is to set the
default action (which is, in your case, called action_) in you jail.local file's
DEFAULT section:

[DEFAULT]
action = %(action_)s

After restarting fail2ban's service you shouldn't get any email notifications
from fail2ban.

[0] https://github.com/fail2ban/fail2ban/blob/0.10/config/jail.conf#L163-L213


-- 
GPG key ID: 0xFB738CE27B634E4B

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
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