为什么不使用 EXIM 和 OpenDKIM 服务?

Why not use EXIM an OpenDKIM service?

我尝试在 CentOS 7 中配置 EXIM + OpenDKIM... (一切都是来自存储库的最新版本)

我使用这个描述来配置系统:https://www.rosehosting.com/blog/how-to-install-and-configure-dkim-with-opendkim-and-exim-on-a-centos-7-vps/,但我没有使用默认选择器,我尝试使用唯一的。

外发邮件没有DKIM签名,我在EXIM中使用这个配置:

remote_smtp:
    driver = smtp
    DKIM_DOMAIN = $sender_address_domain
    DKIM_SELECTOR = 20170915exim
    DKIM_PRIVATE_KEY = ${if exists{/etc/opendkim/keys/$sender_address_domain/20170915exim}{/etc/opendkim/keys/$sender_address_domain/20170915exim}{0}}
    DKIM_CANON = relaxed
    DKIM_STRICT = 0

有了这个,/etc/opendkim:

.
├── keys
│ └── valami.com
│ ├── 20170915exim
│ └── 20170915exim.txt
├── KeyTable
├── SigningTable
└── TrustedHosts

但是当我发送邮件时(通过邮件、telnet 或任何其他方式),EXIM 不使用 OpenDKIM。当然 opendkim 监听端口:

tcp 0 0 127.0.0.1:8891 0.0.0.0:* LISTEN 6663/opendkim

当我从本地主机向外部发送邮件时:

2017-09-15 15:53:20 1dsr3M-0005fK-Ul <= root@valami.com H=localhost [127.0.0.1] P=smtp S=341
2017-09-15 15:53:21 1dsr3M-0005fK-Ul => xxx@gmail.com R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [74.125.133.26] X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=yes K C="250 2.0.0 OK o1si854413wrg.487 - gsmtp"
2017-09-15 15:53:21 1dsr3M-0005fK-Ul Completed

为什么不将 Exim 守护进程称为 OpenDKIM 接口?

感谢您的帮助!

我解决了!
我必须在配置文件中添加一个 'dkim_sign_headers' 变量...

remote_smtp:
  driver = smtp
  dkim_domain = $sender_address_domain
  dkim_selector = 20170915exim
  dkim_private_key = ${if exists{/etc/opendkim/keys/$dkim_domain/$dkim_selector}{/etc/opendkim/keys/$dkim_domain/$dkim_selector}{0}}
  dkim_canon = relaxed
  dkim_strict = 0
  dkim_sign_headers = subject:to:from