Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Sep 2006
    Location
    Buenos Aires
    Posts
    16

    Default Automatic massive add of SPF records on all existing domain zones

    HEllo,

    I need to automatically add SPF records to all my dns zones I already have set up. I have a ton of domains without proper SPF records added, some of them do have them, but the mayority dont. I have updated the DNS ZONE Templates for future inclusion when an account/domain is addem from now on, so its just for the old accounts/domains.

    Is there an automated way I can do this? Its a reall pain in the *** to manually add them.
    Thank you,
    Jack

  2. #2
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,093
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    You'd have to write a Perl script I think. There is a system script around that allows you to rebuild the zone files but it's name currently escapes me. You could probably tweak that.

    However since it's mostly just a matter of adding lines onto the ends of your zone files, and you could probably avoid needing to tweak the serial numbers [EDIT] by doing a "service named restart" after doing the mass edit (ie restarting named causes all the zones to be reloaded with the new changes, otherwise you'd have to change the serial number to get the new zone loaded).
    Last edited by brianoz; 10-01-2006 at 05:54 AM.

  3. #3
    Member freedog96150's Avatar
    Join Date
    Mar 2005
    Location
    Nevada, USA
    Posts
    68

    Default

    Quote Originally Posted by COBRAws
    HEllo,

    I need to automatically add SPF records to all my dns zones I already have set up. I have a ton of domains without proper SPF records added, some of them do have them, but the mayority dont. I have updated the DNS ZONE Templates for future inclusion when an account/domain is addem from now on, so its just for the old accounts/domains.

    Is there an automated way I can do this? Its a reall pain in the *** to manually add them.
    Thank you,
    Jack
    I am curious. What did you add to your zone templates to add SPF records to all new accounts. I have had spotty luck with my changes working on all new account creations.
    **********************
    Brian Frias
    "Without fear, there is no
    courage"
    **********************

  4. #4
    Member
    Join Date
    Sep 2006
    Location
    Buenos Aires
    Posts
    16

    Default

    Quote Originally Posted by freedog96150
    I am curious. What did you add to your zone templates to add SPF records to all new accounts. I have had spotty luck with my changes working on all new account creations.
    Easy, I just added the following at the end of my DNS ZONE Templates:

    %domain%. IN TXT "v=spf1 ip4:xx.xx.xx.xx ip4:xx.xx.xx.xx ip4:xx.xx.xx.xx a mx ptr ~all"
    The ip3: values deppends on how many IPs does your domain work on. I have several domains sending emails from different IP numbers, so I just add those IPs I know.

    brianoz thanks for boost! Ill search for that perl script.

    --EDiT--
    I've found a perl script for adding new lines to the dns zone db's
    here is the link: http://forums.cpanel.net/showthread.php?t=52803
    Last edited by COBRAws; 10-02-2006 at 10:41 PM.

  5. #5
    Member
    Join Date
    Mar 2004
    Posts
    710

    Default

    Just remember, servers using strict SPF will reject any email that you forward. See the spf website.
    Lloyd F Tennison

  6. #6
    Member
    Join Date
    Aug 2002
    Posts
    1,118

    Default

    lloyd_tennison is right, atleast in the way that I understand SPF.

    In order for SPF to work correctly, individual users are going to have to specify what IPs are meant to send e-mail from that domain. This may be the individual's ISP outgoing mail server or it could be any outgoing mail server. The IP of the SMTP server that you use to send out mail from your ISP may not be the same IP as the IP that the SMTP server actually sends the message out to the Internet. All of these are factors in concerns with SPF.

    For SPF to really work with cPanel, I think an SPF wizard needs to be added to each individual's control panel. Then individual account owners can specify what IPs are suppose to be able to send out mail for that domain. Then if an account has users that use Bellsouth and Comcast Internet services, they can specify their ISP specific mail server sending IPs through the control panel and have it added to the SPF record for their domain. I would think that some checks would have to be included to insure that the SPF data is accurate or correct.

  7. #7
    Member Solokron's Avatar
    Join Date
    Aug 2003
    Posts
    779

    Default

    Don't even dedicated IP accounts default and send via the server's main IP anyhow?

    Quote Originally Posted by COBRAws View Post
    Easy, I just added the following at the end of my DNS ZONE Templates:



    The ip3: values deppends on how many IPs does your domain work on. I have several domains sending emails from different IP numbers, so I just add those IPs I know.

    brianoz thanks for boost! Ill search for that perl script.

    --EDiT--
    I've found a perl script for adding new lines to the dns zone db's
    here is the link: http://forums.cpanel.net/showthread.php?t=52803
    ULTRA Website Hosting - 8 Years Hosting
    Shared | Reseller | Dedicated | Colocation

Similar Threads & Tags
Similar threads

  1. Replies: 6
    Last Post: 07-21-2011, 06:10 AM
  2. Park Domain and add Mail Parking to existing domain
    By hostmedic in forum Feature Requests for cPanel/WHM
    Replies: 1
    Last Post: 06-10-2011, 06:02 AM
  3. Replies: 1
    Last Post: 04-05-2011, 01:38 PM
  4. Are SPF records checked per Domain or per IP/server?
    By norelidd in forum E-mail Discussions
    Replies: 1
    Last Post: 12-20-2007, 03:11 PM
  5. Automatic add entry in domain zone
    By Creazioni1 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 05-28-2004, 05:38 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube