Use eval to get dkim policies (#268)
To prevent a fatal plugin error in case of DNS timeout
This commit is contained in:
parent
03c9d045f4
commit
e551786a9e
@ -275,7 +275,9 @@ sub get_details {
|
|||||||
push @data, "selector: " . $dkim->signature->selector if $dkim->signature;
|
push @data, "selector: " . $dkim->signature->selector if $dkim->signature;
|
||||||
push @data, "result: " . $dkim->result_detail if $dkim->result_detail;
|
push @data, "result: " . $dkim->result_detail if $dkim->result_detail;
|
||||||
|
|
||||||
foreach my $policy ($dkim->policies) {
|
my @policies = eval { $dkim->policies };
|
||||||
|
|
||||||
|
foreach my $policy (@policies) {
|
||||||
next if !$policy;
|
next if !$policy;
|
||||||
push @data, "policy: " . $policy->as_string;
|
push @data, "policy: " . $policy->as_string;
|
||||||
push @data, "name: " . $policy->name;
|
push @data, "name: " . $policy->name;
|
||||||
|
Loading…
Reference in New Issue
Block a user