Hoppa till innehållet

E-postsäkerhet: SPF, DKIM och DMARC

SPF, DMARC, DKIM, MTA-STS, TLS-RPT, CAA, DNSSEC och redundanta namnservrar.

Senast granskad

Vikt i poängen

20 %

En av sex moduler, poängpolicy v2.1.0

Källor

  • DNS

E-post är det enklaste sättet att utge sig för att vara en organisation. Vem som helst kan skicka ett meddelande som påstår sig komma från er domän. SPF, DKIM och DMARC är de poster som låter mottagande e-postservrar skilja ett äkta meddelande från ett förfalskat, och eftersom de publiceras i öppen DNS går de att läsa utifrån.

Vi läser er SPF-post, er DMARC-post och era DKIM-nycklar och kontrollerar om de faktiskt skyddar er, inte bara om de finns. En SPF-post som slutar med +all godkänner alla servrar på internet, och en DMARC-policy med p=none ber mottagarna att inte göra något alls. Båda ser ut att vara på plats, men ingen av dem stoppar förfalskad e-post.

Resten av modulen gäller transporten och zonen runt er e-post: om MTA-STS tillämpas, om TLS-rapportering är uppsatt, om CAA begränsar vem som får utfärda certifikat för er, om DNSSEC är aktiverat och om ni har tillräckligt många namnservrar. Kontrollerna av e-posttransporten gäller bara domäner som tar emot e-post.

Vill ni se hur det ser ut för er egen domän kan ni kontrollera den gratis.

Fynd som modulen kan ge

Varje fynd i en rapport beskriver vad som testades, varför det spelar roll, vilken konsekvens det kan få och hur ni åtgärdar det. Här är alla fynd modulen kan ge, de allvarligaste först. Begreppen förklaras i ordlistan. Fynden står på engelska, så som TrustSek rapporterar dem i dag.

Högallvarlighetsgrad 70 till 89

  • 80

    SPF authorises all senders

    The all mechanism decides what receivers do with mail from servers not listed in the record. +all authorises the entire internet; no all at all leaves it neutral.

    Så åtgärdar ni det: End the record with -all (reject) once you are confident every legitimate sender is listed, or ~all (softfail) while you verify. Use your DMARC aggregate reports to find senders you have missed before tightening.

    Vad som testades och konsekvensen
    Vad som testades
    The qualifier on the SPF record's all mechanism
    Konsekvens
    Anyone can send mail claiming to be from your domain and pass SPF. This also breaks DMARC, which relies on SPF or DKIM alignment to make a pass/fail decision.
  • 70

    DMARC record missing

    DMARC builds on SPF and DKIM to provide email authentication and reporting

    Så åtgärdar ni det: Publish a DMARC TXT record at _dmarc.<your-domain> starting with v=DMARC1; p=none; rua=mailto:dmarc@<your-domain>. Monitor aggregate reports for 30 days, then graduate to p=quarantine and finally p=reject once SPF/DKIM are aligned for all legitimate senders.

    Vad som testades och konsekvensen
    Vad som testades
    DNS DMARC record lookup
    Konsekvens
    Missing DMARC leaves email authentication incomplete and vulnerable to spoofing

Medelallvarlighetsgrad 40 till 69

  • 65

    Insufficient nameservers

    Fewer than two nameservers means there is no redundancy in the one system every other service depends on. RFC 1034 has recommended at least two, on separate networks, since 1987.

    Så åtgärdar ni det: Add at least one more nameserver, ideally with a different provider or at minimum in a different network and location. Most managed DNS providers supply four by default; if you are running your own, this is a strong argument for moving to a managed service.

    Vad som testades och konsekvensen
    Vad som testades
    The count of NS records for the domain
    Konsekvens
    If the single nameserver becomes unreachable, the domain stops resolving entirely: website, email, and every API integration fail at once, and cached answers expire progressively so the outage spreads rather than appearing instantly. It is also trivially easy to overwhelm with traffic.
  • 60

    SPF record missing

    SPF prevents email spoofing by specifying authorized mail servers

    Så åtgärdar ni det: Publish an SPF TXT record at the apex of your domain. Start with v=spf1 include:<your-mail-provider> ~all (e.g. include:_spf.google.com for Google Workspace, include:spf.protection.outlook.com for M365). After 30 days of clean DMARC reports, harden to -all.

    Vad som testades och konsekvensen
    Vad som testades
    DNS SPF record lookup
    Konsekvens
    Without SPF, attackers can send convincing phishing emails from your domain
  • 60

    DNSSEC not enabled

    DNSSEC cryptographically signs DNS records to prevent spoofing

    Så åtgärdar ni det: Enable DNSSEC at your DNS provider (Route53, Cloudflare, and Google DNS all offer one-click enablement). Verify the DS record is published at your registrar so the signing chain is anchored at the TLD; until the DS is in place at the registrar, DNSSEC is configured but not actually validated.

    Vad som testades och konsekvensen
    Vad som testades
    DNS DNSSEC validation
    Konsekvens
    Without DNSSEC, DNS responses can be intercepted and modified
  • 55

    DMARC policy set to none

    DMARC is published but set to p=none, which asks receivers to report on failures while still delivering the mail. It is the correct place to start, and the wrong place to stop.

    Så åtgärdar ni det: Read your aggregate reports until every legitimate sender passes SPF or DKIM alignment, then move to p=quarantine (optionally with pct= to ramp gradually), and finally p=reject. Most domains stall at none indefinitely; treat this as a project with an end date rather than a permanent state.

    Vad som testades och konsekvensen
    Vad som testades
    The policy (p=) value in the DMARC record
    Konsekvens
    Spoofed mail from your domain is still delivered to recipients. You gain visibility through aggregate reports, but no protection: anyone can send as your domain and it will land in the inbox.
  • 50

    SPF record invalid

    An SPF record with a syntax error is not partially effective: receivers that cannot parse it generally treat it as permerror and ignore it entirely. The domain is left with no SPF protection while appearing configured.

    Så åtgärdar ni det: Validate the record with an SPF checker. The usual causes are more than one v=spf1 record on the domain (only one is permitted), exceeding the ten-DNS-lookup limit, or a stray character. Consolidate to a single record and use include: for third-party senders.

    Vad som testades och konsekvensen
    Vad som testades
    Syntax of the published SPF TXT record
    Konsekvens
    Spoofed mail claiming to come from your domain passes unchecked, and DMARC cannot reach a pass verdict through SPF alignment, weakening it too. The failure is silent: nothing warns you that the record you published is being discarded.
  • 50

    CAA record missing

    CAA records prevent unauthorized SSL certificate issuance

    Så åtgärdar ni det: Publish CAA records naming your authorized CA(s), e.g. 0 issue "letsencrypt.org" and 0 issue "digicert.com". Add 0 iodef "mailto:security@<your-domain>" so you receive notifications when issuance is attempted by a non-authorized CA.

    Vad som testades och konsekvensen
    Vad som testades
    DNS CAA record lookup
    Konsekvens
    Attackers could obtain fraudulent certificates for phishing sites
  • 45

    MTA-STS policy not enforced

    MTA-STS tells sending servers to require TLS for your domain. In "testing" mode they report failures but deliver anyway, so the policy provides no actual protection.

    Så åtgärdar ni det: Confirm from your TLS-RPT reports that legitimate senders are succeeding, then change the policy mode to enforce. Keep the same max_age so caches roll over cleanly.

    Vad som testades och konsekvensen
    Vad som testades
    The _mta-sts TXT record and the published policy file
    Konsekvens
    Mail can still be delivered over an unencrypted or downgraded connection, which is exactly what MTA-STS exists to prevent. The published policy gives a false impression of protection.
  • 45

    SPF record has no all mechanism

    The all mechanism decides what receivers do with mail from servers not listed in the record. +all authorises the entire internet; no all at all leaves it neutral.

    Så åtgärdar ni det: End the record with -all (reject) once you are confident every legitimate sender is listed, or ~all (softfail) while you verify. Use your DMARC aggregate reports to find senders you have missed before tightening.

    Vad som testades och konsekvensen
    Vad som testades
    The qualifier on the SPF record's all mechanism
    Konsekvens
    Anyone can send mail claiming to be from your domain and pass SPF. This also breaks DMARC, which relies on SPF or DKIM alignment to make a pass/fail decision.

Lågallvarlighetsgrad 0 till 39

  • 30

    TLS reporting not configured

    TLS-RPT is where receiving servers send daily reports about failures to deliver mail to you over TLS.

    Så åtgärdar ni det: Publish a TXT record at _smtp._tls with v=TLSRPTv1; rua=mailto:.... Point it at a monitored mailbox or a reporting service; the reports are JSON and small.

    Vad som testades och konsekvensen
    Vad som testades
    The _smtp._tls TXT record
    Konsekvens
    Without it, a certificate expiring on your mail servers, or an active downgrade attack, produces no signal at all until users report missing mail.

Beror på vad som hittasallvarlighetsgraden avgörs av vad som hittas

De andra modulerna

Källor