跳到正文
DEV Community· Netbase JSC·· 5 天前AI 評分43

SPF、DKIM 和 DMARC:10 分鐘檢查網域設定

SPF, DKIM and DMARC: a 10-minute check for your domain

AI 導讀

網域郵件驗證檢查應核對 SPF、DKIM 和 DMARC 三項 DNS 記錄,並確認寄件服務通過 DMARC 對齊。SPF 應只有一筆根網域 TXT 記錄,DNS 查詢少於 10 次;DMARC 報告應先檢視 2–4 週,再逐步改用 p=quarantine 及 p=reject。AdminKit 的開源 MCP 伺服器可從 Claude 或其他 MCP 用戶端執行檢查。

正文

Netbase JSC

By Netbase JSC. The checkers linked below are AdminKit.net, a free toolkit built by Netbase JSC; any equivalent checker works.

If mail from your domain lands in spam, or you are moving DMARC to an enforcing policy, these three records are the place to start.

1. SPF

  • Exactly one TXT record starting with v=spf1 on the root domain.
  • It lists every service that sends as you: mail host, ESP, CRM, helpdesk.
  • Stay under 10 DNS lookups, and end with ~all or -all.
  • Check: https://adminkit.net/tools/spf-check/

2. DKIM

  • Each sending service signs with its own selector (for example google._domainkey).
  • Publish the selector record each service gives you, then verify it resolves.
  • Check: https://adminkit.net/tools/dkim-check/

3. DMARC

  • Record at _dmarc.yourdomain.
  • Start with v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.
  • Read the reports for 2–4 weeks and fix any sender that fails alignment.
  • Then move to p=quarantine, and later p=reject.
  • Check: https://adminkit.net/tools/dmarc-check/

The most common failure: a third-party tool signs with its own DKIM domain, so DMARC fails alignment even though "DKIM passes".

4. Also worth checking

For AI assistants

AdminKit's open-source MCP server (MIT) runs these checks from Claude or other MCP clients: uvx adminkit-mcp (https://github.com/netbasecorp/adminkit-mcp).

來源:DEV Community · dev.to