Subject: [bug#42899] [PATCH v3 6/9] services: dovecot: Add 'mail-attribute-dict' configuration option.

From: Alexey Abramov <[email-masked]>
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@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@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