opyebDNSSECLab

CAA, SPF and TXT lint — the mistakes that block certificates and email

Checks · 8 min

In one line: CAA flags, tags and values, the SPF ten-lookup limit, the single-SPF rule, and splitting TXT strings at 255 bytes.

CAA and SPF look like one-line TXT records, but a small format error can block certificate issuance or send mail to the spam folder. These are the problems a zone linter catches.

1. CAA structure

example.com. 3600 IN CAA 0 issue "letsencrypt.org"
example.com. 3600 IN CAA 0 issuewild ";"
example.com. 3600 IN CAA 0 iodef "mailto:security@example.com"
PartMeaning
Flags0–255. 0 is standard; 128 marks a critical tag that an issuing CA must understand.
TagOne of issue, issuewild, iodef.
ValuePermitted CA domain, ; for none, or a mailto/URL for iodef.

Frequent errors:

  • The value is not quoted and is cut at the first space.
  • An undefined tag such as issuer — L_CAA_TAG.
  • An iodef value without mailto: — L_CAA_IODEF.
  • Flags outside 0–255 — L_CAA_FLAGS.

CAA is inherited: a subdomain without its own CAA falls under the parent's policy.

2. SPF: one record, ten lookups

example.com. 3600 IN TXT "v=spf1 mx include:_spf.example.net -all"
  • Only one SPF record: two v=spf1 TXT records at one name cause a permanent error — L_SPF_MULTI.
  • Ten-lookup limit: include, a, mx, ptr, exists and redirect= count as DNS lookups; more than 10 fails — L_SPF_LOOKUP. Includes inside includes add up.
  • No SPF record type: the IN SPF type is obsolete; use TXT — L_SPF_TYPE.
  • All terminator: end with -all, ~all or ?all — L_SPF_NO_ALL.

3. The 255-byte TXT rule

long._domainkey IN TXT ( "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A"
                          "MIIBCgKCAQEA..." )

A single string over 255 bytes is truncated or rejected on the wire — L_TXT_LONG, L_TXT_SPLIT. DKIM public keys hit this limit constantly.

4. DKIM and DMARC follow the same rules

DKIM p= values are long and must be split. DMARC allows exactly one TXT at _dmarc, and is usually staged from p=none to quarantine and reject.

5. Check order

  1. Read the TXT, CAA and SPF findings from the zone linter.
  2. Query the public DNS with dig TXT example.com to confirm nothing was cut.
  3. Follow SPF includes and count the lookups with a validator.
  4. Test CAA against a staging CA to confirm issuance really is blocked or allowed.

Computing a single DS record makes the relationship between the key tag and the digest concrete.

Open DNSSECLab

Frequently asked questions

Why does a second SPF record break mail?

RFC 7208 says a name with more than one v=spf1 TXT record is a permanent error, because the receiver cannot know which policy to use.

What does an issuewild value of ; mean?

No CA may issue wildcard certificates for the domain. A bare ; in issue blocks ordinary certificates as well.

Does splitting TXT at 255 bytes change the value?

No. DNS concatenates the strings into one value; applications do not see the string boundaries.

References

Read next

0 bytes of your input sent to a server (advertising and affiliate widgets excluded)