Package: guix-patches;
Reported by: Alexey Abramov <levenson <at> mmer.org>
Date: Mon, 17 Aug 2020 09:29:02 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42899 in the body.
You can then email your comments to 42899 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 17 Aug 2020 09:29:02 GMT) Full text and rfc822 format available.Alexey Abramov <levenson <at> mmer.org>
:guix-patches <at> gnu.org
.
(Mon, 17 Aug 2020 09:29:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: guix-patches <at> gnu.org Subject: [PATCH 00/10] Dovecot improvements. Add support for pigeonhole. Date: Mon, 17 Aug 2020 11:27:48 +0200
Hi Guix, I did some work on dovecot, and now can run it with sieve/managesieve support. I followed the same aproach NixOS guys did. I patched moduledir in the source code (/etc/dovecot/modules), and provide it as a symlink to current system profiles lib/dovecot. I also added fts plugin support for dovecot, added few more options for sieve protocol configuration. Alexey Abramov (10): gnu: dovecot: Add lucene library to support fts indexing. gnu: dovecot: Patch and provide a static path for module directory. services: dovecot: Use modules via symlink to system profile. gnu: dovecot-pigeonhole: Add new variable. services: dovecot: Serialize global settings first. services: dovecot: Only serialize settings with non-empty values. services: dovecot: Add 'mail-attribute-dict' configuration option. services: dovecot: Add 'imap-metadata?' protocol configuration option. services: dovecot: Add 'managesieve-notify-capability' configuration. services: dovecot: Add 'managesieve-sieve-capability' option. gnu/local.mk | 1 + gnu/packages/mail.scm | 68 +++++++- ...ovecot-use-static-path-for-moduledir.patch | 146 +++++++++++++++++ gnu/services/mail.scm | 151 ++++++++++-------- 4 files changed, 300 insertions(+), 66 deletions(-) create mode 100644 gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 17 Aug 2020 09:32:02 GMT) Full text and rfc822 format available.Message #8 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH 01/10] gnu: dovecot: Add lucene library to support fts indexing. Date: Mon, 17 Aug 2020 11:31:15 +0200
* gnu/packages/mail.scm (dovecot)[inputs]: Add ice4c and clucene libraries. * gnu/packages/mail.scm (dovecot)[arguments]: Add --with-lucene configuration switch. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/packages/mail.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 6792b9b4a9..98e75fa90f 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -87,6 +87,7 @@ #:use-module (gnu packages guile-xyz) #:use-module (gnu packages flex) #:use-module (gnu packages haskell-xyz) + #:use-module (gnu packages icu4c) #:use-module (gnu packages kerberos) #:use-module (gnu packages libcanberra) #:use-module (gnu packages libevent) @@ -113,6 +114,7 @@ #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) + #:use-module (gnu packages rdf) #:use-module (gnu packages ruby) #:use-module (gnu packages search) #:use-module (gnu packages serialization) @@ -1425,11 +1427,14 @@ facilities for checking incoming mail.") ("lz4" ,lz4) ("openssl" ,openssl) ("sqlite" ,sqlite) - ("zlib" ,zlib))) + ("zlib" ,zlib) + ("icu4c" ,icu4c) + ("clucene" ,clucene))) (arguments `(#:configure-flags '("--sysconfdir=/etc" "--localstatedir=/var" - "--with-sqlite") ; not auto-detected + "--with-sqlite" ; not auto-detected + "--with-lucene") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-file-names -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 17 Aug 2020 09:32:02 GMT) Full text and rfc822 format available.Message #11 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [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 <levenson <at> mmer.org> --- 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.") (mail-plugin-dir - (file-name "/usr/lib/dovecot") + (file-name "/etc/dovecot/modules") "Directory where to look up mail plugins.") (mail-plugins @@ -1519,13 +1519,16 @@ greyed out, instead of only later giving \"not selectable\" popup error. (else (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) "/etc/dovecot/dovecot.conf") (mkdir-p/perms "/etc/dovecot/private" user #o700) + (unless (file-exists? moduledir) + (symlink "/run/current-system/profile/lib/dovecot" moduledir)) (create-self-signed-certificate-if-absent #:private-key "/etc/dovecot/private/default.pem" #:public-key "/etc/dovecot/default.pem" -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 17 Aug 2020 09:32:02 GMT) Full text and rfc822 format available.Message #14 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH 04/10] gnu: dovecot-pigeonhole: Add new variable. Date: Mon, 17 Aug 2020 11:31:18 +0200
Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/packages/mail.scm | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 8e7d5b2fc1..25e9570958 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1467,6 +1467,62 @@ It supports mbox/Maildir and its own dbox/mdbox formats.") (license (list license:lgpl2.1 license:expat (license:non-copyleft "file://COPYING"))))) +(define-public dovecot-pigeonhole + (let ((dovecot-version (version-major+minor (package-version dovecot)))) + (package + (name "dovecot-pigeonhole") + (version "0.5.11") + (source + (origin + (method url-fetch) + (uri (string-append "https://pigeonhole.dovecot.org/releases/" + dovecot-version "/" + "dovecot-" dovecot-version "-pigeonhole-" version ".tar.gz")) + (sha256 + (base32 + "1w5mryv6izh1gv7davnl94rb0pvh5bxl2bydzbfla1b83x22m5qb")))) + (build-system gnu-build-system) + (native-inputs + `(("automake" ,automake) + ("autoconf" ,autoconf) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config) + ("gettext" ,gettext-minimal) + ("dovecot" ,dovecot))) + (arguments + `(#:configure-flags + (list "--with-dovecot-install-dirs=no" + (string-append "--with-dovecot=" + (assoc-ref %build-inputs "dovecot") + "/lib/dovecot") + (string-append "--with-moduledir=" + (assoc-ref %outputs "out") + "/lib/dovecot")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-file-names + (lambda _ + (let ((out (assoc-ref %outputs "out"))) + (substitute* "src/managesieve/managesieve-settings.c" + ((".executable = \"managesieve\"") + (string-append ".executable = \"" out "/libexec/dovecot/managesieve\""))) + (substitute* "src/managesieve-login/managesieve-login-settings.c" + ((".executable = \"managesieve-login\"") + (string-append ".executable = \"" out "/libexec/dovecot/managesieve-login\"")))) + #t))))) + (home-page "https://pigeonhole.dovecot.org") + (synopsis "Pigeonhole project provides mail filtering facilities using +the Sieve language") + (description + "@code{dovecot-pigonhole} adds support for the Sieve +language (RFC 5228) and the ManageSieve protocol (RFC 5804) to the +@code{Dovecot} Secure IMAP Server.") + ;; Pigeonhole is open source and distributed under the same + ;; license as Dovecot: LGPL v2.1 + (license (list license:lgpl2.1 + (license:non-copyleft "file://COPYING") + (license:non-copyleft "file://COPYING.LGPL")))))) + (define-public dovecot-trees (package (name "dovecot-trees") -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 17 Aug 2020 09:32:03 GMT) Full text and rfc822 format available.Message #17 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH 05/10] services: dovecot: Serialize global settings first. Date: Mon, 17 Aug 2020 11:31:19 +0200
* gnu/services/mail.scm (dovecot-configuration): To avoid dovecot warning messages, move serialization of protocol settings below the global one. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/services/mail.scm | 118 +++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index da17933d6b..5959d878e7 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -479,64 +479,6 @@ interfaces. If you want to specify non-default ports or anything more complex, customize the address and port fields of the @samp{inet-listener} of the specific services you are interested in.") - (protocols - (protocol-configuration-list - (list (protocol-configuration - (name "imap")))) - "List of protocols we want to serve. Available protocols include -@samp{imap}, @samp{pop3}, and @samp{lmtp}.") - - (services - (service-configuration-list - (list - (service-configuration - (kind "imap-login") - (client-limit 0) - (process-limit 0) - (listeners - (list - (inet-listener-configuration (protocol "imap") (port 143) (ssl? #f)) - (inet-listener-configuration (protocol "imaps") (port 993) (ssl? #t))))) - (service-configuration - (kind "pop3-login") - (listeners - (list - (inet-listener-configuration (protocol "pop3") (port 110) (ssl? #f)) - (inet-listener-configuration (protocol "pop3s") (port 995) (ssl? #t))))) - (service-configuration - (kind "lmtp") - (client-limit 1) - (process-limit 0) - (listeners - (list (unix-listener-configuration (path "lmtp") (mode "0666"))))) - (service-configuration - (kind "imap") - (client-limit 1) - (process-limit 1024)) - (service-configuration - (kind "pop3") - (client-limit 1) - (process-limit 1024)) - (service-configuration - (kind "auth") - (service-count 0) - (client-limit 0) - (process-limit 1) - (listeners - (list (unix-listener-configuration (path "auth-userdb"))))) - (service-configuration - (kind "auth-worker") - (client-limit 1) - (process-limit 0)) - (service-configuration - (kind "dict") - (client-limit 1) - (process-limit 0) - (listeners (list (unix-listener-configuration (path "dict"))))))) - "List of services to enable. Available services include @samp{imap}, -@samp{imap-login}, @samp{pop3}, @samp{pop3-login}, @samp{auth}, and -@samp{lmtp}.") - (dict (dict-configuration (dict-configuration)) "Dict configuration, as created by the @code{dict-configuration} @@ -1430,7 +1372,65 @@ greyed out, instead of only later giving \"not selectable\" popup error. (imap-urlauth-host (string "") - "Host allowed in URLAUTH URLs sent by client. \"*\" allows all.") ) + "Host allowed in URLAUTH URLs sent by client. \"*\" allows all.") + + (protocols + (protocol-configuration-list + (list (protocol-configuration + (name "imap")))) + "List of protocols we want to serve. Available protocols include +@samp{imap}, @samp{pop3}, and @samp{lmtp}.") + + (services + (service-configuration-list + (list + (service-configuration + (kind "imap-login") + (client-limit 0) + (process-limit 0) + (listeners + (list + (inet-listener-configuration (protocol "imap") (port 143) (ssl? #f)) + (inet-listener-configuration (protocol "imaps") (port 993) (ssl? #t))))) + (service-configuration + (kind "pop3-login") + (listeners + (list + (inet-listener-configuration (protocol "pop3") (port 110) (ssl? #f)) + (inet-listener-configuration (protocol "pop3s") (port 995) (ssl? #t))))) + (service-configuration + (kind "lmtp") + (client-limit 1) + (process-limit 0) + (listeners + (list (unix-listener-configuration (path "lmtp") (mode "0666"))))) + (service-configuration + (kind "imap") + (client-limit 1) + (process-limit 1024)) + (service-configuration + (kind "pop3") + (client-limit 1) + (process-limit 1024)) + (service-configuration + (kind "auth") + (service-count 0) + (client-limit 0) + (process-limit 1) + (listeners + (list (unix-listener-configuration (path "auth-userdb"))))) + (service-configuration + (kind "auth-worker") + (client-limit 1) + (process-limit 0)) + (service-configuration + (kind "dict") + (client-limit 1) + (process-limit 0) + (listeners (list (unix-listener-configuration (path "dict"))))))) + "List of services to enable. Available services include @samp{imap}, +@samp{imap-login}, @samp{pop3}, @samp{pop3-login}, @samp{auth}, and +@samp{lmtp}.")) (define-configuration opaque-dovecot-configuration (dovecot -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 17 Aug 2020 09:32:03 GMT) Full text and rfc822 format available.Message #20 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH 06/10] services: dovecot: Only serialize settings with non-empty values. Date: Mon, 17 Aug 2020 11:31:20 +0200
* gnu/services/mail.scm (serialize-space-separated-string-list): Protocols might have custom settings, which are not supported by other protocols. To prevent dovecot/services from crashing, serialize settings that hold non-empty values only. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/services/mail.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 5959d878e7..1d5d322a53 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -99,7 +99,9 @@ (and (string? x) (not (string-index x #\space)))) val))) (define (serialize-space-separated-string-list field-name val) - (serialize-field field-name (string-join val " "))) + (match val + (() #f) + (_ (serialize-field field-name (string-join val " "))))) (define (comma-separated-string-list? val) (and (list? val) -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 17 Aug 2020 09:32:04 GMT) Full text and rfc822 format available.Message #23 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH 08/10] services: dovecot: Add 'imap-metadata?' protocol configuration option. Date: Mon, 17 Aug 2020 11:31:22 +0200
* gnu/services/mail.scm (protocol-configuration): Define the option to be able to activate the IMAP METADATA commands over the imap protocol. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/services/mail.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index f2b9774bfd..27ba532338 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -348,7 +348,10 @@ This is used by imap (for shared users) and lda.") (mail-max-userip-connections (non-negative-integer 10) "Maximum number of IMAP connections allowed for a user from each IP -address. NOTE: The username is compared case-sensitively.")) +address. NOTE: The username is compared case-sensitively.") + (imap-metadata? + (boolean #f) + "Activate the commands of @code{IMAP METADATA} extension (RFC 5464).")) (define (serialize-protocol-configuration field-name val) (format #t "protocol ~a {\n" (protocol-configuration-name val)) -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 17 Aug 2020 09:32:04 GMT) Full text and rfc822 format available.Message #26 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH 07/10] services: dovecot: Add 'mail-attribute-dict' configuration option. Date: Mon, 17 Aug 2020 11:31:21 +0200
* gnu/services/mail.scm (dovecot-configuration): Define 'mail-attribute-dict' directive to support IMAP METADATA extension.: Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/services/mail.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 1d5d322a53..f2b9774bfd 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1126,6 +1126,11 @@ disabled.") @samp{mdbox-rotate-size}. This setting currently works only in Linux with some file systems (ext4, xfs).") + (mail-attribute-dict + (string "file:%h/dovecot-attributes") + "Activate the metadata storage of @code{IMAP METADATA} extension (RFC 5464), which allows +per-mailbox, per-user data to be stored and accessed via IMAP commands.") + (mail-attachment-dir (string "") "sdbox and mdbox support saving mail attachments to external files, -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 17 Aug 2020 09:32:04 GMT) Full text and rfc822 format available.Message #29 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH 09/10] services: dovecot: Add 'managesieve-notify-capability' configuration. Date: Mon, 17 Aug 2020 11:31:23 +0200
* gnu/services/mail.scm (protocol-configuration): Define new option for protocol-configuration. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/services/mail.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 27ba532338..4b208646b6 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -351,7 +351,13 @@ This is used by imap (for shared users) and lda.") address. NOTE: The username is compared case-sensitively.") (imap-metadata? (boolean #f) - "Activate the commands of @code{IMAP METADATA} extension (RFC 5464).")) + "Activate the commands of @code{IMAP METADATA} extension (RFC 5464).") + (managesieve-notify-capability + (space-separated-string-list '()) + "Define NOTIFY capabilities reported by the ManageSieve +service before authentication. If left unassigned, these will be assigned +dynamically according to what the Sieve interpreter supports by default (after +login this may differ depending on the authenticated user)")) (define (serialize-protocol-configuration field-name val) (format #t "protocol ~a {\n" (protocol-configuration-name val)) -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 17 Aug 2020 09:32:05 GMT) Full text and rfc822 format available.Message #32 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH 10/10] services: dovecot: Add 'managesieve-sieve-capability' option. Date: Mon, 17 Aug 2020 11:31:24 +0200
* gnu/services/mail.scm (protocol-configuration): Define it. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/services/mail.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 4b208646b6..7024356842 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -357,6 +357,12 @@ address. NOTE: The username is compared case-sensitively.") "Define NOTIFY capabilities reported by the ManageSieve service before authentication. If left unassigned, these will be assigned dynamically according to what the Sieve interpreter supports by default (after +login this may differ depending on the authenticated user)") + (managesieve-sieve-capability + (space-separated-string-list '()) + "Define SIEVE capabilities reported by the ManageSieve +service before authentication. If left unassigned, these will be assigned +dynamically according to what the Sieve interpreter supports by default (after login this may differ depending on the authenticated user)")) (define (serialize-protocol-configuration field-name val) -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 17 Aug 2020 09:32:05 GMT) Full text and rfc822 format available.Message #35 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH 02/10] gnu: dovecot: Patch and provide a static path for module directory. Date: Mon, 17 Aug 2020 11:31:16 +0200
* gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch: New file. * gnu/packages/mail.scm (dovecot)[source]: Use it. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/local.mk | 1 + gnu/packages/mail.scm | 3 +- ...ovecot-use-static-path-for-moduledir.patch | 146 ++++++++++++++++++ 3 files changed, 149 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch diff --git a/gnu/local.mk b/gnu/local.mk index 87bd7094bf..2817deb01f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -900,6 +900,7 @@ dist_patch_DATA = \ %D%/packages/patches/doc++-include-directives.patch \ %D%/packages/patches/doc++-segfault-fix.patch \ %D%/packages/patches/docker-fix-tests.patch \ + %D%/packages/patches/dovecot-use-static-path-for-moduledir.patch \ %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ %D%/packages/patches/doxygen-test.patch \ %D%/packages/patches/doxygen-1.8.17-runtests.patch \ diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 98e75fa90f..8e7d5b2fc1 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1411,7 +1411,8 @@ facilities for checking incoming mail.") (version-major+minor version) "/" "dovecot-" version ".tar.gz")) (sha256 - (base32 "1p5gp8jbavcsaara5mfn5cbrnlxssajnchczbgmmfzr7228fmnfk")))) + (base32 "1p5gp8jbavcsaara5mfn5cbrnlxssajnchczbgmmfzr7228fmnfk")) + (patches (search-patches "dovecot-use-static-path-for-moduledir.patch")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch b/gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch new file mode 100644 index 0000000000..da9f4034f4 --- /dev/null +++ b/gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch @@ -0,0 +1,146 @@ +Subject: [PATCH] Use static path for moduledir. + +Patch was taken from NixOS repo. Make dovecot look for plugins in +/etc/dovecot/modules so we can symlink plugins from several packages +there. + +The rational behind the patch can be found here: +https://dovecot.org/pipermail/dovecot/2013-April/089931.html + +--- + src/auth/main.c | 4 ++-- + src/config/config-parser.c | 2 +- + src/config/config-parser.h | 2 +- + src/dict/main.c | 2 +- + src/doveadm/doveadm-util.c | 4 ++-- + src/lib-fs/fs-api.c | 2 +- + src/lib-ssl-iostream/iostream-ssl.c | 4 ++-- + src/lib-storage/mail-storage-settings.c | 2 +- + 9 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/src/auth/main.c b/src/auth/main.c +index 2dbf9e176..b1e778ab7 100644 +--- a/src/auth/main.c ++++ b/src/auth/main.c +@@ -192,7 +192,7 @@ static void main_preinit(void) + mod_set.debug = global_auth_settings->debug; + mod_set.filter_callback = auth_module_filter; + +- modules = module_dir_load(AUTH_MODULE_DIR, NULL, &mod_set); ++ modules = module_dir_load("/etc/dovecot/modules/auth", NULL, &mod_set); + module_dir_init(modules); + + if (!worker) +@@ -223,7 +223,7 @@ void auth_module_load(const char *names) + mod_set.debug = global_auth_settings->debug; + mod_set.ignore_missing = TRUE; + +- modules = module_dir_load_missing(modules, AUTH_MODULE_DIR, names, ++ modules = module_dir_load_missing(modules, "/etc/dovecot/modules/auth", names, + &mod_set); + module_dir_init(modules); + } +diff --git a/src/config/config-parser.c b/src/config/config-parser.c +index 6894123ea..07e9fecb4 100644 +--- a/src/config/config-parser.c ++++ b/src/config/config-parser.c +@@ -1077,7 +1077,7 @@ void config_parse_load_modules(void) + + i_zero(&mod_set); + mod_set.abi_version = DOVECOT_ABI_VERSION; +- modules = module_dir_load(CONFIG_MODULE_DIR, NULL, &mod_set); ++ modules = module_dir_load("/etc/dovecot/modules/settings", NULL, &mod_set); + module_dir_init(modules); + + i_array_init(&new_roots, 64); +diff --git a/src/config/config-parser.h b/src/config/config-parser.h +index e0a0a5bea..32bd76804 100644 +--- a/src/config/config-parser.h ++++ b/src/config/config-parser.h +@@ -1,7 +1,7 @@ + #ifndef CONFIG_PARSER_H + #define CONFIG_PARSER_H + +-#define CONFIG_MODULE_DIR MODULEDIR"/settings" ++#define CONFIG_MODULE_DIR "/etc/dovecot/modules/settings" + + #define IS_WHITE(c) ((c) == ' ' || (c) == '\t') + +diff --git a/src/dict/main.c b/src/dict/main.c +index 722ed025f..4ed12ae5e 100644 +--- a/src/dict/main.c ++++ b/src/dict/main.c +@@ -104,7 +104,7 @@ static void main_init(void) + mod_set.abi_version = DOVECOT_ABI_VERSION; + mod_set.require_init_funcs = TRUE; + +- modules = module_dir_load(DICT_MODULE_DIR, NULL, &mod_set); ++ modules = module_dir_load("/etc/dovecot/modules/dict", NULL, &mod_set); + module_dir_init(modules); + + /* Register only after loading modules. They may contain SQL drivers, +diff --git a/src/doveadm/doveadm-util.c b/src/doveadm/doveadm-util.c +index a65ef7f72..c19eba06c 100644 +--- a/src/doveadm/doveadm-util.c ++++ b/src/doveadm/doveadm-util.c +@@ -33,7 +33,7 @@ void doveadm_load_modules(void) + mod_set.debug = doveadm_debug; + mod_set.ignore_dlopen_errors = TRUE; + +- modules = module_dir_load_missing(modules, DOVEADM_MODULEDIR, ++ modules = module_dir_load_missing(modules, "/etc/dovecot/modules/doveadm", + NULL, &mod_set); + module_dir_init(modules); + } +@@ -58,7 +58,7 @@ bool doveadm_has_unloaded_plugin(const char *name) + return FALSE; + } + +- dir = opendir(DOVEADM_MODULEDIR); ++ dir = opendir("/etc/dovecot/modules/doveadm"); + if (dir == NULL) + return FALSE; + +diff --git a/src/lib-fs/fs-api.c b/src/lib-fs/fs-api.c +index a939f612d..846cf86e6 100644 +--- a/src/lib-fs/fs-api.c ++++ b/src/lib-fs/fs-api.c +@@ -114,7 +114,7 @@ static void fs_class_try_load_plugin(const char *driver) + mod_set.abi_version = DOVECOT_ABI_VERSION; + mod_set.ignore_missing = TRUE; + +- fs_modules = module_dir_load_missing(fs_modules, MODULE_DIR, ++ fs_modules = module_dir_load_missing(fs_modules, "/etc/dovecot/modules", + module_name, &mod_set); + module_dir_init(fs_modules); + +diff --git a/src/lib-ssl-iostream/iostream-ssl.c b/src/lib-ssl-iostream/iostream-ssl.c +index f62c80d37..900ab46c4 100644 +--- a/src/lib-ssl-iostream/iostream-ssl.c ++++ b/src/lib-ssl-iostream/iostream-ssl.c +@@ -54,8 +54,8 @@ int ssl_module_load(const char **error_r) + mod_set.abi_version = DOVECOT_ABI_VERSION; + mod_set.setting_name = "<built-in lib-ssl-iostream lookup>"; + mod_set.require_init_funcs = TRUE; +- ssl_module = module_dir_load(MODULE_DIR, plugin_name, &mod_set); +- if (module_dir_try_load_missing(&ssl_module, MODULE_DIR, plugin_name, ++ ssl_module = module_dir_load("/etc/dovecot/modules", plugin_name, &mod_set); ++ if (module_dir_try_load_missing(&ssl_module, "/etc/dovecot/modules", plugin_name, + &mod_set, error_r) < 0) + return -1; + module_dir_init(ssl_module); +diff --git a/src/lib-storage/mail-storage-settings.c b/src/lib-storage/mail-storage-settings.c +index b314b529c..705509456 100644 +--- a/src/lib-storage/mail-storage-settings.c ++++ b/src/lib-storage/mail-storage-settings.c +@@ -337,7 +337,7 @@ static const struct mail_user_settings mail_user_default_settings = { + .last_valid_gid = 0, + + .mail_plugins = "", +- .mail_plugin_dir = MODULEDIR, ++ .mail_plugin_dir = "/etc/dovecot/modules", + + .mail_log_prefix = "%s(%u)<%{pid}><%{session}>: ", + +-- +2.27.0 -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 18 Aug 2020 12:01:02 GMT) Full text and rfc822 format available.Message #38 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v2 01/10] gnu: dovecot: Add lucene library to support fts indexing. Date: Tue, 18 Aug 2020 14:00:29 +0200
* gnu/packages/mail.scm (dovecot)[inputs]: Add ice4c and clucene libraries. * gnu/packages/mail.scm (dovecot)[arguments]: Add --with-lucene configuration switch. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/packages/mail.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 6792b9b4a9..98e75fa90f 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -87,6 +87,7 @@ #:use-module (gnu packages guile-xyz) #:use-module (gnu packages flex) #:use-module (gnu packages haskell-xyz) + #:use-module (gnu packages icu4c) #:use-module (gnu packages kerberos) #:use-module (gnu packages libcanberra) #:use-module (gnu packages libevent) @@ -113,6 +114,7 @@ #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) + #:use-module (gnu packages rdf) #:use-module (gnu packages ruby) #:use-module (gnu packages search) #:use-module (gnu packages serialization) @@ -1425,11 +1427,14 @@ facilities for checking incoming mail.") ("lz4" ,lz4) ("openssl" ,openssl) ("sqlite" ,sqlite) - ("zlib" ,zlib))) + ("zlib" ,zlib) + ("icu4c" ,icu4c) + ("clucene" ,clucene))) (arguments `(#:configure-flags '("--sysconfdir=/etc" "--localstatedir=/var" - "--with-sqlite") ; not auto-detected + "--with-sqlite" ; not auto-detected + "--with-lucene") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-file-names -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 18 Aug 2020 12:01:02 GMT) Full text and rfc822 format available.Message #41 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v2 03/10] services: dovecot: Use modules via symlink to system profile. Date: Tue, 18 Aug 2020 14:00:31 +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 <levenson <at> mmer.org> --- doc/guix.texi | 9 +++++++-- gnu/services/mail.scm | 13 ++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e0c138533f..9f803fdbac 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18333,8 +18333,13 @@ Defaults to @samp{"/var/run/dovecot/auth-userdb"}. @end deftypevr @deftypevr {@code{dovecot-configuration} parameter} file-name mail-plugin-dir -Directory where to look up mail plugins. -Defaults to @samp{"/usr/lib/dovecot"}. +Directory where to look up mail plugins. In Guix, dovecot plugins have +all its modules under /gnu/store/xxx-plugin/(lib|libexec)/dovecot. To be +able to load all those modules by doveconf or services like sieve, +@samp{mail-plugin-dir} is a symlink "/run/current-system/profile/lib/dovecot", +which creates during the activation step. + +Defaults to @samp{"/etc/dovecot/modules"}. @end deftypevr @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list mail-plugins diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index cfcaf4601b..2832303d88 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1044,8 +1044,12 @@ directories are prefixed with the chroot directory, append \"/.\" to This is used by imap (for shared users) and lda.") (mail-plugin-dir - (file-name "/usr/lib/dovecot") - "Directory where to look up mail plugins.") + (file-name "/etc/dovecot/modules") + "Directory where to look up mail plugins. In Guix, dovecot plugins have +all its modules under /gnu/store/xxx-plugin/(lib|libexec)/dovecot. To be able +to load all those modules by doveconf or services like imap, +@samp{mail-plugin-dir} is a symlink `/run/current-system/profile/lib/dovecot`, +which creates during the activation step.") (mail-plugins (space-separated-string-list '()) @@ -1519,13 +1523,16 @@ greyed out, instead of only later giving \"not selectable\" popup error. (else (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) "/etc/dovecot/dovecot.conf") (mkdir-p/perms "/etc/dovecot/private" user #o700) + (unless (file-exists? moduledir) + (symlink "/run/current-system/profile/lib/dovecot" moduledir)) (create-self-signed-certificate-if-absent #:private-key "/etc/dovecot/private/default.pem" #:public-key "/etc/dovecot/default.pem" -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 18 Aug 2020 12:01:03 GMT) Full text and rfc822 format available.Message #44 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v2 05/10] services: dovecot: Serialize global settings first. Date: Tue, 18 Aug 2020 14:00:33 +0200
* gnu/services/mail.scm (dovecot-configuration): To avoid dovecot warning messages, move serialization of protocol settings below the global one. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/services/mail.scm | 118 +++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 2832303d88..a3c48bdb99 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -479,64 +479,6 @@ interfaces. If you want to specify non-default ports or anything more complex, customize the address and port fields of the @samp{inet-listener} of the specific services you are interested in.") - (protocols - (protocol-configuration-list - (list (protocol-configuration - (name "imap")))) - "List of protocols we want to serve. Available protocols include -@samp{imap}, @samp{pop3}, and @samp{lmtp}.") - - (services - (service-configuration-list - (list - (service-configuration - (kind "imap-login") - (client-limit 0) - (process-limit 0) - (listeners - (list - (inet-listener-configuration (protocol "imap") (port 143) (ssl? #f)) - (inet-listener-configuration (protocol "imaps") (port 993) (ssl? #t))))) - (service-configuration - (kind "pop3-login") - (listeners - (list - (inet-listener-configuration (protocol "pop3") (port 110) (ssl? #f)) - (inet-listener-configuration (protocol "pop3s") (port 995) (ssl? #t))))) - (service-configuration - (kind "lmtp") - (client-limit 1) - (process-limit 0) - (listeners - (list (unix-listener-configuration (path "lmtp") (mode "0666"))))) - (service-configuration - (kind "imap") - (client-limit 1) - (process-limit 1024)) - (service-configuration - (kind "pop3") - (client-limit 1) - (process-limit 1024)) - (service-configuration - (kind "auth") - (service-count 0) - (client-limit 0) - (process-limit 1) - (listeners - (list (unix-listener-configuration (path "auth-userdb"))))) - (service-configuration - (kind "auth-worker") - (client-limit 1) - (process-limit 0)) - (service-configuration - (kind "dict") - (client-limit 1) - (process-limit 0) - (listeners (list (unix-listener-configuration (path "dict"))))))) - "List of services to enable. Available services include @samp{imap}, -@samp{imap-login}, @samp{pop3}, @samp{pop3-login}, @samp{auth}, and -@samp{lmtp}.") - (dict (dict-configuration (dict-configuration)) "Dict configuration, as created by the @code{dict-configuration} @@ -1434,7 +1376,65 @@ greyed out, instead of only later giving \"not selectable\" popup error. (imap-urlauth-host (string "") - "Host allowed in URLAUTH URLs sent by client. \"*\" allows all.") ) + "Host allowed in URLAUTH URLs sent by client. \"*\" allows all.") + + (protocols + (protocol-configuration-list + (list (protocol-configuration + (name "imap")))) + "List of protocols we want to serve. Available protocols include +@samp{imap}, @samp{pop3}, and @samp{lmtp}.") + + (services + (service-configuration-list + (list + (service-configuration + (kind "imap-login") + (client-limit 0) + (process-limit 0) + (listeners + (list + (inet-listener-configuration (protocol "imap") (port 143) (ssl? #f)) + (inet-listener-configuration (protocol "imaps") (port 993) (ssl? #t))))) + (service-configuration + (kind "pop3-login") + (listeners + (list + (inet-listener-configuration (protocol "pop3") (port 110) (ssl? #f)) + (inet-listener-configuration (protocol "pop3s") (port 995) (ssl? #t))))) + (service-configuration + (kind "lmtp") + (client-limit 1) + (process-limit 0) + (listeners + (list (unix-listener-configuration (path "lmtp") (mode "0666"))))) + (service-configuration + (kind "imap") + (client-limit 1) + (process-limit 1024)) + (service-configuration + (kind "pop3") + (client-limit 1) + (process-limit 1024)) + (service-configuration + (kind "auth") + (service-count 0) + (client-limit 0) + (process-limit 1) + (listeners + (list (unix-listener-configuration (path "auth-userdb"))))) + (service-configuration + (kind "auth-worker") + (client-limit 1) + (process-limit 0)) + (service-configuration + (kind "dict") + (client-limit 1) + (process-limit 0) + (listeners (list (unix-listener-configuration (path "dict"))))))) + "List of services to enable. Available services include @samp{imap}, +@samp{imap-login}, @samp{pop3}, @samp{pop3-login}, @samp{auth}, and +@samp{lmtp}.")) (define-configuration opaque-dovecot-configuration (dovecot -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 18 Aug 2020 12:01:03 GMT) Full text and rfc822 format available.Message #47 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v2 06/10] services: dovecot: Only serialize settings with non-empty values. Date: Tue, 18 Aug 2020 14:00:34 +0200
* gnu/services/mail.scm (serialize-space-separated-string-list): Protocols might have custom settings, which are not supported by other protocols. To prevent dovecot/services from crashing, serialize settings that hold non-empty values only. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/services/mail.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index a3c48bdb99..6e166af2be 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -99,7 +99,9 @@ (and (string? x) (not (string-index x #\space)))) val))) (define (serialize-space-separated-string-list field-name val) - (serialize-field field-name (string-join val " "))) + (match val + (() #f) + (_ (serialize-field field-name (string-join val " "))))) (define (comma-separated-string-list? val) (and (list? val) -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 18 Aug 2020 12:01:03 GMT) Full text and rfc822 format available.Message #50 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v2 04/10] gnu: dovecot-pigeonhole: Add new variable. Date: Tue, 18 Aug 2020 14:00:32 +0200
Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/packages/mail.scm | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 8e7d5b2fc1..25e9570958 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1467,6 +1467,62 @@ It supports mbox/Maildir and its own dbox/mdbox formats.") (license (list license:lgpl2.1 license:expat (license:non-copyleft "file://COPYING"))))) +(define-public dovecot-pigeonhole + (let ((dovecot-version (version-major+minor (package-version dovecot)))) + (package + (name "dovecot-pigeonhole") + (version "0.5.11") + (source + (origin + (method url-fetch) + (uri (string-append "https://pigeonhole.dovecot.org/releases/" + dovecot-version "/" + "dovecot-" dovecot-version "-pigeonhole-" version ".tar.gz")) + (sha256 + (base32 + "1w5mryv6izh1gv7davnl94rb0pvh5bxl2bydzbfla1b83x22m5qb")))) + (build-system gnu-build-system) + (native-inputs + `(("automake" ,automake) + ("autoconf" ,autoconf) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config) + ("gettext" ,gettext-minimal) + ("dovecot" ,dovecot))) + (arguments + `(#:configure-flags + (list "--with-dovecot-install-dirs=no" + (string-append "--with-dovecot=" + (assoc-ref %build-inputs "dovecot") + "/lib/dovecot") + (string-append "--with-moduledir=" + (assoc-ref %outputs "out") + "/lib/dovecot")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-file-names + (lambda _ + (let ((out (assoc-ref %outputs "out"))) + (substitute* "src/managesieve/managesieve-settings.c" + ((".executable = \"managesieve\"") + (string-append ".executable = \"" out "/libexec/dovecot/managesieve\""))) + (substitute* "src/managesieve-login/managesieve-login-settings.c" + ((".executable = \"managesieve-login\"") + (string-append ".executable = \"" out "/libexec/dovecot/managesieve-login\"")))) + #t))))) + (home-page "https://pigeonhole.dovecot.org") + (synopsis "Pigeonhole project provides mail filtering facilities using +the Sieve language") + (description + "@code{dovecot-pigonhole} adds support for the Sieve +language (RFC 5228) and the ManageSieve protocol (RFC 5804) to the +@code{Dovecot} Secure IMAP Server.") + ;; Pigeonhole is open source and distributed under the same + ;; license as Dovecot: LGPL v2.1 + (license (list license:lgpl2.1 + (license:non-copyleft "file://COPYING") + (license:non-copyleft "file://COPYING.LGPL")))))) + (define-public dovecot-trees (package (name "dovecot-trees") -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 18 Aug 2020 12:01:04 GMT) Full text and rfc822 format available.Message #53 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v2 08/10] services: dovecot: Add 'imap-metadata?' protocol configuration option. Date: Tue, 18 Aug 2020 14:00:36 +0200
* gnu/services/mail.scm (protocol-configuration): Define the option to be able to activate the IMAP METADATA commands over the imap protocol. * doc/guix.texi (Mail Services): Document it. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- doc/guix.texi | 11 +++++++++++ gnu/services/mail.scm | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index bbdbdf70e1..5c3e706390 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17513,6 +17513,17 @@ This is used by imap (for shared users) and lda. It defaults to @samp{"/var/run/dovecot/auth-userdb"}. @end deftypevr +@deftypevr {@code{protocol-configuration} parameter} boolean imap-metadata? +Activate the commands of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464,RFC <at> tie{}5464}. + +If activated, a dictionary needs to be configured, via the +@code{mail-attribute-dict} setting. + +Defaults to @samp{#f}. + +@end deftypevr + @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins Space separated list of plugins to load. @end deftypevr diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index d8df5c82e4..ee710303e7 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -348,7 +348,13 @@ This is used by imap (for shared users) and lda.") (mail-max-userip-connections (non-negative-integer 10) "Maximum number of IMAP connections allowed for a user from each IP -address. NOTE: The username is compared case-sensitively.")) +address. NOTE: The username is compared case-sensitively.") + (imap-metadata? + (boolean #f) + "Activate the commands of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. If activated, a +dictionary needs to be configured, via the @code{mail-attribute-dict} +setting.")) (define (serialize-protocol-configuration field-name val) (format #t "protocol ~a {\n" (protocol-configuration-name val)) -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 18 Aug 2020 12:01:04 GMT) Full text and rfc822 format available.Message #56 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v2 07/10] services: dovecot: Add 'mail-attribute-dict' configuration option. Date: Tue, 18 Aug 2020 14:00:35 +0200
* gnu/services/mail.scm (dovecot-configuration): Define 'mail-attribute-dict' directive to support IMAP METADATA extension.: * doc/guix.texi (Mail Services): Document it. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- doc/guix.texi | 15 +++++++++++++++ gnu/services/mail.scm | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 9f803fdbac..bbdbdf70e1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18211,6 +18211,21 @@ could allow a user to delete others' mailboxes, or @code{ln -s @samp{""}. @end deftypevr +@deftypevr {@code{dovecot-configuration} parameter} string mail-attribute-dict +Activate the metadata storage of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464,RFC <at> tie{}5464}. The goal of +the METADATA extension is to provide a means for clients to set and +retrieve 'annotations' or 'metadata' on an IMAP server. The annotations +can be associated with specific mailboxes or the server as a whole. The +server can choose to support only server annotations or both server and +mailbox annotations. For example, a general comment being added to a +mailbox may have an entry name of '/comment' and a value of 'Really +useful mailbox' + +Defaults to @samp{""}. + +@end deftypevr + @deftypevr {@code{dovecot-configuration} parameter} boolean mail-full-filesystem-access? Allow full file system access to clients. There's no access checks other than what the operating system does for the active UID/GID. It diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 6e166af2be..d8df5c82e4 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1130,6 +1130,17 @@ disabled.") @samp{mdbox-rotate-size}. This setting currently works only in Linux with some file systems (ext4, xfs).") + (mail-attribute-dict + (string "") + "Activate the metadata storage of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. The goal of the +METADATA extension is to provide a means for clients to set and retrieve +'annotations' or 'metadata' on an IMAP server. The annotations can be +associated with specific mailboxes or the server as a whole. The server can +choose to support only server annotations or both server and mailbox +annotations. For example, a general comment being added to a mailbox may have +an entry name of '/comment' and a value of 'Really useful mailbox'") + (mail-attachment-dir (string "") "sdbox and mdbox support saving mail attachments to external files, -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 18 Aug 2020 12:01:05 GMT) Full text and rfc822 format available.Message #59 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v2 09/10] services: dovecot: Add 'managesieve-notify-capability' option. Date: Tue, 18 Aug 2020 14:00:37 +0200
* doc/guix.texi (Mail Services): Document it. * gnu/services/mail.scm (protocol-configuration): Define it. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- doc/guix.texi | 9 +++++++++ gnu/services/mail.scm | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 5c3e706390..10d4861c4e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17524,6 +17524,15 @@ Defaults to @samp{#f}. @end deftypevr +@deftypevr {@code{protocol-configuration} parameter} space-separated-string-list managesieve-notify-capabilities +Report notify capabilities by the managesieve service upon a client +connection. If left unassigned, these will be assigned dynamically +according to what the Sieve interpreter supports by default (after login +this may differ depending on the authenticated user). + +Defaults to @samp{()}. +@end deftypevr + @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins Space separated list of plugins to load. @end deftypevr diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index ee710303e7..8b57b42dfe 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -354,7 +354,13 @@ address. NOTE: The username is compared case-sensitively.") "Activate the commands of @code{IMAP METADATA} extension @uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. If activated, a dictionary needs to be configured, via the @code{mail-attribute-dict} -setting.")) +setting.") + (managesieve-notify-capability + (space-separated-string-list '()) + "Report NOTIFY capabilities by the ManageSieve service upon a client +connection. If left unassigned, these will be assigned dynamically +according to what the Sieve interpreter supports by default.")) + (define (serialize-protocol-configuration field-name val) (format #t "protocol ~a {\n" (protocol-configuration-name val)) -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 18 Aug 2020 12:01:05 GMT) Full text and rfc822 format available.Message #62 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v2 02/10] gnu: dovecot: Patch and provide a static path for module directory. Date: Tue, 18 Aug 2020 14:00:30 +0200
* gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch: New file. * gnu/packages/mail.scm (dovecot)[source]: Use it. Signed-off-by: Alexey Abramov <levenson <at> mmer.org> --- gnu/local.mk | 1 + gnu/packages/mail.scm | 3 +- ...ovecot-use-static-path-for-moduledir.patch | 146 ++++++++++++++++++ 3 files changed, 149 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch diff --git a/gnu/local.mk b/gnu/local.mk index 87bd7094bf..2817deb01f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -900,6 +900,7 @@ dist_patch_DATA = \ %D%/packages/patches/doc++-include-directives.patch \ %D%/packages/patches/doc++-segfault-fix.patch \ %D%/packages/patches/docker-fix-tests.patch \ + %D%/packages/patches/dovecot-use-static-path-for-moduledir.patch \ %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ %D%/packages/patches/doxygen-test.patch \ %D%/packages/patches/doxygen-1.8.17-runtests.patch \ diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 98e75fa90f..8e7d5b2fc1 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1411,7 +1411,8 @@ facilities for checking incoming mail.") (version-major+minor version) "/" "dovecot-" version ".tar.gz")) (sha256 - (base32 "1p5gp8jbavcsaara5mfn5cbrnlxssajnchczbgmmfzr7228fmnfk")))) + (base32 "1p5gp8jbavcsaara5mfn5cbrnlxssajnchczbgmmfzr7228fmnfk")) + (patches (search-patches "dovecot-use-static-path-for-moduledir.patch")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch b/gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch new file mode 100644 index 0000000000..da9f4034f4 --- /dev/null +++ b/gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch @@ -0,0 +1,146 @@ +Subject: [PATCH] Use static path for moduledir. + +Patch was taken from NixOS repo. Make dovecot look for plugins in +/etc/dovecot/modules so we can symlink plugins from several packages +there. + +The rational behind the patch can be found here: +https://dovecot.org/pipermail/dovecot/2013-April/089931.html + +--- + src/auth/main.c | 4 ++-- + src/config/config-parser.c | 2 +- + src/config/config-parser.h | 2 +- + src/dict/main.c | 2 +- + src/doveadm/doveadm-util.c | 4 ++-- + src/lib-fs/fs-api.c | 2 +- + src/lib-ssl-iostream/iostream-ssl.c | 4 ++-- + src/lib-storage/mail-storage-settings.c | 2 +- + 9 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/src/auth/main.c b/src/auth/main.c +index 2dbf9e176..b1e778ab7 100644 +--- a/src/auth/main.c ++++ b/src/auth/main.c +@@ -192,7 +192,7 @@ static void main_preinit(void) + mod_set.debug = global_auth_settings->debug; + mod_set.filter_callback = auth_module_filter; + +- modules = module_dir_load(AUTH_MODULE_DIR, NULL, &mod_set); ++ modules = module_dir_load("/etc/dovecot/modules/auth", NULL, &mod_set); + module_dir_init(modules); + + if (!worker) +@@ -223,7 +223,7 @@ void auth_module_load(const char *names) + mod_set.debug = global_auth_settings->debug; + mod_set.ignore_missing = TRUE; + +- modules = module_dir_load_missing(modules, AUTH_MODULE_DIR, names, ++ modules = module_dir_load_missing(modules, "/etc/dovecot/modules/auth", names, + &mod_set); + module_dir_init(modules); + } +diff --git a/src/config/config-parser.c b/src/config/config-parser.c +index 6894123ea..07e9fecb4 100644 +--- a/src/config/config-parser.c ++++ b/src/config/config-parser.c +@@ -1077,7 +1077,7 @@ void config_parse_load_modules(void) + + i_zero(&mod_set); + mod_set.abi_version = DOVECOT_ABI_VERSION; +- modules = module_dir_load(CONFIG_MODULE_DIR, NULL, &mod_set); ++ modules = module_dir_load("/etc/dovecot/modules/settings", NULL, &mod_set); + module_dir_init(modules); + + i_array_init(&new_roots, 64); +diff --git a/src/config/config-parser.h b/src/config/config-parser.h +index e0a0a5bea..32bd76804 100644 +--- a/src/config/config-parser.h ++++ b/src/config/config-parser.h +@@ -1,7 +1,7 @@ + #ifndef CONFIG_PARSER_H + #define CONFIG_PARSER_H + +-#define CONFIG_MODULE_DIR MODULEDIR"/settings" ++#define CONFIG_MODULE_DIR "/etc/dovecot/modules/settings" + + #define IS_WHITE(c) ((c) == ' ' || (c) == '\t') + +diff --git a/src/dict/main.c b/src/dict/main.c +index 722ed025f..4ed12ae5e 100644 +--- a/src/dict/main.c ++++ b/src/dict/main.c +@@ -104,7 +104,7 @@ static void main_init(void) + mod_set.abi_version = DOVECOT_ABI_VERSION; + mod_set.require_init_funcs = TRUE; + +- modules = module_dir_load(DICT_MODULE_DIR, NULL, &mod_set); ++ modules = module_dir_load("/etc/dovecot/modules/dict", NULL, &mod_set); + module_dir_init(modules); + + /* Register only after loading modules. They may contain SQL drivers, +diff --git a/src/doveadm/doveadm-util.c b/src/doveadm/doveadm-util.c +index a65ef7f72..c19eba06c 100644 +--- a/src/doveadm/doveadm-util.c ++++ b/src/doveadm/doveadm-util.c +@@ -33,7 +33,7 @@ void doveadm_load_modules(void) + mod_set.debug = doveadm_debug; + mod_set.ignore_dlopen_errors = TRUE; + +- modules = module_dir_load_missing(modules, DOVEADM_MODULEDIR, ++ modules = module_dir_load_missing(modules, "/etc/dovecot/modules/doveadm", + NULL, &mod_set); + module_dir_init(modules); + } +@@ -58,7 +58,7 @@ bool doveadm_has_unloaded_plugin(const char *name) + return FALSE; + } + +- dir = opendir(DOVEADM_MODULEDIR); ++ dir = opendir("/etc/dovecot/modules/doveadm"); + if (dir == NULL) + return FALSE; + +diff --git a/src/lib-fs/fs-api.c b/src/lib-fs/fs-api.c +index a939f612d..846cf86e6 100644 +--- a/src/lib-fs/fs-api.c ++++ b/src/lib-fs/fs-api.c +@@ -114,7 +114,7 @@ static void fs_class_try_load_plugin(const char *driver) + mod_set.abi_version = DOVECOT_ABI_VERSION; + mod_set.ignore_missing = TRUE; + +- fs_modules = module_dir_load_missing(fs_modules, MODULE_DIR, ++ fs_modules = module_dir_load_missing(fs_modules, "/etc/dovecot/modules", + module_name, &mod_set); + module_dir_init(fs_modules); + +diff --git a/src/lib-ssl-iostream/iostream-ssl.c b/src/lib-ssl-iostream/iostream-ssl.c +index f62c80d37..900ab46c4 100644 +--- a/src/lib-ssl-iostream/iostream-ssl.c ++++ b/src/lib-ssl-iostream/iostream-ssl.c +@@ -54,8 +54,8 @@ int ssl_module_load(const char **error_r) + mod_set.abi_version = DOVECOT_ABI_VERSION; + mod_set.setting_name = "<built-in lib-ssl-iostream lookup>"; + mod_set.require_init_funcs = TRUE; +- ssl_module = module_dir_load(MODULE_DIR, plugin_name, &mod_set); +- if (module_dir_try_load_missing(&ssl_module, MODULE_DIR, plugin_name, ++ ssl_module = module_dir_load("/etc/dovecot/modules", plugin_name, &mod_set); ++ if (module_dir_try_load_missing(&ssl_module, "/etc/dovecot/modules", plugin_name, + &mod_set, error_r) < 0) + return -1; + module_dir_init(ssl_module); +diff --git a/src/lib-storage/mail-storage-settings.c b/src/lib-storage/mail-storage-settings.c +index b314b529c..705509456 100644 +--- a/src/lib-storage/mail-storage-settings.c ++++ b/src/lib-storage/mail-storage-settings.c +@@ -337,7 +337,7 @@ static const struct mail_user_settings mail_user_default_settings = { + .last_valid_gid = 0, + + .mail_plugins = "", +- .mail_plugin_dir = MODULEDIR, ++ .mail_plugin_dir = "/etc/dovecot/modules", + + .mail_log_prefix = "%s(%u)<%{pid}><%{session}>: ", + +-- +2.27.0 -- 2.27.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Wed, 19 Aug 2020 07:43:01 GMT) Full text and rfc822 format available.Message #65 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: Alexey Abramov <levenson <at> mmer.org> Cc: 42899 <at> debbugs.gnu.org Subject: Re: [bug#42899] [PATCH v2 02/10] gnu: dovecot: Patch and provide a static path for module directory. Date: Wed, 19 Aug 2020 10:41:32 +0300
[Message part 1 (text/plain, inline)]
How are all the XXX_MODULE_DIR variables set? Would it be possible to just set MODULE_DIR to /etc/dovecot/modules and leave the others as-is? They seem to just use a file/folder under MODULE_DIR. On Tue, Aug 18, 2020 at 02:00:30PM +0200, Alexey Abramov wrote: > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch: New file. > * gnu/packages/mail.scm (dovecot)[source]: Use it. > > Signed-off-by: Alexey Abramov <levenson <at> mmer.org> > --- > gnu/local.mk | 1 + > gnu/packages/mail.scm | 3 +- > ...ovecot-use-static-path-for-moduledir.patch | 146 ++++++++++++++++++ > 3 files changed, 149 insertions(+), 1 deletion(-) > create mode 100644 gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch > > diff --git a/gnu/local.mk b/gnu/local.mk > index 87bd7094bf..2817deb01f 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -900,6 +900,7 @@ dist_patch_DATA = \ > %D%/packages/patches/doc++-include-directives.patch \ > %D%/packages/patches/doc++-segfault-fix.patch \ > %D%/packages/patches/docker-fix-tests.patch \ > + %D%/packages/patches/dovecot-use-static-path-for-moduledir.patch \ > %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ > %D%/packages/patches/doxygen-test.patch \ > %D%/packages/patches/doxygen-1.8.17-runtests.patch \ > diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm > index 98e75fa90f..8e7d5b2fc1 100644 > --- a/gnu/packages/mail.scm > +++ b/gnu/packages/mail.scm > @@ -1411,7 +1411,8 @@ facilities for checking incoming mail.") > (version-major+minor version) "/" > "dovecot-" version ".tar.gz")) > (sha256 > - (base32 "1p5gp8jbavcsaara5mfn5cbrnlxssajnchczbgmmfzr7228fmnfk")))) > + (base32 "1p5gp8jbavcsaara5mfn5cbrnlxssajnchczbgmmfzr7228fmnfk")) > + (patches (search-patches "dovecot-use-static-path-for-moduledir.patch")))) > (build-system gnu-build-system) > (native-inputs > `(("pkg-config" ,pkg-config))) > diff --git a/gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch b/gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch > new file mode 100644 > index 0000000000..da9f4034f4 > --- /dev/null > +++ b/gnu/packages/patches/dovecot-use-static-path-for-moduledir.patch > @@ -0,0 +1,146 @@ > +Subject: [PATCH] Use static path for moduledir. > + > +Patch was taken from NixOS repo. Make dovecot look for plugins in > +/etc/dovecot/modules so we can symlink plugins from several packages > +there. > + > +The rational behind the patch can be found here: > +https://dovecot.org/pipermail/dovecot/2013-April/089931.html > + > +--- > + src/auth/main.c | 4 ++-- > + src/config/config-parser.c | 2 +- > + src/config/config-parser.h | 2 +- > + src/dict/main.c | 2 +- > + src/doveadm/doveadm-util.c | 4 ++-- > + src/lib-fs/fs-api.c | 2 +- > + src/lib-ssl-iostream/iostream-ssl.c | 4 ++-- > + src/lib-storage/mail-storage-settings.c | 2 +- > + 9 files changed, 12 insertions(+), 12 deletions(-) > + > +diff --git a/src/auth/main.c b/src/auth/main.c > +index 2dbf9e176..b1e778ab7 100644 > +--- a/src/auth/main.c > ++++ b/src/auth/main.c > +@@ -192,7 +192,7 @@ static void main_preinit(void) > + mod_set.debug = global_auth_settings->debug; > + mod_set.filter_callback = auth_module_filter; > + > +- modules = module_dir_load(AUTH_MODULE_DIR, NULL, &mod_set); > ++ modules = module_dir_load("/etc/dovecot/modules/auth", NULL, &mod_set); > + module_dir_init(modules); > + > + if (!worker) > +@@ -223,7 +223,7 @@ void auth_module_load(const char *names) > + mod_set.debug = global_auth_settings->debug; > + mod_set.ignore_missing = TRUE; > + > +- modules = module_dir_load_missing(modules, AUTH_MODULE_DIR, names, > ++ modules = module_dir_load_missing(modules, "/etc/dovecot/modules/auth", names, > + &mod_set); > + module_dir_init(modules); > + } > +diff --git a/src/config/config-parser.c b/src/config/config-parser.c > +index 6894123ea..07e9fecb4 100644 > +--- a/src/config/config-parser.c > ++++ b/src/config/config-parser.c > +@@ -1077,7 +1077,7 @@ void config_parse_load_modules(void) > + > + i_zero(&mod_set); > + mod_set.abi_version = DOVECOT_ABI_VERSION; > +- modules = module_dir_load(CONFIG_MODULE_DIR, NULL, &mod_set); > ++ modules = module_dir_load("/etc/dovecot/modules/settings", NULL, &mod_set); > + module_dir_init(modules); > + > + i_array_init(&new_roots, 64); > +diff --git a/src/config/config-parser.h b/src/config/config-parser.h > +index e0a0a5bea..32bd76804 100644 > +--- a/src/config/config-parser.h > ++++ b/src/config/config-parser.h > +@@ -1,7 +1,7 @@ > + #ifndef CONFIG_PARSER_H > + #define CONFIG_PARSER_H > + > +-#define CONFIG_MODULE_DIR MODULEDIR"/settings" > ++#define CONFIG_MODULE_DIR "/etc/dovecot/modules/settings" > + > + #define IS_WHITE(c) ((c) == ' ' || (c) == '\t') > + > +diff --git a/src/dict/main.c b/src/dict/main.c > +index 722ed025f..4ed12ae5e 100644 > +--- a/src/dict/main.c > ++++ b/src/dict/main.c > +@@ -104,7 +104,7 @@ static void main_init(void) > + mod_set.abi_version = DOVECOT_ABI_VERSION; > + mod_set.require_init_funcs = TRUE; > + > +- modules = module_dir_load(DICT_MODULE_DIR, NULL, &mod_set); > ++ modules = module_dir_load("/etc/dovecot/modules/dict", NULL, &mod_set); > + module_dir_init(modules); > + > + /* Register only after loading modules. They may contain SQL drivers, > +diff --git a/src/doveadm/doveadm-util.c b/src/doveadm/doveadm-util.c > +index a65ef7f72..c19eba06c 100644 > +--- a/src/doveadm/doveadm-util.c > ++++ b/src/doveadm/doveadm-util.c > +@@ -33,7 +33,7 @@ void doveadm_load_modules(void) > + mod_set.debug = doveadm_debug; > + mod_set.ignore_dlopen_errors = TRUE; > + > +- modules = module_dir_load_missing(modules, DOVEADM_MODULEDIR, > ++ modules = module_dir_load_missing(modules, "/etc/dovecot/modules/doveadm", > + NULL, &mod_set); > + module_dir_init(modules); > + } > +@@ -58,7 +58,7 @@ bool doveadm_has_unloaded_plugin(const char *name) > + return FALSE; > + } > + > +- dir = opendir(DOVEADM_MODULEDIR); > ++ dir = opendir("/etc/dovecot/modules/doveadm"); > + if (dir == NULL) > + return FALSE; > + > +diff --git a/src/lib-fs/fs-api.c b/src/lib-fs/fs-api.c > +index a939f612d..846cf86e6 100644 > +--- a/src/lib-fs/fs-api.c > ++++ b/src/lib-fs/fs-api.c > +@@ -114,7 +114,7 @@ static void fs_class_try_load_plugin(const char *driver) > + mod_set.abi_version = DOVECOT_ABI_VERSION; > + mod_set.ignore_missing = TRUE; > + > +- fs_modules = module_dir_load_missing(fs_modules, MODULE_DIR, > ++ fs_modules = module_dir_load_missing(fs_modules, "/etc/dovecot/modules", > + module_name, &mod_set); > + module_dir_init(fs_modules); > + > +diff --git a/src/lib-ssl-iostream/iostream-ssl.c b/src/lib-ssl-iostream/iostream-ssl.c > +index f62c80d37..900ab46c4 100644 > +--- a/src/lib-ssl-iostream/iostream-ssl.c > ++++ b/src/lib-ssl-iostream/iostream-ssl.c > +@@ -54,8 +54,8 @@ int ssl_module_load(const char **error_r) > + mod_set.abi_version = DOVECOT_ABI_VERSION; > + mod_set.setting_name = "<built-in lib-ssl-iostream lookup>"; > + mod_set.require_init_funcs = TRUE; > +- ssl_module = module_dir_load(MODULE_DIR, plugin_name, &mod_set); > +- if (module_dir_try_load_missing(&ssl_module, MODULE_DIR, plugin_name, > ++ ssl_module = module_dir_load("/etc/dovecot/modules", plugin_name, &mod_set); > ++ if (module_dir_try_load_missing(&ssl_module, "/etc/dovecot/modules", plugin_name, > + &mod_set, error_r) < 0) > + return -1; > + module_dir_init(ssl_module); > +diff --git a/src/lib-storage/mail-storage-settings.c b/src/lib-storage/mail-storage-settings.c > +index b314b529c..705509456 100644 > +--- a/src/lib-storage/mail-storage-settings.c > ++++ b/src/lib-storage/mail-storage-settings.c > +@@ -337,7 +337,7 @@ static const struct mail_user_settings mail_user_default_settings = { > + .last_valid_gid = 0, > + > + .mail_plugins = "", > +- .mail_plugin_dir = MODULEDIR, > ++ .mail_plugin_dir = "/etc/dovecot/modules", > + > + .mail_log_prefix = "%s(%u)<%{pid}><%{session}>: ", > + > +-- > +2.27.0 > -- > 2.27.0 > > > > -- Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Wed, 19 Aug 2020 09:45:01 GMT) Full text and rfc822 format available.Message #68 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 42899 <at> debbugs.gnu.org Subject: Re: [bug#42899] [PATCH v2 02/10] gnu: dovecot: Patch and provide a static path for module directory. Date: Wed, 19 Aug 2020 11:44:20 +0200
Hi, Efraim Flashner <efraim <at> flashner.co.il> writes: > How are all the XXX_MODULE_DIR variables set? Would it be possible to > just set MODULE_DIR to /etc/dovecot/modules and leave the others as-is? > They seem to just use a file/folder under MODULE_DIR. They set during compilation time. If I pass it as a configuration option, dovecot will try to install libraries there which won't work. For example: --8<---------------cut here---------------start------------->8--- -*- mode: rg; default-directory: "~/factory/dovecot/" -*- rg started at Wed Aug 19 10:35:00 /gnu/store/cxy9n8aic4c9zd0r372m6b6yzw3dhcyl-ripgrep-12.1.1/bin/rg --color always --colors match:fg:red -n --type-add gn\:\*.gn --type-add gn\:\*.gni --type-add gyp\:\*.gyp --type-add gyp\:\*.gypi --no-heading --type all -e AUTH_MODULE_DIR src/auth/Makefile.am:42: -DAUTH_MODULE_DIR=\""$(auth_moduledir)"\" \ src/auth/main.c:195: modules = module_dir_load(AUTH_MODULE_DIR, NULL, &mod_set); src/auth/main.c:226: modules = module_dir_load_missing(modules, AUTH_MODULE_DIR, names, src/doveadm/doveadm-pw.c:40: modules = module_dir_load_missing(modules, AUTH_MODULE_DIR, NULL, &mod_set); src/doveadm/Makefile.am:28: -DAUTH_MODULE_DIR=\""$(moduledir)/auth"\" \ rg finished (5 matches found) at Wed Aug 19 10:35:00 --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- -*- mode: rg; default-directory: "~/factory/dovecot/" -*- rg started at Wed Aug 19 11:33:25 /gnu/store/cxy9n8aic4c9zd0r372m6b6yzw3dhcyl-ripgrep-12.1.1/bin/rg --color always --colors match:fg:red -n --type-add gn\:\*.gn --type-add gn\:\*.gni --type-add gyp\:\*.gyp --type-add gyp\:\*.gypi --no-heading --type all -e DOVEADM_MODULEDIR src/doveadm/doveadm-util.c:36: modules = module_dir_load_missing(modules, DOVEADM_MODULEDIR, src/doveadm/doveadm-util.c:61: dir = opendir(DOVEADM_MODULEDIR); src/doveadm/Makefile.am:29: -DDOVEADM_MODULEDIR=\""$(doveadm_moduledir)"\" \ rg finished (3 matches found) at Wed Aug 19 11:33:25 --8<---------------cut here---------------end--------------->8--- -- Alexey
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Sun, 23 Aug 2020 20:47:02 GMT) Full text and rfc822 format available.Message #71 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: Alexey Abramov <levenson <at> mmer.org> Cc: 42899 <at> debbugs.gnu.org Subject: Re: [bug#42899] [PATCH v2 02/10] gnu: dovecot: Patch and provide a static path for module directory. Date: Sun, 23 Aug 2020 23:45:35 +0300
[Message part 1 (text/plain, inline)]
On Wed, Aug 19, 2020 at 11:44:20AM +0200, Alexey Abramov wrote: > Hi, > > Efraim Flashner <efraim <at> flashner.co.il> writes: > > > How are all the XXX_MODULE_DIR variables set? Would it be possible to > > just set MODULE_DIR to /etc/dovecot/modules and leave the others as-is? > > They seem to just use a file/folder under MODULE_DIR. > > They set during compilation time. If I pass it as a configuration option, dovecot will try to install libraries there which won't work. This was enough to jog my memory that we have a couple of packages (with services) that have configure flags for one directory and install to %outputs as expected. I came up with the attached patch to make that happen. > > For example: > > --8<---------------cut here---------------start------------->8--- > -*- mode: rg; default-directory: "~/factory/dovecot/" -*- > rg started at Wed Aug 19 10:35:00 > > /gnu/store/cxy9n8aic4c9zd0r372m6b6yzw3dhcyl-ripgrep-12.1.1/bin/rg --color always --colors match:fg:red -n --type-add gn\:\*.gn --type-add gn\:\*.gni --type-add gyp\:\*.gyp --type-add gyp\:\*.gypi --no-heading --type all -e AUTH_MODULE_DIR > > src/auth/Makefile.am:42: -DAUTH_MODULE_DIR=\""$(auth_moduledir)"\" \ > src/auth/main.c:195: modules = module_dir_load(AUTH_MODULE_DIR, NULL, &mod_set); > src/auth/main.c:226: modules = module_dir_load_missing(modules, AUTH_MODULE_DIR, names, > src/doveadm/doveadm-pw.c:40: modules = module_dir_load_missing(modules, AUTH_MODULE_DIR, NULL, &mod_set); > src/doveadm/Makefile.am:28: -DAUTH_MODULE_DIR=\""$(moduledir)/auth"\" \ > > rg finished (5 matches found) at Wed Aug 19 10:35:00 > --8<---------------cut here---------------end--------------->8--- > > --8<---------------cut here---------------start------------->8--- > -*- mode: rg; default-directory: "~/factory/dovecot/" -*- > rg started at Wed Aug 19 11:33:25 > > /gnu/store/cxy9n8aic4c9zd0r372m6b6yzw3dhcyl-ripgrep-12.1.1/bin/rg --color always --colors match:fg:red -n --type-add gn\:\*.gn --type-add gn\:\*.gni --type-add gyp\:\*.gyp --type-add gyp\:\*.gypi --no-heading --type all -e DOVEADM_MODULEDIR > > src/doveadm/doveadm-util.c:36: modules = module_dir_load_missing(modules, DOVEADM_MODULEDIR, > src/doveadm/doveadm-util.c:61: dir = opendir(DOVEADM_MODULEDIR); > src/doveadm/Makefile.am:29: -DDOVEADM_MODULEDIR=\""$(doveadm_moduledir)"\" \ > > rg finished (3 matches found) at Wed Aug 19 11:33:25 > --8<---------------cut here---------------end--------------->8--- > > -- > Alexey -- Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
[0001-gnu-dovecot-Set-moduledir-to-global-directory.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Sun, 23 Aug 2020 21:18:01 GMT) Full text and rfc822 format available.Message #74 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: Alexey Abramov <levenson <at> mmer.org> Cc: 42899 <at> debbugs.gnu.org Subject: Re: [bug#42899] [PATCH v2 04/10] gnu: dovecot-pigeonhole: Add new variable. Date: Mon, 24 Aug 2020 00:16:51 +0300
[Message part 1 (text/plain, inline)]
Make sure you run 'guix lint' on the package, some of the lines are too long. On Tue, Aug 18, 2020 at 02:00:32PM +0200, Alexey Abramov wrote: > Signed-off-by: Alexey Abramov <levenson <at> mmer.org> > --- > gnu/packages/mail.scm | 56 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 56 insertions(+) > > diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm > index 8e7d5b2fc1..25e9570958 100644 > --- a/gnu/packages/mail.scm > +++ b/gnu/packages/mail.scm > @@ -1467,6 +1467,62 @@ It supports mbox/Maildir and its own dbox/mdbox formats.") > (license (list license:lgpl2.1 license:expat > (license:non-copyleft "file://COPYING"))))) > > +(define-public dovecot-pigeonhole > + (let ((dovecot-version (version-major+minor (package-version dovecot)))) > + (package > + (name "dovecot-pigeonhole") > + (version "0.5.11") > + (source > + (origin > + (method url-fetch) > + (uri (string-append "https://pigeonhole.dovecot.org/releases/" > + dovecot-version "/" > + "dovecot-" dovecot-version "-pigeonhole-" version ".tar.gz")) Is there a difference between dovecot-2.3-pigeonhole-0.5.11.tar.gz and dovecot-2.3.11-pigeonhole-0.5.11.tar.gz? > + (sha256 > + (base32 > + "1w5mryv6izh1gv7davnl94rb0pvh5bxl2bydzbfla1b83x22m5qb")))) > + (build-system gnu-build-system) > + (native-inputs > + `(("automake" ,automake) > + ("autoconf" ,autoconf) > + ("libtool" ,libtool) > + ("pkg-config" ,pkg-config) > + ("gettext" ,gettext-minimal) > + ("dovecot" ,dovecot))) it doesn't looke like automake, autoconf, libtool or gettext are necessary here. Also, 'guix gc --references' show a reference to dovecot, so that should go in inputs. > + (arguments > + `(#:configure-flags > + (list "--with-dovecot-install-dirs=no" > + (string-append "--with-dovecot=" > + (assoc-ref %build-inputs "dovecot") > + "/lib/dovecot") > + (string-append "--with-moduledir=" > + (assoc-ref %outputs "out") > + "/lib/dovecot")) > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'patch-file-names > + (lambda _ If you change the lambda to (lambda* (#:key outputs #:allow-other-keys) then you can change the let to (let ((out (assoc-ref outputs "out"))) and it fits better with the code formatting in the rest of Guix. > + (let ((out (assoc-ref %outputs "out"))) > + (substitute* "src/managesieve/managesieve-settings.c" > + ((".executable = \"managesieve\"") > + (string-append ".executable = \"" out "/libexec/dovecot/managesieve\""))) > + (substitute* "src/managesieve-login/managesieve-login-settings.c" > + ((".executable = \"managesieve-login\"") > + (string-append ".executable = \"" out "/libexec/dovecot/managesieve-login\"")))) Some of these lines are too long. We try to wrap them at 80, and the linter complains once it hits 90. If you start a new line after 'out' then it should flow nicely. > + #t))))) > + (home-page "https://pigeonhole.dovecot.org") > + (synopsis "Pigeonhole project provides mail filtering facilities using > +the Sieve language") I would shorten this to 'Mail filtering in Dovecot using the Sieve language' > + (description > + "@code{dovecot-pigonhole} adds support for the Sieve > +language (RFC 5228) and the ManageSieve protocol (RFC 5804) to the > +@code{Dovecot} Secure IMAP Server.") > + ;; Pigeonhole is open source and distributed under the same > + ;; license as Dovecot: LGPL v2.1 > + (license (list license:lgpl2.1 > + (license:non-copyleft "file://COPYING") > + (license:non-copyleft "file://COPYING.LGPL")))))) It looked to me like it was just lgpl2.1 > + > (define-public dovecot-trees > (package > (name "dovecot-trees") > -- > 2.27.0 > > > > -- Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Sun, 23 Aug 2020 21:20:02 GMT) Full text and rfc822 format available.Message #77 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: Alexey Abramov <levenson <at> mmer.org> Cc: 42899 <at> debbugs.gnu.org Subject: Re: [bug#42899] [PATCH v2 01/10] gnu: dovecot: Add lucene library to support fts indexing. Date: Mon, 24 Aug 2020 00:18:40 +0300
[Message part 1 (text/plain, inline)]
I've sorted the added libraries alphabetically and pushed this patch. On Tue, Aug 18, 2020 at 02:00:29PM +0200, Alexey Abramov wrote: > * gnu/packages/mail.scm (dovecot)[inputs]: Add ice4c and clucene libraries. > * gnu/packages/mail.scm (dovecot)[arguments]: Add --with-lucene configuration switch. > > Signed-off-by: Alexey Abramov <levenson <at> mmer.org> > --- > gnu/packages/mail.scm | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm > index 6792b9b4a9..98e75fa90f 100644 > --- a/gnu/packages/mail.scm > +++ b/gnu/packages/mail.scm > @@ -87,6 +87,7 @@ > #:use-module (gnu packages guile-xyz) > #:use-module (gnu packages flex) > #:use-module (gnu packages haskell-xyz) > + #:use-module (gnu packages icu4c) > #:use-module (gnu packages kerberos) > #:use-module (gnu packages libcanberra) > #:use-module (gnu packages libevent) > @@ -113,6 +114,7 @@ > #:use-module (gnu packages python-web) > #:use-module (gnu packages python-xyz) > #:use-module (gnu packages readline) > + #:use-module (gnu packages rdf) > #:use-module (gnu packages ruby) > #:use-module (gnu packages search) > #:use-module (gnu packages serialization) > @@ -1425,11 +1427,14 @@ facilities for checking incoming mail.") > ("lz4" ,lz4) > ("openssl" ,openssl) > ("sqlite" ,sqlite) > - ("zlib" ,zlib))) > + ("zlib" ,zlib) > + ("icu4c" ,icu4c) > + ("clucene" ,clucene))) > (arguments > `(#:configure-flags '("--sysconfdir=/etc" > "--localstatedir=/var" > - "--with-sqlite") ; not auto-detected > + "--with-sqlite" ; not auto-detected > + "--with-lucene") > #:phases > (modify-phases %standard-phases > (add-after 'unpack 'patch-file-names > -- > 2.27.0 > > > > -- Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Sun, 23 Aug 2020 21:24:01 GMT) Full text and rfc822 format available.Message #80 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: Alexey Abramov <levenson <at> mmer.org> Cc: 42899 <at> debbugs.gnu.org Subject: Re: [bug#42899] [PATCH 00/10] Dovecot improvements. Add support for pigeonhole. Date: Mon, 24 Aug 2020 00:23:04 +0300
[Message part 1 (text/plain, inline)]
There's some changes to dovecot and the dovecot service here. I don't use the dovecot service so I don't really feel comfortable reviewing it in depth. I believe some of the others who use the dovecot service will be coming by to test out those bits. -- Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 24 Aug 2020 10:02:02 GMT) Full text and rfc822 format available.Message #83 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 42899 <at> debbugs.gnu.org Subject: Re: [bug#42899] [PATCH v2 02/10] gnu: dovecot: Patch and provide a static path for module directory. Date: Mon, 24 Aug 2020 12:01:37 +0200
Efraim Flashner <efraim <at> flashner.co.il> writes: > On Wed, Aug 19, 2020 at 11:44:20AM +0200, Alexey Abramov wrote: >> Hi, >> >> Efraim Flashner <efraim <at> flashner.co.il> writes: >> >> > How are all the XXX_MODULE_DIR variables set? Would it be possible to >> > just set MODULE_DIR to /etc/dovecot/modules and leave the others as-is? >> > They seem to just use a file/folder under MODULE_DIR. >> >> They set during compilation time. If I pass it as a configuration option, dovecot will try to install libraries there which won't work. > > This was enough to jog my memory that we have a couple of packages (with > services) that have configure flags for one directory and install to > %outputs as expected. I came up with the attached patch to make that > happen. Thank you very much! I have just tested it, and as you might probably know everything works as expected. I will push your updated patch as soon as guys review the services part. -- Alexey
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Mon, 24 Aug 2020 10:48:02 GMT) Full text and rfc822 format available.Message #86 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: Efraim Flashner <efraim <at> flashner.co.il> Cc: 42899 <at> debbugs.gnu.org Subject: Re: [bug#42899] [PATCH v2 04/10] gnu: dovecot-pigeonhole: Add new variable. Date: Mon, 24 Aug 2020 12:47:08 +0200
[Message part 1 (text/plain, inline)]
Efraim Flashner <efraim <at> flashner.co.il> writes: > Make sure you run 'guix lint' on the package, some of the lines are too > long. > [...] > > Is there a difference between dovecot-2.3-pigeonhole-0.5.11.tar.gz and > dovecot-2.3.11-pigeonhole-0.5.11.tar.gz? Hm, I didn't even know that you can download the latter one. I used the URL provided from the [1] Anyways, I have downloaded both of them and did a check. Most of the differences relate to Makefile.in, however I also found that the ChangeLog file from "2.3" is newer then "2.3.11". The latter miss one change. Please see the diff I have attached. So I guess we should use dovecot-2.3-pigeonhole-0.5.11.tar.gz. > [...] > > it doesn't looke like automake, autoconf, libtool or gettext are > necessary here. Also, 'guix gc --references' show a reference to > dovecot, so that should go in inputs. It is indeed not required. I removed native-imports completely and everithing builds OK. I also moved dovecot to inputs, checked 'guix gc --references', but it turned out that it shows dovecot anyways. ,----[ guix gc --references /gnu/store/c6lnlfqh0jxkrz1x8mk7gdpx15iffxqd-dovecot-pigeonhole-0.5.11/ ] | /gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib | /gnu/store/c6lnlfqh0jxkrz1x8mk7gdpx15iffxqd-dovecot-pigeonhole-0.5.11 | /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31 | /gnu/store/hcxpkksmbql6s4al8yy2myr25kh4cic0-openssl-1.1.1g | /gnu/store/mhwawv2afb40xv96mdanr2qlqkj6wh8m-dovecot-2.3.11.3 `---- As I understood, it means that if someone have dovecot and dovecot-pigeonhole installed, and the decide to remove pigeonhole, dovecot will be GCed. Please correct me if am wrong. > [...] > > If you change the lambda to (lambda* (#:key outputs #:allow-other-keys) > then you can change the let to (let ((out (assoc-ref outputs "out"))) > and it fits better with the code formatting in the rest of Guix. Done. > [...] > > Some of these lines are too long. We try to wrap them at 80, and the > linter complains once it hits 90. If you start a new line after 'out' > then it should flow nicely. Done. Yeah, I saw this, but decided that separating the last argument is not that pretty. > [...] > > I would shorten this to 'Mail filtering in Dovecot using the Sieve > language' Done. I am fine with that. As a non native speaker I usually prefer not to touch these kind of things, until I am really sure it can be improved. =) [...] > > It looked to me like it was just lgpl2.1 Sorry, I am not following. I removed the comment I left indeed. Do you mean I should remove (license:non-copyleft "file://COPYING") the part completely? The blob contains both COPYING and COPYING.LGPL so I just copied them both. Footnotes: [1] https://pigeonhole.dovecot.org/download.html -- Alexey
[pigeonhole.2.3-to-2.3.11.diff (text/x-patch, attachment)]
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Wed, 26 Aug 2020 04:24:02 GMT) Full text and rfc822 format available.Message #89 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Tobias Geerinckx-Rice <me <at> tobias.gr> To: Alexey Abramov <levenson <at> mmer.org> Cc: 42899 <at> debbugs.gnu.org, guix-patches <at> gnu.org Subject: Re: [bug#42899] [PATCH 04/10] gnu: dovecot-pigeonhole: Add new variable. Date: Wed, 26 Aug 2020 06:23:25 +0200
[Message part 1 (text/plain, inline)]
Alexey, Alexey Abramov 写道: > Signed-off-by: Alexey Abramov <levenson <at> mmer.org> No need to sign of on your own patches. > +(define-public dovecot-pigeonhole I've applied these patches on my mail server and will enjoy testing them. Thanks! Kind regards, T G-R
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Wed, 26 Aug 2020 04:24:02 GMT) Full text and rfc822 format available.guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 27 Aug 2020 15:19:01 GMT) Full text and rfc822 format available.Message #95 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v3 2/9] services: dovecot: Use modules via symlink to system profile. Date: Thu, 27 Aug 2020 17:17:36 +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. --- doc/guix.texi | 9 +++++++-- gnu/services/mail.scm | 13 ++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 0b79a49814..dfa83c409c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18360,8 +18360,13 @@ Defaults to @samp{"/var/run/dovecot/auth-userdb"}. @end deftypevr @deftypevr {@code{dovecot-configuration} parameter} file-name mail-plugin-dir -Directory where to look up mail plugins. -Defaults to @samp{"/usr/lib/dovecot"}. +Directory where to look up mail plugins. In Guix, dovecot plugins have +all its modules under /gnu/store/xxx-plugin/(lib|libexec)/dovecot. To be +able to load all those modules by doveconf or services like sieve, +@samp{mail-plugin-dir} is a symlink "/run/current-system/profile/lib/dovecot", +which creates during the activation step. + +Defaults to @samp{"/etc/dovecot/modules"}. @end deftypevr @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list mail-plugins diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index cfcaf4601b..2832303d88 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1044,8 +1044,12 @@ directories are prefixed with the chroot directory, append \"/.\" to This is used by imap (for shared users) and lda.") (mail-plugin-dir - (file-name "/usr/lib/dovecot") - "Directory where to look up mail plugins.") + (file-name "/etc/dovecot/modules") + "Directory where to look up mail plugins. In Guix, dovecot plugins have +all its modules under /gnu/store/xxx-plugin/(lib|libexec)/dovecot. To be able +to load all those modules by doveconf or services like imap, +@samp{mail-plugin-dir} is a symlink `/run/current-system/profile/lib/dovecot`, +which creates during the activation step.") (mail-plugins (space-separated-string-list '()) @@ -1519,13 +1523,16 @@ greyed out, instead of only later giving \"not selectable\" popup error. (else (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) "/etc/dovecot/dovecot.conf") (mkdir-p/perms "/etc/dovecot/private" user #o700) + (unless (file-exists? moduledir) + (symlink "/run/current-system/profile/lib/dovecot" moduledir)) (create-self-signed-certificate-if-absent #:private-key "/etc/dovecot/private/default.pem" #:public-key "/etc/dovecot/default.pem" -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 27 Aug 2020 15:19:02 GMT) Full text and rfc822 format available.Message #98 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v3 3/9] gnu: dovecot-pigeonhole: Add new variable. Date: Thu, 27 Aug 2020 17:17:37 +0200
--- gnu/packages/mail.scm | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index c22dd27547..5470144d53 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1481,6 +1481,56 @@ It supports mbox/Maildir and its own dbox/mdbox formats.") (license (list license:lgpl2.1 license:expat (license:non-copyleft "file://COPYING"))))) +(define-public dovecot-pigeonhole + (let ((dovecot-version (version-major+minor (package-version dovecot)))) + (package + (name "dovecot-pigeonhole") + (version "0.5.11") + (source + (origin + (method url-fetch) + (uri (string-append "https://pigeonhole.dovecot.org/releases/" + dovecot-version "/" + "dovecot-" dovecot-version "-pigeonhole-" version ".tar.gz")) + (sha256 + (base32 + "1w5mryv6izh1gv7davnl94rb0pvh5bxl2bydzbfla1b83x22m5qb")))) + (build-system gnu-build-system) + (inputs + `(("dovecot" ,dovecot))) + (arguments + `(#:configure-flags + (list "--with-dovecot-install-dirs=no" + (string-append "--with-dovecot=" + (assoc-ref %build-inputs "dovecot") + "/lib/dovecot") + (string-append "--with-moduledir=" + (assoc-ref %outputs "out") + "/lib/dovecot")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-file-names + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "src/managesieve/managesieve-settings.c" + ((".executable = \"managesieve\"") + (string-append ".executable = \"" out + "/libexec/dovecot/managesieve\""))) + (substitute* "src/managesieve-login/managesieve-login-settings.c" + ((".executable = \"managesieve-login\"") + (string-append ".executable = \"" out + "/libexec/dovecot/managesieve-login\"")))) + #t))))) + (home-page "https://pigeonhole.dovecot.org") + (synopsis "Mail filtering in Dovecot using the Sieve language") + (description + "@code{dovecot-pigonhole} adds support for the Sieve +language (RFC 5228) and the ManageSieve protocol (RFC 5804) to the +@code{Dovecot} Secure IMAP Server.") + (license (list license:lgpl2.1 + (license:non-copyleft "file://COPYING") + (license:non-copyleft "file://COPYING.LGPL")))))) + (define-public dovecot-trees (package (name "dovecot-trees") -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 27 Aug 2020 15:19:02 GMT) Full text and rfc822 format available.Message #101 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH v3 1/9] gnu: dovecot: Set moduledir to global directory. Date: Thu, 27 Aug 2020 17:17:35 +0200
From: Efraim Flashner <efraim <at> flashner.co.il> * gnu/packages/mail.scm (dovecot)[arguments]: Add configure-flag to set moduledir. Adjust custom 'install phase to override moduledir so it successfully installs. --- gnu/packages/mail.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 81dc5b8eec..c22dd27547 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1444,7 +1444,8 @@ facilities for checking incoming mail.") `(#:configure-flags '("--sysconfdir=/etc" "--localstatedir=/var" "--with-sqlite" ; not auto-detected - "--with-lucene") ; not auto-detected + "--with-lucene" ; not auto-detected + "--with-moduledir=/etc/dovecot/modules") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-file-names @@ -1461,9 +1462,13 @@ facilities for checking incoming mail.") (("cat") (which "cat"))) #t)) (replace 'install - (lambda* (#:key make-flags #:allow-other-keys) + (lambda* (#:key outputs make-flags #:allow-other-keys) + ;; The .la files don't like having the moduledir moved. + (for-each delete-file (find-files "." "\\.la")) ;; Simple hack to avoid installing a trivial README in /etc. (apply invoke "make" "install" "sysconfdir=/tmp/bogus" + (string-append "moduledir=" (assoc-ref outputs "out") + "/lib/dovecot") make-flags)))))) (home-page "https://www.dovecot.org") (synopsis "Secure POP3/IMAP server") -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 27 Aug 2020 15:19:03 GMT) Full text and rfc822 format available.Message #104 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v3 7/9] services: dovecot: Add 'imap-metadata?' protocol configuration option. Date: Thu, 27 Aug 2020 17:17:41 +0200
* gnu/services/mail.scm (protocol-configuration): Define the option to be able to activate the IMAP METADATA commands over the imap protocol. * doc/guix.texi (Mail Services): Document it. --- doc/guix.texi | 11 +++++++++++ gnu/services/mail.scm | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index f2124560ae..f46854480b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17540,6 +17540,17 @@ This is used by imap (for shared users) and lda. It defaults to @samp{"/var/run/dovecot/auth-userdb"}. @end deftypevr +@deftypevr {@code{protocol-configuration} parameter} boolean imap-metadata? +Activate the commands of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464,RFC <at> tie{}5464}. + +If activated, a dictionary needs to be configured, via the +@code{mail-attribute-dict} setting. + +Defaults to @samp{#f}. + +@end deftypevr + @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins Space separated list of plugins to load. @end deftypevr diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index d8df5c82e4..ee710303e7 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -348,7 +348,13 @@ This is used by imap (for shared users) and lda.") (mail-max-userip-connections (non-negative-integer 10) "Maximum number of IMAP connections allowed for a user from each IP -address. NOTE: The username is compared case-sensitively.")) +address. NOTE: The username is compared case-sensitively.") + (imap-metadata? + (boolean #f) + "Activate the commands of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. If activated, a +dictionary needs to be configured, via the @code{mail-attribute-dict} +setting.")) (define (serialize-protocol-configuration field-name val) (format #t "protocol ~a {\n" (protocol-configuration-name val)) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 27 Aug 2020 15:19:03 GMT) Full text and rfc822 format available.Message #107 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v3 6/9] services: dovecot: Add 'mail-attribute-dict' configuration option. Date: Thu, 27 Aug 2020 17:17:40 +0200
* gnu/services/mail.scm (dovecot-configuration): Define 'mail-attribute-dict' directive to support IMAP METADATA extension.: * doc/guix.texi (Mail Services): Document it. --- doc/guix.texi | 15 +++++++++++++++ gnu/services/mail.scm | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index dfa83c409c..f2124560ae 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18238,6 +18238,21 @@ could allow a user to delete others' mailboxes, or @code{ln -s @samp{""}. @end deftypevr +@deftypevr {@code{dovecot-configuration} parameter} string mail-attribute-dict +Activate the metadata storage of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464,RFC <at> tie{}5464}. The goal of +the METADATA extension is to provide a means for clients to set and +retrieve 'annotations' or 'metadata' on an IMAP server. The annotations +can be associated with specific mailboxes or the server as a whole. The +server can choose to support only server annotations or both server and +mailbox annotations. For example, a general comment being added to a +mailbox may have an entry name of '/comment' and a value of 'Really +useful mailbox' + +Defaults to @samp{""}. + +@end deftypevr + @deftypevr {@code{dovecot-configuration} parameter} boolean mail-full-filesystem-access? Allow full file system access to clients. There's no access checks other than what the operating system does for the active UID/GID. It diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 6e166af2be..d8df5c82e4 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1130,6 +1130,17 @@ disabled.") @samp{mdbox-rotate-size}. This setting currently works only in Linux with some file systems (ext4, xfs).") + (mail-attribute-dict + (string "") + "Activate the metadata storage of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. The goal of the +METADATA extension is to provide a means for clients to set and retrieve +'annotations' or 'metadata' on an IMAP server. The annotations can be +associated with specific mailboxes or the server as a whole. The server can +choose to support only server annotations or both server and mailbox +annotations. For example, a general comment being added to a mailbox may have +an entry name of '/comment' and a value of 'Really useful mailbox'") + (mail-attachment-dir (string "") "sdbox and mdbox support saving mail attachments to external files, -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 27 Aug 2020 15:19:04 GMT) Full text and rfc822 format available.Message #110 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v3 9/9] services: dovecot: Add 'managesieve-sieve-capability' option. Date: Thu, 27 Aug 2020 17:17:43 +0200
* gnu/services/mail.scm (protocol-configuration): Define it. * doc/guix.texi (Mail Services): Document it. --- doc/guix.texi | 9 +++++++++ gnu/services/mail.scm | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index acccef181f..59377bb678 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17560,6 +17560,15 @@ this may differ depending on the authenticated user). Defaults to @samp{()}. @end deftypevr +@deftypevr {@code{protocol-configuration} parameter} space-separated-string-list managesieve-sieve-capability +Report SIEVE capabilities by the ManageSieve service upon a client +connection. If left unassigned, these will be assigned dynamically +according to what the Sieve interpreter supports by default. + +Defaults to @samp{()}. + +@end deftypevr + @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins Space separated list of plugins to load. @end deftypevr diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 8b57b42dfe..91d7041636 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -359,7 +359,12 @@ setting.") (space-separated-string-list '()) "Report NOTIFY capabilities by the ManageSieve service upon a client connection. If left unassigned, these will be assigned dynamically -according to what the Sieve interpreter supports by default.")) +according to what the Sieve interpreter supports by default.") + (managesieve-sieve-capability + (space-separated-string-list '()) + "Report SIEVE capabilities by the ManageSieve service upon a client ++connection. If left unassigned, these will be assigned dynamically ++according to what the Sieve interpreter supports by default.")) (define (serialize-protocol-configuration field-name val) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 27 Aug 2020 15:19:04 GMT) Full text and rfc822 format available.Message #113 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v3 8/9] services: dovecot: Add 'managesieve-notify-capability' option. Date: Thu, 27 Aug 2020 17:17:42 +0200
* doc/guix.texi (Mail Services): Document it. * gnu/services/mail.scm (protocol-configuration): Define it. --- doc/guix.texi | 9 +++++++++ gnu/services/mail.scm | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index f46854480b..acccef181f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17551,6 +17551,15 @@ Defaults to @samp{#f}. @end deftypevr +@deftypevr {@code{protocol-configuration} parameter} space-separated-string-list managesieve-notify-capabilities +Report notify capabilities by the managesieve service upon a client +connection. If left unassigned, these will be assigned dynamically +according to what the Sieve interpreter supports by default (after login +this may differ depending on the authenticated user). + +Defaults to @samp{()}. +@end deftypevr + @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins Space separated list of plugins to load. @end deftypevr diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index ee710303e7..8b57b42dfe 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -354,7 +354,13 @@ address. NOTE: The username is compared case-sensitively.") "Activate the commands of @code{IMAP METADATA} extension @uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. If activated, a dictionary needs to be configured, via the @code{mail-attribute-dict} -setting.")) +setting.") + (managesieve-notify-capability + (space-separated-string-list '()) + "Report NOTIFY capabilities by the ManageSieve service upon a client +connection. If left unassigned, these will be assigned dynamically +according to what the Sieve interpreter supports by default.")) + (define (serialize-protocol-configuration field-name val) (format #t "protocol ~a {\n" (protocol-configuration-name val)) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 27 Aug 2020 15:19:04 GMT) Full text and rfc822 format available.Message #116 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v3 5/9] services: dovecot: Only serialize settings with non-empty values. Date: Thu, 27 Aug 2020 17:17:39 +0200
* gnu/services/mail.scm (serialize-space-separated-string-list): Protocols might have custom settings, which are not supported by other protocols. To prevent dovecot/services from crashing, serialize settings that hold non-empty values only. --- gnu/services/mail.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index a3c48bdb99..6e166af2be 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -99,7 +99,9 @@ (and (string? x) (not (string-index x #\space)))) val))) (define (serialize-space-separated-string-list field-name val) - (serialize-field field-name (string-join val " "))) + (match val + (() #f) + (_ (serialize-field field-name (string-join val " "))))) (define (comma-separated-string-list? val) (and (list? val) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 27 Aug 2020 15:19:05 GMT) Full text and rfc822 format available.Message #119 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v3 4/9] services: dovecot: Serialize global settings first. Date: Thu, 27 Aug 2020 17:17:38 +0200
* gnu/services/mail.scm (dovecot-configuration): To avoid dovecot warning messages, move serialization of protocol settings below the global one. --- gnu/services/mail.scm | 118 +++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 2832303d88..a3c48bdb99 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -479,64 +479,6 @@ interfaces. If you want to specify non-default ports or anything more complex, customize the address and port fields of the @samp{inet-listener} of the specific services you are interested in.") - (protocols - (protocol-configuration-list - (list (protocol-configuration - (name "imap")))) - "List of protocols we want to serve. Available protocols include -@samp{imap}, @samp{pop3}, and @samp{lmtp}.") - - (services - (service-configuration-list - (list - (service-configuration - (kind "imap-login") - (client-limit 0) - (process-limit 0) - (listeners - (list - (inet-listener-configuration (protocol "imap") (port 143) (ssl? #f)) - (inet-listener-configuration (protocol "imaps") (port 993) (ssl? #t))))) - (service-configuration - (kind "pop3-login") - (listeners - (list - (inet-listener-configuration (protocol "pop3") (port 110) (ssl? #f)) - (inet-listener-configuration (protocol "pop3s") (port 995) (ssl? #t))))) - (service-configuration - (kind "lmtp") - (client-limit 1) - (process-limit 0) - (listeners - (list (unix-listener-configuration (path "lmtp") (mode "0666"))))) - (service-configuration - (kind "imap") - (client-limit 1) - (process-limit 1024)) - (service-configuration - (kind "pop3") - (client-limit 1) - (process-limit 1024)) - (service-configuration - (kind "auth") - (service-count 0) - (client-limit 0) - (process-limit 1) - (listeners - (list (unix-listener-configuration (path "auth-userdb"))))) - (service-configuration - (kind "auth-worker") - (client-limit 1) - (process-limit 0)) - (service-configuration - (kind "dict") - (client-limit 1) - (process-limit 0) - (listeners (list (unix-listener-configuration (path "dict"))))))) - "List of services to enable. Available services include @samp{imap}, -@samp{imap-login}, @samp{pop3}, @samp{pop3-login}, @samp{auth}, and -@samp{lmtp}.") - (dict (dict-configuration (dict-configuration)) "Dict configuration, as created by the @code{dict-configuration} @@ -1434,7 +1376,65 @@ greyed out, instead of only later giving \"not selectable\" popup error. (imap-urlauth-host (string "") - "Host allowed in URLAUTH URLs sent by client. \"*\" allows all.") ) + "Host allowed in URLAUTH URLs sent by client. \"*\" allows all.") + + (protocols + (protocol-configuration-list + (list (protocol-configuration + (name "imap")))) + "List of protocols we want to serve. Available protocols include +@samp{imap}, @samp{pop3}, and @samp{lmtp}.") + + (services + (service-configuration-list + (list + (service-configuration + (kind "imap-login") + (client-limit 0) + (process-limit 0) + (listeners + (list + (inet-listener-configuration (protocol "imap") (port 143) (ssl? #f)) + (inet-listener-configuration (protocol "imaps") (port 993) (ssl? #t))))) + (service-configuration + (kind "pop3-login") + (listeners + (list + (inet-listener-configuration (protocol "pop3") (port 110) (ssl? #f)) + (inet-listener-configuration (protocol "pop3s") (port 995) (ssl? #t))))) + (service-configuration + (kind "lmtp") + (client-limit 1) + (process-limit 0) + (listeners + (list (unix-listener-configuration (path "lmtp") (mode "0666"))))) + (service-configuration + (kind "imap") + (client-limit 1) + (process-limit 1024)) + (service-configuration + (kind "pop3") + (client-limit 1) + (process-limit 1024)) + (service-configuration + (kind "auth") + (service-count 0) + (client-limit 0) + (process-limit 1) + (listeners + (list (unix-listener-configuration (path "auth-userdb"))))) + (service-configuration + (kind "auth-worker") + (client-limit 1) + (process-limit 0)) + (service-configuration + (kind "dict") + (client-limit 1) + (process-limit 0) + (listeners (list (unix-listener-configuration (path "dict"))))))) + "List of services to enable. Available services include @samp{imap}, +@samp{imap-login}, @samp{pop3}, @samp{pop3-login}, @samp{auth}, and +@samp{lmtp}.")) (define-configuration opaque-dovecot-configuration (dovecot -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 08 Sep 2020 13:52:01 GMT) Full text and rfc822 format available.Message #122 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: guix-devel <at> gnu.org Cc: 42899 <at> debbugs.gnu.org Subject: [PATCH v4 0/8] Dovecot and pigeonhole improvements. Date: Tue, 8 Sep 2020 15:51:06 +0200
Hi Guix, I have been a happy user of dovecot+pigeonhole for a few weeks now. I am adding @guix-devel to give these changes more attention. dovecot-pigeonhole is already merged, Thank you Tobias. The next step is to provide some common location where dovecot services can find plugins and their settings. I created /etc/dovecot/modules directory, which is actually a link to "/run/current-system/profile/lib/dovecot" and it is creating during the activation time. By doing this we can make sure, that all dovecot services, those which come with dovecot, can find extensions like sieve/managesieve and their extra settings. I am using mbsync for my email synchronization. And use the following snippet for my IMAPAccount/IMAPStore. --8<---------------cut here---------------start------------->8--- IMAPAccount current-user Host localhost User aabramov Tunnel /run/current-system/profile/libexec/dovecot/imap IMAPStore current-user Account current-user --8<---------------cut here---------------end--------------->8--- I noticed that when I run imap this way, it reads dovecot configuration, and if some global (dovecot) settings are defined below the service ones, I get a lot of warning message that they won't affect those, and I should move them above in order to make them work. That is why I changed the order of serialization. I also added some extra settings to the configuration, but those are not for all the services. If you don't apply any values to them, they are still serialized to every service, hence services are crashing with a fatal error. I added a change that will prevent it. I have rebased my changes and provide v4 series of patches. Please let me know what you think. Alexey Abramov (7): services: dovecot: Use modules via symlink to system profile. services: dovecot: Serialize global settings first. services: dovecot: Only serialize settings with non-empty values. services: dovecot: Add 'mail-attribute-dict' configuration option. services: dovecot: Add 'imap-metadata?' protocol configuration option. services: dovecot: Add 'managesieve-notify-capability' option. services: dovecot: Add 'managesieve-sieve-capability' option. Efraim Flashner (1): gnu: dovecot: Set moduledir to global directory. doc/guix.texi | 53 +++++++++++++- gnu/packages/mail.scm | 9 ++- gnu/services/mail.scm | 165 ++++++++++++++++++++++++++---------------- 3 files changed, 159 insertions(+), 68 deletions(-) -- Alexey
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 08 Sep 2020 13:54:02 GMT) Full text and rfc822 format available.Message #125 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v4 2/8] services: dovecot: Use modules via symlink to system profile. Date: Tue, 8 Sep 2020 15:53:42 +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. --- doc/guix.texi | 9 +++++++-- gnu/services/mail.scm | 13 ++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f224e356bc..61b65db35b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18613,8 +18613,13 @@ Defaults to @samp{"/var/run/dovecot/auth-userdb"}. @end deftypevr @deftypevr {@code{dovecot-configuration} parameter} file-name mail-plugin-dir -Directory where to look up mail plugins. -Defaults to @samp{"/usr/lib/dovecot"}. +Directory where to look up mail plugins. In Guix, dovecot plugins have +all its modules under /gnu/store/xxx-plugin/(lib|libexec)/dovecot. To be +able to load all those modules by doveconf or services like sieve, +@samp{mail-plugin-dir} is a symlink "/run/current-system/profile/lib/dovecot", +which creates during the activation step. + +Defaults to @samp{"/etc/dovecot/modules"}. @end deftypevr @deftypevr {@code{dovecot-configuration} parameter} space-separated-string-list mail-plugins diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index cfcaf4601b..2832303d88 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1044,8 +1044,12 @@ directories are prefixed with the chroot directory, append \"/.\" to This is used by imap (for shared users) and lda.") (mail-plugin-dir - (file-name "/usr/lib/dovecot") - "Directory where to look up mail plugins.") + (file-name "/etc/dovecot/modules") + "Directory where to look up mail plugins. In Guix, dovecot plugins have +all its modules under /gnu/store/xxx-plugin/(lib|libexec)/dovecot. To be able +to load all those modules by doveconf or services like imap, +@samp{mail-plugin-dir} is a symlink `/run/current-system/profile/lib/dovecot`, +which creates during the activation step.") (mail-plugins (space-separated-string-list '()) @@ -1519,13 +1523,16 @@ greyed out, instead of only later giving \"not selectable\" popup error. (else (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) "/etc/dovecot/dovecot.conf") (mkdir-p/perms "/etc/dovecot/private" user #o700) + (unless (file-exists? moduledir) + (symlink "/run/current-system/profile/lib/dovecot" moduledir)) (create-self-signed-certificate-if-absent #:private-key "/etc/dovecot/private/default.pem" #:public-key "/etc/dovecot/default.pem" -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 08 Sep 2020 13:54:02 GMT) Full text and rfc822 format available.Message #128 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH v4 1/8] gnu: dovecot: Set moduledir to global directory. Date: Tue, 8 Sep 2020 15:53:41 +0200
From: Efraim Flashner <efraim <at> flashner.co.il> * gnu/packages/mail.scm (dovecot)[arguments]: Add configure-flag to set moduledir. Adjust custom 'install phase to override moduledir so it successfully installs. --- gnu/packages/mail.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index beee68c67d..6068736508 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1460,7 +1460,8 @@ facilities for checking incoming mail.") `(#:configure-flags '("--sysconfdir=/etc" "--localstatedir=/var" "--with-sqlite" ; not auto-detected - "--with-lucene") ; not auto-detected + "--with-lucene" ; not auto-detected + "--with-moduledir=/etc/dovecot/modules") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-file-names @@ -1477,9 +1478,13 @@ facilities for checking incoming mail.") (("cat") (which "cat"))) #t)) (replace 'install - (lambda* (#:key make-flags #:allow-other-keys) + (lambda* (#:key outputs make-flags #:allow-other-keys) + ;; The .la files don't like having the moduledir moved. + (for-each delete-file (find-files "." "\\.la")) ;; Simple hack to avoid installing a trivial README in /etc. (apply invoke "make" "install" "sysconfdir=/tmp/bogus" + (string-append "moduledir=" (assoc-ref outputs "out") + "/lib/dovecot") make-flags)))))) (home-page "https://www.dovecot.org") (synopsis "Secure POP3/IMAP server") -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 08 Sep 2020 13:55:02 GMT) Full text and rfc822 format available.Message #131 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v4 3/8] services: dovecot: Serialize global settings first. Date: Tue, 8 Sep 2020 15:53:43 +0200
* gnu/services/mail.scm (dovecot-configuration): To avoid dovecot warning messages, move serialization of protocol settings below the global one. --- gnu/services/mail.scm | 118 +++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 2832303d88..a3c48bdb99 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -479,64 +479,6 @@ interfaces. If you want to specify non-default ports or anything more complex, customize the address and port fields of the @samp{inet-listener} of the specific services you are interested in.") - (protocols - (protocol-configuration-list - (list (protocol-configuration - (name "imap")))) - "List of protocols we want to serve. Available protocols include -@samp{imap}, @samp{pop3}, and @samp{lmtp}.") - - (services - (service-configuration-list - (list - (service-configuration - (kind "imap-login") - (client-limit 0) - (process-limit 0) - (listeners - (list - (inet-listener-configuration (protocol "imap") (port 143) (ssl? #f)) - (inet-listener-configuration (protocol "imaps") (port 993) (ssl? #t))))) - (service-configuration - (kind "pop3-login") - (listeners - (list - (inet-listener-configuration (protocol "pop3") (port 110) (ssl? #f)) - (inet-listener-configuration (protocol "pop3s") (port 995) (ssl? #t))))) - (service-configuration - (kind "lmtp") - (client-limit 1) - (process-limit 0) - (listeners - (list (unix-listener-configuration (path "lmtp") (mode "0666"))))) - (service-configuration - (kind "imap") - (client-limit 1) - (process-limit 1024)) - (service-configuration - (kind "pop3") - (client-limit 1) - (process-limit 1024)) - (service-configuration - (kind "auth") - (service-count 0) - (client-limit 0) - (process-limit 1) - (listeners - (list (unix-listener-configuration (path "auth-userdb"))))) - (service-configuration - (kind "auth-worker") - (client-limit 1) - (process-limit 0)) - (service-configuration - (kind "dict") - (client-limit 1) - (process-limit 0) - (listeners (list (unix-listener-configuration (path "dict"))))))) - "List of services to enable. Available services include @samp{imap}, -@samp{imap-login}, @samp{pop3}, @samp{pop3-login}, @samp{auth}, and -@samp{lmtp}.") - (dict (dict-configuration (dict-configuration)) "Dict configuration, as created by the @code{dict-configuration} @@ -1434,7 +1376,65 @@ greyed out, instead of only later giving \"not selectable\" popup error. (imap-urlauth-host (string "") - "Host allowed in URLAUTH URLs sent by client. \"*\" allows all.") ) + "Host allowed in URLAUTH URLs sent by client. \"*\" allows all.") + + (protocols + (protocol-configuration-list + (list (protocol-configuration + (name "imap")))) + "List of protocols we want to serve. Available protocols include +@samp{imap}, @samp{pop3}, and @samp{lmtp}.") + + (services + (service-configuration-list + (list + (service-configuration + (kind "imap-login") + (client-limit 0) + (process-limit 0) + (listeners + (list + (inet-listener-configuration (protocol "imap") (port 143) (ssl? #f)) + (inet-listener-configuration (protocol "imaps") (port 993) (ssl? #t))))) + (service-configuration + (kind "pop3-login") + (listeners + (list + (inet-listener-configuration (protocol "pop3") (port 110) (ssl? #f)) + (inet-listener-configuration (protocol "pop3s") (port 995) (ssl? #t))))) + (service-configuration + (kind "lmtp") + (client-limit 1) + (process-limit 0) + (listeners + (list (unix-listener-configuration (path "lmtp") (mode "0666"))))) + (service-configuration + (kind "imap") + (client-limit 1) + (process-limit 1024)) + (service-configuration + (kind "pop3") + (client-limit 1) + (process-limit 1024)) + (service-configuration + (kind "auth") + (service-count 0) + (client-limit 0) + (process-limit 1) + (listeners + (list (unix-listener-configuration (path "auth-userdb"))))) + (service-configuration + (kind "auth-worker") + (client-limit 1) + (process-limit 0)) + (service-configuration + (kind "dict") + (client-limit 1) + (process-limit 0) + (listeners (list (unix-listener-configuration (path "dict"))))))) + "List of services to enable. Available services include @samp{imap}, +@samp{imap-login}, @samp{pop3}, @samp{pop3-login}, @samp{auth}, and +@samp{lmtp}.")) (define-configuration opaque-dovecot-configuration (dovecot -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 08 Sep 2020 13:55:02 GMT) Full text and rfc822 format available.Message #134 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v4 4/8] services: dovecot: Only serialize settings with non-empty values. Date: Tue, 8 Sep 2020 15:53:44 +0200
* gnu/services/mail.scm (serialize-space-separated-string-list): Protocols might have custom settings, which are not supported by other protocols. To prevent dovecot/services from crashing, serialize settings that hold non-empty values only. --- gnu/services/mail.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index a3c48bdb99..6e166af2be 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -99,7 +99,9 @@ (and (string? x) (not (string-index x #\space)))) val))) (define (serialize-space-separated-string-list field-name val) - (serialize-field field-name (string-join val " "))) + (match val + (() #f) + (_ (serialize-field field-name (string-join val " "))))) (define (comma-separated-string-list? val) (and (list? val) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 08 Sep 2020 13:55:03 GMT) Full text and rfc822 format available.Message #137 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v4 5/8] services: dovecot: Add 'mail-attribute-dict' configuration option. Date: Tue, 8 Sep 2020 15:53:45 +0200
* gnu/services/mail.scm (dovecot-configuration): Define 'mail-attribute-dict' directive to support IMAP METADATA extension.: * doc/guix.texi (Mail Services): Document it. --- doc/guix.texi | 15 +++++++++++++++ gnu/services/mail.scm | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 61b65db35b..6d6912febf 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18491,6 +18491,21 @@ could allow a user to delete others' mailboxes, or @code{ln -s @samp{""}. @end deftypevr +@deftypevr {@code{dovecot-configuration} parameter} string mail-attribute-dict +Activate the metadata storage of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464,RFC <at> tie{}5464}. The goal of +the METADATA extension is to provide a means for clients to set and +retrieve 'annotations' or 'metadata' on an IMAP server. The annotations +can be associated with specific mailboxes or the server as a whole. The +server can choose to support only server annotations or both server and +mailbox annotations. For example, a general comment being added to a +mailbox may have an entry name of '/comment' and a value of 'Really +useful mailbox' + +Defaults to @samp{""}. + +@end deftypevr + @deftypevr {@code{dovecot-configuration} parameter} boolean mail-full-filesystem-access? Allow full file system access to clients. There's no access checks other than what the operating system does for the active UID/GID. It diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 6e166af2be..d8df5c82e4 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1130,6 +1130,17 @@ disabled.") @samp{mdbox-rotate-size}. This setting currently works only in Linux with some file systems (ext4, xfs).") + (mail-attribute-dict + (string "") + "Activate the metadata storage of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. The goal of the +METADATA extension is to provide a means for clients to set and retrieve +'annotations' or 'metadata' on an IMAP server. The annotations can be +associated with specific mailboxes or the server as a whole. The server can +choose to support only server annotations or both server and mailbox +annotations. For example, a general comment being added to a mailbox may have +an entry name of '/comment' and a value of 'Really useful mailbox'") + (mail-attachment-dir (string "") "sdbox and mdbox support saving mail attachments to external files, -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 08 Sep 2020 13:55:03 GMT) Full text and rfc822 format available.Message #140 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v4 6/8] services: dovecot: Add 'imap-metadata?' protocol configuration option. Date: Tue, 8 Sep 2020 15:53:46 +0200
* gnu/services/mail.scm (protocol-configuration): Define the option to be able to activate the IMAP METADATA commands over the imap protocol. * doc/guix.texi (Mail Services): Document it. --- doc/guix.texi | 11 +++++++++++ gnu/services/mail.scm | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6d6912febf..e5c1d9d2f2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17793,6 +17793,17 @@ This is used by imap (for shared users) and lda. It defaults to @samp{"/var/run/dovecot/auth-userdb"}. @end deftypevr +@deftypevr {@code{protocol-configuration} parameter} boolean imap-metadata? +Activate the commands of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464,RFC <at> tie{}5464}. + +If activated, a dictionary needs to be configured, via the +@code{mail-attribute-dict} setting. + +Defaults to @samp{#f}. + +@end deftypevr + @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins Space separated list of plugins to load. @end deftypevr diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index d8df5c82e4..ee710303e7 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -348,7 +348,13 @@ This is used by imap (for shared users) and lda.") (mail-max-userip-connections (non-negative-integer 10) "Maximum number of IMAP connections allowed for a user from each IP -address. NOTE: The username is compared case-sensitively.")) +address. NOTE: The username is compared case-sensitively.") + (imap-metadata? + (boolean #f) + "Activate the commands of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. If activated, a +dictionary needs to be configured, via the @code{mail-attribute-dict} +setting.")) (define (serialize-protocol-configuration field-name val) (format #t "protocol ~a {\n" (protocol-configuration-name val)) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 08 Sep 2020 13:55:04 GMT) Full text and rfc822 format available.Message #143 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v4 7/8] services: dovecot: Add 'managesieve-notify-capability' option. Date: Tue, 8 Sep 2020 15:53:47 +0200
* doc/guix.texi (Mail Services): Document it. * gnu/services/mail.scm (protocol-configuration): Define it. --- doc/guix.texi | 9 +++++++++ gnu/services/mail.scm | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index e5c1d9d2f2..8c41a22652 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17804,6 +17804,15 @@ Defaults to @samp{#f}. @end deftypevr +@deftypevr {@code{protocol-configuration} parameter} space-separated-string-list managesieve-notify-capabilities +Report notify capabilities by the managesieve service upon a client +connection. If left unassigned, these will be assigned dynamically +according to what the Sieve interpreter supports by default (after login +this may differ depending on the authenticated user). + +Defaults to @samp{()}. +@end deftypevr + @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins Space separated list of plugins to load. @end deftypevr diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index ee710303e7..8b57b42dfe 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -354,7 +354,13 @@ address. NOTE: The username is compared case-sensitively.") "Activate the commands of @code{IMAP METADATA} extension @uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. If activated, a dictionary needs to be configured, via the @code{mail-attribute-dict} -setting.")) +setting.") + (managesieve-notify-capability + (space-separated-string-list '()) + "Report NOTIFY capabilities by the ManageSieve service upon a client +connection. If left unassigned, these will be assigned dynamically +according to what the Sieve interpreter supports by default.")) + (define (serialize-protocol-configuration field-name val) (format #t "protocol ~a {\n" (protocol-configuration-name val)) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 08 Sep 2020 13:55:04 GMT) Full text and rfc822 format available.Message #146 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v4 8/8] services: dovecot: Add 'managesieve-sieve-capability' option. Date: Tue, 8 Sep 2020 15:53:48 +0200
* gnu/services/mail.scm (protocol-configuration): Define it. * doc/guix.texi (Mail Services): Document it. --- doc/guix.texi | 9 +++++++++ gnu/services/mail.scm | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 8c41a22652..d28e7c1b5f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17813,6 +17813,15 @@ this may differ depending on the authenticated user). Defaults to @samp{()}. @end deftypevr +@deftypevr {@code{protocol-configuration} parameter} space-separated-string-list managesieve-sieve-capability +Report SIEVE capabilities by the ManageSieve service upon a client +connection. If left unassigned, these will be assigned dynamically +according to what the Sieve interpreter supports by default. + +Defaults to @samp{()}. + +@end deftypevr + @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins Space separated list of plugins to load. @end deftypevr diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 8b57b42dfe..91d7041636 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -359,7 +359,12 @@ setting.") (space-separated-string-list '()) "Report NOTIFY capabilities by the ManageSieve service upon a client connection. If left unassigned, these will be assigned dynamically -according to what the Sieve interpreter supports by default.")) +according to what the Sieve interpreter supports by default.") + (managesieve-sieve-capability + (space-separated-string-list '()) + "Report SIEVE capabilities by the ManageSieve service upon a client ++connection. If left unassigned, these will be assigned dynamically ++according to what the Sieve interpreter supports by default.")) (define (serialize-protocol-configuration field-name val) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 08 Sep 2020 14:03:02 GMT) Full text and rfc822 format available.Message #149 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Tobias Geerinckx-Rice <me <at> tobias.gr> To: Alexey Abramov <levenson <at> mmer.org> Cc: 42899 <at> debbugs.gnu.org Subject: Re: [bug#42899] [PATCH v4 1/8] gnu: dovecot: Set moduledir to global directory. Date: Tue, 08 Sep 2020 14:03:28 +0000
Alexey, On 2020-09-08 13:53, Alexey Abramov wrote: > v4 Thanks! What's changed in v4? I've been running a Dovecot with your outstanding patches for a week now, with 0 angry users; I'll review & try to push them later today. Kind regards, T G-R Sent from a Web browser. Excuse or enjoy my brevity.
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 08 Sep 2020 14:22:01 GMT) Full text and rfc822 format available.Message #152 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: Tobias Geerinckx-Rice <me <at> tobias.gr> Cc: 42899 <at> debbugs.gnu.org Subject: Re: [bug#42899] [PATCH v4 1/8] gnu: dovecot: Set moduledir to global directory. Date: Tue, 08 Sep 2020 16:21:14 +0200
Hi, Tobias Geerinckx-Rice <me <at> tobias.gr> writes: > Alexey, > > On 2020-09-08 13:53, Alexey Abramov wrote: >> v4 > > Thanks! What's changed in v4? > > I've been running a Dovecot with your outstanding patches for a week > now, with 0 angry users; I'll review & try to push them later today. That was quick, thanks! Glad to hear everything is OK. Well, this time I sent a cover letter to a guix-devel only for some reason. =( I described the changes in general. V4 doesn't have anything new. I just rebase v3 and provide v4 to let you guys apply/merge/work with them easier. Well, at least, I think it would be easier. -- Alexey
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 20 Oct 2020 15:08:01 GMT) Full text and rfc822 format available.Message #155 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v5 0/6] Dovecot improvements Date: Tue, 20 Oct 2020 17:06:49 +0200
I have updated the series. Dovecot modules are provided via computed set of modules, which is available via /usr/lib/dovecot symlink. All other linux distribution uses the very same location, so I followed the same rule. Alexey Abramov (5): services: dovecot: Provide plugins through a /gnu/store directory. services: dovecot: Add 'mail-attribute-dict' configuration option. services: dovecot: Add 'imap-metadata?' protocol configuration option. services: dovecot: Add 'managesieve-notify-capability' option. services: dovecot: Add 'managesieve-sieve-capability' option. Efraim Flashner (1): gnu: dovecot: Set moduledir to global directory. doc/guix.texi | 52 ++++++++++++++++++++++++++ gnu/packages/mail.scm | 9 ++++- gnu/services/mail.scm | 85 +++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 141 insertions(+), 5 deletions(-) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 20 Oct 2020 15:08:02 GMT) Full text and rfc822 format available.Message #158 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v5 2/6] services: dovecot: Provide plugins through a /gnu/store directory. Date: Tue, 20 Oct 2020 17:06:51 +0200
* gnu/services/mail.scm (package-list?, serialize-package-list): * gnu/services/mail.scm (dovecot-configuration)[extensions]: New field. The field lets you provide a list of dovecot plugins that need to be available during the runtime. A union of the set of modules will be created on the activation time. * gnu/services/mail.scm (opaque-dovecot-configuration)[extensions]: Likewise. * gnu/services/mail.scm (%dovecot-moduledir): New function. * gnu/services/mail.scm (%dovecot-activation): Add step to compute a set of modules, and provide them over the shared link at /usr/lib/dovecot. * doc/guix.texi (Mail Services)[extension]: Add documentation. --- doc/guix.texi | 8 +++++++ gnu/services/mail.scm | 55 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 51dc42e5a2..13cd86779e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18404,6 +18404,14 @@ Available @code{dovecot-configuration} fields are: The dovecot package. @end deftypevr +@deftypevr {@code{dovecot-configuration} parameter} package-list extensions +Plugins and extensions to the Dovecot package. Specify a list of +dovecot plugins that needs to be available for dovecot and its modules. + +Defaults to @samp{()}. + +@end deftypevr + @deftypevr {@code{dovecot-configuration} parameter} comma-separated-string-list listen A list of IPs or hosts where to listen for connections. @samp{*} listens on all IPv4 interfaces, @samp{::} listens on all IPv6 diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 71fa975b5d..b49fc07916 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -468,11 +468,21 @@ as @code{#t}.)") (serialize-namespace-configuration field-name val)) val)) +(define (package-list? val) + (and (list? val) (and-map package? val))) +(define (serialize-package-list field-name val) + #f) + (define-configuration dovecot-configuration (dovecot (package dovecot) "The dovecot package.") + (extensions + (package-list '()) + "Plugins and extensions to the Dovecot package. Specify a list of dovecot +plugins that needs to be available for dovecot and its modules.") + (listen (comma-separated-string-list '("*" "::")) "A list of IPs or hosts where to listen in for connections. @samp{*} @@ -1439,6 +1449,11 @@ greyed out, instead of only later giving \"not selectable\" popup error. (package dovecot) "The dovecot package.") + (extensions + (package-list '()) + "Plugins and extensions to the Dovecot package. Specify a list of dovecot +plugins that needs to be available for dovecot and its modules.") + (string (string (configuration-missing-field 'opaque-dovecot-configuration 'string)) @@ -1464,6 +1479,29 @@ greyed out, instead of only later giving \"not selectable\" popup error. (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin"))))) +(define (%dovecot-moduledir packages) + ;; Create a union of the set of modules and dovecot itself. + (computed-file + "dovecot-moduledir" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (mkdir #$output) + (for-each + (lambda (package) + (let ((path (string-append package "/lib/dovecot"))) + (for-each + (lambda (src) + (let* ((tail (substring src (string-length path))) + (dst (string-append #$output tail))) + (mkdir-p (dirname dst)) + (if (file-exists? dst) + (format (current-error-port) "warning: ~a exists\n" dst) + (symlink src dst)))) + (find-files path)))) + (list #$@packages)) + #t)))) + (define (%dovecot-activation config) ;; Activation gexp. (let ((config-str @@ -1474,7 +1512,15 @@ greyed out, instead of only later giving \"not selectable\" popup error. (with-output-to-string (lambda () (serialize-configuration config - dovecot-configuration-fields))))))) + dovecot-configuration-fields)))))) + (moduledir-directory + (cond + ((opaque-dovecot-configuration? config) + (%dovecot-moduledir (cons* (opaque-dovecot-configuration-dovecot config) + (opaque-dovecot-configuration-extensions config)))) + (else + (%dovecot-moduledir (cons* (dovecot-configuration-dovecot config) + (dovecot-configuration-extensions config))))))) #~(begin (use-modules (guix build utils)) (define (mkdir-p/perms directory owner perms) @@ -1521,13 +1567,18 @@ greyed out, instead of only later giving \"not selectable\" popup error. (else (format (current-error-port) "Failed to create public key at ~a.\n" public-key))))) - (let ((user (getpwnam "dovecot"))) + (let ((user (getpwnam "dovecot")) + (moduledir-symlink "/usr/lib/dovecot")) (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) "/etc/dovecot/dovecot.conf") (mkdir-p/perms "/etc/dovecot/private" user #o700) + (mkdir-p (dirname moduledir-symlink)) + (when (file-exists? moduledir-symlink) + (delete-file moduledir-symlink)) + (symlink #$moduledir-directory moduledir-symlink) (create-self-signed-certificate-if-absent #:private-key "/etc/dovecot/private/default.pem" #:public-key "/etc/dovecot/default.pem" -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 20 Oct 2020 15:08:02 GMT) Full text and rfc822 format available.Message #161 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v5 3/6] services: dovecot: Add 'mail-attribute-dict' configuration option. Date: Tue, 20 Oct 2020 17:06:52 +0200
* gnu/services/mail.scm (dovecot-configuration): Define 'mail-attribute-dict' directive to support IMAP METADATA extension.: * doc/guix.texi (Mail Services): Document it. --- doc/guix.texi | 15 +++++++++++++++ gnu/services/mail.scm | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 13cd86779e..d30cd2c86b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19134,6 +19134,21 @@ could allow a user to delete others' mailboxes, or @code{ln -s @samp{""}. @end deftypevr +@deftypevr {@code{dovecot-configuration} parameter} string mail-attribute-dict +Activate the metadata storage of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464,RFC <at> tie{}5464}. The goal of +the METADATA extension is to provide a means for clients to set and +retrieve 'annotations' or 'metadata' on an IMAP server. The annotations +can be associated with specific mailboxes or the server as a whole. The +server can choose to support only server annotations or both server and +mailbox annotations. For example, a general comment being added to a +mailbox may have an entry name of '/comment' and a value of 'Really +useful mailbox' + +Defaults to @samp{""}. + +@end deftypevr + @deftypevr {@code{dovecot-configuration} parameter} boolean mail-full-filesystem-access? Allow full file system access to clients. There's no access checks other than what the operating system does for the active UID/GID. It diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index b49fc07916..caa8bc5893 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1136,6 +1136,17 @@ disabled.") @samp{mdbox-rotate-size}. This setting currently works only in Linux with some file systems (ext4, xfs).") + (mail-attribute-dict + (string "") + "Activate the metadata storage of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. The goal of the +METADATA extension is to provide a means for clients to set and retrieve +'annotations' or 'metadata' on an IMAP server. The annotations can be +associated with specific mailboxes or the server as a whole. The server can +choose to support only server annotations or both server and mailbox +annotations. For example, a general comment being added to a mailbox may have +an entry name of '/comment' and a value of 'Really useful mailbox'") + (mail-attachment-dir (string "") "sdbox and mdbox support saving mail attachments to external files, -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 20 Oct 2020 15:08:03 GMT) Full text and rfc822 format available.Message #164 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v5 4/6] services: dovecot: Add 'imap-metadata?' protocol configuration option. Date: Tue, 20 Oct 2020 17:06:53 +0200
* gnu/services/mail.scm (protocol-configuration): Define the option to be able to activate the IMAP METADATA commands over the imap protocol. * doc/guix.texi (Mail Services): Document it. --- doc/guix.texi | 11 +++++++++++ gnu/services/mail.scm | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index d30cd2c86b..d915d004c9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18436,6 +18436,17 @@ This is used by imap (for shared users) and lda. It defaults to @samp{"/var/run/dovecot/auth-userdb"}. @end deftypevr +@deftypevr {@code{protocol-configuration} parameter} boolean imap-metadata? +Activate the commands of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464,RFC <at> tie{}5464}. + +If activated, a dictionary needs to be configured, via the +@code{mail-attribute-dict} setting. + +Defaults to @samp{#f}. + +@end deftypevr + @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins Space separated list of plugins to load. @end deftypevr diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index caa8bc5893..0c21da8891 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -348,7 +348,13 @@ This is used by imap (for shared users) and lda.") (mail-max-userip-connections (non-negative-integer 10) "Maximum number of IMAP connections allowed for a user from each IP -address. NOTE: The username is compared case-sensitively.")) +address. NOTE: The username is compared case-sensitively.") + (imap-metadata? + (boolean #f) + "Activate the commands of @code{IMAP METADATA} extension +@uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. If activated, a +dictionary needs to be configured, via the @code{mail-attribute-dict} +setting.")) (define (serialize-protocol-configuration field-name val) (format #t "protocol ~a {\n" (protocol-configuration-name val)) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 20 Oct 2020 15:08:03 GMT) Full text and rfc822 format available.Message #167 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Cc: Efraim Flashner <efraim <at> flashner.co.il> Subject: [PATCH v5 1/6] gnu: dovecot: Set moduledir to global directory. Date: Tue, 20 Oct 2020 17:06:50 +0200
From: Efraim Flashner <efraim <at> flashner.co.il> * gnu/packages/mail.scm (dovecot)[arguments]: Add configure-flag to set moduledir. Adjust custom 'install phase to override moduledir so it successfully installs. --- gnu/packages/mail.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 5056098806..ea53787ce0 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1579,7 +1579,8 @@ facilities for checking incoming mail.") `(#:configure-flags '("--sysconfdir=/etc" "--localstatedir=/var" "--with-sqlite" ; not auto-detected - "--with-lucene") ; not auto-detected + "--with-lucene" ; not auto-detected + "--with-moduledir=/usr/lib/dovecot") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-file-names @@ -1596,9 +1597,13 @@ facilities for checking incoming mail.") (("cat") (which "cat"))) #t)) (replace 'install - (lambda* (#:key make-flags #:allow-other-keys) + (lambda* (#:key outputs make-flags #:allow-other-keys) + ;; The .la files don't like having the moduledir moved. + (for-each delete-file (find-files "." "\\.la")) ;; Simple hack to avoid installing a trivial README in /etc. (apply invoke "make" "install" "sysconfdir=/tmp/bogus" + (string-append "moduledir=" (assoc-ref outputs "out") + "/lib/dovecot") make-flags)))))) (home-page "https://www.dovecot.org") (synopsis "Secure POP3/IMAP server") -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 20 Oct 2020 15:08:04 GMT) Full text and rfc822 format available.Message #170 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v5 6/6] services: dovecot: Add 'managesieve-sieve-capability' option. Date: Tue, 20 Oct 2020 17:06:55 +0200
* gnu/services/mail.scm (protocol-configuration): Define it. * doc/guix.texi (Mail Services): Document it. --- doc/guix.texi | 9 +++++++++ gnu/services/mail.scm | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index c033868baa..a77e030176 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18456,6 +18456,15 @@ this may differ depending on the authenticated user). Defaults to @samp{()}. @end deftypevr +@deftypevr {@code{protocol-configuration} parameter} space-separated-string-list managesieve-sieve-capability +Report SIEVE capabilities by the ManageSieve service upon a client +connection. If left unassigned, these will be assigned dynamically +according to what the Sieve interpreter supports by default. + +Defaults to @samp{()}. + +@end deftypevr + @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins Space separated list of plugins to load. @end deftypevr diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 2066661907..06d9af829d 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -359,7 +359,12 @@ setting.") (space-separated-string-list '()) "Report NOTIFY capabilities by the ManageSieve service upon a client connection. If left unassigned, these will be assigned dynamically -according to what the Sieve interpreter supports by default.")) +according to what the Sieve interpreter supports by default.") + (managesieve-sieve-capability + (space-separated-string-list '()) + "Report SIEVE capabilities by the ManageSieve service upon a client ++connection. If left unassigned, these will be assigned dynamically ++according to what the Sieve interpreter supports by default.")) (define (serialize-protocol-configuration field-name val) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 20 Oct 2020 15:08:04 GMT) Full text and rfc822 format available.Message #173 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v5 5/6] services: dovecot: Add 'managesieve-notify-capability' option. Date: Tue, 20 Oct 2020 17:06:54 +0200
* doc/guix.texi (Mail Services): Document it. * gnu/services/mail.scm (protocol-configuration): Define it. --- doc/guix.texi | 9 +++++++++ gnu/services/mail.scm | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index d915d004c9..c033868baa 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18447,6 +18447,15 @@ Defaults to @samp{#f}. @end deftypevr +@deftypevr {@code{protocol-configuration} parameter} space-separated-string-list managesieve-notify-capabilities +Report notify capabilities by the managesieve service upon a client +connection. If left unassigned, these will be assigned dynamically +according to what the Sieve interpreter supports by default (after login +this may differ depending on the authenticated user). + +Defaults to @samp{()}. +@end deftypevr + @deftypevr {@code{protocol-configuration} parameter} space-separated-string-list mail-plugins Space separated list of plugins to load. @end deftypevr diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 0c21da8891..2066661907 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -354,7 +354,13 @@ address. NOTE: The username is compared case-sensitively.") "Activate the commands of @code{IMAP METADATA} extension @uref{https://tools.ietf.org/html/rfc5464, RFC <at> tie{}5464}. If activated, a dictionary needs to be configured, via the @code{mail-attribute-dict} -setting.")) +setting.") + (managesieve-notify-capability + (space-separated-string-list '()) + "Report NOTIFY capabilities by the ManageSieve service upon a client +connection. If left unassigned, these will be assigned dynamically +according to what the Sieve interpreter supports by default.")) + (define (serialize-protocol-configuration field-name val) (format #t "protocol ~a {\n" (protocol-configuration-name val)) -- 2.28.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Fri, 25 Dec 2020 16:16:02 GMT) Full text and rfc822 format available.Message #176 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov via web <issues.guix.gnu.org <at> elephly.net> To: 42899 <at> debbugs.gnu.org Subject: [PATCH 00/10] Dovecot improvements. Add support for pigeonhole. Date: Fri, 25 Dec 2020 17:15:11 +0100
Just a friendly reminder. Please let me know what you think. Or maybe I missed something.
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 16 Jul 2024 21:38:01 GMT) Full text and rfc822 format available.Message #179 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: "Thomas Ieong" <th.ieong <at> free.fr> To: Alexey Abramov via web <issues.guix.gnu.org <at> elephly.net> Cc: 42899 <at> debbugs.gnu.org Subject: Re: [bug#42899] [PATCH 00/10] Dovecot improvements. Add support for pigeonhole. Date: Tue, 16 Jul 2024 23:37:15 +0200
Hey, I'm slowly getting back into contributing to guix again, gonna apply these patchs and see if we can still make it work.
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 21 Nov 2024 12:27:02 GMT) Full text and rfc822 format available.Message #182 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v6 0/3] services: dovecot: Add pigeonhole support Date: Thu, 21 Nov 2024 12:25:55 +0000
Hi everyone, It is been a while.. I add some changes to the previous series. - I changed the location of modules to /usr/lib/dovecot instead of /etc/dovecot. Don't know why). /usr/lib/dovecot seems natural to me. - I renamed `%dovecot-moduledir' to make-dovecot-moduledir, and now use union-build to create the union of modules. - %dovecot-activation uses switch-symlinks now. - I changed the tests a little bit, so that email will go through a simple sieve script. Alexey Abramov (3): gnu: dovecot: Set moduledir to global directory. services: dovecot: Provide plugins through a /gnu/store directory. tests: dovecot: Add sieve. doc/guix.texi | 19 ++++++++++++ gnu/packages/mail.scm | 8 ++++-- gnu/services/mail.scm | 44 ++++++++++++++++++++++++++-- gnu/tests/mail.scm | 67 +++++++++++++++++++++++++++++++++++++++---- 4 files changed, 129 insertions(+), 9 deletions(-) -- 2.46.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 21 Nov 2024 12:27:02 GMT) Full text and rfc822 format available.Message #185 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v6 1/3] gnu: dovecot: Set moduledir to global directory. Date: Thu, 21 Nov 2024 12:25:56 +0000
* gnu/packages/mail.scm (dovecot)[arguments]: Add configure-flag to set moduledir. Adjust custom 'install phase to override moduledir so it successfully installs. --- gnu/packages/mail.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 636961aae79..1c537b70a27 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -2141,7 +2141,8 @@ (define-public dovecot `(#:configure-flags '("--sysconfdir=/etc" "--localstatedir=/var" "--with-sqlite" ; not auto-detected - "--with-lucene") ; not auto-detected + "--with-lucene" + "--with-moduledir=/usr/lib/dovecot") ; not auto-detected ;; The -rdynamic linker flag is needed for the backtrace() function to ;; have symbol names rather than just addresses. Dovecot's tests rely ;; on this, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=962630. @@ -2161,9 +2162,12 @@ (define-public dovecot "src/lib-smtp/test-bin/sendmail-success.sh") (("cat") (which "cat"))))) (replace 'install - (lambda* (#:key make-flags #:allow-other-keys) + (lambda* (#:key outputs make-flags #:allow-other-keys) + ;; The .la files don't like having the moduledir moved. + (for-each delete-file (find-files "." "\\.la")) ;; Simple hack to avoid installing a trivial README in /etc. (apply invoke "make" "install" "sysconfdir=/tmp/bogus" + (string-append "moduledir=" (assoc-ref outputs "out") "/lib/dovecot") make-flags)))))) (home-page "https://www.dovecot.org") (synopsis "Secure POP3/IMAP server") -- 2.46.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 21 Nov 2024 12:27:03 GMT) Full text and rfc822 format available.Message #188 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v6 2/3] services: dovecot: Provide plugins through a /gnu/store directory. Date: Thu, 21 Nov 2024 12:25:57 +0000
* gnu/services/mail.scm (package-list?, serialize-package-list): * gnu/services/mail.scm (dovecot-configuration)[extensions]: New field. The field lets you provide a list of dovecot plugins that need to be available during the runtime. A union of the set of modules will be created on the activation time. * gnu/services/mail.scm (opaque-dovecot-configuration)[extensions]: Likewise. * gnu/services/mail.scm (make-dovecot-moduledir): New function. * gnu/services/mail.scm (%dovecot-activation): Add step to compute a set of modules, and provide them over the shared link at /usr/lib/dovecot. * doc/guix.texi (Mail Services)[extension]: Add documentation. Clarify the purpose and usage of the extensions parameter. Add an example showing how to enable Sieve filtering using dovecot-pigeonhole. Better explain the module directory structure and requirements. --- doc/guix.texi | 19 +++++++++++++++++++ gnu/services/mail.scm | 44 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 1c39628ffaf..8ab628af0a4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -26629,6 +26629,25 @@ Available @code{dovecot-configuration} fields are: The dovecot package. @end deftypevr +@deftypevr {@code{dovecot-configuration} parameter} package-list extensions +A list of additional Dovecot plugin packages to make available at runtime. During +service activation, the @file{lib/dovecot} directory from each specified package +is combined with Dovecot's core modules into a unified module directory. + +For example, to enable Sieve filtering: + +@lisp +(extensions (list dovecot-pigeonhole)) +@end lisp + +Each package in the list must provide its modules at @file{lib/dovecot}, +as this is where @code{make-dovecot-moduledir} expects to find its +extensions. The service combines these directories to create a unified +module structure. + +The default value is an empty list, providing only core Dovecot functionality. +@end deftypevr + @deftypevr {@code{dovecot-configuration} parameter} comma-separated-string-list listen A list of IPs or hosts where to listen for connections. @samp{*} listens on all IPv4 interfaces, @samp{::} listens on all IPv6 diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 18b482272c7..ce0a37dc5f9 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -521,11 +521,21 @@ (define (serialize-list-of-namespace-configuration field-name val) (serialize-namespace-configuration field-name val)) val)) +(define (package-list? val) + (and (list? val) (and-map package? val))) +(define (serialize-package-list field-name val) + #f) + (define-configuration dovecot-configuration (dovecot (file-like dovecot) "The dovecot package.") + (extensions + (package-list '()) + "Plugins and extensions to the Dovecot package. Specify a list of dovecot +plugins that needs to be available for dovecot and its modules.") + (listen (comma-separated-string-list '("*" "::")) "A list of IPs or hosts where to listen in for connections. @samp{*} @@ -1109,7 +1119,7 @@ (define-configuration dovecot-configuration @item fcntl Use this if possible. Works with NFS too if lockd is used. @item flock -May not exist in all systems. Doesn't work with NFS. +May not exist in all systems. Doesn't work with NFS. @item lockf May not exist in all systems. Doesn't work with NFS. @end table @@ -1500,6 +1510,11 @@ (define-configuration opaque-dovecot-configuration (file-like dovecot) "The dovecot package.") + (extensions + (package-list '()) + "Plugins and extensions to the Dovecot package. Specify a list of dovecot +plugins that needs to be available for dovecot and its modules.") + (string (string (configuration-missing-field 'opaque-dovecot-configuration 'string)) @@ -1525,6 +1540,21 @@ (define %dovecot-accounts (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin"))))) +(define (make-dovecot-moduledir packages) + "Return a computed file containing a union of Dovecot module directories from PACKAGES. +Each package's '/lib/dovecot' directory is combined into a single location." + ;; Create a union of the set of modules and dovecot itself. + (with-imported-modules '((guix build union)) + (computed-file + "dovecot-moduledir" + #~(begin + (use-modules (guix build union) (srfi srfi-26)) + + (union-build #$output + (map (cut string-append <> + "/lib/dovecot") + (list #$@packages))))))) + (define (%dovecot-activation config) ;; Activation gexp. (let ((config-str @@ -1535,7 +1565,15 @@ (define (%dovecot-activation config) (with-output-to-string (lambda () (serialize-configuration config - dovecot-configuration-fields))))))) + dovecot-configuration-fields)))))) + (moduledir-directory + (cond + ((opaque-dovecot-configuration? config) + (make-dovecot-moduledir (cons* (opaque-dovecot-configuration-dovecot config) + (opaque-dovecot-configuration-extensions config)))) + (else + (make-dovecot-moduledir (cons* (dovecot-configuration-dovecot config) + (dovecot-configuration-extensions config))))))) (with-imported-modules (source-module-closure '((gnu build activation))) #~(begin (use-modules (guix build utils) (gnu build activation)) @@ -1586,6 +1624,8 @@ (define* (create-self-signed-certificate-if-absent (copy-file #$(plain-file "dovecot.conf" config-str) "/etc/dovecot/dovecot.conf") (mkdir-p/perms "/etc/dovecot/private" user #o700) + (mkdir-p "/usr/lib") + (switch-symlinks "/usr/lib/dovecot" #$moduledir-directory) (create-self-signed-certificate-if-absent #:private-key "/etc/dovecot/private/default.pem" #:public-key "/etc/dovecot/default.pem" -- 2.46.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Thu, 21 Nov 2024 12:27:03 GMT) Full text and rfc822 format available.Message #191 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Alexey Abramov <levenson <at> mmer.org> To: 42899 <at> debbugs.gnu.org Subject: [PATCH v6 3/3] tests: dovecot: Add sieve. Date: Thu, 21 Nov 2024 12:25:58 +0000
* gnu/tests/mail.scm (%dovecot-os): Add dovecot-pigeonhole and simple imapsieve configuration. * gnu/tests/mail.scm (run-dovecot-test): Define simple sieve script. Add SELECT TESTBOX step to let dovecot properly do mailbox synchronization. --- gnu/tests/mail.scm | 67 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 5 deletions(-) diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm index 176e7c1d074..3b498b5b575 100644 --- a/gnu/tests/mail.scm +++ b/gnu/tests/mail.scm @@ -297,10 +297,42 @@ (define %dovecot-os (service dhcp-client-service-type) (service dovecot-service-type (dovecot-configuration + (extensions (list dovecot-pigeonhole)) (disable-plaintext-auth? #f) + ;; Required for sieve! + (postmaster-address "postmaster <at> komputilo") (ssl? "no") (auth-mechanisms '("anonymous")) (auth-anonymous-username "alice") + (protocols + (list (protocol-configuration + (name "imap") + (mail-plugins '("$mail_plugins" "imap_sieve")) + (imap-metadata? #t)))) + + (plugin-configuration + (plugin-configuration + (entries (list + (cons 'sieve-global "/tmp") + (cons 'sieve-extensions "+editheader") + + (cons 'imapsieve-mailbox1-name "*") + (cons 'imapsieve-mailbox1-causes "APPEND") + ;; Run the script *before* the user scripts + (cons 'imapsieve-mailbox1-before "file:/tmp/main.sieve") + ;; We want to automatically remove original email + (cons 'imapsieve-expunge-discarded "yes") + + (cons 'sieve-trace-debug "yes") + (cons 'sieve-trace-dir "/tmp") + (cons 'sieve-trace-level "tests") + (cons 'sieve-plugins "sieve_imapsieve") + ;; You cannot run scripts anywhere you want + ;; Sieve allows you to only run scripts under + ;; sieve_pipe_bin_dir. + (cons 'sieve-pipe-bin-dir "/tmp") + )))) + (mail-location (string-append "maildir:~/Maildir" ":INBOX=~/Maildir/INBOX" @@ -334,6 +366,18 @@ (define* (message-length message #:key (encoding "iso-8859-1")) (define message "From: test <at> example.com\n\ Subject: Hello Nice to meet you!") + (define sieve-script + "require \"editheader\";\n +addheader \"X-Sieve-Filtered\" \"Guix\"; +") + ;; Install our sieve script + (marionette-eval + `(begin + (with-output-to-file "/tmp/main.sieve" + (lambda () + (display ,sieve-script)))) + marionette) + (test-runner-current (system-test-runner #$output)) (test-begin "dovecot") @@ -367,6 +411,19 @@ (define message "From: test <at> example.com\n\ ;; Create a TESTBOX mailbox (write-line "a CREATE TESTBOX" imap) (read-line imap) ;OK + ;; Select mailbox. This is required so that dovecot did + ;; synchronization correctly. + (write-line "a SELECT TESTBOX" imap) + ;; ("* FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)\r") + ;; ("* OK [PERMANENTFLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft \\*)] Flags permitted.\r") + ;; ("* 1 EXISTS\r") + ;; ("* 1 RECENT\r") + ;; ("* OK [UNSEEN 1] First unseen.\r") + ;; ("* OK [UIDVALIDITY 1732177859] UIDs valid\r") + ;; ("* OK [UIDNEXT 3] Predicted next UID\r") + (for-each (lambda (n) + (read-line imap)) + (iota 7)) ;; Append a message to a TESTBOX mailbox (write-line (format #f "a APPEND TESTBOX {~a}" (number->string (message-length message))) @@ -380,18 +437,18 @@ (define message "From: test <at> example.com\n\ #t)) (test-equal "mail arrived" - message + (string-join (list "X-Sieve-Filtered: Guix" message) "\n") (marionette-eval '(begin (use-modules (ice-9 ftw) (ice-9 match) (rnrs io ports)) - - (let ((TESTBOX/new "/home/alice/Maildir/TESTBOX/new/")) - (match (scandir TESTBOX/new) + ;; XXX: We expect a new email in /cur directory + (let ((TESTBOX/cur "/home/alice/Maildir/TESTBOX/cur/")) + (match (scandir TESTBOX/cur) (("." ".." message-file) (call-with-input-file - (string-append TESTBOX/new message-file) + (string-append TESTBOX/cur message-file) get-string-all))))) marionette)) -- 2.46.0
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 26 Nov 2024 09:59:02 GMT) Full text and rfc822 format available.Message #194 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Simon Streit <simon <at> netpanic.org> To: Alexey Abramov via Guix-patches via <guix-patches <at> gnu.org> Cc: 42899 <at> debbugs.gnu.org, Alexey Abramov <levenson <at> mmer.org> Subject: Re: [bug#42899] [PATCH v6 0/3] services: dovecot: Add pigeonhole support Date: Tue, 26 Nov 2024 10:58:50 +0100
Hello Alexey, Alexey Abramov via Guix-patches via <guix-patches <at> gnu.org> writes: > - I changed the location of modules to /usr/lib/dovecot instead of > /etc/dovecot. Don't know why). /usr/lib/dovecot seems natural to me. > - I renamed `%dovecot-moduledir' to make-dovecot-moduledir, and now use > union-build to create the union of modules. > - %dovecot-activation uses switch-symlinks now. > - I changed the tests a little bit, so that email will go through a simple > sieve script. I applied the patches and got it working too. Kind regards -- Simon
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Tue, 26 Nov 2024 10:00:02 GMT) Full text and rfc822 format available.guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Sat, 11 Jan 2025 23:07:02 GMT) Full text and rfc822 format available.Message #200 received at 42899 <at> debbugs.gnu.org (full text, mbox):
From: Rodion Goritskov <rodion.goritskov <at> gmail.com> To: control <at> debbugs.gnu.org,42899 <at> debbugs.gnu.org Subject: QA review for 42899 Date: Sun, 12 Jan 2025 00:06:12 +0100
user guix usertag 42899 + reviewed-looks-good thanks Guix QA review form submission: 1. The latest patch version applies fine 2. Dovecot builds fine 3. Tests pass 4. Tried on my personal mail server - Dovecot with enabled pigeonhole extension starts, managesieve works fine (finally!) 5. Documentation is clear and in place From my point of view - it is fine to be merged, works great. Couldn't make managesieve work without this extension. Items marked as checked: Lint warnings, Package builds, Commit messages
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Fri, 21 Feb 2025 15:28:02 GMT) Full text and rfc822 format available.Message #203 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Simon Streit <simon <at> netpanic.org> To: Alexey Abramov via Guix-patches via <guix-patches <at> gnu.org> Cc: 42899 <at> debbugs.gnu.org, Alexey Abramov <levenson <at> mmer.org> Subject: Re: [bug#42899] [PATCH v6 0/3] services: dovecot: Add pigeonhole support Date: Fri, 21 Feb 2025 16:27:08 +0100
Hello, bumping this now. Alexey Abramov via Guix-patches via <guix-patches <at> gnu.org> writes: > Hi everyone, > > It is been a while.. I add some changes to the previous series. > > - I changed the location of modules to /usr/lib/dovecot instead of > /etc/dovecot. Don't know why). /usr/lib/dovecot seems natural to me. > - I renamed `%dovecot-moduledir' to make-dovecot-moduledir, and now use > union-build to create the union of modules. > - %dovecot-activation uses switch-symlinks now. > - I changed the tests a little bit, so that email will go through a simple > sieve script. I hope you excuse me for bumping this patch submission. I've been running these patches since and see no problems with using them. Sieve filtering works without a problem. It would be great to see them in Guix proper. Thank you for your work. Kind regards -- Simon
guix-patches <at> gnu.org
:bug#42899
; Package guix-patches
.
(Fri, 21 Feb 2025 15:28:02 GMT) Full text and rfc822 format available.Christopher Baines <mail <at> cbaines.net>
:Alexey Abramov <levenson <at> mmer.org>
:Message #211 received at 42899-done <at> debbugs.gnu.org (full text, mbox):
From: Christopher Baines <mail <at> cbaines.net> To: Alexey Abramov <levenson <at> mmer.org> Cc: 42899-done <at> debbugs.gnu.org, Rodion Goritskov <rodion.goritskov <at> gmail.com> Subject: Re: [bug#42899] [PATCH v6 0/3] services: dovecot: Add pigeonhole support Date: Tue, 25 Feb 2025 11:35:46 +0000
[Message part 1 (text/plain, inline)]
Alexey Abramov via Guix-patches via <guix-patches <at> gnu.org> writes: > Hi everyone, > > It is been a while.. I add some changes to the previous series. > > - I changed the location of modules to /usr/lib/dovecot instead of > /etc/dovecot. Don't know why). /usr/lib/dovecot seems natural to me. > - I renamed `%dovecot-moduledir' to make-dovecot-moduledir, and now use > union-build to create the union of modules. > - %dovecot-activation uses switch-symlinks now. > - I changed the tests a little bit, so that email will go through a simple > sieve script. > > Alexey Abramov (3): > gnu: dovecot: Set moduledir to global directory. > services: dovecot: Provide plugins through a /gnu/store directory. > tests: dovecot: Add sieve. > > doc/guix.texi | 19 ++++++++++++ > gnu/packages/mail.scm | 8 ++++-- > gnu/services/mail.scm | 44 ++++++++++++++++++++++++++-- > gnu/tests/mail.scm | 67 +++++++++++++++++++++++++++++++++++++++---- > 4 files changed, 129 insertions(+), 9 deletions(-) Thanks all, I've pushed these patches to master as c9d9eab868f155ea4f49199b7cf9ad13002bfc86. Chris
[signature.asc (application/pgp-signature, inline)]
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Wed, 26 Mar 2025 11:24:15 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.