I've configured fail2ban on multiple servers to send an email message when
an IP address is banned. However, on one of my servers running Ubuntu
12.04 LTS, I do NOT receive an email notification when an IP address is
banned. There is no trace of any message being sent in the mail log to the
destination email address I have configured. I have verified that my
sendmail path is what fail2ban expects:
# which sendmail
/usr/sbin/sendmail
In jail.local, I have the following settings:
# The simplest action to take: ban only
action_ = %(banaction)s[name=%(__name__)s, port="%(port)s",
protocol="%(protocol)s]
# ban & send an e-mail with whois report to the destemail.
action_mw = %(banaction)s[name=%(__name__)s, port="%(port)s",
protocol="%(protocol)s]
%(mta)s-whois[name=%(__name__)s, dest="%(destemail)s",
protocol="%(protocol)s]
# ban & send an e-mail with whois report and relevant log lines
# to the destemail.
action_mwl = %(banaction)s[name=%(__name__)s, port="%(port)s",
protocol="%(protocol)s]
%(mta)s-whois-lines[name=%(__name__)s, dest="%(destemail)s",
logpath=%(logpath)s]
# 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
action = %(action_mwl)s
# "ignoreip" can be an IP address, a CIDR mask or a DNS host
ignoreip = 127.0.0.1
bantime = -1
maxretry = 8
# "backend" specifies the backend used to get files modification. Available
# options are "gamin", "polling" and "auto".
# yoh: For some reason Debian shipped python-gamin didn't work as expected
# This issue left ToDo, so polling is default backend for now
backend = polling
#
# Destination email address used solely for the interpolations in
# jail.{conf,local} configuration files.
destemail = (THIS_EMAIL_ADDRESS)
I have tried both action_mw and action_mwl. Neither result in an email
message being sent. I cannot figure out why it isn't working on this
server. It works just fine on my other servers, and they are all
configured similarly.
Email is working on this server, as the following command results in an
email being sent:
echo "test message" | mailx -s 'test subject' [email protected]
Does anyone have any ideas or suggestions? I appreciate any help. I'm
running Fail2ban v0.8.6
------------------------------------------------------------------------------
_______________________________________________
Fail2ban-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fail2ban-users