192 |
- |
1 |
# Fail2Ban configuration file
|
|
|
2 |
#
|
|
|
3 |
# Common settings for mail actions
|
|
|
4 |
#
|
|
|
5 |
# Users can override the defaults in mail-whois-common.local
|
|
|
6 |
|
|
|
7 |
[INCLUDES]
|
|
|
8 |
|
|
|
9 |
# Load customizations if any available
|
|
|
10 |
after = mail-whois-common.local
|
|
|
11 |
|
|
|
12 |
[DEFAULT]
|
|
|
13 |
#original character set of whois output will be sent to mail program
|
|
|
14 |
_whois = whois <ip> || echo "missing whois program"
|
|
|
15 |
|
|
|
16 |
# use heuristics to convert charset of whois output to a target
|
|
|
17 |
# character set before sending it to a mail program
|
|
|
18 |
# make sure you have 'file' and 'iconv' commands installed when opting for that
|
|
|
19 |
_whois_target_charset = UTF-8
|
|
|
20 |
_whois_convert_charset = (%(_whois)s) |
|
|
|
21 |
{ 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 - ; }
|
|
|
22 |
|
|
|
23 |
# choose between _whois and _whois_convert_charset in mail-whois-common.local
|
|
|
24 |
# or other *.local which include mail-whois-common.conf.
|
|
|
25 |
_whois_command = %(_whois)s
|
|
|
26 |
#_whois_command = %(_whois_convert_charset)s
|
|
|
27 |
|
|
|
28 |
[Init]
|