easm.chUnderstanding your external attack surface

E-mail security

SPF, DKIM and DMARC prevent fraudsters from sending e-mails in your name. STARTTLS and MTA-STS protect the transport.

1 min read · in plain words and for experts

Diagram
  1. Forged e-mail
  2. Recipient checks SPF and DKIM
  3. DMARC decides
  4. Rejected

What eam.ch checks

CheckSeverity
No DMARC record (_dmarc)high
No SPF, or SPF with +all/?allhigh/medium
DMARC p=nonemedium
MX without STARTTLS or with invalid certificatemedium
No DKIM under common selectorslow
No MTA-STS; domain without MX not lockedinfo

Records

example.ch.         TXT  "v=spf1 mx include:_spf.provider.example -all"
_dmarc.example.ch.  TXT  "v=DMARC1; p=reject; rua=mailto:dmarc@example.ch; adkim=s; aspf=s"
; domain without e-mail (null MX, RFC 7505):
noreply.example.ch. MX   0 .
noreply.example.ch. TXT  "v=spf1 -all"

Notes on introduction

  • SPF: at most 10 DNS lookups (RFC 7208, section 4.6.4); keep include chains flat.
  • DKIM: keys of at least 2048 bits, rotate selectors. eam.ch only finds common selectors; a missing result is therefore “low”.
  • DMARC: evaluate aggregate reports (rua) for a few weeks, then quarantine with pct and finally reject.
  • MTA-STS (RFC 8461) with TLS-RPT (RFC 8460) enforces encrypted delivery; DANE (RFC 7672) requires DNSSEC.

Since 2024, large mailbox providers have required SPF, DKIM and DMARC from bulk senders.

In short

  • Without DMARC anyone can forge e-mails with your domain.
  • SPF names the permitted servers, DKIM signs, DMARC decides.
  • The goal is p=reject – step by step, after evaluating the reports.
  • STARTTLS and MTA-STS protect the transport.

Learn more: E-mail protocols (mail.eam.ch) – SMTP, IMAP, SPF, DKIM, DMARC: how e-mail works and where it is heading.

Check it yourself

Commands to verify on Linux or macOS. Replace ihre-domain.ch with your domain and only check your own systems.

dig +short TXT ihre-domain.ch | grep spf1
dig +short TXT _dmarc.ihre-domain.ch
dig +short TXT _mta-sts.ihre-domain.ch
openssl s_client -starttls smtp -connect mx.ihre-domain.ch:25 </dev/null | head -5