From 1ebe407ba7b9ee3c4a0f41a314bd89ce828dd0fc Mon Sep 17 00:00:00 2001 From: Mike Nowak Date: Wed, 28 Jul 2021 11:42:18 +0900 Subject: [PATCH] Adding a new feed option ignore_codes, that allows for ignoring specific RBL return codes. --- src/Rbl.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Rbl.php b/src/Rbl.php index 0245835..f5e30cc 100644 --- a/src/Rbl.php +++ b/src/Rbl.php @@ -69,6 +69,7 @@ class Rbl extends Collector 'filters' => 'sometimes|array', 'information' => 'sometimes|array', 'codes' => 'required|array', + 'ignore_codes' => 'sometimes|array', 'method' => 'required|string', 'zonefile' => 'sometimes|file', ]; @@ -298,6 +299,11 @@ private function scanAddress($address) if ($result = gethostbyname($lookup)) { if ($result != $lookup) { + // Stop processing if result on ignore_codes list + if (in_array($result, $feedData['ignore_codes'])) { + continue; + } + // If config is empty, we fall back to this $reason = 'SPAM Sending host';