You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 20.04 VPS配置DKIM与SPF时opendkim-testkey提示密钥正常但不安全的问题求助

Ubuntu 20.04 VPS配置DKIM与SPF时opendkim-testkey提示密钥正常但不安全的问题求助

大家好,我在Ubuntu 20.04的VPS上按常规步骤安装了opendkim及配套工具:

sudo apt install opendkim opendkim-tools

安装过程没出任何问题,实际发信也正常——邮件能顺利抵达目标邮箱,垃圾邮件评分仅3.9,不会被拦进垃圾文件夹。

但我用下面的命令测试DKIM密钥时,得到了两个看起来矛盾的结果:

sudo opendkim-testkey -d domain.tld -s default -vvv

返回内容:

opendkim-testkey: key not secure
opendkim-testkey: key OK

明明显示密钥状态正常,却又提示不安全,这让我对这个“OK”的可靠性有点存疑。有没有大佬知道怎么操作才能让密钥变成“secure”状态?


Update:根据评论区的建议,我把我的opendkim.conf配置内容贴出来,方便大家帮忙排查问题:

Syslog                  yes
Logwhy                  yes
UMask                   007
Canonicalization        relaxed/simple
Mode                    sv
SubDomains              no
AutoRestart             yes
AutoRestartRate         10/1M
Background              yes
DNSTimeout              5
SignatureAlgorithm      rsa-sha256
Socket                  local:/run/opendkim/opendkim.sock
PidFile                 /run/opendkim/opendkim.pid
OversignHeaders         From
TrustAnchorFile         /usr/share/dns/root.key
include
UserID                  opendkim
KeyTable                refile:/etc/opendkim/key.table
SigningTable            refile:/etc/opendkim/signing.table
ExternalIgnoreList      /etc/opendkim/trusted.hosts
InternalHosts           /etc/opendkim/trusted.hosts

备注:内容来源于stack exchange,提问作者Jerome

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 12:17:43