Skip to content

Commit

Permalink
add configurable DNS retrans option (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigio authored Oct 25, 2023
1 parent c296644 commit 7883a3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Mail/DMARC/Base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,12 @@ sub epoch_to_iso {
sub get_resolver {
my $self = shift;
my $timeout = shift || $self->config->{dns}{timeout} || 5;
my $retrans = shift || $self->config->{dns}{retrans} || 5;
return $self->{resolver} if defined $self->{resolver};
$self->{resolver} = Net::DNS::Resolver->new( dnsrch => 0 );
$self->{resolver}->tcp_timeout($timeout);
$self->{resolver}->udp_timeout($timeout);
$self->{resolver}->retrans($retrans);
return $self->{resolver};
}

Expand Down
1 change: 1 addition & 0 deletions share/mail-dmarc.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ backend = perl

[dns]
timeout = 5
retrans = 5
public_suffix_list = share/public_suffix_list

[smtp]
Expand Down

0 comments on commit 7883a3e

Please sign in to comment.