无法在OpenDKIM中加载密钥权限被拒绝

问题描述 投票:1回答:1

以前使用Dovecot / Postfix / DKIM设置,多个域正常运行数月。

我试图添加一个新域名。回顾我为原作所做的事情。一旦我遇到大多数问题,所有配置文件,密钥,文本记录等工作,我可以收到没有问题的电子邮件,但不会在新的电子邮件/域上发送电子邮件。

收到以下错误:

Mar 23 02:48:49 MainFrame-2017 opendkim[4225]: can't load key from /etc/opendkim/keys/zaehlas.com/mail.private: Permission denied
Mar 23 02:48:49 MainFrame-2017 opendkim[4225]: DF0CF5C4CC0: error loading key 'mail._domainkey.zaehlas.com'

安装有以下版本:

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:        16.04
Codename:       xenial
root@MainFrame-2017:/etc/opendkim/keys/zaehlas.com# dpkg -s opendkim | grep '^Version:'
Version: 2.10.3-3build1
root@MainFrame-2017:/etc/opendkim/keys/zaehlas.com# dpkg -s postfix | grep '^Version:'
Version: 3.1.0-3ubuntu0.3

我检查了权限和配置文件。适用于4个域,不适用于最后一个域。最后按照我可以找到的(MANY)指南上的建议重置所有权限,重新启动整个服务器,重启多个服务,现在我的域名都不会使用DKIM发送电子邮件

我的opendkim.conf(删除了注释和空格)

OversignHeaders     From
TrustAnchorFile       /usr/share/dns/root.key
AutoRestart             Yes
AutoRestartRate         10/1h
UMask                   002
Syslog                  yes
SyslogSuccess           Yes
LogWhy                  Yes
Canonicalization        relaxed/simple
ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts
InternalHosts           refile:/etc/opendkim/TrustedHosts
KeyTable                refile:/etc/opendkim/KeyTable
SigningTable            refile:/etc/opendkim/SigningTable
Mode                    sv
PidFile                 /var/run/opendkim/opendkim.pid
SignatureAlgorithm      rsa-sha256
UserID                  opendkim:opendkim
Socket                  inet:12301@localhost

opendkim和keyfiles中的权限

root@MainFrame-2017:/etc/opendkim# ls -l
total 16
drw------- 9 opendkim opendkim 4096 Mar 23 00:31 keys
-rw-r--r-- 1 opendkim opendkim  772 Mar 23 02:10 KeyTable
-rw-r--r-- 1 opendkim opendkim  394 Mar 23 00:28 SigningTable
-rw-r--r-- 1 opendkim opendkim  286 Mar 23 02:42 TrustedHosts
root@MainFrame-2017:/etc/opendkim# namei -l /etc/opendkim/keys/zaehlas.com/mail.private
f: /etc/opendkim/keys/zaehlas.com/mail.private
drwxr-xr-x root     root     /
drwxr-xr-x root     root     etc
drwxr-xr-x opendkim opendkim opendkim
drw------- opendkim opendkim keys
drw------- opendkim opendkim zaehlas.com
-rw------- opendkim opendkim mail.private

KeyTable文件:

mail._domainkey.zaehlas.com zaehlas.com:mail:/etc/opendkim/keys/zaehlas.com/mail.private
mail._domainkey.bglancesglass.com bglancesglass.com:mail:/etc/opendkim/keys/bglancesglass.com/mail.private
mail._domainkey.millenniumlarp.com millenniumlarp.com:mail:/etc/opendkim/keys/millenniumlarp.com/mail.private
mail._domainkey.pittsburghglassclub.com pittsburghglassclub.com:mail:/etc/opendkim/keys/pittsburghglassclub.com/mail.private
mail._domainkey.pittsburghglassclub.org pittsburghglassclub.org:mail:/etc/opendkim/keys/pittsburghglassclub.org/mail.private
mail._domainkey.chataboutdg.com chataboutdg.com:mail:/etc/opendkim/keys/chataboutdg.com/mail.private
mail._domainkey.lostvalleylegacy.com lostvalleylegacy.com:mail/etc/opendkim/keys/lostvalleylegacy.com/mail.private

和DKIM测试工作:

root@MainFrame-2017:/etc/opendkim# opendkim-testkey -d zaehlas.com -s mail -vvv
opendkim-testkey: using default configfile /etc/opendkim.conf
opendkim-testkey: checking key 'mail._domainkey.zaehlas.com'
opendkim-testkey: key not secure
opendkim-testkey: key OK

我完全没有想法。它起作用了,现在却没有,而且没有任何重要的变化。我已经尝试了几种不同的权限,经过验证的opendkim正在使用正确的组和用户名。

提前感谢你错过了一些东西,或提到要检查其他指南没有提到的东西。

email server postfix-mta dkim
1个回答
0
投票

我备份了我的配置文件。 apt-get purged opendkim,重新安装opendkim,恢复了我的确切配置文件,并且工作正常。

我不知道为什么。

PFM

© www.soinside.com 2019 - 2024. All rights reserved.