Try to use the "named-compilezone" tool from named.
The more simplified syntax, to send a zone file to standard output is:
# named-compilezone -s relative -o - [zone] [zonefile]
(You can replace the parameter "-o - " by a file "-o [outputfile]", but redirecting to standard output makes it easy to view it)
Executing this command to your domain:
# named-compilezone -s relative -o - gaiabithia.org gaiabithia.org.db
.. results in the "reformated" zone in this output:
$ORIGIN .
$TTL 86400 ; 1 day
gaiabithia.org IN SOA s3ns1.bentsea.net. brokenmind.gmail.com. (
2018071600 ; serial
3600 ; refresh (1 hour)
7200 ; retry (2 hours)
1209600 ; expire (2 weeks)
86400 ; minimum (1 day)
)
NS s3ns1.bentsea.net.
NS s3ns2.bentsea.net.
$TTL 14400 ; 4 hours
A 172.93.54.122
MX 0 gaiabithia.org.
TXT "v=spf1 +a +mx +ip4:172.93.54.122 ~all"
$ORIGIN gaiabithia.org.
_dmarc TXT "v=DMARC1\; p=none"
default._domainkey TXT "v=DKIM1\; k=rsa\; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDeyZLcuYMlLXr2kN0C6q/aSK8WltaHIzoGgGed1yrc2BlQmpmvb6fU5PtPtHxDXhVRK5xNH8xe6gJSeVqoUDcMZGICY5VMjrS0b4RCZ7NlPl1MWY9hCoke09iDe7khzNE8UEQyf+Yu+5lKCgRyRUNZGdABrFE3h7N0ALtO95tkywIDAQAB"
cpanel A 172.93.54.122
cwp A 172.93.54.122
ftp CNAME gaiabithia.org.
imap CNAME gaiabithia.org.
localhost A 127.0.0.1
mail CNAME gaiabithia.org.
pop CNAME gaiabithia.org.
pop3 CNAME gaiabithia.org.
smtp CNAME gaiabithia.org.
webmail A 172.93.54.122
www CNAME gaiabithia.org.
So, you must redirect the standar output to a file(p.ex. 'gaiabithia.org.db.new'):
# named-compilezone -s relative -o - gaiabithia.org gaiabithia.org.db > gaiabithia.org.db.new
And after that, replace it in the real zone file (backup it first):
# cp -p gaiabithia.org.db gaiabithia.org.db.backup
# mv gaiabithia.org.db.new gaiabithia.org.db
Strangely, CWP have a mix from "relative" and "full" style zones, and should be simplified in one or other style.
But You can make a script to mix them in a unique file, if you want to.
And do everything the same for the other domain as well.
Regards,
Netino