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.

Modify automatically generated SPF record

Discussion in 'General Discussion' started by optize, Dec 3, 2013.

  1. optize

    optize Well-Known Member

    Joined:
    Apr 27, 2005
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    Came across this post from a long time ago:

    http://forums.cpanel.net/f5/external-mail-server-spf-207622.html

    That file doesn't seem to be used anymore. I'm trying to add a "include:" line automatically into every SPF record that gets generated by cPanel.

    Anyone know the proper way to do this? I don't want to do it via custom DNS templates because not everyone wants a SPF record, and I prefer not to grep for existing SPF records in /var/named/ and modify them manually.
     
  2. 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 following file should still be active on your system:

    Code:
    /usr/local/cpanel/Cpanel/SPF.pm
    Could you elaborate on the specific changes you made to this file that did not work?

    Thank you.
     
  3. optize

    optize Well-Known Member

    Joined:
    Apr 27, 2005
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    Yep - that's the file.

    I've made the following changes to both references to this:

    my $mainip = "x.x.x.x";
    #my $mainip = Cpanel::NAT::get_public_ip( Cpanel::DIp::getmainserverip() );

    There was no impact to generating the SPF, it still used the main system IP.

    So, I tried changing $string as well to include an outbound statement.

    my $string = "v=spf1 +a +mx +include:eek:utbound.xxxxxx.com +ip4:$mainip";

    Again, no changes. I restarted cPanel after making those changes, is there anything else I need to do for this file to work correctly?
     
  4. optize

    optize Well-Known Member

    Joined:
    Apr 27, 2005
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    I've also submitted a support ticket on this, but they told me to submit a feature request, they weren't able to help.

    Ticket 4408381
     
Loading...

Share This Page