Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Aug 2021 15:31:30 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 258011] mail/opendkim does not restart properly with "service -R"
Message-ID:  <bug-258011-7788-SSI9Xx0Z2g@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-258011-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-258011-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258011

--- Comment #1 from ml@netfence.it ---
After some more investigation:

1) opendkim does not start if called from /root:
I.e.
# cd /root
# mkdir /var/run/milteropendkim
# chown mailnull:mailnull /var/run/milteropendkim/
# chmod 755 /var/run/milteropendkim/
#/usr/local/sbin/opendkim -l -u mailnull:mailnull -P
/var/run/milteropendkim/pid -x /usr/local/etc/mail/opendkim.conf -f
opendkim: socket cleanup failed: Permission denied
# cd /any_other_dir
#/usr/local/sbin/opendkim -l -u mailnull:mailnull -P
/var/run/milteropendkim/pid -x /usr/local/etc/mail/opendkim.conf -f
(works)

I don't underestand why; possibly it's a bug upstream? I have not looked in=
to
this.



2) As a consequence, "/usr/local/etc/rc.d/milter-opendkim start" does NOT w=
ork
if called from /root, but does if called from any other directory.



3) "service -R" does not set current dir (bug???), so the above still appli=
es:
if launched from /root it will fail to start milter-opendkim, while succeed=
ing
if run from any other directory.
("service milter-opendkim start" always works as /usr/sbin/service does "cd=
 /"
before calling any rc script in this case).




A simple workaround would be to put "cd /" as the second-last line of
${PREFIX}/etc/rc.d/milter-opendkim (just before 'run_rc_command "$1"').

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-258011-7788-SSI9Xx0Z2g>