From 901eeff53df0b3b73d607212aa9b1fd526617176 Mon Sep 17 00:00:00 2001 From: Jan Grewe Date: Mon, 6 Feb 2017 22:04:36 +0100 Subject: [PATCH] Make Abusix lookup compatible with Dash --- config/action.d/complain.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/action.d/complain.conf b/config/action.d/complain.conf index 84dbaf39..9934bd94 100644 --- a/config/action.d/complain.conf +++ b/config/action.d/complain.conf @@ -62,8 +62,9 @@ actioncheck = # Values: CMD # 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) + REV_IP=$(printf %%s ${IP}. | tac -s.) + ADDRESSES=$(dig +short -t txt -q ${REV_IP}abuse-contacts.abusix.org) + IFS=,; ADDRESSES=$(echo $ADDRESSES) IFS=${oifs} IP= if [ ! -z "$ADDRESSES" ]; then