[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/08: service: postfix: Use mail-aliases-service-type.
From: |
guix-commits |
Subject: |
06/08: service: postfix: Use mail-aliases-service-type. |
Date: |
Sun, 12 Jun 2022 06:28:58 -0400 (EDT) |
rekado pushed a commit to branch wip-postfix
in repository guix.
commit 918efbd529ad374b0f594e29980f858aa4262c4f
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Mon Aug 10 07:55:38 2020 +0200
service: postfix: Use mail-aliases-service-type.
* gnu/services/mail.scm (postfix-service-type): Extend
mail-aliases-service-type.
(postfix-shepherd-service): Generate /etc/aliases.db if necessary.
---
gnu/services/mail.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index b63fe81e28..d5bee0872e 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2019 Kristofer Buffington <kristoferbuffington@gmail.com>
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2020 Gábor Boskovits <boskovits@gmail.com>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2074,9 +2075,17 @@ inet_protocols = ipv4
(match-record config <postfix-configuration>
(postfix)
(let* ((postfix-binary (file-append postfix "/postfix"))
+ (postalias-binary (file-append postfix "/postalias"))
(postfix-action
(lambda (action)
#~(lambda _
+ (when (or (not (file-exists? "/etc/aliases.db"))
+ (> (stat:mtime (stat "/etc/aliases"))
+ (stat:mtime (stat "/etc/aliases.db"))))
+ (invoke #$postalias-binary
+ "-c"
+ #$(postfix-configuration-directory config)
+ "/etc/aliases"))
(invoke #$postfix-binary "-c"
#$(postfix-configuration-directory config)
#$action)))))
@@ -2092,6 +2101,7 @@ inet_protocols = ipv4
(name 'postfix)
(extensions (list (service-extension account-service-type postfix-accounts)
(service-extension activation-service-type
postfix-activation)
- (service-extension shepherd-root-service-type
postfix-shepherd-service)))
+ (service-extension shepherd-root-service-type
postfix-shepherd-service)
+ (service-extension mail-aliases-service-type (const
'()))))
(description "Run the Postfix MTA.")
(default-value (postfix-configuration))))
- branch wip-postfix created (now c854575dd8), guix-commits, 2022/06/12
- 06/08: service: postfix: Use mail-aliases-service-type.,
guix-commits <=
- 03/08: gnu: postfix-minimal: Update to 3.5.0., guix-commits, 2022/06/12
- 04/08: system: examples: Add postfix.tmpl., guix-commits, 2022/06/12
- 08/08: gnu: postfix-minimal: Update to 3.7.2., guix-commits, 2022/06/12
- 05/08: gnu: postfix-minimal: Fix startup warnings., guix-commits, 2022/06/12
- 01/08: gnu: Add postfix., guix-commits, 2022/06/12
- 07/08: system: postfix.tmpl: Add mail-aliases-service., guix-commits, 2022/06/12
- 02/08: services: Add postfix service., guix-commits, 2022/06/12