Change multiple DNS zones using templates/wildcards
What I'm trying to do is to add specific records to all (or most part) of the domains hosted in the server using a DNS template-like syntax.
Example:
I want to add
,
and
pointing to
like this:
I've already done it for the accounts created from now on (WHM -> Home "DNS Functions "Edit Zone Template) adding this snippet:
But now I need it to be set on the domains previously hosted. How can I achieve that? Thank you for your help Mauricio
smtp
,
imap
and
pop
CNAMES
pointing to
mail.%domain%.
like this:
smtp 14400 IN CNAME mail.example.com.
imap 14400 IN CNAME mail.example.com.
pop 14400 IN CNAME mail.example.com.
I've already done it for the accounts created from now on (WHM -> Home "DNS Functions "Edit Zone Template) adding this snippet:
pop IN CNAME %domain%.
imap IN CNAME %domain%.
smtp IN CNAME %domain%.
But now I need it to be set on the domains previously hosted. How can I achieve that? Thank you for your help Mauricio
-
Hey there! There isn't a good way to go about doing this besides recreating the zone files, which would use the new template information. I don't have a good way to apply new template data to existing zone files. That could be a good feature request idea though - if you get it submitted I'll be sure to approve it. 0 -
Hey cPRex, Thank you. It'd be great to have this feature. Anyway, I think I'll be doing this using whmapi with something like this: whmapi1 addzonerecord domain=example.com name=imap class=IN ttl=14400 type=CNAME cname=mail.example.com
Regards.0
Please sign in to leave a comment.
Comments
2 comments