diff --git a/ChangeLog b/ChangeLog index b1aac1bf..c5bcc77b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,9 @@ ver. 0.9.3 (2015/XX/XXX) - wanna-be-released useful under heavy load to avoid contesting on iptables calls. If you need to disable, define 'action.d/iptables-common.local' with empty value for 'lockingopt' in `[Init]` section. + * mail-whois-lines, sendmail-geoip-lines and sendmail-whois-lines + actions now include by default only the first 1000 log lines in + the emails. Adjust to augment the behavior. - Fixes: * reload in interactive mode appends all the jails twice (gh-825) diff --git a/config/action.d/mail-whois-lines.conf b/config/action.d/mail-whois-lines.conf index ef22c262..6e39c605 100644 --- a/config/action.d/mail-whois-lines.conf +++ b/config/action.d/mail-whois-lines.conf @@ -46,7 +46,7 @@ actionban = printf %%b "Hi,\n Here is more information about :\n `%(_whois_command)s`\n\n Lines containing IP: in \n - `grep -E '(^|[^0-9])([^0-9]|$)' `\n\n + `grep -E '(^|[^0-9])([^0-9]|$)' `\n\n Regards,\n Fail2Ban"|mail -s "[Fail2Ban] : banned from `uname -n`" @@ -71,3 +71,7 @@ dest = root # Path to the log files which contain relevant lines for the abuser IP # logpath = /dev/null + +# Number of log lines to include in the email +# +grepopts = -m 1000 diff --git a/config/action.d/sendmail-geoip-lines.conf b/config/action.d/sendmail-geoip-lines.conf index 929908db..2232642c 100644 --- a/config/action.d/sendmail-geoip-lines.conf +++ b/config/action.d/sendmail-geoip-lines.conf @@ -34,7 +34,7 @@ actionban = printf %%b "Subject: [Fail2Ban] : banned from `uname -n` AS:`geoiplookup -f /usr/share/GeoIP/GeoIPASNum.dat "" | cut -d':' -f2-` hostname: `host -t A 2>&1`\n\n Lines containing IP: in \n - `grep -E '(^|[^0-9])([^0-9]|$)' `\n\n + `grep -E '(^|[^0-9])([^0-9]|$)' `\n\n Regards,\n Fail2Ban" | /usr/sbin/sendmail -f @@ -47,3 +47,7 @@ name = default # Path to the log files which contain relevant lines for the abuser IP # logpath = /dev/null + +# Number of log lines to include in the email +# +grepopts = -m 1000 diff --git a/config/action.d/sendmail-whois-lines.conf b/config/action.d/sendmail-whois-lines.conf index 663ec599..4156c947 100644 --- a/config/action.d/sendmail-whois-lines.conf +++ b/config/action.d/sendmail-whois-lines.conf @@ -26,7 +26,7 @@ actionban = printf %%b "Subject: [Fail2Ban] : banned from `uname -n` Here is more information about :\n `/usr/bin/whois || echo missing whois program`\n\n Lines containing IP: in \n - `grep -E '(^|[^0-9])([^0-9]|$)' `\n\n + `grep -E '(^|[^0-9])([^0-9]|$)' `\n\n Regards,\n Fail2Ban" | /usr/sbin/sendmail -f @@ -40,3 +40,6 @@ name = default # logpath = /dev/null +# Number of log lines to include in the email +# +grepopts = -m 1000