![无法打开私钥文件以进行读取错误](https://linux22.com/image/694798/%E6%97%A0%E6%B3%95%E6%89%93%E5%BC%80%E7%A7%81%E9%92%A5%E6%96%87%E4%BB%B6%E4%BB%A5%E8%BF%9B%E8%A1%8C%E8%AF%BB%E5%8F%96%E9%94%99%E8%AF%AF.png)
当我跑步时mail -vs“测试 DKIM”[电子邮件保护]< /dev/null'我收到此错误:
LOG: MAIN PANIC
unable to open private key file for reading: /etc/exim/dkim.private.key #0
dkim.private.key 文件存在且所有者是根
完整日志:
WARNING: purging the environment.
Suggested action: use keep_environment and add_environment.
delivering 1cEeEN-0000u6-8U
Connecting to gmail-smtp-in.l.google.com [64.233.167.26]:25 ... connected
SMTP<< 220 mx.google.com ESMTP zw7si24925107wjb.31 - gsmtp
SMTP>> EHLO mail.test.com
SMTP<< 250-mx.google.com at your service, [193.70.43.73]
250-SIZE 157286400
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
SMTP>> STARTTLS
SMTP<< 220 2.0.0 Ready to start TLS
SMTP>> EHLO mail.test.com
SMTP<< 250-mx.google.com at your service, [193.70.43.73]
250-SIZE 157286400
250-8BITMIME
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
SMTP>> MAIL FROM:<[email protected]> SIZE=1538
SMTP>> RCPT TO:<[email protected]>
SMTP>> DATA
SMTP<< 250 2.1.0 OK zw7si24925107wjb.31 - gsmtp
SMTP<< 250 2.1.5 OK zw7si24925107wjb.31 - gsmtp
SMTP<< 354 Go ahead zw7si24925107wjb.31 - gsmtp
SMTP>> writing message and terminating "."
LOG: MAIN PANIC
unable to open private key file for reading: /etc/exim/dkim.private.key #0
SMTP<< 250 2.0.0 OK 1481124843 zw7si24925107wjb.31 - gsmtp
SMTP>> QUIT
LOG: MAIN
=> [email protected] R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [64.233.167.26] X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 C="250 2.0.0 OK 1481124843 zw7si24925107wjb.31 - gsmtp"
LOG: MAIN
Completed
答案1
DKIM 不应以 root 身份运行。
授予您的 DKIM 用户读取密钥的权限并重新启动 DKIM 服务。