Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Email delivery

IONOS mail fails SPF because the record is missing, duplicated or too long

Errorspf=fail or spf=softfail for a message sent through IONOS

Short answer

SPF for IONOS mail fails when the domain's DNS does not include the IONOS sender, when there are two SPF records, or when the record needs more than 10 DNS lookups. If DNS is outside IONOS, you must add the IONOS entry yourself. Keep one record and allow time for DNS to spread.

  • Applies to IONOS Mail, SPF RFC 7208
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Read the SPF record that DNS really serves for the domain. There must be exactly one line starting with v=spf1.

    dig +short TXT example.com
  2. 2Match what you see, then jump to its fix

    1. 1The domain's name servers are not IONOS, and the SPF record has no IONOS include.The DNS zone is at another provider and has no IONOS entryFix
    2. 2dig returns two TXT lines beginning v=spf1.Two SPF records exist for the domainFix
    3. 3permerror although only one record exists, and it includes many services.The record needs more than 10 DNS lookupsFix
    4. 4The record is right in your panel, but dig from outside still shows the old one.The change has not spread yetFix

What does the error look like?

  • spf=fail or spf=softfail for a message sent through IONOS
  • SPF permerror

Cause 1 of 4

The DNS zone is at another provider and has no IONOS entry

1Check

IONOS says that if you use IONOS email accounts but manage your DNS zone elsewhere, you must set up the SPF entry with your DNS provider.

dig +short NS example.com

2Fix

At your DNS provider, create the TXT record with the value IONOS shows for external DNS in its help page or your control panel. The help page gives this one.

v=spf1 include:_spf-us.ionos.com ~all

3Verify

dig shows the record, and a new test message shows spf=pass.

dig +short TXT example.com

Confirmed by ionos.com

Did this fix it?

Cause 2 of 4

Two SPF records exist for the domain

1Check

If more than one SPF record is found, the result is permerror. RFC 7208 says a domain must not publish multiple records that would lead to more than one being selected.

dig +short TXT example.com | grep -c "v=spf1"

2Fix

Merge them into one record that lists every sender, ending in a single all term, then delete the extra record.

v=spf1 include:_spf-us.ionos.com include:sender.example.net ~all

3Verify

The count command prints 1.

dig +short TXT example.com | grep -c "v=spf1"

Confirmed by rfc-editor.org

Did this fix it?

Cause 3 of 4

The record needs more than 10 DNS lookups

1Check

include, a, mx, ptr and exists, plus the redirect modifier, count toward a limit of 10 DNS lookups. ip4, ip6 and all do not count.

dig +short TXT example.com

2Fix

Remove services you no longer use, and replace some includes with ip4 or ip6 entries your provider documents as stable.

v=spf1 include:_spf-us.ionos.com ip4:203.0.113.10 ~all

3Verify

A fresh test message shows spf=pass instead of permerror.

dig +short TXT example.com

Confirmed by rfc-editor.org

Did this fix it?

Cause 4 of 4

The change has not spread yet

1Check

IONOS says a change can take up to 48 hours to spread worldwide and take effect.

dig +short TXT example.com @8.8.8.8

2Fix

Wait, and test again. Do not keep changing the record meanwhile.

# no change needed; recheck after DNS has spread

3Verify

dig against a public resolver shows the new record.

dig +short TXT example.com @8.8.8.8

Confirmed by ionos.com

Did this fix it?

How do I stop it coming back?

  • Edit the one existing SPF record instead of adding another.
  • Keep a list of the services allowed to send as your domain.
  • Add DKIM and DMARC after SPF works.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Related fixes

Email

Django send_mail fails or hangs with an SSL error

smtplib.SMTPException raised from send_mail()

Django has two secure modes that must not be mixed: EMAIL_USE_TLS for explicit TLS (STARTTLS, usually port 587) and EMAIL_USE_SSL for implicit TLS (usually port 465).

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.