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.

Automatic massive add of SPF records on all existing domain zones

Discussion in 'General Discussion' started by COBRAws, Sep 30, 2006.

  1. COBRAws

    COBRAws Member

    Joined:
    Sep 26, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Buenos Aires
    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. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    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).
     
    #2 brianoz, Oct 1, 2006
    Last edited: Oct 1, 2006
  3. freedog96150

    freedog96150 Well-Known Member

    Joined:
    Mar 25, 2005
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Nevada, USA
    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.
     
  4. COBRAws

    COBRAws Member

    Joined:
    Sep 26, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Buenos Aires
    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
     
    #4 COBRAws, Oct 2, 2006
    Last edited: Oct 2, 2006
  5. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    Just remember, servers using strict SPF will reject any email that you forward. See the spf website.
     
  6. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    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. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    Don't even dedicated IP accounts default and send via the server's main IP anyhow?

     
Loading...

Share This Page