无法在服务器 16.04 上安装 DKIM/Postfix

无法在服务器 16.04 上安装 DKIM/Postfix

我有一个新的 Ubuntu 安装,我正尝试使用这个安装 DKIM/Postfix指南在这里。我运行了命令

apt-get install aptitude

但这给了我以下错误

Job for opendkim.service failed because the control process exited with error code. See "systemctl status opendkim.service" and "journalctl -xe" for details.
invoke-rc.d: initscript opendkim, action "start" failed.
● opendkim.service - DomainKeys Identified Mail (DKIM) Milter
   Loaded: loaded (/lib/systemd/system/opendkim.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2017-08-17 14:37:08 IST; 12ms ago
     Docs: man:opendkim(8)
           man:opendkim.conf(5)
           man:opendkim-genkey(8)
           man:opendkim-genzone(8)
           man:opendkim-testadsp(8)
           man:opendkim-testkey
           http://www.opendkim.org/docs.html
  Process: 7636 ExecStart=/usr/sbin/opendkim -x /etc/opendkim.conf -u opendkim -P /var/run/opendkim/opendkim.pid -p $SOCKET $DAEMON_OPTS (code=exited, status=78)
  Process: 7633 ExecStartPre=/bin/chown opendkim.opendkim /var/run/opendkim (code=exited, status=0/SUCCESS)
  Process: 7630 ExecStartPre=/bin/mkdir -p /var/run/opendkim (code=exited, status=0/SUCCESS)

Aug 17 14:37:08 ubun1-frank systemd[1]: Starting DomainKeys Identified Mail (DKIM) Milter...
Aug 17 14:37:08 ubun1-frank opendkim[7636]: /etc/dkim.key: open(): Permission denied
Aug 17 14:37:08 ubun1-frank opendkim[7636]: opendkim: /etc/opendkim.conf: /etc/dkim.key: open(): Permission denied
Aug 17 14:37:08 ubun1-frank systemd[1]: opendkim.service: Control process exited, code=exited status=78
Aug 17 14:37:08 ubun1-frank systemd[1]: Failed to start DomainKeys Identified Mail (DKIM) Milter.
Aug 17 14:37:08 ubun1-frank systemd[1]: opendkim.service: Unit entered failed state.
Aug 17 14:37:08 ubun1-frank systemd[1]: opendkim.service: Failed with result 'exit-code'.
dpkg: error processing package opendkim (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 opendkim
E: Sub-process /usr/bin/dpkg returned an error code (1)

运行systemctl status opendkim.service将得到相同的输出,并且运行journalctl -xe将得到以下内容

Aug 17 14:43:18 ubun1-frank sshd[8157]: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.45.175.2  user=root
Aug 17 14:43:19 ubun1-frank sshd[8155]: Failed password for root from 182.100.67.4 port 42473 ssh2
Aug 17 14:43:20 ubun1-frank sshd[8153]: Failed password for root from 59.63.166.81 port 13759 ssh2
Aug 17 14:43:20 ubun1-frank sshd[8153]: error: maximum authentication attempts exceeded for root from 59.63.166.81 port 13759 ssh2 [preauth]
Aug 17 14:43:20 ubun1-frank sshd[8153]: Disconnecting: Too many authentication failures [preauth]
Aug 17 14:43:20 ubun1-frank sshd[8153]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.63.166.81  user=root
Aug 17 14:43:20 ubun1-frank sshd[8153]: PAM service(sshd) ignoring max retries; 6 > 3
Aug 17 14:43:20 ubun1-frank sshd[8159]: Received disconnect from 59.45.175.2 port 42659:11:  [preauth]
Aug 17 14:43:20 ubun1-frank sshd[8159]: Disconnected from 59.45.175.2 port 42659 [preauth]
Aug 17 14:43:20 ubun1-frank sshd[8159]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.45.175.2  user=root
Aug 17 14:43:20 ubun1-frank sshd[8161]: Received disconnect from 59.45.175.2 port 47307:11:  [preauth]
Aug 17 14:43:20 ubun1-frank sshd[8161]: Disconnected from 59.45.175.2 port 47307 [preauth]
Aug 17 14:43:20 ubun1-frank sshd[8161]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.45.175.2  user=root
Aug 17 14:43:21 ubun1-frank sshd[8155]: Failed password for root from 182.100.67.4 port 42473 ssh2

这对我来说更奇怪,因为我不明白身份验证失败是什么意思。它指的是什么身份验证?我以 root 用户身份登录并能够执行命令。有人可以分享一些关于这方面的见解吗?我做错了什么?

答案1

尝试这个:

编辑 /etc/opendkim.conf。更改以下内容:从

Socket inet:8891@localhost

Socket inet:[email protected]

相关内容