me
/
guix
Archived
1
0
Fork 0

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>
master
Alexey Abramov 2020-09-08 15:53:44 +02:00 committed by Tobias Geerinckx-Rice
parent dce464e940
commit a16400919f
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 3 additions and 1 deletions

View File

@ -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)