SPF (Sender Policy Framework) allows you to specify in the TXT DNS records domain settings addresses from which you can send mail to prevent e-mail spoofing.
Here is an example of adding SPF records:
v=spf1 +a +mx -all
v=spf1 ip4:192.168.1.5 ip4:192.168.7.111 +a +mx -all
Where, v=spf1 is the SPF version,
ip4:ADDRESS The IP address from which you can send mail,
+a allows receiving mail from addresses that are specified in A-records of the domain,
+mx allows mail reception if the address is specified by the MX record of the domain,
-all reject all other messages that failed verification.
+all accept.
~all accept as spam.
You can check SPF for example here:
spfinfo.org
mxtoolbox.com/spf.aspx
See also my articles:
How to add MX record
PTR record
Configuring SPF and DKIM records in cPanel