Skip to content

Commit e43f7cf

Browse files
committed
dns: add null mx record (rfc7505)
1 parent 6e59d4a commit e43f7cf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/NP/Model/DnsRoot.pm

+8
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ sub data {
5555
{txt => "_globalsign-domain-verification=mVYWxIl-2ab_B1yPPFxEmDCLrBcl6ucouXJOU_P0_C"},
5656
];
5757

58+
# null MX records by default, rfc7505
59+
$data->{""}->{mx} = [{mx => ".", preference => 0},];
60+
5861
if ($self->origin eq "pool.ntp.org") {
5962

6063
# google domain verification
@@ -126,6 +129,7 @@ sub populate_country_zones {
126129
if ($ttl) {
127130
$data->{$pgeodns_group}->{ttl} = $ttl;
128131
}
132+
$data->{$pgeodns_group}->{mx} = [{mx => ".", preference => 0}];
129133

130134
$min_non_duplicate_size = int(@$entries / $zone_count)
131135
if (@$entries / $zone_count > $min_non_duplicate_size);
@@ -143,6 +147,8 @@ sub populate_country_zones {
143147
next;
144148
}
145149

150+
$data->{$pgeodns_group}->{mx} = [{mx => ".", preference => 0}];
151+
146152
$data->{$pgeodns_group}->{a} = [];
147153
if ($ttl) {
148154
$data->{$pgeodns_group}->{ttl} = $ttl;
@@ -167,6 +173,8 @@ sub populate_country_zones {
167173
my $e = shift @$entries;
168174
push @{$data->{$pgeodns_group}->{a}}, $e;
169175
}
176+
177+
$data->{$pgeodns_group}->{mx} = [{mx => ".", preference => 0}];
170178
}
171179
}
172180
}

0 commit comments

Comments
 (0)