![opendkim 没有签名表匹配没有签名数据](https://linux22.com/image/724190/opendkim%20%E6%B2%A1%E6%9C%89%E7%AD%BE%E5%90%8D%E8%A1%A8%E5%8C%B9%E9%85%8D%E6%B2%A1%E6%9C%89%E7%AD%BE%E5%90%8D%E6%95%B0%E6%8D%AE.png)
当我尝试安装和配置 opendkim 时出现错误:
no signing table match for '[email protected]'
no signature data
opendkim.conf:
# 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 022
# Sign for example.com with key in /etc/mail/dkim.key using
# selector '2007' (e.g. 2007._domainkey.example.com)
#Domain *
#KeyFile /etc/mail/dkim.key
#Selector default
# Commonly-used options; the commented-out versions show the defaults.
#Canonicalization simple
Mode sv
SubDomains yes
#ADSPDiscard no
# 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
KeyTable /etc/opendkim/KeyTable
SigningTable /etc/opendkim/SigningTable
ExternalIgnoreList /etc/opendkim/TrustedHosts
InternalHosts /etc/opendkim/TrustedHosts
LogWhy Yes
UserID opendkim:opendkim
Socket inet:8891@localhost
PidFile /var/run/opendkim/opendkim.pid
我使用这个脚本来管理我的域:
for domain in domain.com domain2.com domain3.com
do
mkdir -p /etc/opendkim/keys/$domain
cd /etc/opendkim/keys/$domain
opendkim-genkey -r -d $domain
chown opendkim:opendkim default.private
echo "default._domainkey.$domain $domain:default:/etc/opendkim/keys/$domain/default.private" >> /etc/opendkim/KeyTable
echo "$domain default._domainkey.$domain" >> /etc/opendkim/SigningTable
done
我尝试:
sudo chown opendkim:opendkim -R /etc/opendkim
sudo chmod 770 -R /etc/opendkim
或使用refile
,SigningTable
但没有任何变化......
我输入/etc/默认/opendkim
SOCKET="inet:8891:localhost"
为 DKIM 添加配置:
#DKIM
milter_default_action = accept
milter_protocol = 6
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
milter_mail_macros {mail_addr} {client_addr} {client_name} {auth_authen}
我的配置有什么问题?
版本:
后缀:
mail_version = 3.1.8
dovecot --版本
2.2.27 (c0f36b0)
opendkim-V
opendkim: OpenDKIM Filter v2.11.0
答案1
假设您的 SigningTable 包含通配符(例如*@mydomain.com
,*
匹配所有用户的地方是通配符),您应该在其前面加上前缀重新归档:在里面opendkim.conf文件,如下所示:
SigningTable refile:/etc/opendkim/SigningTable