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.

SPF record question- multiple IP addresses

Discussion in 'E-mail Discussions' started by maestroc, Sep 16, 2016.

Tags:
  1. maestroc

    maestroc Active Member

    Joined:
    Aug 23, 2012
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Reseller Owner
    I have been having problems with deliverability of email messages sent from my server. I have several IPs on it, one being the main server IP xxx.15 and another for a specific domain on xxx.16. The dot 16 IP has most of the shared accounts on it but the mail server is on dot 15.

    I discovered that when I create new accounts it is creating SPF records that only list the xxx.16 IP address as being allowed to send mail for the domain. I have now added the xxx.15 IP to the SPF record and am hoping this will help things (let me know if I have this all screwy in my head).
    My question is, how can I set up cpanel to add that xxx.15 address automatically when it sets up a new account?
     
  2. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    387
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    If you want to generate SPF record with multiple ip's then better edit the dns zone template and add the SPF record which you wish to have for all the newly created account.

    Sample entry would be like the below

    %domain%. IN TXT "v=spf1 a ip4:192.168.1.1 ip4:192.168.1.15 ip4:192.168.1.16 mx -all"

    Your server admin might be able to help to get this configured properly.
     
  3. maestroc

    maestroc Active Member

    Joined:
    Aug 23, 2012
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Reseller Owner
    Thank you NixTree for your help and suggestions. I'm my own administrator, learning fast, but still a little clueless at times. Could you clarify the following for me:

    1) I am looking in my Edit Zone Templates (simple) section in WHM and was going to put that line in but then had a thought, since the system already adds the xxx.15 address if I put it in like that (with both ips) will it cause any problems due to the duplication?

    2) Do I also need to add the same line to the standard and standardvirtualftp zone templates as well?

    3) Also, once I add that record to the template what do I need to do to propagate it to all the accounts on the server or should I go through and change things one at a time for the existing accounts?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    The SPF record configured by cPanel will use the main server IP address. This is by design. The use of "+a" and "+mx" in the SPF record accounts for the possibility the domain name is assigned a dedicated IP address. Thus, you shouldn't have to manually add in the extra IP address. Could you let us know which issues you are having with sending email?

    Thank you.
     
Loading...

Share This Page