Skip to content

Authorizing a third-party sender in SPF without overshooting

How to add a transactional or marketing provider to a cPanel domain's SPF record without inheriting the provider's churn of IPs or pushing the lookup count over the spec limit.

A vendor onboarding email arrives: “Add include:_spf.vendor.com to your SPF record.” The temptation is to paste it in and move on. The result is an SPF record that grows lookup count every time the vendor adds a region, picks up a partner ESP, or restructures their authentication. After three vendors, the record fails the ten-lookup limit and every receiver returns PermError. The right move is to add the include intentionally, scoped to the smallest authorized set.

What’s happening

A third-party include effectively delegates SPF authorization. Whatever IPs the vendor publishes — directly or transitively through their own includes — gain authority to send as your domain. That works fine for two senders. It fails the spec for five, and the failure is silent: DMARC reports show PermError, but the cPanel server itself has no record of the issue.

How to verify

Before adding the include, measure its cost:

dig +short TXT _spf.vendor.com

Walk every include and redirect inside the result. An SPF lookup-counter (dmarcian.com/spf-survey, mxtoolbox.com/spf.aspx) does this faster. Add the projected cost to your current count from dig +short TXT example.com. If the sum exceeds 10, do not paste the include — flatten or replace.

The fix

  1. Confirm the vendor actually needs SPF authorization. Many transactional providers (Postmark, SendGrid, Amazon SES) authenticate via DKIM with their own signing domain. If d= in their messages already points at a domain they control, SPF alignment is satisfied without listing them in your SPF.
  2. Prefer DKIM alignment over SPF inclusion whenever the vendor offers a custom CNAME for DKIM. This gets you DMARC alignment without burning a lookup slot.
  3. If SPF inclusion is unavoidable, scope it. Use the vendor’s narrowest include if they publish per-product records (include:tx.vendor.com instead of include:vendor.com).
  4. Audit quarterly. Every quarter, dig the apex SPF, run it through a lookup counter, and remove any include whose source IPs no longer appear in DMARC aggregate reports.
  5. Document each include with the vendor name, contact, and contract end date in your domain record so the next operator knows what to retire.

When several cPanel-hosted brands share the same third-party senders, Stack Harbor maintains the include map in cPanel/WHM management so adding a new vendor never quietly breaks the four already in place.