From 49ba3adfdff205aeddbe90ee8757e75009d9eed0 Mon Sep 17 00:00:00 2001 From: Dariqq Date: Wed, 15 Oct 2025 11:27:03 +0000 Subject: services: opensmtd: Add back option to log to syslog. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The option for syslog logging was removed in 6036f1f3053bc9b4f0411b5e8aeaab5bd7f4ec7b. * gnu/services/mail.scm (opensmtpd-shepherd-service): When log-file is #f daemonize and set the pid-file. Change-Id: I356f4ccacc473def35708c114947788d485d058b Signed-off-by: Ludovic Courtès --- gnu/services/mail.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gnu') diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index eef46d8f63d..edcc0caa97c 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1744,8 +1744,11 @@ match from local for any action outbound (documentation "Run the OpenSMTPD daemon.") (start (let ((smtpd (file-append package "/sbin/smtpd"))) #~(make-forkexec-constructor - (list #$smtpd "-d" "-f" #$config-file) - #:log-file #$log-file))) + (list #$smtpd "-f" #$config-file + #$@(if log-file '("-d") '())) + #$@(if log-file + (list #:log-file log-file) + (list #:pid-file "/var/run/smtpd.pid"))))) (stop #~(make-kill-destructor)))))) (define %opensmtpd-accounts -- cgit v1.3