You are not logged in.
I'm trying to make opendmarc successfully start on boot.
Currently, I have to manually create a directory "/run/opendmarc" and give it the necessary permissions for it to run.
The config would be this:
AuthservID mail.<mydomain>
Socket local:/run/opendmarc/dmarc.sock
PidFile /var/run/opendmarc/opendmarc.pid
HistoryFile /var/run/opendmarc/opendmarc.dat
UserID opendmarc:postfix
Syslog true
UMask 0002
The service file is the default one, haven't touched it yet.
[Unit]
Description=OpenDMARC
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
ExecStart=/usr/bin/opendmarc -c /etc/opendmarc/opendmarc.conf
Restart=always
[Install]
WantedBy=multi-user.target
I tried with root:root in the config file, I tried even without specifying a UserID, still no luck.
Pretty sure this is not tested well enough, but then again, it could be just me.
When I have time, I'll try to look into the source code and see if there's actually code that makes that directory if needed or it just waits for it to be there.
Any thoughts on this one?
Last edited by smirky (2016-10-26 06:20:16)
Personal spot :: https://www.smirky.net/ :: Try not to get lost!
Offline
This would normally be handled with a RuntimeDirectory directive in the service file (or with tmpfiles.d).
Offline
@Raynman - Thank you!
I learned about /etc/tmpfiles.d/ which turned out exactly what I needed.
0 « root » ~ » cat /etc/tmpfiles.d/opendmarc.conf
D /run/opendmarc 0750 opendmarc postfix
I actually found there's an opendkim.conf file in there for "opendkim" and I just copied it, modified it as the above cat shows and now it survives reboot.
Did some more research on opendkim, to see how it handles that, but I didn't find anything in the PKGBUILD or the install hook:
https://git.archlinux.org/svntogit/comm … s/opendkim
Perhaps I'm missing something? How did that file get in there in the first place?
If I find that out, I can request a change for "opendmarc" too.
EDIT:
What's even stranger is this:
0 « root » /etc/tmpfiles.d » pacman -Qo *
error: No package owns opendkim.conf
error: No package owns opendmarc.conf
Really confusing!
Last edited by smirky (2016-10-18 17:26:50)
Personal spot :: https://www.smirky.net/ :: Try not to get lost!
Offline