on 2017-10-12 i’ve done a routine apt-get update; apt-get upgrade on a debian stretch vm that, among other services, runs opendkim service that adds a digital signature in the headers of the outgoing mails. during the update i was asked weather to keep or replace the /etc/opendkim.conf; as usual in such cases i’ve answered no which led to situation where the opendkimd no longer started. in /var/log/syslog i saw:
Oct 12 07:00:06 server opendkim[763]: OpenDKIM Filter v2.11.0 terminating with status 0, errno = 0 Oct 12 07:01:19 server systemd[1]: opendkim.service: PID file /var/run/opendkim/opendkim.pid not readable (yet?) after start: No such file or directory Oct 12 07:01:19 server opendkim[6107]: OpenDKIM Filter v2.11.0 starting (args: -x /etc/opendkim.conf) Oct 12 07:02:49 server systemd[1]: opendkim.service: Start operation timed out. Terminating.
i’ve diffed the existing and proposed configs and noticed a new directive that was not present in my original, admitably archaic, file:
PidFile /var/run/opendkim/opendkim.pid
adding it and restarting the service resolved the problem.
I had the same issue after I lately upgraded a Debian from jessie to stretch (this server config is dragged from prehistoric times as well… I may better reinstall it from scratch one day).
Meanwhile: thanks for this!
i’m glad to hear that it helped you : ]
After a migration from Ubuntu 17.04 to 18.04 I lost Opendkim.
But with your solution it works fine again.
Many thanks to you.
Best regards
Dan
thanks for sharing, great to know that it’s helpful for others!
Thank you, this is amazing. I struggled for a long time as how to get opendkim started for the first time in Debian 9.5. This solved it.
you’re welcome!
Thanks for this tip.
Again ! Same here, thank you !