Subject: [bug#77501] [PATCH] Log OpenSMTPd to /var/log/mail.log via a configurable option. (Closes: #77501)

From: Andreas Enge <[email-masked]>
Date: Wed, 9 Apr 2025 23:58:22 +0200

Am Wed, Apr 09, 2025 at 11:22:58PM +0200 schrieb Ludovic Courtès:
> Could you add a conventional commit log?

This was there in my version of the patch a bit further up.

> >                      #~(make-forkexec-constructor
> > -                       (list #$smtpd "-f" #$config-file)
> > -                       #:pid-file "/var/run/smtpd.pid")))
> > +                       (list #$smtpd
> > +                             "-d"
> > +                             "-f" #$config-file)
> > +                       #:log-file #$log-file)))
> I believe #:pid-file should be kept, no?

This was dropped following my remark above:
"I have looked at the shepherd manual, and in
   https://www.gnu.org/software/shepherd/manual/shepherd.html#Service-De_002d-and-Constructors
it says the following about make-fork-exec-constructor:
'Note: This will not work as expected if the process “daemonizes”
(forks); in that case, you will need to pass #:pid-file, as explained
below.'
Now that you do not daemonize, is #:pid-file still needed or useful?"

The "-d" flag passed to #$smtpd prevents it from "daemonizing". So we
concluded that the #:pid-file thing was not needed (maybe it is needed,
but then the documentation should be adapted).

Andreas