Where can i find the zone file template?

shaun

Well-Known Member
PartnerNOC
Verifed Vendor
Nov 9, 2001
702
1
318
San Clemente, Ca
cPanel Access Level
DataCenter Provider
Twitter
thier isnt a template, /scripts/adddns is the file that adds zones.

Also the script uses /etc/wwwacct.conf and pulls 2 nameservers i beleive. If you log into your WHM and under setup change the secondary nameserver in their to whatever you want it set to it will auto add that ns to the zones.


As you can see by this code from adddns....

open(CONF,"/etc/wwwacct.conf") || die "/etc/wwwacct.conf not found\n";
while(<CONF>) {
$_ =~ s/\n//g;
if ($_ !~ /^;/) {
if(/^NS (\S+)$/) {
$nameserver = $1;
}
if(/^NS2 (\S+)$/) {
$nameserver2 = $1;
}
if (/^CONTACTEMAIL/) {
(undef,$contactemail) = split(/ /, $_);
}
}
}
close(CONF);

cPanel.net Support Ticket Number:
 

chrisbond

Well-Known Member
Apr 12, 2003
59
0
156
Hereford, United Kingdom
Very werid later on the /scripts/adddns file i added:

$ndomain. IN MX 0 $ndomain.
$ndomain. IN MX 15 mxbackup.myserver.net.

Then when i added a new domain it didnt take effect.

cPanel.net Support Ticket Number:
 

shaun

Well-Known Member
PartnerNOC
Verifed Vendor
Nov 9, 2001
702
1
318
San Clemente, Ca
cPanel Access Level
DataCenter Provider
Twitter
account creation probably doesnt use this... what if you create a zone manually under dns fucntions? also remember upcp and updatenow will over write that file with the correct version from cpanel once they are run. All scripts in /scripts are sync'd with cpanel's versions.

cPanel.net Support Ticket Number:
 

chrisbond

Well-Known Member
Apr 12, 2003
59
0
156
Hereford, United Kingdom
Yup just noticed that myself - seems a shame to have to manually edit the zone file after would be cool if there was an extra variable.

There is a file /etc/secondarymx but theres no documentation for it gonna add a line to it see what it does.

cPanel.net Support Ticket Number:
 

chrisbond

Well-Known Member
Apr 12, 2003
59
0
156
Hereford, United Kingdom
Theres a good reason why that file didnt work its part of exim:

# If you are an MX backup or gateway of some kind for some domains, you must
# set relay_domains to match those domains. This will allow any host to
# relay through your host to those domains.
#
# See the section of the manual entitled "Control of relaying" for more
# information.
relay_domains = lsearch;/etc/localdomains : lsearch;/etc/secondarymx

Aye well, anybody wrote any scripts to add secondary dns on a crontab basis?

cPanel.net Support Ticket Number:
 

shaun

Well-Known Member
PartnerNOC
Verifed Vendor
Nov 9, 2001
702
1
318
San Clemente, Ca
cPanel Access Level
DataCenter Provider
Twitter
/etc/secondarymx is for domains using your server as a secondary mx server... you'd put one domain per line.


you could write a cron script that ran thru checking and adding the secondary mx.

sumit a feature request to cpanel and ask them to add a field to teh setup screen which allows you to set a secondary MX and the weight so that it's added by default... i'm sure they'd do this.

cPanel.net Support Ticket Number:
 

chrisbond

Well-Known Member
Apr 12, 2003
59
0
156
Hereford, United Kingdom
Found it in /scripts/wwwacct that does the job nicely its hidden in there - just need to keep an eye out when i run updatenow or upcp to make sure it doesnt get overwritten.

cPanel.net Support Ticket Number:
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,531
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
Not denying that, there are a lot of things with cpanel that are not configurable enough when it comes to running a server. They could very easily create an area in WHM to allow you to modify the /scripts files and not have the changes overwritten.

For example why not put all of the DNS functions in one script, then call that script as required. As it is now making DNS changes to wwwacct only helps with new accounts, it does not help with parking domains etc... Also if at any point an account is suspened and then unsuspended, a lot of the customizations are lost.

cPanel.net Support Ticket Number: