BF: grep in mail*-whois-lines.conf also matches beginning/end of line to work with the recidive filter (Debian #744774)

Thanks James Bottomley for the report and tentative solutions
pull/695/head
Yaroslav Halchenko 2014-04-14 15:40:21 -04:00
parent bb2d981bf8
commit 30bc782b18
3 changed files with 4 additions and 2 deletions

View File

@ -12,6 +12,8 @@ ver. 0.8.14 (2014/??/??) - take-care-of-the-elderly
- Fixes:
- minor fixes for claimed Python 2.4 and 2.5 compatibility
- grep in mail*-whois-lines.conf now also matches end of line to work
with the recidive filter
ver. 0.8.13 (2014/03/15) - maintenance-only-from-now-on

View File

@ -42,7 +42,7 @@ actionban = printf %%b "Hi,\n
Here is more information about <ip>:\n
`whois <ip> || echo missing whois program`\n\n
Lines containing IP:<ip> in <logpath>\n
`grep '[^0-9]<ip>[^0-9]' <logpath>`\n\n
`grep -E '(^|[^0-9])<ip>([^0-9]|$)' <logpath>`\n\n
Regards,\n
Fail2Ban"|mail -s "[Fail2Ban] <name>: banned <ip> from `uname -n`" <dest>

View File

@ -58,7 +58,7 @@ actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from `uname -n`
Here is more information about <ip>:\n
`/usr/bin/whois <ip> || echo missing whois program`\n\n
Lines containing IP:<ip> in <logpath>\n
`grep '[^0-9]<ip>[^0-9]' <logpath>`\n\n
`grep -E '(^|[^0-9])<ip>([^0-9]|$)' <logpath>`\n\n
Regards,\n
Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest>