Skip to content

Commit

Permalink
dns: add null mx record (rfc7505)
Browse files Browse the repository at this point in the history
  • Loading branch information
abh committed Aug 12, 2024
1 parent 6e59d4a commit e43f7cf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/NP/Model/DnsRoot.pm
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ sub data {
{txt => "_globalsign-domain-verification=mVYWxIl-2ab_B1yPPFxEmDCLrBcl6ucouXJOU_P0_C"},
];

# null MX records by default, rfc7505
$data->{""}->{mx} = [{mx => ".", preference => 0},];

if ($self->origin eq "pool.ntp.org") {

# google domain verification
Expand Down Expand Up @@ -126,6 +129,7 @@ sub populate_country_zones {
if ($ttl) {
$data->{$pgeodns_group}->{ttl} = $ttl;
}
$data->{$pgeodns_group}->{mx} = [{mx => ".", preference => 0}];

$min_non_duplicate_size = int(@$entries / $zone_count)
if (@$entries / $zone_count > $min_non_duplicate_size);
Expand All @@ -143,6 +147,8 @@ sub populate_country_zones {
next;
}

$data->{$pgeodns_group}->{mx} = [{mx => ".", preference => 0}];

$data->{$pgeodns_group}->{a} = [];
if ($ttl) {
$data->{$pgeodns_group}->{ttl} = $ttl;
Expand All @@ -167,6 +173,8 @@ sub populate_country_zones {
my $e = shift @$entries;
push @{$data->{$pgeodns_group}->{a}}, $e;
}

$data->{$pgeodns_group}->{mx} = [{mx => ".", preference => 0}];
}
}
}
Expand Down

0 comments on commit e43f7cf

Please sign in to comment.