dkimproxy ignores user settings

Very useful, but unmaintained, dkim email message signing program.
All the time I’ve been using it the sysvinit script to start it has been a mess and various workarounds are needed. With the refusal to accept a different location for private.key being particularly annoying.
At least on debian and ubuntu thisis the case.
Even though you are supposed to be able to override default settings in
/etc/dkimproxy/dkimproxy_out.conf it does not happen.
This is only for dkimproxy.out because that’s all I use but should be adaptable to dkimproxy.in

To do

Mask the sysvinit script. (even though there’s currently no service file for dkimproxy the below still works).

systemctl mask --now dkimproxy.service

Create /etc/systemd/system/dkimproxy-out.service

[Unit]
Description=dkimproxy.out slightly more sane
After=network.target

[Service]
Type=forking
User=dkimproxy
ExecStart=/usr/sbin/dkimproxy.out --conf_file=/etc/dkimproxy/dkimproxy_out.conf
ExecStop=/bin/kill -15 $MAINPID
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

Create (or edit) /etc/dkimproxy/dkimproxy_out.conf with options of your choosing which will now be honoured.

user	 			dkimproxy
group		 		dkimproxy
min_servers 		2
min_spare_servers 	1
listen    			127.0.0.1:10027
relay     			127.0.0.1:10028
domain    			xxxx.co.uk,bbbb.com
signature 			dkim
method				relaxed
keyfile 			/etc/dkimproxy/private.key
selector 			selector1
daemonize

Enable and start.

systemctl enable --now dkimproxy-out.service

Leave a Reply

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

Are we human, or are we dancers ? *