SOLVED DNS Zone templates edition ('bad dotted quad' error)

Operating System & Version
CloudLinux 7.9
cPanel & WHM Version
100.0.5

mlopez

Well-Known Member
Dec 17, 2020
76
13
8
Maldonado - Uruguay
cPanel Access Level
Root Administrator
Twitter
Hello,

I'm trying to edit DNS Zone Templates for all new hosting accounts. I want to change the default cPanel DNS configuration for MX records so as to get the following

Code:
mail    IN    A    1.2.3.4
example.com.    IN    MX    0 mail.example.com.
_dmarc    TXT    "v=DMARC1;p=none;sp=none;adkim=r;aspf=r;pct=100;fo=0;rf=afrf;ri=86400;rua=mailto:[email protected];ruf=mailto:[email protected]"
Being, of course, %ip% = 1.2.3.4 and %domain% = example.com

I made this code but it doesn't work:

Code:
; cPanel %cpversion%
; Zone file for %domain%
$TTL %ttl%
@      %nsttl%    IN      SOA     %nameserver%. %rpemail%. (
        %serial%    ; serial, todays date+todays
        3600        ; refresh, seconds
        1800        ; retry, seconds
        1209600        ; expire, seconds
        86400 )        ; minimum, seconds

%domain%. %nsttl% IN NS %nameserver%.
%domain%. %nsttl% IN NS %nameserver2%.
%domain%. %nsttl% IN NS %nameserver3%.
%domain%. %nsttl% IN NS %nameserver4%.

%nameserverentry%. IN A %nameservera%
%nameserverentry2%. IN A %nameservera2%
%nameserverentry3%. IN A %nameservera3%
%nameserverentry4%. IN A %nameservera4%

%domain%. IN A %ip%
%domain%. IN AAAA %ipv6%
ipv6 IN AAAA %ipv6%

mail.%domain%. IN A %domain%.
%domain%. IN MX 0 mail.%domain%.

www IN CNAME %domain%.
ftp IN CNAME %domain%.

_dmarc IN TXT v=DMARC1\;p=quarantine\;sp=none\;adkim=r\;aspf=r\;pct=100\;fo=0\;rf=afrf\;ri=86400\;rua=mailto:postmaster\@%domain%\;ruf=postmaster\@%domain%
But I get this error: near 'domain.com.': bad dotted quad

1639157591749.png
What's the correct syntax?

Regards,