mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-05-13 14:36:43 +00:00
Merge 147a8b4d98 into 557e7eecf9
This commit is contained in:
commit
229dd82ccd
2 changed files with 4 additions and 2 deletions
|
|
@ -4,7 +4,8 @@
|
|||
# _grep_logs_args = 'test'
|
||||
# (printf %%b "Log-excerpt contains 'test':\n"; %(_grep_logs)s; printf %%b "Log-excerpt contains 'test':\n") | mail ...
|
||||
#
|
||||
_grep_logs = logpath="<logpath>"; grep <grepopts> %(_grep_logs_args)s $logpath | <greplimit>
|
||||
# Wrap log lines to 900 chars to comply with SMTP line length limit (RFC 5321: max 998 chars)
|
||||
_grep_logs = logpath="<logpath>"; grep <grepopts> %(_grep_logs_args)s $logpath | fold -sw 900 | <greplimit>
|
||||
# options `-wF` used to match only whole words and fixed string (not as pattern)
|
||||
_grep_logs_args = -wF "<ip>"
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ after = mail-whois-common.local
|
|||
|
||||
[DEFAULT]
|
||||
#original character set of whois output will be sent to mail program
|
||||
_whois = whois <ip> || echo "missing whois program"
|
||||
# Wrap whois output to 900 chars to comply with SMTP line length limit (RFC 5321: max 998 chars)
|
||||
_whois = whois <ip> | fold -sw 900 || echo "missing whois program"
|
||||
|
||||
# use heuristics to convert charset of whois output to a target
|
||||
# character set before sending it to a mail program
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue