opendkim failing to start after recent routine debian update

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.

2 Comments

  1. 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!

Leave a Reply

Your email address will not be published. Required fields are marked *