OpenDKIM 错误

OpenDKIM 错误

发送邮件时,Outlook 出现错误4.7.1 Service unavailable - try again later。我已安装 postfix、dovecot 和 openDKIM,但 OpenDKIM 出现错误:

Mar 30 10:19:32 x opendkim[16762]: can't load key from /etc/ssl/private/mail.x.nl.key: Permission denied
Mar 30 10:19:32 x opendkim[16762]: A058440C14: error loading key '_domainkey.x.nl'
Mar 30 10:20:27 x opendkim[16762]: can't load key from /etc/ssl/private/mail.x.nl.key: Permission denied
Mar 30 10:20:27 x opendkim[16762]: 6A4FF40C14: error loading key '_domainkey.x.nl'
Mar 30 11:45:42 x opendkim[16762]: can't load key from /etc/ssl/private/mail.x.nl.key: Permission denied
Mar 30 11:45:42 x opendkim[16762]: 0EDB640845: error loading key '_domainkey.x.nl'
Mar 30 11:47:48 x postfix/postfix-script[1373]: error: unknown command: 'restart'
Mar 30 11:47:48 x postfix/postfix-script[1374]: fatal: usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)
Mar 30 11:51:41 x opendkim[1888]: can't load key from /etc/ssl/private/mail.x.nl.key: Permission denied
Mar 30 11:51:41 x opendkim[1888]: BF89E40845: error loading key '_domainkey.x.key

** Output from namei -l ** 
f: /etc/ssl/private/mail.x.nl.key
drwxr-xr-x root      root     /
drwxr-xr-x root      root     etc
drwxr-xr-x root      root     ssl
drwx--x--- root      ssl-cert private
-rw-r--r-- opendkim  opendkim mail.x.nl.key

我尝试将 .key 文件设置为0755所有者opendkim:opendkim。我能解决这个问题吗?

答案1

您的权限太严格。
用户opendkim/组无权访问该/etc/ssl/private文件夹。
根据您的设置,该文件夹应归opendkim组所有,并且组还应具有对该文件夹的读取/执行权限。

此外,密钥文件的权限太开放。
它应该具有0600权限,但无论如何都不应是所有人都可读的。

答案2

就我而言有帮助

chown -R opendkim:opendkim /etc/opendkim
chmod 0750 /etc/opendkim/keys
chmod 0600 /etc/opendkim/keys/default.private

相关内容