Daily Tech Briefing
AI 科技速览
每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。
Hacker News · 2026/8/3 09:29:46
What DMARC Protects You From, and What It Does Not
AI 中文解读
DMARC这项技术最近在技术圈引发热议,但大多数人其实误解了它的作用。简单来说,DMARC只做一件事:核验邮件发件人域名是否被授权,它并不像大家想的那样能彻底防钓鱼、杀垃圾邮件。邮件系统里其实有两个"发件人"地址,一个藏在服务器后台相当于寄件包裹上的发货地址,另一个就是你眼前看到的银行名称和邮箱。黑客的套路就是让显示地址伪装成你的银行,后台地址却指向自己服务器,DMARC就是专门揪出这种错配的。但对普通人而言,核心认知是:即便收到完全通过DMARC验证的邮件,也不代表内容安全。它只证明发信方确实是域名主人,就像一张写着"我是正规公司"的身份证——但持证者是否心怀不轨,DMARC管不了。这提醒我们,收到看似官方的邮件仍要保持警惕,别因为技术认证就放松对链接和附件的防范。反诈意识依然是保护自己的第一道防线。
← All articles
Insight
What DMARC Actually Protects You From, and What It Does Not
3 Aug 2026 · 8 min read
Ask five people what DMARC does and you will get five answers: it stops phishing, it kills spam, it proves an email is safe. None of that is quite right. DMARC (the current spec is RFC 9989) checks one narrow thing: did the owner of the domain shown in the From line actually authorise this message, provable through SPF or DKIM?
It is a good question to answer. It is also a lot smaller than the reputation DMARC has built up. Reach p=reject thinking you are now phishing-proof and you will quietly drop the controls that handle everything DMARC never touched in the first place.
How email proves who sent it
Two building blocks sit underneath DMARC. SPF is a list a domain publishes of the servers allowed to send mail on its behalf; the receiver checks whether the mail actually arrived from one of them. DKIM adds a cryptographic signature to the message, which lets the receiver confirm it came from the signing domain and was not altered along the way. DMARC then pins both of those to the address you see in the From line.
Here is the part that trips people up. An email actually has two "from" addresses. There is the envelope address, which works like the address on a posted parcel: mail servers use it to route the message and then throw it away, so you never see it. And there is the visible From your mail app displays, the "Your Bank <alerts@your-bank.com>" you read at the top of the message. Nothing forces those two to match. That gap is the whole game: an attacker can show your bank in the visible From while the envelope quietly points at their own server.
SPF looks at the envelope address. DKIM's signature carries a domain of its own. DMARC's job is to take whichever of those actually authenticated and check it against the From line you can see, because that is the address a human trusts.
What these actually look like
All three live as text records in your domain's DNS, the same place your website's address is configured. You do not need to memorise the syntax; it helps to recognise the shape.
An SPF record lists who is allowed to send. This one authorises Google Workspace and a marketing tool, and says anything else should be treated as suspicious:
example.com. TXT "v=spf1 include:_spf.google.com include:sendgrid.net -all"
The include: entries pull in each provider's own list of servers, and -all means "if it is not on those lists, it is not us".
A DKIM record publishes the public half of the signing key, so receivers can check the signature on your mail. The long string is the key itself:
selector1._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQ...AB"
Finally the DMARC record ties it together and tells receivers what to do when a message fails. This one asks them to reject failures and to send you reports:
_dmarc.example.com. TXT "v=DMARC1; p=reject; rua=mailto:reports@example.com"
p=reject is the strict setting: fail authentication and the mail gets turned away. rua= is simply where your aggregate reports land.
How a pass is actually decided
DMARC sits on top of SPF and DKIM, and it evaluates them independently. There are two separate ways a message can pass: SPF passes for the hidden envelope domain and that domain aligns with the visible From domain, or a DKIM signature validates and its signing domain aligns with the visible From domain. If either aligned path succeeds, DMARC passes. If neither does, it fails. "Aligns" simply means the two domains match closely enough to count as the same organisation.
flowchart TD
A[Incoming email] --> S{SPF authenticates and aligns with From domain?}
S -->|yes| P([DMARC pass])
S -->|no| D{DKIM validates and aligns with From domain?}
D -->|yes| P
D -->|no| F([DMARC fail])
DMARC passes if either SPF or DKIM both authenticat
分享
阅读原文 ↗