aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-03-17 18:23:33 -0300
committerEuAndreh <eu@euandre.org>2023-03-17 18:23:33 -0300
commitb635dcec81371a5895ae32eb463c370ba40e6f93 (patch)
treea4db1f171b1008bb60c244eccc6e6b62038014ff
parentqueue.scm: Remove trailing "/" from Postfix "mail-directory" variable (diff)
downloadpackage-repository-b635dcec81371a5895ae32eb463c370ba40e6f93.tar.gz
package-repository-b635dcec81371a5895ae32eb463c370ba40e6f93.tar.xz
queue.scm: Play it save when creating /var/mail
-rw-r--r--src/org/euandre/queue.scm7
1 files 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)