Error 'Two or more type TXT SPF records found'

Problem

Intermittent error bounce back email received while trying to send emails:

550 5.5.2 <email address>: Recipient address rejected: SPF record(s) are malformed: SPF Permanent Error: Two or more type TXT SPFrecords found.

Environment

  • Gmail
  • SPF
  • DNS records

Solution

  1. Verify your DNS console and make sure you have one SPF record only.
  2. If you need to add multiple ranges, make sure you include them in the same record.
  3. Avoid creating multiple SPF records, otherwise, your emails will start bouncing.

Cause

An SPF record is a Sender Policy Framework record. It's used to indicate to mail exchanges which hosts are authorized to send mail for a domain. Only one SPF record is allowed per domain.