Email Security: How to create SPF record on DNS server
To create an SPF record for a domain.
Mechanism.
EXAMPLE: v=spf1 mx:messages.sonicwall.com -all.
When creating an SPF record that uses the ~all instead of all, you are specifying a softfail whereas the all would result in a hard fail if the conditions of the SPF record are not matching.
NOTE: Save your settings. DNS records can take up to 48 hours to propagate.
For more reference you can refer to: http://www.open-spf.org/SPF_Record_Syntax