DNS import mishandled bind zone file syntax
When importing a DNS bind9 zone file, records are not handled correctly if they do not include the optional hostname.
Eg. this is valid syntax, which we use widely (eg. when named writes a zone in text format):
host123 A 1.2.3.4
MX host123
TXT "v=spf1 a -all"
Instead of 3 records (A, MX, TXT) for 'host123' being created, this turns into an A record for 'host123' and 2 records (MX, TXT) for hostname 'in'.
This includes records for the domain itself, eg. we often use something like:
$ORIGIN domain.tld.
$TTL 3600
@ IN SOA ns1.domain.tld. hostmaster.domain.tld. (
2020032601 ; Serial
7200 ; Refresh, seconds
540 ; Retry, seconds
604800 ; Expire, seconds
3600 ) ; Minimum, seconds
IN A 1.2.3.4
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN MX 10 mx1.domain.tld.
IN MX 20 mx2.domain.tld.
IN TXT "v=spf1 a mx ~all"