DKIM 密钥
DKIM 密钥用于对域名发送的邮件进行数字签名,帮助收件方验证邮件真实性。
Schema
interface DkimKey {
id: string; // "dkm_..." - 唯一标识
domain_id: string; // 关联域名
selector: string; // DNS 选择器(如 "default")
is_active: boolean; // 是否用于签名
dns_record_name: string; // DNS 记录名
dns_record_value: string; // DNS 记录值
created_at: string;
updated_at: string;
}
属性
| 属性 | 类型 | 说明 |
|---|---|---|
id | string | dkm_ 前缀的 KSUID |
domain_id | string | 密钥所属域名 |
selector | string | DKIM 选择器 |
is_active | boolean | 用于签名 |
dns_record_name | string | DNS TXT 记录名 |
dns_record_value | string | 公钥值 |
created_at | string | 创建时间 |
updated_at | string | 更新时间 |
DNS 配置
添加 DKIM 的 TXT 记录:
| 记录类型 | 名称 | 值 |
|---|---|---|
| TXT | {selector}._domainkey.example.com | v=DKIM1; k=rsa; p={public_key} |
密钥轮换
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Create │────▶│ Activate │────▶│ Deactivate │
│ New Key │ │ New Key │ │ Old Key │
└─────────────┘ └─────────────┘ └─────────────┘
每个域名仅允许一个激活密钥。
示例
{
"id": "dkm_2kHfPZcN9xW4mE8RtY7vB",
"domain_id": "hst_1jGePYbM8wV3lD7QsX6uA",
"selector": "default",
"is_active": true,
"dns_record_name": "default._domainkey.example.com",
"dns_record_value": "v=DKIM1; k=rsa; p=MIGfMA0GCS...",
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z"
}