summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/mail.scm7
1 files changed, 5 insertions, 2 deletions
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