JeramySimpson

Registered
Jun 19, 2013
1
0
1
cPanel Access Level
Root Administrator
Issue (occurs on 5 different WHM servers):
We are finding the webmail, autodiscover, autoconfig and dev entries are being duplicated when you modify the account by changing the domain name.
While the DNS still works the file is technically invalid.

Also note: if the original details are different to the zone template, the older details will appear at the bottom of the file but the newer details is what will be returned by the nameservers.

Steps to reproduce (via WHM interface):
1. Create an account (eg. anitabath.example.com.au).
2. Modify the account's domain name (eg. anitabath2.example.com.au).

Example DNS (Before):
Code:
; cPanel first:11.60.0.35 (update_time):1485325775 Cpanel::ZoneFile::VERSION:1.3 hostname:my7.domain.com.au latest:11.60.0.35
; Zone file for anitabath.example.com.au
$TTL 14400
anitabath.example.com.au.     86400   IN    SOA     ns.domain.com.au.    server.domain.com.au.   (
                                                2017012502 ;Serial Number
                                                86400 ;refresh
                                                7200 ;retry
                                                3600000 ;expire
                                                86400 ;minimum
        )
anitabath.example.com.au.     86400   IN    NS    ns.domain.com.au.
anitabath.example.com.au.     86400   IN    NS    ns2.domain.com.au.
anitabath.example.com.au.     14400   IN    A    202.60.xx.xx
localhost    14400   IN    A    127.0.0.1
anitabath.example.com.au.     14400   IN    MX    0    mail5.domain.com.au.
mail    14400   IN    CNAME   mail5.domain.com.au.
www     14400   IN    CNAME   anitabath.example.com.au.
dev     14400   IN    CNAME   anitabath.example.com.au.
ftp     14400   IN    CNAME   anitabath.example.com.au.
webmail 14400   IN    CNAME   mail5.domain.com.au.
autodiscover    14400   IN    A    202.60.xxx.xxx
autoconfig    14400   IN    A    202.60.xxx.xxx
anitabath.example.com.au.     14400   IN    TXT     " v=spf1 +a +mx +a:mailers.domain.com.au ~all"
Example DNS (After):
Code:
; cPanel first:11.60.0.35 (update_time):1485325857 Cpanel::ZoneFile::VERSION:1.3 hostname:my7.domain.com.au latest:11.60.0.35
; Zone file for anitabath2.example.com.au
$TTL 14400
anitabath2.example.com.au.    86400   IN    SOA     ns.domain.com.au.    server.domain.com.au.   (
                                                2017012501 ;Serial Number
                                                86400 ;refresh
                                                7200 ;retry
                                                3600000 ;expire
                                                86400   )

anitabath2.example.com.au.    86400   IN    NS    ns.domain.com.au.
anitabath2.example.com.au.    86400   IN    NS    ns2.domain.com.au.


anitabath2.example.com.au.    14400   IN    A    202.60.xx.xx

localhost    14400   IN    A    127.0.0.1

anitabath2.example.com.au.    14400   IN    MX    0    mail5.domain.com.au.

mail    14400   IN    CNAME   mail5.domain.com.au.
www     14400   IN    CNAME   anitabath2.example.com.au.
dev     14400   IN    CNAME   anitabath2.example.com.au.
ftp     14400   IN    CNAME   anitabath2.example.com.au.
webmail 14400   IN    CNAME   mail5.domain.com.au.

autodiscover    14400   IN    A    202.60.xxx.xxx
autoconfig    14400   IN    A    202.60.xxx.xxx

anitabath2.example.com.au.    14400   IN    TXT     " v=spf1 +a +mx +a:mailers.domain.com.au ~all"
dev     14400   IN    CNAME   anitabath2.example.com.au.
webmail 14400   IN    CNAME   mail5.domain.com.au.
autodiscover    14400   IN    A    202.60.xxx.xxx
autoconfig    14400   IN    A    202.60.xxx.xxx
Standard Zone Template:
Code:
; cPanel %cpversion%
; Zone file for %domain%
$TTL %ttl%
@      %nsttl%    IN      SOA     %nameserver%. %rpemail%. (
        %serial%    ; serial, todays date+todays
        86400        ; refresh, seconds
        7200        ; retry, seconds
        3600000        ; 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%

localhost.%domain%. IN A 127.0.0.1

%domain%. IN MX 0 mail5.domain.com.au.

mail IN CNAME mail5.domain.com.au.
www IN CNAME %domain%.
dev IN CNAME %domain%.
ftp IN CNAME %domain%.
webmail IN CNAME mail5.domain.com.au.

autodiscover IN A 202.60.xxx.xxx
autoconfig IN A 202.60.xxx.xxx

%domain%. IN TXT " v=spf1 +a +mx +a:mailers.domain.com.au ~all"

Thanks for your help :D

P.S. Please ignore the timestamps, I know they aren't in the right order; I did re-create this multiple times to get the examples.
P.P.S. I also tried to add the P.S. to the existing post but upon saving it I get an error(bug) saying that it looks like spam or something.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

Check to see if the following options are enabled under the "Domains" tab in "WHM Home » Server Configuration » Tweak Settings":

"Proxy subdomain creation"
"Thunderbird and Outlook autodiscover and autoconfig support (enables proxy subdomain and SRV record creation)"

If so, then you'd want to remove the custom webmail, autodiscover, and autoconfig entries you've added to your zone templates. Otherwise, you can disable those options in WHM >> Tweak Settings and setup additional custom entries in the zone templates for the additional proxy subdomains (e.g. cpanel, whm).

Thank you.