Hi Freinds,
on Debian Jessie and opendkim 2.9.2-2+deb8u1, using MySQL for "SigningTable", "Domain", "KeyTable",
Opendkim fail to start properly rebooting Debian server, printing this status error code:
systemctl -l status opendkim
● opendkim.service - LSB: Start the OpenDKIM service
Loaded: loaded (/etc/init.d/opendkim)
Active: active (exited) since ven 2018-08-24 15:37:09 CEST; 18min ago
Process: 490 ExecStart=/etc/init.d/opendkim start (code=exited, status=0/SUCCESS)
ago 24 15:37:09 server2 opendkim[490]: Starting OpenDKIM: opendkim: /etc/opendkim.conf: dsn:mysql://usermail:BLABLABLABLABLABLA@3306+127.0.0.1/mailserver/table=virtual_domains?keycol=name?datacol=ID: dkimf_db_open(): Can't connect to MySQL server on '127.0.0.1' (111)
ago 24 15:37:09 server2 opendkim[490]: opendkim.
ago 24 15:37:09 server2 systemd[1]: Started LSB: Start the OpenDKIM service
~~~.
Reloading manually all works fine:
● opendkim.service - LSB: Start the OpenDKIM service
Loaded: loaded (/etc/init.d/opendkim)
Active: active (running) since ven 2018-08-24 15:58:43 CEST; 1s ago
Process: 1560 ExecStop=/etc/init.d/opendkim stop (code=exited, status=0/SUCCESS)
Process: 1565 ExecStart=/etc/init.d/opendkim start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/opendkim.service
├─1573 /usr/sbin/opendkim -x /etc/opendkim.conf -u opendkim -P /var/run/opendkim/opendkim.pid -p local:/var/spool/postfix/var/run/opendkim/opendkim.sock
└─1574 /usr/sbin/opendkim -x /etc/opendkim.conf -u opendkim -P /var/run/opendkim/opendkim.pid -p local:/var/spool/postfix/var/run/opendkim/opendkim.sock
I've try uselessly, trought systemd to set a different MySQL priority:
mkdir /etc/systemd/system/opendkim.service.d
add into that directory a file:
[Unit]
After=mariadb.service
~~~
Thanks
Solved creating a file "local.conf" into "/etc/systemd/system/opendkim.service.d" with this content:
perhaps, however, it would be worthwhile to better adjust the start-up phase on the basis of my report.
thank you!