From b635dcec81371a5895ae32eb463c370ba40e6f93 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 17 Mar 2023 18:23:33 -0300 Subject: queue.scm: Play it save when creating /var/mail --- src/org/euandre/queue.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/org/euandre/queue.scm b/src/org/euandre/queue.scm index d7bd682..f3f6411 100644 --- a/src/org/euandre/queue.scm +++ b/src/org/euandre/queue.scm @@ -1144,9 +1144,10 @@ header_checks = regexp:{ { /^Received:.*/ IGNORE }, { /^X-Originating-IP:.*/ IGN #~(begin (use-modules (guix build utils)) (let ((user (getpwnam "root"))) - (format (current-error-port) - "Creating email spool director: \"~a\".~%" #$mail-directory) - (mkdir-p/perms #$mail-directory user #o755) + (unless (directory-exists? #$mail-directory) + (format (current-error-port) + "Creating email spool director: \"~a\".~%" #$mail-directory) + (mkdir-p/perms #$mail-directory user #o755)) (format (current-error-port) "Creating Postfix queue directory: \"~a\".~%" #$queue-directory) (mkdir-p/perms #$queue-directory user #o755) -- cgit v1.2.3