opendmarc.service inadequate, /etc/default/opendmarc not installed

Bug #1657445 reported by Dominic Raferd
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
opendmarc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This is with opendmarc/1.3.2~Beta1-2 under Zesty Zapus (development branch) 17.04 - downloaded today

1. There is no installation of file /etc/default/opendmarc - if a file already existed you may be asked if you want to replace it and may be able to look at differences, however the new file is not installed in its place. The old file may be renamed as /etc/default/opendmarc.dpkg-old (or may be deleted). I can't fix this bug.

2. Instead of using the bespoke sysv script (/etc/init.d/opendmarc - which however it installs) it uses a poorly-configured /lib/systemd/system/opendmarc.service - this doesn't look at /etc/default/opendmarc (even if it is present) and doesn't respect any Socket setting in /etc/opendmarc.conf. However when you 'enable' opendmarc (i.e. so it runs after rebooting: systemctl enable opendmarc) it then seems to fallback to using the old sysv script (which does work but should be deprecated).

I've attached a patch for opendmarc.service which means it respects an explicit Socket setting in /etc/opendmarc.conf (default: local:/var/run/opendmarc/opendmarc.sock) and /etc/default/opendmarc. With this we no longer need sysv script /etc/init.d/opendmarc.

To get opendmarc to run at boot time and use systemd file (not falling back to sysv):

# in case boot time running is already enabled via sysv
sudo systemctl disable opendmarc.service
sudo mv /etc/init.d/opendmarc /etc/init.d/opendmarc.orig
sudo systemctl enable opendmarc.service

Alternatively, for a workaround that uses /etc/default/opendmarc we can go back to using /etc/init.d/opendmarc thus (with sudo as appropriate):

systemctl stop opendmarc
mv /lib/systemd/system/opendmarc.service file /lib/systemd/system/opendmarc.service.orig
systemctl daemon-reload
systemctl start opendmarc
# run after each boot
systemctl enable opendmarc

Tags: patch
Revision history for this message
Dominic Raferd (dominic-timedicer) wrote :
Revision history for this message
Dominic Raferd (dominic-timedicer) wrote :

Sorry, that patch didn't work and it doesn't seem possible to pick up User, Group or PID settings and apply them with systemd service files. This new patch does work but it is only picking up Socket from /etc/opendmarc.conf or /etc/default/opendmarc.

Revision history for this message
Dominic Raferd (dominic-timedicer) wrote :

sorry, a lot of bad info here. It's clear I don't understand systemd. However I think my original points 1 & 2 stand.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "opendmarc.service.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Scott Kitterman (kitterman) wrote :

I've just uploaded an update to Debian that updates README.Debian (which I neglected to do when adding the service file) that explains how to handle things in lieu of using /etc/defaults, which is apparently not a very systemd thing to do.

Changed in opendmarc (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.