From 74a6afadd565b679f73b88a6ebf81a358c0ee155 Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 16 Jan 2017 09:40:48 +0100 Subject: [PATCH] Mail-actions switched to use new option "norestored" instead of checking of variable `restored` during shell execution (prevents executing of such actions at all). --- config/action.d/complain.conf | 6 ++++-- config/action.d/dshield.conf | 13 +++++-------- config/action.d/mail-buffered.conf | 11 ++++------- config/action.d/mail-whois-lines.conf | 6 ++++-- config/action.d/mail-whois.conf | 7 ++++--- config/action.d/mail.conf | 10 ++++------ config/action.d/sendmail-buffered.conf | 7 ++++--- config/action.d/sendmail-geoip-lines.conf | 6 ++++-- config/action.d/sendmail-whois-ipjailmatches.conf | 7 ++++--- config/action.d/sendmail-whois-ipmatches.conf | 7 ++++--- config/action.d/sendmail-whois-lines.conf | 6 ++++-- config/action.d/sendmail-whois-matches.conf | 7 ++++--- config/action.d/sendmail-whois.conf | 7 ++++--- config/action.d/sendmail.conf | 7 ++++--- config/action.d/smtp.py | 3 +++ config/action.d/xarf-login-attack.conf | 10 ++++------ 16 files changed, 64 insertions(+), 56 deletions(-) diff --git a/config/action.d/complain.conf b/config/action.d/complain.conf index d0156a44..84dbaf39 100644 --- a/config/action.d/complain.conf +++ b/config/action.d/complain.conf @@ -34,6 +34,9 @@ before = helpers-common.conf [Definition] +# bypass ban/unban for restored tickets +norestored = 1 + # Option: actionstart # Notes.: command executed once at the start of Fail2Ban. # Values: CMD @@ -58,8 +61,7 @@ actioncheck = # Tags: See jail.conf(5) man page # Values: CMD # -actionban = %(_bypass_if_restored)s - oifs=${IFS}; +actionban = oifs=${IFS}; IFS=.; SEP_IP=( ); set -- ${SEP_IP}; ADDRESSES=$(dig +short -t txt -q $4.$3.$2.$1.abuse-contacts.abusix.org); IFS=,; ADDRESSES=$(echo $ADDRESSES) IFS=${oifs} diff --git a/config/action.d/dshield.conf b/config/action.d/dshield.conf index 35eaa3be..4f2e09ca 100644 --- a/config/action.d/dshield.conf +++ b/config/action.d/dshield.conf @@ -26,12 +26,11 @@ # configure how often the buffer is flushed). # -[INCLUDES] - -before = helpers-common.conf - [Definition] +# bypass ban/unban for restored tickets +norestored = 1 + # Option: actionstart # Notes.: command executed once at the start of Fail2Ban. # Values: CMD @@ -68,8 +67,7 @@ actioncheck = # few seconds out, are incorrect. See # http://sourceforge.net/tracker/index.php?func=detail&aid=2017795&group_id=121032&atid=689047 # -actionban = %(_bypass_if_restored)s - TZONE=`date +%%z | sed 's/\([+-]..\)\(..\)/\1:\2/'` +actionban = TZONE=`date +%%z | sed 's/\([+-]..\)\(..\)/\1:\2/'` DATETIME="`perl -e '@t=localtime(