所以我在OpenDKIM签名的时候遇到了麻烦,但是我打了一个关于可能导致它的问题:
Debian Jessie,Postfix和OpenDKIM。
我的/etc/opendkim.conf :
Syslog yes SyslogSuccess Yes LogWhy yes UMask 002 Canonicalization relaxed/simple Mode sv SubDomains no #ADSPAction continue AutoRestart Yes AutoRestartRate 10/1h Background yes DNSTimeout 5 SignatureAlgorithm rsa-sha256 UserID opendkim:opendkim Socket inet:12301@localhost KeyTable refile:/etc/opendkim/KeyTable SigningTable refile:/etc/opendkim/SigningTable ExternalIgnoreList refile:/etc/opendkim/TrustedHosts InternalHosts refile:/etc/opendkim/TrustedHosts
我的/etc/opendkim/KeyTable :
default._domainkey.example.com example.com:default:/etc/opendkim/keys/example.com/default.private
我的/etc/opendkim/SigningTable :
example.com default._domainkey.example.com
在SigningTable上尝试了以下变化,但是禁用了我的SMTP:
*@example.com default._domainkey.example.com
在我的/etc/default/opendkim取消注释以下行:
SOCKET="inet:12345@localhost
在我的/etc/postfix/main/cf有以下内容:
# DKIM milter_default_action = accept milter_protocol = 6 smtpd_milters = inet:localhost:12345 non_smtpd_milters = inet:localhost:12345
这是什么opendkim-testkey -d example.com -s default -vvv返回:
opendkim-testkey: using default configfile /etc/opendkim.conf opendkim-testkey: checking key 'default._domainkey.example.com' opendkim-testkey: key not secure opendkim-testkey: key OK
我的日志似乎没有任何与opendkim有关的错误,但是当我尝试validation签名时,mail-tester.com报告没有DKIM签名,[email protected]返回一个DKIM检查:无。
任何帮助确定我失踪将非常感激。 谢谢。
我看到的问题:
你使用refile
从文档 :
如果string以“refile:”开始,那么string的其余部分被假定为指定一个包含一组模式的文件,每行一个,以及它们的相关值。 该模式被视为第一个空白的行的开始,并且该空白之后的部分被用作当该模式匹配时要使用的值。 模式是简单的通配符模式,匹配除了星号(“*”)被认为是通配符的所有文本。 如果一个值包含多个条目,则条目应该用冒号分隔。
KeyTable不遵循这种模式,所以它不需要关键字refile。 也许它不会伤害,我不知道。 我没有在我的configuration中使用它,它适用于我。
KeyTable /etc/opendkim/KeyTable SigningTable refile:/etc/opendkim/SigningTable
你的KeyTable
这些行应该以域名开头,而不是域名logging:
example.com example.com:default:/etc/opendkim/keys/example.com/default.private
SigningTable
签名表应该将电子邮件地址映射到域。 它应该是这样的:
*@example.com example.com
这里需要refile关键字。
我不知道ExternalIgnoreList和InternalHosts ,因为我不使用它们。 其余的configuration看起来不错。