guix-patches
[Top][All Lists]
Advanced

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

bug#25898: [PATCH 1/2] gnu: Add dovecot-trees.


From: contact . ng0
Subject: bug#25898: [PATCH 1/2] gnu: Add dovecot-trees.
Date: Tue, 28 Feb 2017 11:11:46 +0000

From: ng0 <address@hidden>

* gnu/packages/mail.scm (dovecot-trees): New variable.
---
 gnu/packages/mail.scm | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 65 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index f4f732ec1..47b4e7184 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -44,6 +44,7 @@
   #:use-module (gnu packages backup)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
   #:use-module (gnu packages databases)
@@ -93,7 +94,7 @@
                 #:select (gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
                            non-copyleft (expat . license:expat) bsd-3
                            public-domain bsd-4 isc (openssl . license:openssl)
-                           bsd-2 x11-style))
+                           bsd-2 x11-style agpl3))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -1126,6 +1127,69 @@ It supports mbox/Maildir and its own dbox/mdbox 
formats.")
     ;; Unicode, Inc. License Agreement for Data Files and Software.
     (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
 
+(define-public dovecot-trees
+  (let ((commit "006059c8a47d68f14f73c09743e45b9a73014dbf")
+        (revision "1"))
+    (package
+      (name "dovecot-trees")
+      (version (string-append "2.0.0-" revision "." (string-take commit 7)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://0xacab.org/riseuplabs/trees.git";)
+               (commit commit)))
+         (file-name (string-append name "-" version "-checkout"))
+         (sha256
+          (base32
+           "0ax90bzc66x179wi1m7ywqwa8nssyhjngs7ij109hqqxg5ymfp73"))))
+      (build-system gnu-build-system)
+      (native-inputs
+       `(("automake" ,automake)
+         ("autoconf" ,autoconf)
+         ("libtool" ,libtool)
+         ("dovecot" ,dovecot)
+         ("pkg-config" ,pkg-config)))
+      (inputs
+       `(("libsodium" ,libsodium)))
+      (arguments
+       `(#:tests? #f ;No tests exist.
+         #:configure-flags (list (string-append "--with-dovecot="
+                                                (assoc-ref %build-inputs 
"dovecot")
+                                                "/lib/dovecot"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'configure 'autogen
+             (lambda _
+               (zero? (system* "./autogen.sh"))))
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (dovemod (string-append out "/lib/dovecot/modules")))
+                 (install-file "src/.libs/lib18_trees_plugin.so"
+                               dovemod)
+                 #t))))))
+      (home-page "https://0xacab.org/riseuplabs/trees";)
+      (synopsis "NaCL-based Dovecot email storage encryption plugin")
+      (description
+       "@defn{Technology for Resting Email Encrypted Storage} (TREES) is a
+NaCL-based @code{Dovecot} encryption plugin.
+This plugin adds individually encrypted mail storage to the @code{Dovecot}
+IMAP server.  It is inspired by Posteo's @code{scrambler} which uses
+OpenSSL and RSA keypairs.  @code{TREES} works in a similar way, but uses
+the @code{Sodium} crypto library (based on NaCL).
+
+How it works:
address@hidden
address@hidden On IMAP log in, the user's cleartext password is passed to the 
plugin.
address@hidden The plugin creates an argon2 digest from the password.
address@hidden This password digest is used as a symmetric secret to decrypt a 
libsodium secretbox.
address@hidden Inside the secretbox is stored a Curve25519 private key.
address@hidden The Curve25519 private key is used to decrypt each individual 
message, using lidsodium sealed boxes.
address@hidden New mail is encrypted as it arrives using the Curve25519 public 
key.
address@hidden enumerate\n")
+      (license agpl3))))
+
 (define-public isync
   (package
     (name "isync")
-- 
2.12.0






reply via email to

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