Hi everyone, OpenDKIM comes with the config file validation tool that can be used by specifying -n command line option. I would like to suggest to add ExecStartPre=/usr/sbin/opendkim -n -x /etc/opendkim/opendkim.conf to validate config file before start/restart Thanks in advance. Regards, Garry
Sounds good. We should do this in the OpenRC service file too, in the check_cfg() function.
Hey Garry, Ralph opened a pull request on github that includes a new systemd service file: https://github.com/gentoo/gentoo/blob/6fd3891124506865f757e3bf68a4ff689b454461/mail-filter/opendkim/files/opendkim.service.r4 Does that work for you? A real live systemd test would be nice.
Ah, Michael beat me to it. ;-) I don't use systemd for Gentoo myself, so your test would be appreciated. In case anybody is wondering about the argument list: The manpage states that 'opendkim -n' will parse both the configuration file and command line arguments.
Hey guys, Thanks for the update. Just tested new service file from the mentioned PR and it is looking all good. Cheers, Garry
Thank you for testing the change, Garry.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95a67b7125a6fd3b8ef970d7c6f66b9bec91cfcc commit 95a67b7125a6fd3b8ef970d7c6f66b9bec91cfcc Author: Ralph Seichter <github@seichter.de> AuthorDate: 2019-03-29 18:45:11 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2019-03-31 19:02:48 +0000 mail-filter/opendkim: Added pre-start configuration checks Added pre-start configuration checks for OpenRC and systemd. Signed-off-by: Ralph Seichter <gentoo@seichter.de> Closes: https://bugs.gentoo.org/622604 Package-Manager: Portage-2.3.62, Repoman-2.3.11 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> mail-filter/opendkim/files/opendkim.init.r6 | 77 +++++++++ mail-filter/opendkim/files/opendkim.service.r4 | 16 ++ mail-filter/opendkim/opendkim-2.10.3-r9.ebuild | 223 +++++++++++++++++++++++++ 3 files changed, 316 insertions(+)
Thanks everyone!