What counts
include, a, mx, ptr, exists and redirect cost one lookup each, also inside the records you include. ip4, ip6 and all cost nothing.
Example of counting
The record v=spf1 mx include:spf.protection.outlook.com include:_spf.google.com -all uses at least three lookups: one for mx and one for each include. If the included records have their own includes, those come on top.
mx costs one lookup. The addresses of the mail servers are looked up as well, but they do not count against the limit. Instead RFC 7208 sets a limit of 10 mail servers per mx.
How to read the result
- Green: below 9 lookups, a good margin.
- Yellow: 9 or 10. One more service can take you over.
- Red: over 10. SPF gives permerror for all email from the domain.
- Void lookups above 2 also give permerror.
How to get below the limit
- Remove services you no longer use.
- Replace a and mx with ip4 when your own servers have fixed addresses.
- Send newsletters from a subdomain, like news.company.com, with its own SPF record.
- Use flattening only as a last resort, because it needs upkeep.