Results 1 to 11 of 11
  1. #1

    Arrow Edit DNS Zone Template

    How to edit a DNS Zone Template for automatticly insert SPF entry for new account created? I edit the zone template but don´t work.

    I made so:

    In DNS Functions > Edit Zone Template > Simple
    I insert after last line this: %domain%. IN TXT "v=spf1"

    And when I create new account the SPF entry isn´t there.

    I tried also in simple, standard and standardvirtualftp.

    What´s wrong?

    Thank you.

    PS: Sorry by English

  2. #2
    Join Date
    Apr 2005
    silicon and earthquakes
    What system are you using? Is it CPanel or some other panel?

    Most probably your quotes are not processed right (escaped?).

    You could find out where your template goes (to which file) and edit that file by hand.

  3. #3
    I use WHM/cPanel

  4. #4
    Join Date
    Apr 2003
    I basically have the same question. Yes I did try search to find the answer.
    I am about to change servers. Can I change the “edit zone template” on the new server before I transfer account via WHM so that all the account on the new server will have the correct SPF record. On WHM there are three templates

    standardvirtualftp - used for creating a the default zone on a new account with a virtual ftp ip
    simple - used for creating a zone with only an A entry for the domain.
    standard - used for creating a the default zone on a new account and parked/addon domains

    I believe I would use the “standard” template which says

    ; 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%.

    %domain%. IN A %ip%

    localhost.%domain%. IN A

    %domain%. IN MX 0 %domain%.
    What should be changed and what should be added?
    Does the above info look correct?

  5. #5
    Join Date
    Apr 2003
    I guess I was wrong. I thought we had some smart people here who could answer a simple question like this.

  6. #6
    Join Date
    Mar 2005
    Sri Lanka\Colombo
    you need to edit the "standardvirtualftp" and add

    %domain%. IN TXT "v=spf1 mx ~all"

    this should work, i tested it my self

  7. #7
    Join Date
    May 2002
    Check the templates in /var/cpanel/zonetemplates and edit them manually.
    Clook Internet -
    Fully managed UK based webhosting provider
    Est 2002, 24/7 phone support, all the bells and whistles!

  8. #8
    Join Date
    Jan 2005
    I was also wondering the same. Does this change affect *only* new dns zones or existing ones as well? I need to add spf records for a few domains on my server with whm/cpanel.
    Last edited by HD Fanatic; 09-11-2006 at 06:50 PM.

  9. #9
    Join Date
    Jan 2005
    Quote Originally Posted by kalinga
    you need to edit the "standardvirtualftp" and add

    %domain%. IN TXT "v=spf1 mx ~all"

    this should work, i tested it my self
    It works why is mx set to all?

  10. #10
    Join Date
    Nov 2005
    If you modify the zone template, then the newly created accounts will get the effect. Not the old ones. To modify the old spf records you need to manuelly modify the zone files here: /var/named/There you can the domain.db files and you need to modify according your choice. And as you want to add spf records for few domains then it is better you do it manuelly. Modifing zone files will do it for all newly created domains.Best regards
    Mellowhost - Providing High Quality Web Hosting Services since 2007
    SSD Cpanel Shared, SSD OpenVZ & KVM VPS Hosting
    A Hosting Provider with Complete SSD VPS & Shared Hosting.

  11. #11
    Join Date
    May 2003
    Check out the free scripts at

    They have one called rebuildnamedzones which I believe is what you are looking for.

    Here is a link to their scripts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts