SPF records to validate your email as 'ham' (not spam)
We recommend that you add a Sender Policy Framework (SPF) TXT record to your DNS record to help prevent spoofing. SPF identifies which mail servers are allowed to send mail on your behalf. Basically, SPF along with other technologies supported by Office 365 help prevent spam.
SPF is added as a special DNS record that is used by email servers to identify which mail servers are allowed to send email for your domain name. Receiving mail servers can check this record to determine whether a message from your domain comes from an authorized messaging server. If it does not, they can filter it as spam. If your domain does not have an SPF record, some servers may reject the message entirely.
If you are just using Office 365 & Exchange Online, your SPF record should look like this:
v=spf1 include:spf.protection.outlook.com -all
If you use Sharepoint Online, then you may need the following record instead:
v=spf1 include:sharepointonline.com -all
v=spf1 include:servers.mcsv.net -all
v=spf1 include:spf.protection.outlook.com include:servers.mcsv.net -all