Files
nexus/wiki/concepts/DKIM-Email-Authentication.md

41 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "DKIM Email Authentication"
type: concept
tags:
- Email
- Security
- AWS
date: 2026-04-14
---
## Definition
DKIMDomainKeys Identified Mail是一种电子邮件验证标准通过在邮件头部添加数字签名来验证邮件确实由声称的域名授权发送防止邮件被篡改和伪造。
## How DKIM Works
1. **域名所有者**在 DNS 中发布 DKIM 公钥
2. **发送邮件服务器**使用私钥对邮件头和正文生成数字签名
3. **接收服务器**通过 DNS 查询获取公钥,验证签名有效性
4. 签名包含在邮件头的 `DKIM-Signature` 字段中
## DKIM in AWS SES
AWS SES 支持 DKIM 验证:
- SES 自动为域名生成 DKIM 签名密钥
- 域名所有者需要在 DNS 中添加三条 CNAME 记录
- 启用 DKIM 后SES 自动对所有出站邮件进行签名
## Related Concepts
- [[SPF]]Sender Policy Framework另一种 DNS ベースの邮件验证方法
- [[DMARC]]Domain-based Message Authentication, Reporting & Conformance综合 SPF 和 DKIM 的邮件验证框架
- [[Email-Security]]:邮件安全的整体方法论
## DKIM vs SPF vs DMARC
| 机制 | 验证内容 | 实施难度 |
|------|----------|----------|
| SPF | 验证发送服务器 IP 是否被域名授权 | 低 |
| DKIM | 验证邮件内容未被篡改 | 中 |
| DMARC | 基于 SPF + DKIM 验证 | 中高 |