Add A records with a script when adding a new account

May 30, 2017
11
1
3
Burlington ON
cPanel Access Level
Root Administrator
I am wondering if there is any script which i can use to add A records automatically when i create an account on my email server ? Its like when a user adds a domain the script might run a cron or something and automatically add following records to that domains dns zone
mx10.domain.com A 7200 1.1.1.1
mx20.domain.com A 7200 1.1.1.1

Any help is really appreciated
 
May 30, 2017
11
1
3
Burlington ON
cPanel Access Level
Root Administrator
no need to make a script just edit your zone templates
add

mx10.%domain%. IN A 1.1.1.1
mx20.%domain%. IN A 1.1.1.1
I know i can do that, but there is a reason i am asking about a script or a cron job for every new domain added. I tried a lot searching the web on this but no luck so far, if you know such is possible that will be really great.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston