* Don't crash if IP address not supplied
This commit is contained in:
parent
0e669aacca
commit
2e961db6b5
1 changed files with 5 additions and 3 deletions
|
|
@ -156,9 +156,11 @@ while (<STDIN>) {
|
||||||
sub exempt_localhost {
|
sub exempt_localhost {
|
||||||
my %options = @_;
|
my %options = @_;
|
||||||
my $attr = $options{attr};
|
my $attr = $options{attr};
|
||||||
|
if ($attr->{client_address} != '') {
|
||||||
my $client_address = NetAddr::IP->new($attr->{client_address});
|
my $client_address = NetAddr::IP->new($attr->{client_address});
|
||||||
return 'PREPEND X-Comment SPF not applicable to localhost connection, skipped check'
|
return 'PREPEND X-Comment SPF not applicable to localhost connection, skipped check'
|
||||||
if grep($_->contains($client_address), localhost_addresses);
|
if grep($_->contains($client_address), localhost_addresses);
|
||||||
|
};
|
||||||
return 'DUNNO';
|
return 'DUNNO';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue