Step 1: Sign into your Office admin account via https://portal.office.com
Step 2: Navigate to Exchange admin center.
Step 3: On the left pane, scroll down and click More features.
Step 4: Click open under Permissions.
Step 5: Click Protection on the left pane.
Step 6: Switch to the spam filter tab.
Step 7: Double-click on the default policy.
Step 8: Click on advanced options.
Step 9: Under the Mark as Spam area, in the SPF record: hard fail section, select On and click Save.