0

I have a new installation of Ubuntu and I'm trying to install DKIM/Postfix on it using this guide here. I ran the command

apt-get install aptitude

but this gives me the following error

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)

Running systemctl status opendkim.service gives the same output and running journalctl -xe gives the following

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

Which is more weird to me as I don't understand what does it mean authentication failed. What authentication is it talking about? I'm logged in as a root user and able to execute commands. Can someone share some insight on this? What am I doing wrong?

Whip
  • 183
  • 1
  • 2
  • 12
  • Were you able to solve this? I'm also having trouble getting the opendkim service to start on Ubuntu 16.04, and am seeing the "Failed password for root" message when I run journalctl -xe – shig Dec 03 '17 at 16:38
  • I'm sorry but I don't really remember what I did to fix this problem. Did you try snape's answer? – Whip Dec 05 '17 at 09:10
  • No worries. I did try snape's answer, but that didn't work for me. – shig Dec 05 '17 at 12:43

1 Answers1

2

Try this:

edit the /etc/opendkim.conf. Change the following: From

Socket inet:8891@localhost

to

Socket inet:[email protected]
snape
  • 21
  • 2