- Plesk for Windows
IP address of the mailserver changes frequently, the SPF records for all domains have to be updated.
Is there a script that allows replacing all IP addresses for all domains in SPF records at once?
Connect to the server via RDP
Download attached file.
Warning: Create psa database backup How to backup/restore a Plesk database dump?
Run the script in the PowerShell command prompt
When the script is executed it asks to enter two values:
Enter the IP to be replaced:
Enter the exact IP address of the mailserver that should be changed. Press [ENTER] when done.
Enter the new IP:
Enter new IP has to be entered, that will be used as a replacement. Press [ENTER] when done.
The action to update the SPF records needs to be confirmed after that by typing "y" without quotation marks followed by [ENTER].
CONFIG_TEXT: The string 203.0.113.2 will be replaced by 203.0.113.5 Continue? [y/n]: