Skip to content

Commit

Permalink
Adding a new feed option ignore_codes, that allows for ignoring speci…
Browse files Browse the repository at this point in the history
…fic RBL return codes.
  • Loading branch information
mikenowak committed Jul 28, 2021
1 parent 45b78df commit 1ebe407
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Rbl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
];
Expand Down Expand Up @@ -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';

Expand Down

0 comments on commit 1ebe407

Please sign in to comment.