On my VPS Debian Jessie, email server Postfix + Dovecot with user and password on MySQL, I've installed OpenDKIM, that use MySQL for keys too. If for some reason the server reboot, I can find every time the OpenDKIM service in status "active (exited)", and the log report:
opendkim: /etc/opendkim.conf: dsn:mysql://NAME-MAILUSER:**PLAINTEXT-PASSWORD**@MYSQL-PORT+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)
The cause seems to be the connection to the MySQL server
if I restart OpenDKIM, the problem is gone, always.
My questions are two:
- is it possible to prevent systemctl from showing the MySQL password in the logs?
- make sure that OpenDKIM finds the MySQL server started and correctly reboots (OpenDKIM)? Setting different services priority could solve issue? And which is the best practice in this scenario?
Many thanks!
David