SPF change in account migration

eltern

New member
Joined
Sep 10, 2019
Messages
2
Guys, hello.

When I transfer DirectAdmin accounts between servers, the DNS customizations related to SPF are undone, being replaced by the default of the new server (template).

- backup generated by DA;
- Clustered DNS (multiserver);
- latest version of the DA;
- centos 7

Is there a way to avoid this overlap?

Thank you.
 

bdacus01

Verified User
Joined
Jul 22, 2017
Messages
1,319
Location
Murfreesboro
Based on what I think you are referring too. This sort of describes it.

You have to have set up the custom files set up on the new server so it rebuilds the records correctly.

If you just set up spf records on the old server by hand without the customizations saved in the "custom" folder of the templating system uses the default.
 
Last edited:

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,323
Location
Maastricht
It logical that they will be overwritten. What Brent pointed at seems nice but it's for something else really, you might use that, but take care the ip can still be overwritten by the new ip.
In any case be aware that you do -not- use dns_spf.conf anymore because that is obsolete, it's the TXT record you need.

Because if you move servers your server will have another ip and so SPF needs to be adjusted.
There is also an option on restore, to not overwrite DNS settings. However, in that case also the A record ip's and nameservers are not overwritten so that seems not a good idea.
 

bdacus01

Verified User
Joined
Jul 22, 2017
Messages
1,319
Location
Murfreesboro
Brent pointed at seems nice
Yeah, I am not completely sure what they are looking to do post is vague to me. The SPF records need to match the new server. I wasn't sure if maybe they did some non templated work or just built by hand. Then wondered why something is gone.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,323
Location
Maastricht
I think what you pointed to is probably the only thing (next to use old dns settings) to keep SPF "as is". I don't know a better solution.
One has just to be very carefull that the server ip can still be changed when switching.
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,051
I've just confirmed in the code, and both Reseller Level, and Admin Level backup/restore pages have the "Backup/Restore Settings" option:
Code:
Restore with SPF values from backup.
Use local SPF values.
Please check that setting is set as desired and let us know if the creation restore still has the issue.

When the "Restore with SPF values from backup" option is used, no template, custom or otherwise would be used. It would 100% rely on the TXT record from the backup.

Note that DA will still try and surgically swap out the old server IP with the new server IP in the record, if found.

John
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,051
So is the opposite true it would look at the local server setup and custom files..
Correct. Local uses whatever a "new domain" would use. If custom templates are present for new domains, a creation restore would use them too.
 

eltern

New member
Joined
Sep 10, 2019
Messages
2
I've just confirmed in the code, and both Reseller Level, and Admin Level backup/restore pages have the "Backup/Restore Settings" option:
Code:
Restore with SPF values from backup.
Use local SPF values.
Please check that setting is set as desired and let us know if the creation restore still has the issue.

When the "Restore with SPF values from backup" option is used, no template, custom or otherwise would be used. It would 100% rely on the TXT record from the backup.

Note that DA will still try and surgically swap out the old server IP with the new server IP in the record, if found.

John
Thank you for this lesson. It is the absolute solution for now.

To the other members of the forum, I apologize for the lack of detail.

Customizations are not restricted to the server's IP, but to the SPF includes for users Microsoft 365, Gsuite and others.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
5,323
Location
Maastricht
Customizations are not restricted to the server's IP, but to the SPF includes for users Microsoft 365, Gsuite and others.
No apologies needed, I was already under the impression that it would be mainly for these kind of things.
DA support gave a great solution.
 
Top