mbox

[bug#42899,00/10] Dovecot improvements. Add support for pigeonhole.

Message ID 20200817092748.30057-1-levenson@mmer.org
Headers show

Message

Alexey Abramov Aug. 17, 2020, 9:27 a.m. UTC
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

Comments

Efraim Flashner Aug. 23, 2020, 9:23 p.m. UTC | #1
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.
Alexey Abramov Sept. 8, 2020, 1:51 p.m. UTC | #2
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
Alexey Abramov Oct. 20, 2020, 3:06 p.m. UTC | #3
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(-)
Gerd Heber via web Dec. 25, 2020, 4:15 p.m. UTC | #4
Just a friendly reminder. Please let me know what you think. Or maybe I missed something.