From 3952ddfc36b798bcd1e8e46329194bb5e5caeaa6 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 16 Mar 2023 20:36:11 -0300 Subject: queue.scm: Conditionally create /var/mail on activation --- src/org/euandre/queue.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/org/euandre') diff --git a/src/org/euandre/queue.scm b/src/org/euandre/queue.scm index 5790826..8d18f3b 100644 --- a/src/org/euandre/queue.scm +++ b/src/org/euandre/queue.scm @@ -1106,9 +1106,10 @@ header_checks = regexp:{ { /^Received:.*/ IGNORE }, { /^X-Originating-IP:.*/ IGN (format (current-error-port) "Creating Postfix queue directory: \"~a\".~%" #$queue-directory) (mkdir-p/perms #$queue-directory user #o755) - (format (current-error-port) - "Creating email spool director: \"/var/mail\".~%") - (mkdir-p/perms "/var/mail" user #o755) + (unless (directory-exists? "/var/mail") + (format (current-error-port) + "Creating email spool director: \"/var/mail\".~%") + (mkdir-p/perms "/var/mail" user #o755)) (format (current-error-port) "Updating /etc/aliases: FIXME.~%") ;; FIXME: add -c option -- cgit v1.2.3