aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Abramov <levenson@mmer.org>2020-09-08 15:53:44 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2020-09-11 16:28:01 +0200
commita16400919f9e589b7161372c3c97f56b5cf52091 (patch)
treeae08029f8d1ceb3edd361514027f6de37edd871d
parentdce464e9402b0a14290f5c15dca49ae3b616c69b (diff)
downloadguix-a16400919f9e589b7161372c3c97f56b5cf52091.tar
guix-a16400919f9e589b7161372c3c97f56b5cf52091.tar.gz
services: dovecot: Only serialize settings with non-empty values.
* gnu/services/mail.scm (serialize-space-separated-string-list): Protocols might have custom settings, which are not supported by other protocols. To prevent dovecot/services from crashing, serialize settings that hold non-empty values only. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
-rw-r--r--gnu/services/mail.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index 3029a68663..291a2db8e1 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -99,7 +99,9 @@
(and (string? x) (not (string-index x #\space))))
val)))
(define (serialize-space-separated-string-list field-name val)
- (serialize-field field-name (string-join val " ")))
+ (match val
+ (() #f)
+ (_ (serialize-field field-name (string-join val " ")))))
(define (comma-separated-string-list? val)
(and (list? val)