aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/euandre/queue.scm16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/org/euandre/queue.scm b/src/org/euandre/queue.scm
index 45e3e47..821dd0c 100644
--- a/src/org/euandre/queue.scm
+++ b/src/org/euandre/queue.scm
@@ -128,6 +128,7 @@
postfix-configuration-master.cf-extra
postfix-configuration-main.cf-extra
postfix-configuration-config-dirname
+ postfix-configuration-mail-directory
postfix-configuration-data-directory
postfix-configuration-queue-directory
postfix-configuration-user
@@ -882,6 +883,7 @@ By default, the daemon runs in a container.")))
(master.cf-extra postfix-configuration-master.cf-extra (default ""))
(main.cf-extra postfix-configuration-main.cf-extra (default ""))
(config-dirname postfix-configuration-config-dirname (default "postfix"))
+ (mail-directory postfix-configuration-mail-directory (default "/var/mail/"))
(data-directory postfix-configuration-data-directory (default "/var/lib/postfix"))
(queue-directory postfix-configuration-queue-directory (default "/var/spool/postfix"))
(user postfix-configuration-user (default "postfix"))
@@ -1039,7 +1041,7 @@ smtp_sasl_mechanism_filter = login, plain
;; postfix -> package
(define (generate-main.cf config)
(match-record config <postfix-configuration>
- (mail-in-home? enable-submission? queue-directory data-directory
+ (mail-in-home? enable-submission? mail-directory queue-directory data-directory
user setgid-group hostname main.cf-extra)
(format #f
"compatibility_level = 3.6
@@ -1061,7 +1063,7 @@ header_checks = regexp:{ { /^Received:.*/ IGNORE }, { /^X-Originating-IP:.*/ IGN
(if mail-in-home?
"home_mailbox = Mail/Inbox/"
- "mail_spool_directory = /var/mail/")
+ (string-append "mail_spool_directory = " mail-directory))
main.cf-extra
(if enable-submission?
(main.cf-internet-extra
@@ -1123,20 +1125,18 @@ header_checks = regexp:{ { /^Received:.*/ IGNORE }, { /^X-Originating-IP:.*/ IGN
(group setgid-group)))
'()))))
-;; FIXME: parameterize /var/mail
(define (postfix-activation config)
(match-record config <postfix-configuration>
- (queue-directory)
+ (mail-directory queue-directory)
#~(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)
+ (format (current-error-port)
"Creating Postfix queue directory: \"~a\".~%" #$queue-directory)
(mkdir-p/perms #$queue-directory 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