diff options
author | EuAndreh <eu@euandre.org> | 2023-03-17 18:23:33 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-03-17 18:23:33 -0300 |
commit | b635dcec81371a5895ae32eb463c370ba40e6f93 (patch) | |
tree | a4db1f171b1008bb60c244eccc6e6b62038014ff /src | |
parent | queue.scm: Remove trailing "/" from Postfix "mail-directory" variable (diff) | |
download | package-repository-b635dcec81371a5895ae32eb463c370ba40e6f93.tar.gz package-repository-b635dcec81371a5895ae32eb463c370ba40e6f93.tar.xz |
queue.scm: Play it save when creating /var/mail
Diffstat (limited to 'src')
-rw-r--r-- | src/org/euandre/queue.scm | 7 |
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) |