2015-03-27 13:27:41 +00:00
|
|
|
# Fail2Ban configuration file
|
|
|
|
#
|
|
|
|
# Common settings for mail actions
|
|
|
|
#
|
|
|
|
# Users can override the defaults in mail-whois-common.local
|
|
|
|
|
|
|
|
[INCLUDES]
|
|
|
|
|
|
|
|
# Load customizations if any available
|
|
|
|
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"
|
|
|
|
|
|
|
|
# use heuristics to convert charset of whois output to a target
|
|
|
|
# character set before sending it to a mail program
|
2015-03-29 16:18:30 +00:00
|
|
|
# make sure you have 'file' and 'iconv' commands installed when opting for that
|
2015-03-27 13:27:41 +00:00
|
|
|
_whois_target_charset = UTF-8
|
2019-06-15 21:02:53 +00:00
|
|
|
_whois_convert_charset = (%(_whois)s) |
|
2015-03-29 16:18:30 +00:00
|
|
|
{ WHOIS_OUTPUT=$(cat) ; WHOIS_CHARSET=$(printf %%b "$WHOIS_OUTPUT" | file -b --mime-encoding -) ; printf %%b "$WHOIS_OUTPUT" | iconv -f $WHOIS_CHARSET -t %(_whois_target_charset)s//TRANSLIT - ; }
|
2015-03-27 13:27:41 +00:00
|
|
|
|
|
|
|
# choose between _whois and _whois_convert_charset in mail-whois-common.local
|
2015-03-27 17:36:09 +00:00
|
|
|
# or other *.local which include mail-whois-common.conf.
|
2015-03-27 13:27:41 +00:00
|
|
|
_whois_command = %(_whois)s
|
|
|
|
#_whois_command = %(_whois_convert_charset)s
|
2015-03-27 17:36:09 +00:00
|
|
|
|
|
|
|
[Init]
|