Subject: [bug#36239] [PATCH] opensmtpd-service-type to extend pam

From: Kristofer Buffington <[email-masked]>
Date: Sat, 15 Jun 2019 22:45:46 -0400

>From 4498a2c9e1453cb81b54231a5203bc55019e62db Mon Sep 17 00:00:00 2001
From: Kristofer Buffington <[email-masked]>
Date: Wed, 12 Jun 2019 16:34:30 -0400
Subject: [PATCH] * gnu/services/mail.scm added %opensmtpd-pam-services to the
 opensmtpd-service-type
To: [email-masked]

---
 gnu/services/mail.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index 216b2c80b0..e54d7eb3c1 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017, 2018 Clément Lassieur <[email-masked]>
 ;;; Copyright © 2017 Carlo Zancanaro <[email-masked]>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <[email-masked]>
+;;; Copyright © 2019 Kristofer Buffington <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1667,6 +1668,9 @@ accept from local for any relay
            (mkdir-p "/var/spool/smtpd")
            (chmod "/var/spool/smtpd" #o711))))))
 
+(define %opensmtpd-pam-services
+  (list (unix-pam-service "smtpd")))
+
 (define opensmtpd-service-type
   (service-type
    (name 'opensmtpd)
@@ -1675,6 +1679,8 @@ accept from local for any relay
                              (const %opensmtpd-accounts))
           (service-extension activation-service-type
                              opensmtpd-activation)
+          (service-extension pam-root-service-type
+                             (const %opensmtpd-pam-services))
           (service-extension profile-service-type
                              (compose list opensmtpd-configuration-package))
           (service-extension shepherd-root-service-type
-- 
2.18.0