大网数据广告活动
服务器运维问答

OpenDKIM reports "signing table references unknown key" (CentOS 8)

· 52CE 我爱测

I'm attempting to configure OpenDKIM with PostFix on CentOS 8. I've set the following in /etc/opendkim.conf : PidFile /run/opendkim/opendkim.pid Mode sv Syslog yes SyslogSuccess yes LogWhy yes UserID opendkim:opendkim Socket inet…

问题原文

原帖链接 · James Shields · CC BY-SA 4.0

I'm attempting to configure OpenDKIM with PostFix on CentOS 8.

I've set the following in /etc/opendkim.conf:

PidFile /run/opendkim/opendkim.pid
Mode    sv
Syslog  yes
SyslogSuccess   yes
LogWhy  yes
UserID  opendkim:opendkim
Socket  inet:8891@localhost
Umask   002
SendReports     yes
SoftwareHeader  yes
Canonicalization        relaxed/relaxed
Selector        default
KeyTable        /etc/opendkim/KeyTable
SigningTable    refile:/etc/opendkim/SigningTable
ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts
InternalHosts   refile:/etc/opendkim/TrustedHosts
OversignHeaders From

My /etc/opendkim/KeyTable file is as follow:

mta1._domainkey.esfs.info     esfs.info:mta1:/etc/opendkim/keys/esfs.info/mta1.private

[Edit]

My /etc/opendkim/SigningTable file contains:

*@esfs.info default._domainkey.esfs.info

[/Edit]

My /etc/opendkim/TrustedHosts file is:

127.0.0.1
::1
*.esfs.info

I've generated my domain key with the following command:

sudo opendkim-genkey -b 2048 -d your-domain.com -D /etc/opendkim/keys/your-domain.com -s mta1 -v

I copied the contents of /etc/opendkim/keys/esfs.info/mta1.txt, into my dns entry.

However, when I test the key I get a warning that it's not secure:

$ sudo opendkim-testkey -d esfs.info -s mta1 -vvv
opendkim-testkey: using default configfile /etc/opendkim.conf
opendkim-testkey: checking key 'mta1._domainkey.esfs.info'
opendkim-testkey: key not secure
opendkim-testkey: key OK

When I check the server status, I get the following:

$ sudo systemctl status opendkim
● opendkim.service - DomainKeys Identified Mail (DKIM) Milter
   Loaded: loaded (/usr/lib/systemd/system/opendkim.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2021-02-08 23:15:12 GMT; 5 days ago
     Docs: man:opendkim(8)
           man:opendkim.conf(5)
           man:opendkim-genkey(8)
           man:opendkim-genzone(8)
           man:opendkim-testadsp(8)
           man:opendkim-testkey
           http://www.opendkim.org/docs.html
 Main PID: 80340 (opendkim)
    Tasks: 3 (limit: 4947)
   Memory: 2.8M
   CGroup: /system.slice/opendkim.service
           └─80340 /usr/sbin/opendkim -x /etc/opendkim.conf -P /run/opendkim/opendkim.pid

Feb 14 12:57:17 wp2.lostcarpark.com opendkim[80340]: CA0EC5E150: signing table references unknown key 'default._domainkey.esfs.info'
Feb 14 12:57:17 wp2.lostcarpark.com opendkim[80340]: CB0C55E150: signing table references unknown key 'default._domainkey.esfs.info'
Feb 14 12:57:17 wp2.lostcarpark.com opendkim[80340]: CBF885E150: signing table references unknown key 'default._domainkey.esfs.info'
Feb 14 12:57:17 wp2.lostcarpark.com opendkim[80340]: CCDDA5E150: signing table references unknown key 'default._domainkey.esfs.info'

The following is from /var/log/maillog:

Feb 14 14:52:24 wp2 postfix/pickup[279532]: warning: 374135E150: message has been queued for 1 days
Feb 14 14:52:24 wp2 postfix/pickup[279532]: 374135E150: uid=0 from=<root>
Feb 14 14:52:24 wp2 postfix/cleanup[279857]: 374135E150: message-id=<[email omitted]>
Feb 14 14:52:24 wp2 opendkim[80340]: 374135E150: signing table references unknown key 'default._domainkey.esfs.info'
Feb 14 14:52:24 wp2 postfix/cleanup[279857]: 374135E150: milter-reject: END-OF-MESSAGE from localhost[127.0.0.1]: 4.7.1 Service unavailable - try again later; from=<[email omitted]> to=<[email omitted]>

Hope the above is helpful in disgnosing the problem. Really appreciate if someone can point me in the right direction.

已采纳解答

原帖链接 · kubanczyk · CC BY-SA 4.0

Look at:

dig default._domainkey.esfs.info. txt +short

This returns empty, which is unexpected. Instead you have it under a different name mta1:

dig mta1._domainkey.esfs.info txt +short
"v=DKIM1; k=rsa; " "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzPW/qEl5jIpReXwxZ8WaS07dn3QLwa4/OWFn17bh84SM0ac7jMvo8jbBmotuO0o0oFeoODPFEYUyvXx0TScrkhycRuKqlhraBNOiPiLgRgP9L0/5Z4VdWdAhASgFMfa4mK7lfuZ85dMdyshp/SN9R3zNOvExEtuHNvQ0eUkTBcuY4UneAHhlx5SlRORdSzq02eCsgEskMLzBd7" "tEJargXaRjSLdMLnML8yJVtDHhPBH/G8AJsOWOPoXDyt6vI0pWW1o6A7BEleXYouYlge4w6S2Kgzv+QSBJoLxlCyNDo1kBG2lag5Jos4BjlahIYh1gzI5aDozG5VlVeLAq3B7QMQIDAQAB"

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-02-14)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。