Skip to content
EncryptTechBD
Home Industries Our Work Blog Pricing About Contact Discuss Your Project
বাংলা (BN)
Website & Infrastructure 6 min read

Email deliverability problems: SPF, DKIM and DMARC fixes

Why legitimate invoices and quotations land in spam, how SPF, DKIM and DMARC fail, and the diagnostic sequence that finds the cause.

E
EncryptTechBD · 0 comments
Laptop on a desk
Photo: Burst / StockSnap

You send a quotation, the buyer says it never arrived, and the message is sitting in a spam folder. Or a supplier stops receiving your invoices and the bounce mentions SPF, DKIM or DMARC. Email authentication is a chain, and one broken link is enough to damage delivery.

This guide is for the mailbox owner, not a mail server administrator. It explains what each standard checks, which symptom each failure produces, and an order of diagnosis.

Start with the symptom

  • A policy bounce: the receiving server rejected the message because SPF, DKIM or DMARC did not pass.
  • Spam placement: authentication may pass, but reputation, content or sender history is weak.
  • "Via" or "on behalf of": the visible From domain does not align with the domain that authenticated the message.
  • Only one flow fails: invoices from the ERP fail while ordinary replies work. That points to a third-party sender missing from DNS.
  • Failures after a DNS or website migration: records were dropped, duplicated or replaced with incomplete values.
  • Forwarded mail fails: the forwarder changed the envelope sender, so SPF no longer matches.

What the three standards check

SPF lists the servers allowed to send mail for a domain in a TXT record. The receiver checks the envelope sender, not the From address the recipient sees. SPF is easy to misalign when a service sends on your behalf with its own envelope domain, or when mail is forwarded. The record must also stay within the DNS lookup limit defined in RFC 7208; every include: counts.

DKIM adds a cryptographic signature to the message. The sender signs selected headers and the body with a private key, and publishes the public key in DNS under a selector such as selector._domainkey.example.com. DKIM survives forwarding better than SPF because the signature travels with the message. It fails when the selector is wrong, the key is missing or truncated, or a downstream tool modifies the message after signing.

DMARC tells the receiver what to do when neither SPF nor DKIM produces an aligned pass for the From domain. Alignment is the key word: SPF can pass for a bounce domain unrelated to the visible sender, and DKIM can pass for a third-party domain. DMARC requires the SPF domain or the DKIM signing domain to align with the From domain. The policy can be p=none to monitor, p=quarantine to send failures to spam, or p=reject to block them. The rua tag collects aggregate reports.

The usual causes

  • Duplicate SPF records: two TXT records starting with v=spf1 on the same name. Receivers treat this as a permanent error.
  • Lookup limit exceeded: too many includes or nested lookups. The record looks valid in a checker but fails in production.
  • Missing third-party sender: the ERP, helpdesk, ecommerce platform or newsletter tool was never added to SPF, or signs with its own domain.
  • Wrong DKIM selector or key: common after a platform migration or a DNS cleanup.
  • Subdomain gaps: mail is sent from mail.example.com but records exist only on the root domain.
  • Policy set too early: DMARC moved to reject before every legitimate source was identified.
  • Reputation problems: authentication passes, but the sending IP is poor, the list is old, or the message is mostly an image.

A diagnostic sequence

  1. List every sender. Include staff mail, website transactions, invoices, support tickets, marketing, payroll and any application that sends as your domain. This inventory is the most valuable output.
  2. Inspect public DNS. Query the root TXT record, the DMARC record at _dmarc and each DKIM selector using more than one resolver.
  3. Send a real test to Gmail, Outlook and Yahoo. Read Authentication-Results, Received-SPF and the DKIM-Signature header.
  4. Match the failing domain to the sender. If SPF passes but DMARC fails, the problem is alignment. If DKIM fails on one stream only, the selector or signing setup is wrong.
  5. Read DMARC aggregate reports. They show which IPs and domains send as you, which pass and which fail.
  6. Fix DNS, then policy. Correct the records, wait for the TTL, retest, and only then change the DMARC policy.
  7. Tighten in stages. Move from none to quarantine with a percentage, watch the reports, then move to reject.
  8. Monitor after the change. Failures return after a platform migration, a new marketing tool or a DNS provider change.

Fixes that hold

Keep one SPF record per domain. Remove unused includes, check the lookup count after every change, and give any flattened record an owner and a review date.

Give each sending service its own subdomain. Marketing, transactional and internal mail have different risk profiles. Sending marketing from marketing.example.com isolates reputation damage and makes policy easier to manage. Each subdomain needs its own records.

Configure DKIM at the source. Enable DKIM in the sending platform, publish the exact selector and key it provides, and retest the signature after every change. If the provider only offers a shared signing domain, ask whether a custom domain is supported. Without alignment, DKIM will not satisfy DMARC.

Handle forwarding deliberately. Test whether your forwarder preserves the envelope sender. Use a forwarder that rewrites correctly, an ARC-aware service, or accept that some forwarded mail will fail. Do not weaken the domain policy for one forwarding rule.

Watch reputation separately. Authentication is necessary but not sufficient. A new domain, a poor sending IP or a purchased list can still send authenticated mail to spam. Warm up new domains, clean lists and watch complaint rates.

The Bangladesh context

Many SMEs here start with a local hosting account or cPanel mailbox, then add an international marketing tool, a helpdesk and an ERP within a year. Each addition is a new sender. The original SPF record is rarely updated, and no one owns the DNS zone.

Email is also the default channel for quotations, purchase orders and supplier correspondence. A delivery failure can delay a shipment or a payment. The fix is often governance: one domain owner, a sender inventory and a change checklist.

Checklist and metrics

  • Inventory every system that sends as your domain.
  • Save the current SPF, DKIM and DMARC values and TTLs before changing anything.
  • Capture a baseline: alignment rate, bounces, complaints and spam placement.
  • Name who can change DNS and who approves a policy change.
  • Track alignment by sender, time to detect a new sender, and the share of senders covered by policy.

Where this fits in our work

If you need help inventorying senders, cleaning up DNS and running a DMARC rollout that does not block legitimate mail, start with Managed Technology & Cybersecurity. The pricing page explains how scope is built. For the human side of the same problem, read phishing prevention and what training costs.

Sources

Services that deliver this

Want this implemented properly?

Pricing →

Every engagement starts with a written scope. If a requirement is outside it, we quote it separately before starting.

Responses (0)

No comments yet. Add the first one below.

Leave a response

Your email address will not be published. Required fields are marked *.

Keep reading

More field notes