[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#42899] [PATCH 03/10] services: dovecot: Use modules via symlink to

From: Alexey Abramov
Subject: [bug#42899] [PATCH 03/10] services: dovecot: Use modules via symlink to system profile.
Date: Mon, 17 Aug 2020 11:31:17 +0200

* gnu/services/mail.scm (%dovecot-activation): Link the location with multiple
plugins (dovecot-pigeonhole, etc), to a place where dovecot can find them.
* gnu/services/mail.scm (dovecot-configuration): Use the symlink.

Signed-off-by: Alexey Abramov <>
 gnu/services/mail.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index cfcaf4601b..da17933d6b 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -1044,7 +1044,7 @@ directories are prefixed with the chroot directory, 
append \"/.\" to
 This is used by imap (for shared users) and lda.")
-   (file-name "/usr/lib/dovecot")
+   (file-name "/etc/dovecot/modules")
    "Directory where to look up mail plugins.")
@@ -1519,13 +1519,16 @@ greyed out, instead of only later giving \"not 
selectable\" popup error.
               (format (current-error-port)
                       "Failed to create public key at ~a.\n" public-key)))))
-        (let ((user (getpwnam "dovecot")))
+        (let ((user (getpwnam "dovecot"))
+              (moduledir "/etc/dovecot/modules"))
           (mkdir-p/perms "/var/run/dovecot" user #o755)
           (mkdir-p/perms "/var/lib/dovecot" user #o755)
           (mkdir-p/perms "/etc/dovecot" user #o755)
           (copy-file #$(plain-file "dovecot.conf" config-str)
           (mkdir-p/perms "/etc/dovecot/private" user #o700)
+          (unless (file-exists? moduledir)
+            (symlink "/run/current-system/profile/lib/dovecot" moduledir))
            #:private-key "/etc/dovecot/private/default.pem"
            #:public-key "/etc/dovecot/default.pem"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]