spf: exit relayclients while loop when client_ip doesnt match

Checking an invalid address kept looping.
This commit is contained in:
Pim van den Berg 2011-02-01 15:04:33 +01:00 committed by Robert
parent 2ef465e7aa
commit 8f7494f0cb

View File

@ -69,7 +69,7 @@ sub hook_mail {
if exists $relay_clients{$client_ip};
return (DECLINED, "SPF - relaying permitted")
if exists $more_relay_clients->{$client_ip};
$client_ip =~ s/\d+\.?$//; # strip off another 8 bits
$client_ip =~ s/\d+\.?$// or last; # strip off another 8 bits
}
my $scope = $from ? 'mfrom' : 'helo';