diff --git a/ChangeLog b/ChangeLog index de3de7f1..a0e7250d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ ver. 0.9.3 (2015/XX/XXX) - wanna-be-released - IMPORTANT incompatible changes: * filter.d/roundcube-auth.conf - Changed logpath to 'errors' log (was 'userlogins') + * mail-whois-lines, sendmail-geoip-lines and sendmail-whois-lines + actions include only the first 1000 log lines in the email - 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 5f760ac8..feca7e99 100644 --- a/config/action.d/mail-whois-lines.conf +++ b/config/action.d/mail-whois-lines.conf @@ -42,7 +42,7 @@ actionban = printf %%b "Hi,\n Here is more information about :\n `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"|mail -s "[Fail2Ban] : banned from `uname -n`" @@ -67,3 +67,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 3a0c931e..8e311d26 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 abbd60bc..aa00d7bb 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