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.

Adding new outgoing mailserver IP to all SPF records

Discussion in 'E-mail Discussions' started by drinky, Oct 17, 2016.

Tags:
  1. drinky

    drinky Member

    Joined:
    Aug 14, 2003
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    CLOUDLINUX 6.8 x86_64 standard WHM 58.0 (build 32)


    I've changed my outgoing mail IP address in accordance with How to Configure the Exim Outgoing IP Address - cPanel Knowledge Base - cPanel Documentation

    This was due to spamhaus blacklisting an entire block of IPs belonging to my data center.

    Everything seems to be working, however, problem now is that sent mail is now getting a "soft fail" message in the header because the new IP isnt listed in each domain's SPF record.

    Is there a script to go ahead and add the new IP address to all shared hosting account's SPF record?

    TIA
    Brett
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,684
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello @drinky,

    Yes, the following script takes into account the IP address configured in the /etc/mailips file:

    Code:
    /usr/local/cpanel/bin/spf_installer
    Here's a command you could use to update the SPF records for all accounts to the default TXT entry for the new IP address:

    Code:
    for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/spf_installer $i ;done
    Related Documentation: The spf_installer Script - Documentation - cPanel Documentation

    Thank you.
     
  3. drinky

    drinky Member

    Joined:
    Aug 14, 2003
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    Thanks heaps Michael!
     
    cPanelMichael likes this.
Loading...

Share This Page