Skip to content

email check: validate SPF / DKIM / DMARC and DNS blocklists on received messages #853

Closed

Description

@stonalbot

Problem

The email check (inbound delivery inbox) turns green as soon as a mail with the right token arrives. It never looks at who actually sent it or whether the message would pass a real mailbox's filters. So an smtp → email pair can report "delivered" while real recipients reject or spam-file the same mail.

Concrete case: the SMTP relay check was green, yet the same relay, used from another egress IP, was getting 550 5.7.1 … blocked using Spamhaus from Microsoft 365. The blocklisted sending IP was invisible to the delivery check.

Suggestion

When the email check receives a message, optionally validate it like a receiving MTA would, and fail or degrade on a configurable policy:

  • SPF: evaluate the connecting IP against the MAIL FROM / From domain (pass / softfail / fail / none).
  • DKIM: verify the signature(s), and check that one is aligned with the From domain.
  • DMARC: compute the DMARC result from the SPF/DKIM alignment and the published policy.
  • DNS blocklists: look up the real sending IP (connecting peer, plus optionally the IPs in Received: headers) in the same zones as the dnsbl check (DefaultBlocklists: Spamhaus ZEN, SpamCop, Barracuda, UCEPROTECT), with the zone list configurable the same way.

Possible config shape (all optional, off by default to stay backward-compatible):

config:
  require_spf: pass        # pass | softfail | none
  require_dkim: true
  require_dmarc: pass
  blocklists: [zen.spamhaus.org, bl.spamcop.net]   # empty = DefaultBlocklists

The result output should expose each verdict (spf, dkim, dmarc, blocklisted_on) so it is visible even when the policy does not fail the check.

Related

Being able to run one smtp + email pair per private location (or per region) is what makes this useful: with blocklisting it matters which egress IP sent the mail, and an aggregated multi-region check hides it.

🤖 Generated with Claude Code

Activity

  1. added
    converted-to-spec
    on Nov 12, 2026
  2. fclairamb commented on Nov 12, 2026

    @fclairamb
    Owner

    Converted to a spec: specs/todos/2026-11-12-03-email-check-sender-authentication.md (sonnet/high), why: new check config fields + schema change, several subsystems (JMAP blob download, email handler, shared DNSBL helpers, frontend), new dependency. Not implemented yet: closing because the spec now tracks it.

  3. fclairamb commented on Nov 12, 2026

    @fclairamb
    Owner

    autopilot: in #854

  4. added 2 commits that reference this issue on Nov 12, 2026
    df24a76
    25673c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    autopilotconverted-to-spec

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions