The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DNS Zone Templates problem

Discussion in 'Bind / DNS / Nameserver Issues' started by karlos, Feb 15, 2007.

  1. karlos

    karlos Member

    Joined:
    Oct 1, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    I go to

    Main >> DNS Functions >> Edit Zone Templates

    and add a TXT entry

    %domain%. IN TXT "v=spf1 a mx -all"

    but when I "Create a New Account" the DNS Zone created for that new domain don't show me the changes I made in the templates!! :confused:

    Where are the REAL templates used for Cpanel? I look in /var/cpanel/zonetemplates/ and find the simple, standard and standardvirtualftp templates with my changes but seems like cpanel don't use them.

    I have a WHM 10.8.0 cPanel 10.9.0-R37 Fedora i686 - WHM X v3.1.0 and I restarted the named service and cpanel service with no luck. :(


    Thanks in advance for your help.
     
  2. erik@delphi

    erik@delphi Well-Known Member

    Joined:
    Jul 9, 2005
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Belgium
    looks like you tryed to add a SPF record it's not a good idea to automate that add it for each domain seperatly some clients might not like SPF
     
  3. karlos

    karlos Member

    Joined:
    Oct 1, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    Well, yes I want to add that SPF record in every new account DNS zone, and I hope to fix some email issues with servers which implement SPF validation like hotmail.com do. And I'll configure the email clients to use the correct SMTP server for sending emails and pass the SPF validation in the MTAs with SPF enabled.

    Anyway I am confused with this template issue. Why don't show me my templates modification in the new DNS zone? Is Cpanel using other templates? :confused:
     
  4. dexus

    dexus Well-Known Member

    Joined:
    Jan 14, 2006
    Messages:
    169
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Yes, this is realy a problem...

    I found templates located here:
    /var/cpanel/zonetemplates

    and here:
    /usr/local/cpanel/etc/zonetemplates

    but cpanel just don't use them :) Can someone please explain this...
     
  5. ajaydsouza

    ajaydsouza Active Member

    Joined:
    Apr 14, 2006
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    This is the same problem I am facing. I customized my zonetemplates as well, but the New Accounts don't get created with these templates.
     
  6. Vinayak

    Vinayak Well-Known Member

    Joined:
    Jun 27, 2003
    Messages:
    267
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Bharat
    cPanel Access Level:
    Root Administrator
    I have the same settings, changed entries at /var/cpanel/zonetemplates/ as per my liking on all of my servers and they seems to be working perfectly.

    Are you people creating new acounts as root or you have made yourself a reseller for yourself, if so have you used Edit Zone Templates from within that reseller account's WHM?
     
  7. dexus

    dexus Well-Known Member

    Joined:
    Jan 14, 2006
    Messages:
    169
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I am creating new accounts as root, and I tried to edit zone files from WHM and from shell, as I mentioned but cPanel is totaly ignoring those changes. I think that those templates that we are changing are only used for addon domains, but I can't find nowhere tamplates that cPanel is using for new accounts, so weird... :confused:

    @Vinsar
    Are you creating new accounts as a root or reseller?
     
  8. Vinayak

    Vinayak Well-Known Member

    Joined:
    Jun 27, 2003
    Messages:
    267
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Bharat
    cPanel Access Level:
    Root Administrator
    I have checked it both ways and its working.

    I have one of my own Brand under me as reseller so when an account is created form there it gets all the values populated properly.

    And when I create a new account as root again gets all the values populated properly.

    On my server there are only three files at

    /var/cpanel/zonetemplates/ and those are simple, standard & standardvirtualftp

    no subfolders etc.

    BTW I edited the files from shell only.
     
  9. dexus

    dexus Well-Known Member

    Joined:
    Jan 14, 2006
    Messages:
    169
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I realy don't understand this. I have the same problem on five servers, and cPanel just ignores changes in those template files.

    Did you maybe restarted server or cPanel or something else... after those changes?
     
  10. Vinayak

    Vinayak Well-Known Member

    Joined:
    Jun 27, 2003
    Messages:
    267
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Bharat
    cPanel Access Level:
    Root Administrator
    I am not sure, but maybe I started bind.

    You can try it.
     
  11. _user1

    _user1 Member

    Joined:
    Dec 5, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    It does not work!

    I can not apply my new zone template too... :(
    Please fix it. Thank you!
     
  12. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Tested this on 11.4.2-CURRENT_13519

    Edit Zone Templates
    Selected "standardvirtualftp - used for creating a the default zone on a new account with a virtual ftp ip"
    Added the SPF record as shown in the first entry in this thread
    Saved the template
    Created a new user.
    Checked /var/named:
    ; Zone file for spf.me
    $TTL 14400
    @ 86400 IN SOA mundane.cpqa.internal. cpanelqa.cpanel.net. (
    2007060801 ; serial, todays date+todays
    86400 ; refresh, seconds
    7200 ; retry, seconds
    3600000 ; expire, seconds
    86400 ) ; minimum, seconds

    spf.me. 86400 IN NS mundane.cpqa.internal.
    spf.me. 86400 IN NS mundane.cpqa.internal.
    spf.me. 86400 IN NS mundane.cpqa.internal.
    spf.me. 86400 IN NS mundane.cpqa.internal.


    spf.me. IN A 192.168.90.21

    localhost.spf.me. IN A 127.0.0.1

    spf.me. IN MX 0 spf.me.

    mail IN CNAME spf.me.
    www IN CNAME spf.me.
    ftp IN A 192.168.90.21

    spf.me. IN TXT "v=spf1 a mx -all"



    The "standard" template is used when an account has a dedicated IP. The standardvirtualftp template is used for all shared IP accounts.
     
  13. thurmma

    thurmma Member

    Joined:
    Nov 3, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1

    THANK YOU! This is what I have been looking for for some time now :)
     
  14. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    We have changed all three zone templates on all our servers, simply changing the default MX record but the templates are ignored across all 30 servers!
     
  15. Vinayak

    Vinayak Well-Known Member

    Joined:
    Jun 27, 2003
    Messages:
    267
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Bharat
    cPanel Access Level:
    Root Administrator
    Where did you did that, through WHM or at specified directories?

    Are you creating hosted account as root or as reseller?

    Have you restarted bind?

    Changing template will not change the zone records of existing accounts, changes will be applied to new account creation.
     
  16. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    In WHM

    Root

    The server is not a nameserver but the dns changes are sent up to the main nameservers in the cluster correctly. The server has been restarted since these changes were made because of kernel updates.

    Yes, I know. It is only new addon domains that dont seem to use the templates.
     
  17. Vinayak

    Vinayak Well-Known Member

    Joined:
    Jun 27, 2003
    Messages:
    267
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Bharat
    cPanel Access Level:
    Root Administrator
    Check if files simple, standard & standardvirtualftp located at

    /var/cpanel/zonetemplates/
    /usr/local/cpanel/etc/zonetemplates/

    are having desired entries.
     
  18. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    Thanks for your help.

    I logged a ticket with cpanel and they have confirmed that it is a bug after replicating the problem.
     
  19. Kelmas

    Kelmas Well-Known Member

    Joined:
    Nov 6, 2006
    Messages:
    121
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lithuania
    Has it already been solved? Because I have such problem.
     
Loading...

Share This Page