OpenDKIM不签署外发邮件


8

我正在尝试在运行Debian和Postfix的邮件服务器上设置OpenDKIM。这是我完成的配置:

  • 生成了两个密钥(对于我需要为其发送邮件的两个域)
  • 配置的KeyTable,SigningTable和TrustedHosts文件:

关键表

mail._domainkey.domain1.com domain1.com:mail:/etc/opendkim/keys/domain1.com/mail.private
mail._domainkey.domain2.com domain2.com:mail:/etc/opendkim/keys/domain2.com/mail.private

签名表

*.domain1.com mail._domainkey.domain1.com
*.domain2.com mail._domainkey.domain2.com

TrustedHosts

127.0.0.1
::1
localhost

我的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           002
LogWhy          yes

OversignHeaders     From

TrustAnchorFile       /usr/share/dns/root.key

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

最后,我使用milter套接字将其连接到Postfix:

后缀main.cf

# Milters
smtpd_milters =
    unix:/opendkim/opendkim.sock,
    unix:/clamav/clamav-milter.ctl,
    unix:/spamass/spamass.sock

non_smtpd_milters = unix:/opendkim/opendkim.sock

在此当前状态下,OpenDKIM会正确验证传入邮件的签名,但由于某种原因它不会对传出邮件进行签名。mail.log尝试发送消息时已登录:

Nov  8 16:35:02 illium opendkim[30142]: 826DF501F39: %clienthostname% %clientip% not internal
Nov  8 16:35:02 illium opendkim[30142]: 826DF501F39: not authenticated
Nov  8 16:35:02 illium opendkim[30142]: 826DF501F39: no signature data

我相信这not authenticated部分是不正确的,因为该邮件是使用身份验证的SMTP从客户端提交到Postfix的。

Answers:


5

该问题是由两件事引起的:

  1. 相反的是在意见opendkim.conf要求,mode = sv不是默认。我必须明确设置它。

  2. 我在SigningTable中犯了一个错误:*.domain1.com应该是*@domain1.com

纠正这两点后,它现在可以正常工作。


请您发送您在服务器上设置opendkim所遵​​循的步骤,我面临着同样的问题电子邮件不是dkim签名的,尝试了很多事情但失败了
Vijay Muddu
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.