首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OpenDKIM给出没有找到密钥的错误

OpenDKIM给出没有找到密钥的错误
EN

Server Fault用户
提问于 2017-10-15 11:38:29
回答 1查看 4K关注 0票数 1

因此,我已经用后缀安装了OpenDKIM,我仍然可以发送电子邮件,但当我发送邮件时:opendkim-testkey -d example.com -s mail -vvv

我回来了:

opendkim-testkey: using default configfile /etc/opendkim.conf opendkim-testkey: checking key 'mail._domainkey.example.com' opendkim-testkey: No key

如果我使用check@uverfier.port25.com,上面写着

DKIM check: permerrorresult: permerror (no usable key records)

但在电子邮件中,我可以看到我的公钥在电子邮件头与s=mail和d=mydomain.com等.

/etc/opendkim/被设置为opendkim:opendkim用于用户和组。

我的opendkim.conf:

代码语言:javascript
复制
# This is a basic configuration that can easily be adapted to suit a standard
# installation. For more advanced options, see opendkim.conf(5) and/or
# /usr/share/doc/opendkim/examples/opendkim.conf.sample.

# Log to syslog
Syslog                  yes
# Required to use local socket with MTAs that access the socket as a non-
# privileged user (e.g. Postfix)
UMask                   002

# Sign for example.com with key in /etc/mail/dkim.key using
# selector '2007' (e.g. 2007._domainkey.example.com)
#Domain                 example.com
#KeyFile                /etc/mail/dkim.key
Selector                mail

# Commonly-used options; the commented-out versions show the defaults.
#Canonicalization       simple
#Mode                   sv
#SubDomains             no
#ADSPAction            continue

# Always oversign From (sign using actual From and a null From to prevent
# malicious signatures header fields (From and/or others) between the signer
# and the verifier.  From is oversigned by default in the Debian pacakge
# because it is often the identity key used by reputation systems and thus
# somewhat security sensitive.
OversignHeaders         From

# List domains to use for RFC 6541 DKIM Authorized Third-Party Signatures
# (ATPS) (experimental)

#ATPSDomains            example.com

###########################
# My Config Setup Below   #
###########################

AutoRestart             Yes
AutoRestartRate         10/1h
SyslogSuccess           Yes
LogWhy                  Yes

Canonicalization        relaxed/simple

ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts
InternalHosts           refile:/etc/opendkim/TrustedHosts
KeyTable                /etc/opendkim/KeyTable
SigningTable            refile:/etc/opendkim/SigningTable

Mode                    sv
PidFile                 /var/run/opendkim/opendkim.pid
SignatureAlgorithm      rsa-sha256

UserID                  opendkim:opendkim

Socket                  inet:12301@localhost

我的KeyTable文件:

代码语言:javascript
复制
example.com example.com:mail:/etc/opendkim/keys/example.com/mail.private

我的SigningTable文件:

代码语言:javascript
复制
*@example.com example.com

在这方面的任何帮助都是非常感谢的。

EN

回答 1

Server Fault用户

回答已采纳

发布于 2017-10-15 16:48:40

现在就解决了。

当我把公钥放在我的DNS记录中的主部分时,我应该把它放在子域部分,并将mail._domainkey.example.com作为名称/子域。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/878535

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档