gnu: libretro-lowresnx: Update to 1.2.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
CommitLineData
a661e420 1;;; GNU Guix --- Functional package management for GNU
98dd9ff8 2;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
c05d2cfc 3;;; Copyright © 2014, 2015, 2017, 2020 Mark H Weaver <mhw@netris.org>
29a7c98a 4;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
98e9e22f 5;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
f115d817 6;;; Copyright © 2014, 2019 Julien Lepiller <julien@lepiller.eu>
66cc3ab2 7;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
17dd4329 8;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
829785c1 9;;; Copyright © 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
2e88d113 10;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
6ebc3c41 11;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
34dd26af 12;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
8a75c589 13;;; Copyright © 2016 Al McElrath <hello@yrns.org>
21cdb35b 14;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Leo Famulari <leo@famulari.name>
e90819c4 15;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
99404fff 16;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
3f81ca32 17;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
3c986a7d 18;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is>
24262239 19;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
ae5128e2 20;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Arun Isaac <arunisaac@systemreboot.net>
5d87088c 21;;; Copyright © 2016 John Darrington <jmd@gnu.org>
8e020519 22;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
3e9750c3 23;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
6800c797 24;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
2836936b 25;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
7ff2159b 26;;; Copyright © 2017, 2018, 2020 Rene Saavedra <pacoon@protonmail.com>
5296548a 27;;; Copyright © 2018, 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
c115a1c8 28;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
c315d370 29;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
9ce963d8 30;;; Copyright © 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
30a1476b 31;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
24a3eb90 32;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
9ec27360 33;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
660611e5 34;;; Copyright © 2020 Eric Brown <ecbrown@ericcbrown.com>
19ca9828 35;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
3866a9ae 36;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
66d8dc3d 37;;; Copyright © 2020, 2021 Alexey Abramov <levenson@mmer.org>
d763e3c7 38;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
337011c5 39;;; Copyright © 2020, 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro>
c103010a 40;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
df661fb9 41;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
793713dc 42;;; Copyright © 2020 divoplade <d@divoplade.fr>
89f5cec8 43;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
af3bf6b4 44;;; Copyright © 2021 Benoit Joly <benoit@benoitj.ca>
a661e420
LC
45;;;
46;;; This file is part of GNU Guix.
47;;;
48;;; GNU Guix is free software; you can redistribute it and/or modify it
49;;; under the terms of the GNU General Public License as published by
50;;; the Free Software Foundation; either version 3 of the License, or (at
51;;; your option) any later version.
52;;;
53;;; GNU Guix is distributed in the hope that it will be useful, but
54;;; WITHOUT ANY WARRANTY; without even the implied warranty of
55;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56;;; GNU General Public License for more details.
57;;;
58;;; You should have received a copy of the GNU General Public License
59;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
60
1fdd3ee2 61(define-module (gnu packages mail)
e06b1ebc 62 #:use-module (guix utils)
59a43334 63 #:use-module (gnu packages)
1e1142d8 64 #:use-module (gnu packages admin)
b0eb2af2 65 #:use-module (gnu packages aspell)
d983a14f 66 #:use-module (gnu packages autotools)
e8435c4d 67 #:use-module (gnu packages backup)
938078a3 68 #:use-module (gnu packages base)
ee886454 69 #:use-module (gnu packages bash)
f8ae32a2 70 #:use-module (gnu packages bison)
82ffc79f 71 #:use-module (gnu packages boost)
fc9a93cb 72 #:use-module (gnu packages calendar)
ac257f12 73 #:use-module (gnu packages check)
938078a3 74 #:use-module (gnu packages compression)
944a5cdd 75 #:use-module (gnu packages crypto)
f58f767b 76 #:use-module (gnu packages curl)
4fd6bf53 77 #:use-module (gnu packages cyrus-sasl)
81ce19f4 78 #:use-module (gnu packages databases)
255d1bbe 79 #:use-module (gnu packages dbm)
d983a14f 80 #:use-module (gnu packages dejagnu)
8a3741e6 81 #:use-module (gnu packages django)
8b53366c 82 #:use-module (gnu packages dns)
938078a3 83 #:use-module (gnu packages docbook)
7a6213cb 84 #:use-module (gnu packages documentation)
d2938d59 85 #:use-module (gnu packages emacs)
e8435c4d 86 #:use-module (gnu packages enchant)
7fb5084d 87 #:use-module (gnu packages file)
938078a3 88 #:use-module (gnu packages gdb)
aa20b004 89 #:use-module (gnu packages gettext)
938078a3 90 #:use-module (gnu packages ghostscript)
d2938d59 91 #:use-module (gnu packages glib)
af3bf6b4 92 #:use-module (gnu packages golang)
e8435c4d 93 #:use-module (gnu packages gnome)
524e1df6 94 #:use-module (gnu packages gnupg)
152ffe7c 95 #:use-module (gnu packages groff)
d6e941bc 96 #:use-module (gnu packages gsasl)
e8435c4d 97 #:use-module (gnu packages gtk)
1ffa7090 98 #:use-module (gnu packages guile)
0791437f 99 #:use-module (gnu packages guile-xyz)
f8ae32a2 100 #:use-module (gnu packages flex)
9ec27360 101 #:use-module (gnu packages haskell-xyz)
9e2a49db 102 #:use-module (gnu packages icu4c)
b0eb2af2 103 #:use-module (gnu packages kerberos)
c6872990 104 #:use-module (gnu packages language)
e8435c4d 105 #:use-module (gnu packages libcanberra)
8b53366c 106 #:use-module (gnu packages libevent)
d6e941bc 107 #:use-module (gnu packages libidn)
aef4c482 108 #:use-module (gnu packages libunistring)
84ce7c5a 109 #:use-module (gnu packages libunwind)
d983a14f 110 #:use-module (gnu packages linux)
99b23fee 111 #:use-module (gnu packages lsof)
152ffe7c 112 #:use-module (gnu packages lua)
d983a14f 113 #:use-module (gnu packages m4)
938078a3 114 #:use-module (gnu packages man)
1ffa7090 115 #:use-module (gnu packages ncurses)
938078a3 116 #:use-module (gnu packages networking)
82ffc79f 117 #:use-module (gnu packages ninja)
b0eb2af2 118 #:use-module (gnu packages openldap)
c315d370 119 #:use-module (gnu packages onc-rpc)
66cc3ab2 120 #:use-module (gnu packages pcre)
13f04f48 121 #:use-module (gnu packages perl)
f115d817 122 #:use-module (gnu packages perl-check)
eff3a9b2 123 #:use-module (gnu packages perl-web)
938078a3 124 #:use-module (gnu packages pkg-config)
82ffc79f 125 #:use-module (gnu packages protobuf)
3919a31a 126 #:use-module (gnu packages python)
3a98604f 127 #:use-module (gnu packages python-check)
5c4332e5 128 #:use-module (gnu packages python-crypto)
1b2f753d 129 #:use-module (gnu packages python-web)
44d10b1f 130 #:use-module (gnu packages python-xyz)
7fb5084d 131 #:use-module (gnu packages ragel)
ae5128e2 132 #:use-module (gnu packages regex)
9e2a49db 133 #:use-module (gnu packages rdf)
1ffa7090 134 #:use-module (gnu packages readline)
938078a3 135 #:use-module (gnu packages ruby)
d2938d59 136 #:use-module (gnu packages search)
224b1c83 137 #:use-module (gnu packages serialization)
1bd3f849 138 #:use-module (gnu packages samba)
6cf27c89 139 #:use-module (gnu packages screen)
9d0c291e 140 #:use-module (gnu packages sphinx)
cd0322a3 141 #:use-module (gnu packages sqlite)
b0eb2af2 142 #:use-module (gnu packages tcl)
938078a3 143 #:use-module (gnu packages texinfo)
33dc54b0 144 #:use-module (gnu packages time)
a7fd7b68 145 #:use-module (gnu packages tls)
eff3a9b2 146 #:use-module (gnu packages version-control)
938078a3 147 #:use-module (gnu packages w3m)
be0c5733 148 #:use-module (gnu packages web)
7c16151a 149 #:use-module (gnu packages webkit)
3d88855d 150 #:use-module (gnu packages xdisorg)
e8435c4d 151 #:use-module (gnu packages xorg)
938078a3 152 #:use-module (gnu packages xml)
7e3b537c 153 #:use-module ((guix licenses) #:prefix license:)
a661e420
LC
154 #:use-module (guix packages)
155 #:use-module (guix download)
f8ae32a2 156 #:use-module (guix git-download)
62035656 157 #:use-module (guix svn-download)
29a7c98a 158 #:use-module (guix utils)
7fb5084d 159 #:use-module (guix build-system cmake)
7269a591 160 #:use-module (guix build-system glib-or-gtk)
af3bf6b4 161 #:use-module (guix build-system go)
681a6588 162 #:use-module (guix build-system gnu)
66d8dc3d 163 #:use-module (guix build-system go)
e3a47031 164 #:use-module (guix build-system guile)
ebda902f 165 #:use-module (guix build-system perl)
24262239 166 #:use-module (guix build-system python)
98dd9ff8
LC
167 #:use-module (guix build-system trivial)
168 #:use-module (srfi srfi-1)
169 #:use-module (ice-9 match))
a661e420 170
337011c5
ASM
171(define-public abook
172 (package
173 (name "abook")
174 (version "0.6.1")
175 (source
176 (origin
177 (method url-fetch)
178 (uri (string-append "https://abook.sourceforge.io/devel/abook-" version ".tar.gz"))
179 (sha256
180 (base32 "1yf0ifyjhq2r003pnpn92mn0924bn9yxjifxxj2ldcsgd7w0vagh"))))
181 (build-system gnu-build-system)
182 (arguments
183 `(#:phases
184 (modify-phases %standard-phases
185 ;; Fix "undefined reference to `field_id'" errors.
186 (add-after 'unpack 'fix-build-with-recent-gcc
187 (lambda _
188 (substitute* '("database.c" "database.h")
189 (("^inline int" all) (string-append "extern " all)))))
190 ;; Fix following error during bootstrap: "gettext infrastructure
191 ;; mismatch: using a Makefile.in.in from gettext version 0.18 but the
192 ;; autoconf macros are from gettext version 0.20".
193 (add-before 'bootstrap 'fix-gettext-macro-version
194 (lambda _
195 (substitute* "po/Makefile.in.in"
196 (("0.18") "0.20"))))
197 (replace 'bootstrap
198 (lambda _
199 (invoke "aclocal")
200 (invoke "automake" "--add-missing")
201 (invoke "autoconf"))))))
202 (native-inputs
203 `(("autoconf" ,autoconf)
204 ("automake" ,automake)
205 ("gettext" ,gettext-minimal)))
206 (inputs
207 `(("ncurses" ,ncurses)
208 ("readline" ,readline)))
209 (home-page "https://abook.sourceforge.io/")
210 (synopsis "Text-based addressbook")
211 (description
212 "Abook is a text-based addressbook program designed to use with Mutt mail
213client.")
214 (license license:gpl2)))
215
19ca9828
MC
216(define-public anubis
217 (package
218 (name "anubis")
219 ;; This 4.2.90 alpha release adds support for Guile 3 and has fixes for
220 ;; other issues.
221 (version "4.2.90")
222 (source
223 (origin
224 (method url-fetch)
225 (uri (string-append "https://alpha.gnu.org/gnu/anubis/anubis-"
226 version ".tar.gz"))
227 (sha256
228 (base32
229 "0dvm6acl32dv8bixx9z50gzwfp6kj4kxnn1j3dcwjlp7sasjp41s"))))
230 (build-system gnu-build-system)
231 (native-inputs
232 `(("automake" ,automake)
233 ("autoconf" ,autoconf)
234 ("gettext" ,gettext-minimal)
235 ("m4" ,m4))) ;for the test suite
236 (inputs
237 `(("gdbm" ,gdbm)
238 ("gnutls" ,gnutls)
239 ("gpgme" ,gpgme)
240 ("gsasl" ,gsasl)
241 ("guile" ,guile-3.0)
242 ("libgcrypt" ,libgcrypt) ;gnutls support depends on libgcrypt
243 ("libgpg-error" ,libgpg-error)))
244 (outputs '("out" "debug"))
245 (synopsis "SMTP message submission daemon")
246 (description "Anubis is a daemon that sits between the Mail User
247Agent (MUA) and the Mail Transfer Agent (MTA). When a mail is sent by a user
248in the MUA, it is first passed to Anubis, which performs additional processing
249to the message before passing it on for delivery by the MTA. Anubis may, for
250example, modify the message headers or body, or encrypt or sign the message.")
251 (home-page "https://www.gnu.org/software/anubis/manual/")
7e3b537c 252 (license license:gpl3+)))
19ca9828 253
a661e420
LC
254(define-public mailutils
255 (package
256 (name "mailutils")
c28f242b 257 (version "3.10")
a661e420
LC
258 (source (origin
259 (method url-fetch)
260 (uri (string-append "mirror://gnu/mailutils/mailutils-"
20a3df0f 261 version ".tar.xz"))
a661e420
LC
262 (sha256
263 (base32
891b045f
PL
264 "17smrxjdgbbzbzakik30vj46q4iib85ksqhb82jr4vjp57akszh9"))
265 (patches
266 ;; Fixes https://issues.guix.gnu.org/43088.
267 (search-patches "mailutils-fix-uninitialized-variable.patch"))))
a661e420
LC
268 (build-system gnu-build-system)
269 (arguments
98dd9ff8 270 `(#:phases
de75f0b1 271 (modify-phases %standard-phases
baa6790b 272 (add-before 'check 'prepare-test-suite
de75f0b1
EF
273 (lambda _
274 ;; Use the right file name for `cat'.
275 (substitute* "testsuite/lib/mailutils.exp"
276 (("/bin/cat")
277 (which "cat")))
14253017 278
43987c97 279 ;; Tests try to invoke 'mda' such that it looks up the
de75f0b1
EF
280 ;; 'root' user, which does not exist in the build
281 ;; environment.
7cb77b78
LC
282 (substitute* '("mda/mda/tests/testsuite"
283 "mda/lmtpd/tests/testsuite")
de75f0b1
EF
284 (("root <") "nobody <")
285 (("spool/root") "spool/nobody")
286 (("root@localhost") "nobody@localhost"))
14253017 287
de75f0b1
EF
288 ;; The 'pipeact.at' tests generate a shell script; make
289 ;; sure it uses the right shell.
290 (substitute* '("sieve/tests/testsuite"
291 "mh/tests/testsuite")
292 (("#! /bin/sh")
293 (string-append "#!" (which "sh"))))
14253017 294
de75f0b1
EF
295 (substitute* "mh/tests/testsuite"
296 (("moreproc: /bin/cat")
297 (string-append "moreproc: " (which "cat"))))
14253017 298
de75f0b1
EF
299 ;; XXX: The comsatd tests rely on being able to open
300 ;; /dev/tty, but that gives ENODEV in the build
301 ;; environment. Thus, ignore test failures here.
302 (substitute* "comsat/tests/Makefile.in"
303 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
304 (string-append "-" all)))
14253017 305
c28f242b
TGR
306 ;; XXX: The ‘moderator: program discard’ test does not specify
307 ;; an explicit From: but does expect an exact match. But why are
308 ;; all other tests unaffected?
309 (substitute* "sieve/tests/testsuite"
310 (("gray@")
311 "nixbld@"))
312
baa6790b
LC
313 ;; 'frm' tests expect write access to $HOME.
314 (setenv "HOME" (getcwd))
315
316 ;; Avoid the message "I'm going to create the standard MH path
317 ;; for you", which would lead to one test failure (when diffing
318 ;; stdout of 'fmtcheck'.)
319 (call-with-output-file ".mh_profile"
320 (lambda (port)
321 (format port "Path: ~a/Mail-for-tests~%"
322 (getcwd))))
323
de75f0b1
EF
324 #t)))
325 ;; TODO: Add `--with-sql'.
98dd9ff8
LC
326 #:configure-flags
327 (list "--sysconfdir=/etc"
ac3b4b12 328
98dd9ff8
LC
329 ;; Add "/X.Y" to the installation directory.
330 (string-append "--with-guile-site-dir="
331 (assoc-ref %outputs "out")
332 "/share/guile/site/"
333 ,(match (assoc "guile"
334 (package-inputs this-package))
335 (("guile" guile)
336 (version-major+minor
337 (package-version guile))))))
ac3b4b12 338
a661e420 339 #:parallel-tests? #f))
3f3c0ab4 340 (native-inputs
24a3eb90 341 `(("perl" ,perl) ;for 'gylwrap'
a661e420 342 ("texinfo" ,texinfo)
24a3eb90
VL
343 ("dejagnu" ,dejagnu)))
344 (inputs
345 `(("m4" ,m4)
b6bee63b 346 ("guile" ,guile-3.0)
1f889cac 347 ("gsasl" ,gsasl)
a661e420
LC
348 ("gnutls" ,gnutls)
349 ("ncurses" ,ncurses)
abe5d2dc 350 ("readline" ,readline)
a661e420 351 ("linux-pam" ,linux-pam)
3246cc91 352 ("libltdl" ,libltdl)
aef4c482
TGR
353 ("gdbm" ,gdbm)
354
355 ;; Required for SEARCH CHARSET.
356 ("libiconv" ,libiconv)
357 ("libunistring" ,libunistring)))
6fd52309 358 (home-page "https://mailutils.org")
f50d2669 359 (synopsis "Utilities and library for reading and serving mail")
a661e420 360 (description
79c311b8
LC
361 "GNU Mailutils is a collection of programs for managing, viewing and
362processing electronic mail. It contains both utilities and server daemons
363and all operate in a protocol-agnostic way. The underlying libraries are
364also available, simplifying the addition of mail capabilities to new
365software.")
a661e420
LC
366 (license
367 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
7e3b537c 368 (list license:gpl3+ license:lgpl3+))))
d983a14f 369
af3bf6b4
BJ
370(define-public go-gitlab.com-shackra-goimapnotify
371 (let ((commit "832bc7112db9b28e28d69e90b91ea6c005244c9b")
372 (revision "0"))
373 (package
374 (name "go-gitlab.com-shackra-goimapnotify")
375 (version (git-version "0.0.0" revision commit))
376 (source (origin
377 (method git-fetch)
378 (uri (git-reference
379 (url "https://gitlab.com/shackra/goimapnotify")
380 (commit commit)))
381 (file-name (git-file-name name version))
382 (sha256
383 (base32
384 "1h27kshx4vwl5k6vc2szsq3d701fzs4gczjypz907f8hj0lrnjmy"))))
385 (build-system go-build-system)
386 (arguments
387 `(#:import-path "gitlab.com/shackra/goimapnotify"))
388 (propagated-inputs
389 `(("go-github-com-emersion-go-imap" ,go-github-com-emersion-go-imap)
390 ("go-github-com-emersion-go-imap-idle" ,go-github-com-emersion-go-imap-idle)
391 ("go-github-com-emersion-go-sasl" ,go-github-com-emersion-go-sasl)
392 ("go-github-com-sirupsen-logrus" ,go-github-com-sirupsen-logrus)
393 ("go-golang-org-x-text" ,go-golang-org-x-text)))
394 (synopsis "Execute scripts on IMAP mailbox changes.")
395 (description
396 "Script to execute scripts on IMAP mailbox changes (new/deleted/updated
397messages) using IDLE. Implemented in Go.")
398 (home-page "https://gitlab.com/shackra/goimapnotify")
399 (license license:gpl3+))))
400
b6bee63b 401(define-public guile2.2-mailutils
98dd9ff8
LC
402 (package
403 (inherit mailutils)
b6bee63b 404 (name "guile2.2-mailutils")
98dd9ff8 405 (inputs
b6bee63b 406 `(("guile" ,guile-2.2)
98dd9ff8
LC
407 ,@(alist-delete "guile" (package-inputs mailutils))))))
408
b6bee63b
LC
409(define-public guile3.0-mailutils
410 (deprecated-package "guile3.0-mailutils" mailutils))
411
1e1142d8
TGR
412(define-public nullmailer
413 (package
414 (name "nullmailer")
415 (version "2.2")
416 (source
417 (origin
418 (method url-fetch)
419 (uri (list
420 (string-append "https://untroubled.org/nullmailer/"
421 "nullmailer-" version ".tar.gz")
422 ;; Previous releases are moved to this subdirectory.
423 (string-append "https://untroubled.org/nullmailer/archive/"
424 "nullmailer-" version ".tar.gz")))
425 (sha256
426 (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
427 (build-system gnu-build-system)
428 (arguments
429 `(#:configure-flags
430 (list "--enable-tls"
431 "--localstatedir=/var"
432 "--sysconfdir=/etc")
433 #:phases
434 (modify-phases %standard-phases
435 (add-before 'check 'patch-test-FHS-file-names
436 (lambda _
437 (with-directory-excursion "test"
438 (substitute* (list "functions.in"
439 "tests/send")
440 ;; Fix some shebangs later generated on the fly.
441 (("/bin/sh") (which "bash"))))
442 #t))
443 (add-before 'check 'pass-PATH-to-tests
444 ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
445 ;; tests then source ‘functions’, which first demands a working $PATH
446 ;; only to clobber it later. Pass our $PATH to the test environment
447 ;; and don't touch it after that.
448 (lambda _
449 (with-directory-excursion "test"
450 (substitute* "runtests"
451 (("env - bash")
452 (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
453 (substitute* "functions.in"
454 (("export PATH=.*") "")))
455 #t))
456 (add-before 'check 'delete-failing-tests
457 (lambda _
458 (with-directory-excursion "test/tests"
459 (for-each delete-file
460 (list
461 ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
462 "inject/queue"
463 ;; XXX These require the not-yet-packaged tcpserver.
464 "protocols" "smtp-auth")))
465 #t))
466 (add-before 'install 'skip-install-data-local
467 ;; Don't attempt to install run-time files outside of the store.
468 (lambda _
469 (substitute* "Makefile"
470 ((" install-data-local") ""))
471 #t)))))
472 (native-inputs
473 ;; For tests.
474 `(("daemontools" ,daemontools))) ; for svc
475 (inputs
476 `(("gnutls" ,gnutls)))
477 (home-page "https://untroubled.org/nullmailer/")
478 (synopsis "Simple relay-only mail transfer agent")
479 (description
480 "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
481hosts that receive no local mail and only relay mail to a fixed set of smart
482relays. It's useful for systems such as Web servers that must be able to send
483email notifications, without having to run a full-blown MTA such as sendmail
484or qmail.
485
486Nullmailer is designed to be simple to configure, easy to extend, and secure.
487It requires little ongoing administration. The included @command{sendmail}
488emulator front-end should allow most (if not all) sendmail-compatible programs
489to run without any changes.")
7e3b537c
TGR
490 (license (list license:lgpl2.1+ ; lib/cli++/ (but some files lack headers)
491 license:gpl2+)))) ; everything else
1e1142d8 492
d983a14f
AE
493(define-public fetchmail
494 (package
495 (name "fetchmail")
8e3944f8 496 (version "6.4.18")
271b3c9d
TGR
497 (source
498 (origin
499 (method url-fetch)
500 (uri (string-append "mirror://sourceforge/fetchmail/branch_"
501 (version-major+minor version) "/"
502 "fetchmail-" version ".tar.xz"))
503 (sha256
8e3944f8 504 (base32 "17r5zfk9yh7jhgdb360dlzx5fx9lsbmalasx6zgxw9v9vjycjb9h"))))
d983a14f
AE
505 (build-system gnu-build-system)
506 (inputs
507 `(("openssl" ,openssl)))
508 (arguments
271b3c9d
TGR
509 `(#:configure-flags
510 (list (string-append "--with-ssl="
a9ef5425 511 (assoc-ref %build-inputs "openssl")))))
447b61d4 512 (home-page "https://www.fetchmail.info/")
ae2189a9 513 (synopsis "Remote-mail retrieval and forwarding utility")
d983a14f
AE
514 (description
515 "Fetchmail is a full-featured, robust, well-documented remote-mail
516retrieval and forwarding utility intended to be used over on-demand
517TCP/IP links (such as SLIP or PPP connections). It supports every
518remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
519KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
520and IPSEC.
521
522Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
523so it can then be read by normal mail user agents such as mutt, elm
524or BSD Mail. It allows all your system MTA's filtering, forwarding, and
525aliasing facilities to work just as they would on normal mail.")
7e3b537c 526 (license license:gpl2+))) ; most files are actually public domain or x11
13f04f48
AE
527
528(define-public mutt
529 (package
530 (name "mutt")
a3926c82 531 (version "2.0.6")
13f04f48
AE
532 (source (origin
533 (method url-fetch)
a101b15b 534 (uri (list
a101b15b 535 (string-append "https://bitbucket.org/mutt/mutt/downloads/"
a11237e4
LF
536 "mutt-" version ".tar.gz")
537 (string-append "http://ftp.mutt.org/pub/mutt/mutt-"
538 version ".tar.gz")))
13f04f48
AE
539 (sha256
540 (base32
a3926c82 541 "165mpivdhvhavglykwlz0hss2akxd6i6l40rgxs29mjzi52irqw1"))
59c03bd4 542 (patches (search-patches "mutt-store-references.patch"))))
13f04f48
AE
543 (build-system gnu-build-system)
544 (inputs
4fd6bf53 545 `(("cyrus-sasl" ,cyrus-sasl)
b0bb0136 546 ("gdbm" ,gdbm)
524e1df6 547 ("gpgme" ,gpgme)
892be267 548 ("libidn2" ,libidn2)
4fd6bf53 549 ("ncurses" ,ncurses)
13f04f48 550 ("openssl" ,openssl)
892be267
IVB
551 ("perl" ,perl)
552 ("sqlite" ,sqlite)))
13f04f48
AE
553 (arguments
554 `(#:configure-flags '("--enable-smtp"
555 "--enable-imap"
556 "--enable-pop"
524e1df6 557 "--enable-gpgme"
b0bb0136 558 "--enable-hcache" ; for header caching
0323fe80 559 "--enable-sidebar"
892be267 560 "--enable-autocrypt"
13f04f48 561 "--with-ssl"
4fd6bf53 562 "--with-sasl"
892be267
IVB
563 "--with-sqlite3" ; required for Autocrypt
564 "--with-idn2" ; recommended for Autocrypt
02d32b19
TGR
565 ;; So that mutt does not check whether the path
566 ;; exists, which it does not in the chroot.
13f04f48
AE
567 "--with-mailpath=/var/mail")))
568 (home-page "http://www.mutt.org/")
569 (synopsis "Mail client")
570 (description
571 "Mutt is a small but very powerful text-based mail client for Unix
572operating systems.")
7e3b537c 573 (license license:gpl2+)))
681a6588 574
7596ddf3 575(define-public neomutt
d54a759d
TGR
576 (package
577 (name "neomutt")
fd513919 578 (version "20210205")
d54a759d
TGR
579 (source
580 (origin
581 (method git-fetch)
582 (uri (git-reference
b0e7b699 583 (url "https://github.com/neomutt/neomutt")
d54a759d
TGR
584 (commit version)))
585 (file-name (git-file-name name version))
586 (sha256
fd513919 587 (base32 "15kr9nvb4j8lx5rl2yapv231rbp4sbn709vv82pfhx5717x3yf00"))))
d54a759d
TGR
588 (build-system gnu-build-system)
589 (inputs
590 `(("cyrus-sasl" ,cyrus-sasl)
591 ("gdbm" ,gdbm)
592 ("gpgme" ,gpgme)
593 ("ncurses" ,ncurses)
594 ("gnutls" ,gnutls)
595 ("openssl" ,openssl) ; for S/MIME
596 ("perl" ,perl)
597 ("kyotocabinet" ,kyotocabinet)
598 ("libxslt" ,libxslt)
599 ("libidn2" ,libidn2)
600 ("libxml2" ,libxml2)
601 ("lmdb" ,lmdb)
602 ("notmuch" ,notmuch)))
603 (native-inputs
604 `(("automake" ,automake)
605 ("gettext-minimal" ,gettext-minimal)
606 ("pkg-config" ,pkg-config)
607 ("docbook-xsl" ,docbook-xsl)
608 ("docbook-xml" ,docbook-xml-4.2)
609 ("w3m" ,w3m)
ab17fb60
TGR
610 ("tcl" ,tcl)
611
612 ;; Test file data for the unit tests included in the neomutt source.
613 ("neomutt-test-files"
614 ,(let ((commit "8629adab700a75c54e8e28bf05ad092503a98f75"))
615 (origin
616 (method git-fetch)
617 (uri (git-reference
618 (url "https://github.com/neomutt/neomutt-test-files")
619 (commit commit)))
620 (file-name (git-file-name "neomutt-test-files" commit))
621 (sha256
622 (base32 "1ci04nqkab9mh60zzm66sd6mhsr6lya8wp92njpbvafc86vvwdlr")))))))
d54a759d
TGR
623 (arguments
624 `(#:test-target "test"
625 #:configure-flags
626 (list "--gpgme"
7596ddf3 627
d54a759d
TGR
628 ;; Database, implies header caching.
629 "--disable-tokyocabinet"
630 "--disable-qdbm"
631 "--disable-bdb"
632 "--lmdb"
633 "--kyotocabinet"
54a402dd 634
d54a759d 635 "--gdbm"
54a402dd 636
d54a759d
TGR
637 "--gnutls"
638 "--disable-ssl"
639 "--sasl"
640 (string-append "--with-sasl="
641 (assoc-ref %build-inputs "cyrus-sasl"))
7596ddf3 642
7596ddf3 643
d54a759d
TGR
644 "--smime"
645 "--notmuch"
646 "--disable-idn"
647 "--idn2"
7596ddf3 648
d54a759d
TGR
649 ;; If we do not set this, neomutt wants to check
650 ;; whether the path exists, which it does not
651 ;; in the chroot.
652 "--with-mailpath=/var/mail"
7596ddf3 653
d54a759d
TGR
654 "--with-ui=ncurses"
655 (string-append "--with-ncurses="
656 (assoc-ref %build-inputs "ncurses"))
657 (string-append "--prefix="
658 (assoc-ref %outputs "out"))
659 "--debug")
660 #:phases
661 (modify-phases %standard-phases
662 ;; TODO: autosetup is meant to be included in the source,
663 ;; but we should package autosetup and use our own version of it.
664 (replace 'configure
665 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
666 (let* ((out (assoc-ref outputs "out"))
667 (flags `(,@configure-flags))
668 (bash (which "bash")))
669 (setenv "SHELL" bash)
670 (setenv "CONFIG_SHELL" bash)
671 (apply invoke bash
672 (string-append (getcwd) "/configure")
ab17fb60
TGR
673 flags))))
674 (add-before 'check 'prepare-test-files
675 (lambda* (#:key inputs #:allow-other-keys)
676 (copy-recursively (assoc-ref inputs "neomutt-test-files") "tests")
677 (with-directory-excursion "tests"
678 (setenv "NEOMUTT_TEST_DIR" (getcwd)) ; must be absolute
679 (invoke "bash" "setup.sh")
680 #t))))))
c3c56a4e 681 (home-page "https://neomutt.org/")
d54a759d
TGR
682 (synopsis "Command-line mail reader based on Mutt")
683 (description
684 "NeoMutt is a command-line mail reader which is based on mutt.
32fc1ec3 685It adds a large amount of new and improved features to mutt.")
7e3b537c 686 (license license:gpl2+)))
7596ddf3 687
681a6588
MW
688(define-public gmime
689 (package
690 (name "gmime")
4e839a83 691 (version "3.2.7")
681a6588
MW
692 (source (origin
693 (method url-fetch)
75630043 694 (uri (string-append "mirror://gnome/sources/gmime/"
29a7c98a 695 (version-major+minor version)
681a6588
MW
696 "/gmime-" version ".tar.xz"))
697 (sha256
698 (base32
4e839a83 699 "0i3xfc84qn1z99i70q68kbnp9rmgqrnprqb418ba52s6g9j9dsia"))))
681a6588
MW
700 (build-system gnu-build-system)
701 (native-inputs
702 `(("pkg-config" ,pkg-config)
e9654ef1
TLC
703 ("gnupg" ,gnupg) ; for tests only
704 ("gobject-introspection" ,gobject-introspection)))
681a6588
MW
705 (inputs `(("glib" ,glib)
706 ("gpgme" ,gpgme)
707 ("zlib" ,zlib)))
708 (arguments
e9654ef1
TLC
709 `(#:configure-flags
710 (list "--enable-introspection=yes")
711 #:phases
cc955356
EF
712 (modify-phases %standard-phases
713 (add-after
714 'unpack 'patch-paths-in-tests
715 (lambda _
716 ;; The test programs run several programs using 'system' with
ae83dcf6 717 ;; hard-coded paths. Here we patch them all.
718 ;; We use ISO-8859-1 here because test-iconv.c contains
cc955356
EF
719 ;; raw byte sequences in several different encodings.
720 (with-fluids ((%default-port-encoding #f))
721 (substitute* (find-files "tests" "\\.c$")
722 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
723 (let* ((base (basename prog-path))
ae83dcf6 724 (prog (which base)))
cc955356 725 (string-append pre
8e020519
MB
726 (or prog (error "not found: " base)))))))
727 #t)))))
681a6588
MW
728 (home-page "http://spruce.sourceforge.net/gmime/")
729 (synopsis "MIME message parser and creator library")
730 (description
731 "GMime provides a core library and set of utilities which may be used for
732the creation and parsing of messages using the Multipurpose Internet Mail
733Extension (MIME).")
7e3b537c 734 (license (list license:lgpl2.1+ license:gpl2+ license:gpl3+))))
681a6588 735
8e020519
MB
736;; Some packages are not ready for GMime 3 yet.
737(define-public gmime-2.6
738 (package
739 (inherit gmime)
740 (version "2.6.23")
741 (source (origin
742 (method url-fetch)
743 (uri (string-append "mirror://gnome/sources/gmime/"
744 (version-major+minor version)
745 "/gmime-" version ".tar.xz"))
746 (sha256
747 (base32
748 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
749
f6807498
RW
750(define-public altermime
751 (package
752 (name "altermime")
8daad379 753 (version "0.3.11")
f6807498
RW
754 (source (origin
755 (method url-fetch)
756 (uri (string-append "http://pldaniels.com/altermime/altermime-"
757 version ".tar.gz"))
758 (sha256
759 (base32
8daad379 760 "15zxg6spcmd35r6xbidq2fgcg2nzyv1sbbqds08lzll70mqx4pj7"))))
f6807498
RW
761 (build-system gnu-build-system)
762 (arguments
763 `(#:make-flags (list "CC=gcc"
764 (string-append "PREFIX=" (assoc-ref %outputs "out")))
765 #:tests? #f ; there are none
766 #:phases
767 (modify-phases %standard-phases
768 (delete 'configure)
769 (add-after 'unpack 'fix-bugs
770 (lambda _
771 (substitute* "MIME_headers.c"
772 (("hinfo->filename, sizeof\\(hinfo->name\\)")
773 "hinfo->filename, sizeof(hinfo->filename)")
774 (("memset\\(hinfo->defects, 0, _MIMEH_DEFECT_ARRAY_SIZE\\);")
775 "memset(hinfo->defects, 0, sizeof(hinfo->defects));"))
776 (substitute* "pldstr.c"
777 (("if \\(\\(st->start\\)&&\\(st->start != '\\\\0'\\)\\)")
778 "if ((st->start)&&(*st->start != '\\0'))"))
779 (substitute* "qpe.c"
780 (("if \\(lineend != '\\\\0'\\)")
781 "if (*lineend != '\\0')"))
782 #t))
783 (add-after 'unpack 'install-to-prefix
784 (lambda _
785 (substitute* "Makefile"
786 (("/usr/local") "${PREFIX}")
787 (("cp altermime.*") "install -D -t ${PREFIX}/bin altermime\n"))
788 #t))
789 (add-after 'unpack 'disable-Werror
790 (lambda _
791 (substitute* "Makefile"
792 (("-Werror") ""))
793 #t)))))
794 (home-page "https://pldaniels.com/altermime/")
795 (synopsis "Modify MIME-encoded messages")
796 (description
797 "alterMIME is a small program which is used to alter your mime-encoded
798mailpack. What can alterMIME do?
799
800@enumerate
801@item Insert disclaimers,
a4920a22 802@item insert arbitrary X-headers,
f6807498
RW
803@item modify existing headers,
804@item remove attachments based on filename or content-type,
805@item replace attachments based on filename.
806@end enumerate
807.")
808 ;; MIME_headers.c is distributed under BSD-3; the rest of the code is
809 ;; published under the alterMIME license.
810 (license (list (license:non-copyleft "file://LICENSE")
811 license:bsd-3))))
812
82ffc79f
TLC
813(define-public astroid
814 (package
815 (name "astroid")
816 (version "0.15")
817 (source
818 (origin
819 (method git-fetch)
820 (uri (git-reference
821 (url "https://github.com/astroidmail/astroid")
822 (commit (string-append "v" version))))
823 (file-name (git-file-name name version))
824 (sha256
825 (base32 "11cxbva9ni98gii59xmbxh4c6idcg3mg0pgdsp1c3j0yg7ix0lj3"))
826 (modules '((guix build utils)))
827 (snippet
828 '(begin
829 ;; https://github.com/astroidmail/astroid/pull/685
830 (substitute* "tests/test_composed_message.cc"
831 (("\\\\n\\.\\.\\.") "\\n...\\n"))
832 #t))))
833 (build-system cmake-build-system)
834 (arguments
4c9eed9c
TLC
835 `(#:modules ((guix build cmake-build-system)
836 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
837 (guix build utils)
838 (ice-9 match))
839 #:imported-modules ((guix build glib-or-gtk-build-system)
840 ,@%cmake-build-system-modules)
841 #:configure-flags (list "-GNinja")
82ffc79f
TLC
842 #:phases
843 (modify-phases %standard-phases
844 (add-after 'unpack 'skip-markdown-test
845 ;; This test relies on the plugins and the test suite
846 ;; cannot find the Astroid module.
847 ;; gi.require_version ('Astroid', '0.2')
848 ;; ValueError: Namespace Astroid not available
849 (lambda _
850 (substitute* "tests/CMakeLists.txt"
851 ((".*markdown.*") ""))
852 #t))
853 (replace 'build
854 (lambda _
855 (invoke "ninja" "-j" (number->string (parallel-job-count)))))
856 (add-before 'check 'start-xserver
857 (lambda* (#:key inputs #:allow-other-keys)
858 (let ((xorg-server (assoc-ref inputs "xorg-server")))
859 (setenv "HOME" (getcwd))
860 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
861 (setenv "DISPLAY" ":1")
862 #t)))
863 (replace 'check
864 (lambda* (#:key tests? #:allow-other-keys)
865 (when tests?
866 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
867 (invoke "ctest" "."))
868 #t))
869 (replace 'install
870 (lambda _
4c9eed9c
TLC
871 (invoke "ninja" "install")))
872 (add-after 'install 'wrap-with-GI_TYPELIB_PATH
873 (lambda* (#:key inputs outputs #:allow-other-keys)
874 (let ((out (assoc-ref outputs "out"))
875 (paths (map (match-lambda
876 ((outputs . directory)
877 (let ((girepodir (string-append
878 directory
879 "/lib/girepository-1.0")))
880 (if (file-exists? girepodir)
881 girepodir
882 #f))))
883 inputs)))
884 (wrap-program (string-append out "/bin/astroid")
885 `("GI_TYPELIB_PATH" ":" prefix ,(filter identity paths))))
886 #t))
887 (add-after 'install 'glib-or-gtk-compile-schemas
888 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
889 (add-after 'install 'glib-or-gtk-wrap
890 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
82ffc79f
TLC
891 (native-inputs
892 `(("glib-networking" ,glib-networking)
893 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
894 ("gnupg" ,gnupg)
895 ("ninja" ,ninja)
896 ("pkg-config" ,pkg-config)
897 ("ronn" ,ronn)
898 ("w3m" ,w3m)
899 ("xorg-server" ,xorg-server)))
900 (inputs
901 `(("boost" ,boost)
902 ("gmime" ,gmime)
903 ("gobject-introspection" ,gobject-introspection) ; it is referenced
904 ("gtkmm" ,gtkmm)
905 ("libpeas" ,libpeas)
906 ("libsass" ,libsass)
907 ("notmuch" ,notmuch)
908 ("protobuf" ,protobuf)
909 ("python" ,python-wrapper)
910 ("python-pygobject" ,python-pygobject)
911 ("webkitgtk" ,webkitgtk)))
4c9eed9c
TLC
912 (propagated-inputs
913 `(("adwaita-icon-theme" ,adwaita-icon-theme))) ; Required for the thread view
82ffc79f
TLC
914 (home-page "https://astroidmail.github.io/")
915 (synopsis "GTK frontend to the notmuch mail system")
916 (description
917 "Astroid is a lightweight and fast Mail User Agent that provides a
918graphical interface to searching, display and composing email, organized in
919thread and tags. Astroid uses the notmuch backend for searches through tons of
920email. Astroid searches, displays and compose emails — and relies on other
921programs for fetching, syncing and sending email.")
922 (license (list license:gpl3+ ; 'this program'
923 license:lgpl2.1+)))) ; code from geary, gmime
924
0d63abeb
SL
925(define-public ripmime
926 ;; Upstream does not tag or otherwise provide any releases (only a version
927 ;; number in the source)
928 (let ((commit "a556ffe08d620602475c976732e8e1a82f3169e9")
929 (revision "1"))
930 (package
931 (name "ripmime")
932 (version (git-version "1.4.0.10" revision commit))
933 (source (origin
934 (method git-fetch)
935 (uri (git-reference
936 (url "https://github.com/inflex/ripMIME")
937 (commit commit)))
938 (file-name (git-file-name name version))
939 (sha256
940 (base32
941 "1z8ar8flvkd9q3ax4x28sj5pyq8ykk5pq249y967lj2406lxparh"))))
942 (build-system gnu-build-system)
943 (arguments
944 `(#:phases
945 (modify-phases %standard-phases
946 ;; Source has no configure script
947 (delete 'configure)
948 ;; Buildcodes make the build non-reproducible; remove them
949 (add-after 'unpack 'strip-buildcodes
950 (lambda _
951 (substitute* "generate-buildcodes.sh"
952 (("`date \\+%s`") "0")
953 (("`date`") "0")
954 (("`uname -a`") "Guix"))
955 #t))
956 ;; https://github.com/inflex/ripMIME/pull/16 makes 'mkdir-p-bin-man unnecessary
957 (add-before 'install 'mkdir-p-bin-man
958 (lambda _
959 (mkdir-p (string-append (assoc-ref %outputs "out") "/bin"))
960 (mkdir-p (string-append (assoc-ref %outputs "out") "/man"))
961 #t)))
962 ;; Makefile has no tests
963 #:tests? #f
964 #:make-flags (list (string-append "LOCATION=" (assoc-ref %outputs "out"))
965 "CC=gcc")))
966 (synopsis "Extract attachments from MIME-encoded email")
967 (description
968 "ripMIME is a small program to extract the attached files out of a
969MIME-encoded email package.")
970 (home-page "https://github.com/inflex/ripMIME")
971 (license license:bsd-3))))
972
85ad1551
ASM
973(define-public mailcap
974 (let* ((version "2.1.49")
975 (tag ;; mailcap tags their releases like this: rMajor-minor-patch
976 (string-append "r" (string-join (string-split version #\.) "-"))))
977 (package
978 (name "mailcap")
979 (version version)
980 (source
981 (origin
982 (method git-fetch)
983 (uri (git-reference
984 (url "https://pagure.io/mailcap.git")
985 (commit tag)))
986 (file-name (git-file-name name version))
987 (sha256
988 (base32
989 "0ck1fw6gqn51phcfakhfpfq1yziv3gnmgjvswzhj9x0p162n6alj"))))
990 (build-system gnu-build-system)
991 (arguments
992 '(#:phases
993 (modify-phases %standard-phases
994 (delete 'configure)
995 (add-before 'install 'set-dest-dir
996 (lambda* (#:key outputs #:allow-other-keys)
997 (let ((out (assoc-ref outputs "out")))
998 (setenv "DESTDIR" out)
999 (substitute* "Makefile"
1000 (("/usr") "")) ; This allows the man page to install.
1001 #t))))))
1002 (native-inputs
1003 `(("python" ,python))) ; for tests
1004 (synopsis "MIME type associations for file types")
1005 (description
1006 "This package provides MIME type associations for file types.")
1007 (home-page "https://pagure.io/mailcap")
1008 (license (list license:expat ; mailcap.5
1009 license:public-domain))))) ; mailcap and mime.types
1010
a7e59c50
LC
1011(define-public bogofilter
1012 (package
1013 (name "bogofilter")
2665ff41
TGR
1014 (version "1.2.5")
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-stable/"
1019 "bogofilter-" version ".tar.xz"))
1020 (sha256
1021 (base32 "1sl9xrnnlk2sn8gmibhn8li09vnansjbxb9l1182qmgz7cvs2j1j"))))
a7e59c50
LC
1022 (build-system gnu-build-system)
1023 (arguments
c55fa42b
EF
1024 '(#:phases
1025 (modify-phases %standard-phases
1026 (add-before 'check 'pre-check
1027 (lambda _
1028 (substitute* "src/tests/t.frame"
1029 (("GREP=/bin/grep")
1030 (string-append "GREP=" (which "grep") "\n")))
1031 #t)))))
a7e59c50
LC
1032 (native-inputs `(("flex" ,flex)))
1033 (inputs `(("bdb" ,bdb)))
0ba57558 1034 (home-page "https://bogofilter.sourceforge.io/")
a7e59c50
LC
1035 (synopsis "Mail classifier based on a Bayesian filter")
1036 (description
1037 "Bogofilter is a mail filter that classifies mail as spam or ham
1038 (non-spam) by a statistical analysis of the message's header and
1039content (body). The program is able to learn from the user's classifications
1040and corrections. It is based on a Bayesian filter.")
7e3b537c 1041 (license license:gpl3+)))
a7e59c50 1042
3919a31a
EB
1043(define-public offlineimap
1044 (package
1045 (name "offlineimap")
d763e3c7 1046 (version "7.3.3")
3919a31a 1047 (source (origin
bc7c9f77
MB
1048 (method git-fetch)
1049 (uri (git-reference
1050 (url "https://github.com/OfflineIMAP/offlineimap")
1051 (commit (string-append "v" version))))
1052 (file-name (git-file-name name version))
3919a31a
EB
1053 (sha256
1054 (base32
d763e3c7 1055 "1gg8ry67i20qapj4z20am9bm67m2q28kixcj7ja75m897vhzarnq"))))
3919a31a 1056 (build-system python-build-system)
7a6213cb 1057 (native-inputs
4b0e6367 1058 `(("asciidoc" ,asciidoc)))
d763e3c7
TG
1059 (inputs
1060 `(("python2-pysqlite" ,python2-pysqlite)
1061 ("python2-rfc6555" ,python2-rfc6555)
1062 ("python2-six" ,python2-six)))
3919a31a
EB
1063 (arguments
1064 ;; The setup.py script expects python-2.
1065 `(#:python ,python-2
1066 ;; Tests require a modifiable IMAP account.
42aa73b3
EF
1067 #:tests? #f
1068 #:phases
1069 (modify-phases %standard-phases
7a6213cb
MB
1070 (add-after 'build 'build-documentation
1071 (lambda _
1072 (substitute* "docs/Makefile"
1073 ;; Prevent xmllint and xsltproc from downloading a DTD file.
1074 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
7232c3f5 1075 (invoke "make" "-C" "docs" "man")))
7a6213cb
MB
1076 (add-after 'install 'install-documentation
1077 (lambda* (#:key outputs #:allow-other-keys)
1078 (let* ((out (assoc-ref outputs "out"))
1079 (man (string-append out "/share/man")))
1080 (install-file "docs/offlineimap.1" (string-append man "/man1"))
1081 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
42aa73b3 1082 #t))))))
684633e2 1083 (home-page "https://www.offlineimap.org")
31e98ca6 1084 (synopsis "Sync emails between two repositories")
3919a31a
EB
1085 (description
1086 "OfflineImap synchronizes emails between two repositories, so that you
1087can read the same mailbox from multiple computers. It supports IMAP as REMOTE
1088repository and Maildir/IMAP as LOCAL repository.")
7e3b537c 1089 (license license:gpl2+)))
3919a31a 1090
3e9750c3
TD
1091(define-public emacs-mew
1092 (package
1093 (name "emacs-mew")
611a6980 1094 (version "6.8")
3e9750c3
TD
1095 (source (origin
1096 (method url-fetch)
8502ff7a 1097 (uri (string-append "https://mew.org/Release/mew-"
3e9750c3
TD
1098 version ".tar.gz"))
1099 (sha256
1100 (base32
611a6980 1101 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
3e9750c3
TD
1102 (native-inputs
1103 `(("emacs" ,emacs)))
1104 (propagated-inputs
1105 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
1106 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
1107 (build-system gnu-build-system)
1108 (arguments
d5195020 1109 (let ((elisp-dir "/share/emacs/site-lisp")
3e9750c3
TD
1110 (icon-dir "/share/mew"))
1111 `(#:modules ((guix build gnu-build-system)
1112 (guix build utils)
1113 (guix build emacs-utils))
1114 #:imported-modules (,@%gnu-build-system-modules
1115 (guix build emacs-utils))
1116 #:configure-flags
1117 (list (string-append "--with-elispdir=" %output ,elisp-dir)
1118 (string-append "--with-etcdir=" %output ,icon-dir))
1119 #:phases
1120 (modify-phases %standard-phases
1121 (add-after 'configure 'patch-mew-icon-directory
1122 (lambda* (#:key outputs #:allow-other-keys)
1123 (emacs-substitute-sexps "mew-key.el"
1124 ("(def.* mew-icon-directory"
1125 `(progn
1126 (add-to-list 'image-load-path 'mew-icon-directory)
1127 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
1128 #t))
1129 (add-after 'install 'generate-autoloads
1130 (lambda* (#:key outputs #:allow-other-keys)
1131 (emacs-generate-autoloads
1132 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
1133 #t)))
1134 #:tests? #f)))
8502ff7a 1135 (home-page "https://mew.org")
3e9750c3
TD
1136 (synopsis "Emacs e-mail client")
1137 (description "Mew (Messaging in the Emacs World) is a user interface
1138for text messages, multimedia messages (MIME), news articles and
1139security functionality including PGP, S/MIME, SSH, and SSL.")
7e3b537c 1140 (license license:bsd-3)))
3e9750c3 1141
d2938d59
EB
1142(define-public mu
1143 (package
1144 (name "mu")
9a45b335 1145 (version "1.4.15")
d2938d59
EB
1146 (source (origin
1147 (method url-fetch)
e7b9da24 1148 (uri (string-append "https://github.com/djcb/mu/releases/"
b40ba288 1149 "download/" version "/"
857fabcd 1150 "mu-" version ".tar.xz"))
d2938d59
EB
1151 (sha256
1152 (base32
9a45b335 1153 "0ailz0k5fdgq6gdl5m7jxy315b7qn5ckj6xwd49hsiq9vqblwlpp"))))
d2938d59
EB
1154 (build-system gnu-build-system)
1155 (native-inputs
1156 `(("pkg-config" ,pkg-config)
9fd571a2 1157 ("glib" ,glib "bin") ; for gtester
63298f14 1158 ("emacs" ,emacs-minimal)
857fabcd 1159 ("tzdata" ,tzdata-for-tests))) ; for mu/test/test-mu-query.c
d2938d59
EB
1160 (inputs
1161 `(("xapian" ,xapian)
d59ec129 1162 ("guile" ,guile-2.2)
d2938d59 1163 ("glib" ,glib)
857fabcd 1164 ("gmime" ,gmime)))
d2938d59 1165 (arguments
704f2196
AK
1166 `(#:modules ((guix build gnu-build-system)
1167 (guix build utils)
1168 (guix build emacs-utils))
1169 #:imported-modules (,@%gnu-build-system-modules
1170 (guix build emacs-utils))
1171 #:phases
99404fff 1172 (modify-phases %standard-phases
e62e975b 1173 (add-after 'unpack 'patch-configure
789bda83
AK
1174 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
1175 ;; so our Emacs package can't find it. Setting "--with-lispdir"
1176 ;; configure flag doesn't help because "mu4e" will be added to
1177 ;; the lispdir anyway, so we have to modify "configure.ac".
1178 (lambda _
e62e975b 1179 (substitute* "configure"
d59ec129
RW
1180 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
1181 ;; Use latest Guile
1182 (("guile-2.0") "guile-2.2"))
1183 (substitute* '("guile/Makefile.in"
1184 "guile/mu/Makefile.in")
1185 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
789bda83 1186 #t))
096a0527 1187 (add-after 'unpack 'patch-bin-sh-in-tests
3481c714 1188 (lambda _
096a0527
PL
1189 (substitute* '("guile/tests/test-mu-guile.c"
1190 "mu/test-mu-cmd.c"
1191 "mu/test-mu-cmd-cfind.c"
1192 "mu/test-mu-query.c"
1193 "mu/test-mu-threads.c")
1194 (("/bin/sh") (which "sh")))
3481c714 1195 #t))
c9dc4577
RW
1196 (add-before 'install 'fix-ffi
1197 (lambda* (#:key outputs #:allow-other-keys)
1198 (substitute* "guile/mu.scm"
1199 (("\"libguile-mu\"")
1200 (format #f "\"~a/lib/libguile-mu\""
1201 (assoc-ref outputs "out"))))
1202 #t))
99404fff
AK
1203 (add-before 'check 'check-tz-setup
1204 (lambda* (#:key inputs #:allow-other-keys)
1205 ;; For mu/test/test-mu-query.c
1206 (setenv "TZDIR"
1207 (string-append (assoc-ref inputs "tzdata")
1208 "/share/zoneinfo"))
704f2196
AK
1209 #t))
1210 (add-after 'install 'install-emacs-autoloads
1211 (lambda* (#:key outputs #:allow-other-keys)
1212 (emacs-generate-autoloads
1213 "mu4e"
1214 (string-append (assoc-ref outputs "out")
1215 "/share/emacs/site-lisp"))
99404fff 1216 #t)))))
754c1204 1217 (home-page "https://www.djcbsoftware.nl/code/mu/")
d2938d59
EB
1218 (synopsis "Quickly find emails")
1219 (description
1220 "Mu is a tool for dealing with e-mail messages stored in the
1221Maildir-format. Mu's purpose in life is to help you to quickly find the
1222messages you need; in addition, it allows you to view messages, extract
1223attachments, create new maildirs, and so on.")
7e3b537c 1224 (license license:gpl3+)))
d2938d59 1225
a2cb16b0
TS
1226(define-public alot
1227 (package
1228 (name "alot")
5f72da5f 1229 (version "0.9.1")
a2cb16b0 1230 (source (origin
05be4e06 1231 (method git-fetch)
1b94f182
TS
1232 ;; package author intends on distributing via github rather
1233 ;; than pypi:
1234 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
05be4e06
EF
1235 (uri (git-reference
1236 (url "https://github.com/pazz/alot")
1237 (commit version)))
1238 (file-name (git-file-name name version))
a2cb16b0
TS
1239 (sha256
1240 (base32
05be4e06 1241 "0s94m17yph1gq9f2svipb3bbwbw1s4j3zf2xkg5h91006v8286r6"))))
a2cb16b0
TS
1242 (build-system python-build-system)
1243 (arguments
5f72da5f
TLC
1244 `(#:phases
1245 (modify-phases %standard-phases
1246 (add-before 'check 'fix-tests
1247 (lambda* (#:key inputs #:allow-other-keys)
1248 (let ((gnupg (assoc-ref inputs "gnupg")))
1249 (substitute* "tests/test_crypto.py"
1250 (("gpg2") (string-append gnupg "/bin/gpg")))
1251 #t)))
1252 (add-before 'check 'disable-failing-tests
1253 ;; FIXME: Investigate why these tests are failing.
1254 (lambda _
1255 (substitute* "tests/test_helper.py"
1256 (("def test_env_set") "def _test_env_set"))
1257 (substitute* "tests/commands/test_global.py"
1258 (("def test_no_spawn_no_stdin_attached")
1259 "def _test_no_spawn_no_stdin_attached"))
1260 #t)))))
3f81ca32 1261 (native-inputs
5f72da5f
TLC
1262 `(("procps" ,procps)
1263 ("python-mock" ,python-mock)))
a2cb16b0 1264 (inputs
5f72da5f
TLC
1265 `(("gnupg" ,gnupg)
1266 ("python-magic" ,python-magic)
1267 ("python-configobj" ,python-configobj)
1268 ("python-twisted" ,python-twisted)
1269 ("python-service-identity" ,python-service-identity)
1270 ("python-urwid" ,python-urwid)
1271 ("python-urwidtrees" ,python-urwidtrees)
1272 ("python-gpg" ,python-gpg)
1273 ("python-notmuch" ,python-notmuch)))
a2cb16b0 1274 (home-page "https://github.com/pazz/alot")
5f72da5f 1275 (synopsis "Command-line MUA using Notmuch")
a2cb16b0 1276 (description
5f72da5f
TLC
1277 "Alot is a terminal-based mail user agent based on the Notmuch mail
1278indexer. It is written in Python using the @code{urwid} toolkit and features
1279a modular and command prompt driven interface to provide a full mail user
1280agent (@dfn{MUA}) experience as an alternative to the Emacs mode shipped with
1281Notmuch.")
7e3b537c 1282 (license license:gpl3+)))
a2cb16b0 1283
0350a8bb
HG
1284(define-public notifymuch
1285 (let
1286 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
1287 (revision "1"))
1288 (package
1289 (name "notifymuch")
1290 (version (string-append "0.1-" revision "." (string-take commit 7)))
1291 (source
1292 (origin
1293 (method git-fetch)
1294 (uri (git-reference
b0e7b699 1295 (url "https://github.com/kspi/notifymuch")
0350a8bb
HG
1296 (commit commit)))
1297 (sha256
1298 (base32
1299 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
1300 (file-name (string-append name "-" version "-checkout"))))
1301 (build-system python-build-system)
1302 (inputs
1303 `(("python-notmuch" ,python-notmuch)
1304 ("python-pygobject" ,python-pygobject)
1305 ("gobject-introspection" ,gobject-introspection)
1306 ("libnotify" ,libnotify)
1307 ("gtk+" ,gtk+)))
1308 (arguments
1309 `(#:phases
1310 (modify-phases %standard-phases
1311 (add-after 'install 'wrap-binary
1312 (lambda* (#:key outputs #:allow-other-keys)
1313 (let* ((out (assoc-ref outputs "out"))
1314 (bin (string-append out "/bin/notifymuch")))
1315 (wrap-program bin
1316 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
1317 `("GI_TYPELIB_PATH" ":" prefix
1318 (,(getenv "GI_TYPELIB_PATH")
1319 ,(string-append out "/lib/girepository-1.0")))))
1320 #t)))))
1321 (home-page "https://github.com/kspi/notifymuch")
1322 (synopsis "Displays notifications for changes in the notmuch email database")
1323 (description "notifymuch displays desktop notifications for messages in
1324the notmuch database. The notifications are sent using libnotify to a
1325notification daemon. The query to find messages to send a notification about
1326is configurable, and a notification for the same message will not be send
1327within a configurable period (defaults to 48 hours). To use notifymuch, run
1328@command{notifymuch} after new mail is indexed, this can be automated by
1329invoking @command{notifymuch} from the post-new hook.")
7e3b537c 1330 (license license:gpl3))))
0350a8bb 1331
1bd3f849
DT
1332(define-public notmuch
1333 (package
1334 (name "notmuch")
7cb188f8 1335 (version "0.31.4")
1bd3f849
DT
1336 (source (origin
1337 (method url-fetch)
866fade9 1338 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
edc55ce9 1339 version ".tar.xz"))
1bd3f849
DT
1340 (sha256
1341 (base32
7cb188f8 1342 "0magnyjjhhv11nwcm2596hdxszrj61y69i0hmwqdc3v6cxjvcqc6"))))
1bd3f849
DT
1343 (build-system gnu-build-system)
1344 (arguments
d738f134
AI
1345 `(#:modules ((guix build gnu-build-system)
1346 ((guix build emacs-build-system) #:prefix emacs:)
1347 (guix build utils))
1348 #:imported-modules (,@%gnu-build-system-modules
1349 (guix build emacs-build-system)
1350 (guix build emacs-utils))
e82cf6c6
TGR
1351 #:make-flags
1352 (list "V=1" ; verbose test output
1353 "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
eb537f57 1354 #:phases (modify-phases %standard-phases
6cf27c89
MB
1355 (add-after 'unpack 'patch-notmuch-lib.el
1356 (lambda _
1357 (substitute* "emacs/notmuch-lib.el"
1358 (("/bin/sh") (which "sh")))
1359 #t))
eb537f57
DT
1360 (replace 'configure
1361 (lambda* (#:key outputs #:allow-other-keys)
1362 (setenv "CC" "gcc")
1363 (setenv "CONFIG_SHELL" (which "sh"))
ee886454 1364
d738f134
AI
1365 (let* ((out (assoc-ref outputs "out"))
1366 (elisp
1cd91499 1367 (string-append out "/share/emacs/site-lisp/")))
82d2dfa0
TGR
1368 (invoke "./configure"
1369 (string-append "--prefix=" out)
1370 (string-append "--emacslispdir=" elisp)
1371 (string-append "--emacsetcdir=" elisp)))))
c05d2cfc
MW
1372 (add-before 'check 'disable-failing-tests
1373 ;; FIXME: Investigate why these tests are failing,
edc55ce9 1374 ;; and try removing this for notmuch versions > 0.31.
c05d2cfc
MW
1375 (lambda _
1376 (substitute* "test/T356-protected-headers.sh"
1377 (("\\$NOTMUCH_GMIME_X509_CERT_VALIDITY") "0"))
1378 #t))
6cf27c89
MB
1379 (add-before 'check 'prepare-test-environment
1380 (lambda _
1381 (setenv "TEST_CC" "gcc")
1382 ;; Patch various inline shell invocations.
1383 (substitute* (find-files "test" "\\.sh$")
1384 (("/bin/sh") (which "sh")))
d738f134
AI
1385 #t))
1386 (add-after 'install 'make-autoloads
1387 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
1bd3f849 1388 (native-inputs
2c5b91dc 1389 `(("bash-completion" ,bash-completion)
76472ed9 1390 ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
2c5b91dc 1391 ("pkg-config" ,pkg-config)
3d3c07f3
MB
1392 ("python" ,python)
1393 ("python-docutils" ,python-docutils)
556530c9 1394 ("sphinx" ,python-sphinx)
6cf27c89
MB
1395
1396 ;; The following are required for tests only.
1397 ("which" ,which)
1398 ("dtach" ,dtach)
1399 ("gnupg" ,gnupg)
1400 ("man" ,man-db)
1401 ("perl" ,perl)))
1bd3f849 1402 (inputs
2c5b91dc 1403 `(("glib" ,glib)
1bd3f849
DT
1404 ("gmime" ,gmime)
1405 ("talloc" ,talloc)
1406 ("xapian" ,xapian)
1407 ("zlib" ,zlib)))
540d6cc7 1408 (home-page "https://notmuchmail.org/")
1bd3f849
DT
1409 (synopsis "Thread-based email index, search, and tagging")
1410 (description
1411 "Notmuch is a command-line based program for indexing, searching, read-
1412ing, and tagging large collections of email messages.")
7e3b537c 1413 (license license:gpl3+)))
1bd3f849 1414
8a75c589 1415(define-public notmuch-addrlookup-c
9694b44e
AI
1416 (package
1417 (name "notmuch-addrlookup-c")
1418 (version (string-append "9"))
1419 (source (origin
1420 (method git-fetch)
1421 (uri (git-reference
b0e7b699 1422 (url "https://github.com/aperezdc/notmuch-addrlookup-c")
9694b44e
AI
1423 (commit (string-append "v" version))))
1424 (file-name (string-append name "-" version "-checkout"))
1425 (sha256
1426 (base32
1427 "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
1428 (build-system gnu-build-system)
1429 (arguments
1430 '(#:tests? #f ; no tests
1431 #:make-flags (list "CC=gcc")
1432 #:phases (modify-phases %standard-phases
1433 (delete 'configure)
1434 ;; Remove vim code completion config, it's not needed to
1435 ;; build (or be patched).
1436 (add-before 'patch-source-shebangs 'delete-ycm-file
1437 (lambda _ (delete-file ".ycm_extra_conf.py")))
1438 (replace 'install
1439 (lambda* (#:key outputs #:allow-other-keys)
1440 (let ((bin (string-append
1441 (assoc-ref outputs "out") "/bin")))
1442 (install-file "notmuch-addrlookup" bin)))))))
1443 (native-inputs
1444 `(("pkg-config" ,pkg-config)))
1445 (inputs
1446 `(("glib" ,glib)
1447 ("notmuch" ,notmuch)))
1448 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
1449 (synopsis "Address lookup tool for Notmuch")
1450 (description "This is an address lookup tool using a Notmuch database,
8a75c589 1451useful for email address completion.")
9694b44e 1452 (license license:expat)))
8a75c589 1453
4b6909bc
TS
1454(define-public python-notmuch
1455 (package
1456 (name "python-notmuch")
540d6cc7 1457 (version (package-version notmuch))
4b6909bc
TS
1458 ;; Notmuch python bindings are now unavailable on pypi. The
1459 ;; bindings are distributed via the notmuch release tarball.
1460 (source (package-source notmuch))
1461 (build-system python-build-system)
1462 (inputs `(("notmuch" ,notmuch)))
1463 (arguments
1464 `(#:tests? #f ; no "test" target
1465 #:phases
1466 (modify-phases %standard-phases
1467 ;; This python package lives in a subdirectory of the notmuch source
1468 ;; tree, so chdir into it before building.
1469 (add-after 'unpack 'enter-python-dir
1470 (lambda _ (chdir "bindings/python") #t))
1471 ;; Make sure the correct notmuch shared library gets loaded.
1472 (add-before 'build 'set-libnotmuch-file-name
1473 (lambda* (#:key inputs #:allow-other-keys)
1474 (let ((notmuch (assoc-ref inputs "notmuch")))
1475 (substitute* "notmuch/globals.py"
1476 (("libnotmuch\\.so\\.")
1477 (string-append notmuch "/lib/libnotmuch.so.")))
1478 #t))))))
540d6cc7 1479 (home-page (package-home-page notmuch))
4b6909bc
TS
1480 (synopsis "Python bindings of the Notmuch mail indexing library")
1481 (description
1482 "This package provides Python bindings to use the Notmuch mail indexing
1483and search library.")
7e3b537c 1484 (license license:gpl3+)))
4b6909bc 1485
1c74da21 1486(define-public python2-notmuch
caa6fc89 1487 (package-with-python2 python-notmuch))
1c74da21 1488
9ec27360
JW
1489(define-public muchsync
1490 (package
1491 (name "muchsync")
72ee78a6 1492 (version "6")
9ec27360
JW
1493 (source
1494 (origin
1495 (method url-fetch)
1496 (uri (string-append "http://www.muchsync.org/src/"
1497 "muchsync-" version ".tar.gz"))
1498 (sha256
72ee78a6 1499 (base32 "1s799kx16nm5ry1fcqcc0grgxrwnnp4cnzd0hzwbkvc5v2sf6g8b"))))
9ec27360
JW
1500 (build-system gnu-build-system)
1501 (native-inputs
8514dfde 1502 `(("pandoc" ,pandoc)
9ec27360
JW
1503 ("pkg-config" ,pkg-config)))
1504 (inputs
1505 `(("libcrypto" ,openssl)
1506 ("notmuch" ,notmuch)
1507 ("sqlite" ,sqlite)
1508 ("xapian" ,xapian)))
1509 (home-page "http://www.muchsync.org/")
1510 (synopsis "Synchronize notmuch mail across machines")
1511 (description
1512 "Muchsync brings Notmuch to all of your computers by synchronizing your
1513mail messages and Notmuch tags across machines. The protocol is heavily
1514pipelined to work efficiently over high-latency networks such as mobile
1515broadband. Muchsync supports arbitrary pairwise synchronization among
1516replicas. A version-vector-based algorithm allows it to exchange only the
1517minimum information necessary to bring replicas up to date regardless of which
1518pairs have previously synchronized.")
72ee78a6 1519 (license license:gpl2+))) ; with OpenSSL libcrypto exception
9ec27360 1520
98e9e22f
SB
1521(define-public getmail
1522 (package
1523 (name "getmail")
222679d2 1524 (version "5.15")
98e9e22f
SB
1525 (source
1526 (origin
1527 (method url-fetch)
1528 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
7e14ed93 1529 "getmail-" version ".tar.gz"))
98e9e22f 1530 (sha256
222679d2 1531 (base32 "0ahn2jyj4ka996qzs99id59pwxv6sqxp61g7drcf53rzzigq0lyl"))))
98e9e22f
SB
1532 (build-system python-build-system)
1533 (arguments
88e903a5 1534 `(#:tests? #f ; no tests
98e9e22f
SB
1535 #:python ,python-2))
1536 (home-page "http://pyropus.ca/software/getmail/")
1537 (synopsis "Mail retriever")
1538 (description
1539 "A flexible, extensible mail retrieval system with support for
1540POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1541arbitrary message filtering, single-user and domain-mailboxes, and many other
1542useful features.")
1543
1544 ;; License is specified in file '__init__.py'.
7e3b537c 1545 (license license:gpl2)))
98e9e22f 1546
f58f767b
JL
1547(define-public libetpan
1548 (package
1549 (name "libetpan")
a43fcc72 1550 (version "1.9.4")
f58f767b 1551 (source (origin
aae96f8f
TGR
1552 (method git-fetch)
1553 (uri (git-reference
8ed4c468 1554 (url "https://github.com/dinhviethoa/libetpan")
aae96f8f
TGR
1555 (commit version)))
1556 (file-name (git-file-name name version))
f58f767b 1557 (sha256
a43fcc72 1558 (base32 "0g7an003simfdn7ihg9yjv7hl2czsmjsndjrp39i7cad8icixscn"))))
f58f767b 1559 (build-system gnu-build-system)
ce10e2b3 1560 (native-inputs `(("autoconf" ,autoconf)
f58f767b 1561 ("automake" ,automake)
3246cc91 1562 ("libtool" ,libtool)
f58f767b
JL
1563 ("pkg-config" ,pkg-config)))
1564 (propagated-inputs
1565 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1566 ;; libraries need to be propagated.
1567 `(("cyrus-sasl" ,cyrus-sasl)
1568 ("openssl" ,openssl)))
1569 (inputs
1570 `(("curl" ,curl)
c1748912
EF
1571 ("expat" ,expat)
1572 ("zlib" ,zlib)))
f58f767b 1573 (arguments
778d6b52 1574 '(#:configure-flags
f58f767b 1575 '("--disable-static" "--disable-db")))
81fb037f 1576 (home-page "https://www.etpan.org/libetpan.html")
f58f767b
JL
1577 (synopsis "Portable middleware for email access")
1578 (description
1579 "The purpose of this mail library is to provide a portable, efficient
1580framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1581provides an API for C language. It's the low-level API used by MailCore and
1582MailCore 2.")
7e3b537c 1583 (license license:bsd-3)))
f58f767b 1584
ee6e780b
DM
1585(define-public compface
1586 (package
1587 (name "compface")
1588 (version "1.5.2")
1589 (source (origin
1590 (method url-fetch)
1591 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1592 "ftp.xemacs.org/aux/"
f30444b9 1593 "compface-" version ".tar.gz"))
ee6e780b
DM
1594 (sha256
1595 (base32
1596 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1597 (build-system gnu-build-system)
1598 (arguments
1599 `(#:tests? #f))
1600 (synopsis "Portrait image compressor")
586ddde5 1601 (description "This package takes your 48x48x1 portrait image and
ee6e780b 1602compresses it.")
0622403d 1603 (home-page "https://legacy.cs.indiana.edu/ftp/faces/")
7e3b537c 1604 (license (license:x11-style "file://README"))))
ee6e780b 1605
e8435c4d
JL
1606(define-public claws-mail
1607 (package
1608 (name "claws-mail")
fc316a58 1609 (version "3.17.8")
b168f2ba
RG
1610 (source
1611 (origin
1612 (method url-fetch)
1613 (uri
fc316a58
TGR
1614 (string-append "https://www.claws-mail.org/releases/claws-mail-"
1615 version ".tar.xz"))
b168f2ba 1616 (sha256
fc316a58 1617 (base32 "1byxmz68lnm2m8q1gnp0lpr3qp7dcwabrw5iqflz9mlm960v5dyd"))))
7269a591 1618 (build-system glib-or-gtk-build-system)
e8435c4d 1619 (arguments
b168f2ba
RG
1620 `(#:configure-flags
1621 (list
1622 "--enable-gnutls"
1623 "--enable-pgpmime-plugin"
1624 "--enable-enchant"
1625 "--enable-ldap")
1626 #:make-flags
1627 ;; Disable updating icon cache since it's done by the profile hook.
1628 ;; Conflict with other packages in the profile would be inevitable
1629 ;; otherwise.
1630 (list
1631 "gtk_update_icon_cache=true")
1632 #:phases
1633 (modify-phases %standard-phases
1634 (add-before 'build 'patch-mime
1635 (lambda* (#:key inputs #:allow-other-keys)
1636 (substitute* "src/procmime.c"
1637 (("/usr/share/mime/globs")
1638 (string-append (assoc-ref inputs "mime-info")
1639 "/share/mime/globs"))))))))
1640 (native-inputs
1641 `(("pkg-config" ,pkg-config)))
1642 (inputs
1643 `(("bogofilter" ,bogofilter)
1644 ("curl" ,curl)
1645 ("dbus-glib" ,dbus-glib)
1646 ("enchant" ,enchant)
1647 ("expat" ,expat)
1648 ("ghostscript" ,ghostscript)
1649 ("hicolor-icon-theme" ,hicolor-icon-theme)
1650 ("gnupg" ,gnupg)
1651 ("gnutls" ,gnutls)
1652 ("gpgme" ,gpgme)
1653 ("gtk" ,gtk+-2)
1654 ("libarchive" ,libarchive)
1655 ("libcanberra" ,libcanberra)
1656 ("libetpan" ,libetpan)
1657 ("libical" ,libical)
1658 ("libnotify" ,libnotify)
1659 ("libsm" ,libsm)
1660 ("libxml2" ,libxml2)
1661 ("perl" ,perl)
1662 ("python-2" ,python-2)
1663 ("mime-info" ,shared-mime-info)
1664 ("startup-notification" ,startup-notification)))
e8435c4d 1665 (synopsis "GTK-based Email client")
b168f2ba
RG
1666 (description "Claws-Mail is an email client (and news reader) based on GTK+.
1667The appearance and interface are designed to be familiar to new users coming
1668from other popular email clients, as well as experienced users. Almost all
1669commands are accessible with the keyboard. Plus, Claws-Mail is extensible via
1670addons which can add many functionalities to the base client.")
ba5c926c 1671 (home-page "https://www.claws-mail.org/")
7e3b537c 1672 (license license:gpl3+))) ; most files are actually public domain or x11
e8435c4d 1673
d6e941bc
1674(define-public msmtp
1675 (package
1676 (name "msmtp")
a0b3d968 1677 (version "1.8.15")
d6e941bc
1678 (source
1679 (origin
1680 (method url-fetch)
1a80f1a9 1681 (uri (string-append "https://marlam.de/msmtp/releases/"
d23d1ddf
LF
1682 "/msmtp-" version ".tar.xz"))
1683 (sha256
a0b3d968 1684 (base32 "1klrj2a77671xb6xa0a0iyszhjb7swxhmzpzd4qdybmzkrixqr92"))))
d6e941bc
1685 (build-system gnu-build-system)
1686 (inputs
91b3a6d4 1687 `(("libsecret" ,libsecret)
d6e941bc
1688 ("gnutls" ,gnutls)
1689 ("zlib" ,zlib)
1690 ("gsasl" ,gsasl)))
1691 (native-inputs
1692 `(("pkg-config" ,pkg-config)))
1a80f1a9 1693 (home-page "https://marlam.de/msmtp/")
d6e941bc
1694 (arguments
1695 `(#:configure-flags (list "--with-libgsasl"
1696 "--with-libidn"
823e2ed4
LF
1697 "--with-tls=gnutls")
1698 #:phases
1699 (modify-phases %standard-phases
34e549d8 1700 (add-after 'install 'install-additional-files
823e2ed4
LF
1701 (lambda* (#:key outputs #:allow-other-keys)
1702 (let* ((out (assoc-ref outputs "out"))
1703 (bin (string-append out "/bin"))
1704 (doc (string-append out "/share/doc/msmtp"))
34e549d8
EF
1705 (msmtpq "scripts/msmtpq")
1706 (vimfiles (string-append out "/share/vim/vimfiles/plugin")))
823e2ed4
LF
1707 (install-file (string-append msmtpq "/msmtpq") bin)
1708 (install-file (string-append msmtpq "/msmtp-queue") bin)
1709 (install-file (string-append msmtpq "/README.msmtpq") doc)
34e549d8 1710 (install-file "scripts/vim/msmtp.vim" vimfiles)
b93b7b25
EF
1711 ;; Don't rely on netcat being in the PATH to test for a
1712 ;; connection, instead try tp ing debian.org.
1713 (substitute* (string-append bin "/msmtpq")
1714 (("EMAIL_CONN_TEST=n") "EMAIL_CONN_TEST=p"))
823e2ed4 1715 #t))))))
d6e941bc
1716 (synopsis
1717 "Simple and easy to use SMTP client with decent sendmail compatibility")
1718 (description
1719 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1720an SMTP server (for example at a free mail provider) which takes care of further
1721delivery.")
7e3b537c 1722 (license license:gpl3+)))
d6e941bc 1723
66cc3ab2
TUBK
1724(define-public exim
1725 (package
1726 (name "exim")
125aacaa 1727 (version "4.94")
66cc3ab2
TUBK
1728 (source
1729 (origin
1730 (method url-fetch)
c9b99e88
TGR
1731 (uri (let ((file-name (string-append "exim-" version ".tar.xz")))
1732 (list (string-append "https://ftp.exim.org/pub/exim/exim4/"
1733 file-name)
1734 ;; ‘Fix’ releases (exim-x.y.z.f) are kept separately.
1735 (string-append "https://ftp.exim.org/pub/exim/exim4/fixes/"
1736 file-name)
1737 ;; After a new non-fix release, the old one is moved here.
1738 (string-append "https://ftp.exim.org/pub/exim/exim4/old/"
1739 file-name))))
66cc3ab2 1740 (sha256
125aacaa 1741 (base32 "1nsb2i5mqxfz1sl1bmbxmpb2qiaf3wffhfiw4j9vfpagy3xfhzpp"))))
66cc3ab2
TUBK
1742 (build-system gnu-build-system)
1743 (inputs
15871b52 1744 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
cda8250b 1745 ("gnutls" ,gnutls/dane)
66cc3ab2
TUBK
1746 ("gzip" ,gzip)
1747 ("bzip2" ,bzip2)
1748 ("xz" ,xz)
66cc3ab2 1749 ("perl" ,perl)
c315d370 1750 ("libnsl" ,libnsl)
66cc3ab2
TUBK
1751 ("libxt" ,libxt)
1752 ("libxaw" ,libxaw)))
1753 (native-inputs
42773138 1754 `(("pcre" ,pcre "bin")
cda8250b
TGR
1755 ("perl" ,perl)
1756 ("pkg-config" ,pkg-config)))
66cc3ab2
TUBK
1757 (arguments
1758 '(#:phases
dc1d3cde
KK
1759 (modify-phases %standard-phases
1760 (replace 'configure
1761 ;; We'd use #:make-flags but the top-level Makefile calls others
1762 ;; recursively, so just set all variables this way.
1763 (lambda* (#:key outputs inputs #:allow-other-keys)
1764 (substitute* '("Makefile" "OS/Makefile-Default")
1765 (("(RM_COMMAND=).*" all var)
1766 (string-append var "rm\n")))
1767 (copy-file "src/EDITME" "Local/Makefile")
1768 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1769 (let ((out (assoc-ref outputs "out"))
1770 (gzip (assoc-ref inputs "gzip"))
1771 (bzip2 (assoc-ref inputs "bzip2"))
1772 (xz (assoc-ref inputs "xz")))
1773 (substitute* '("Local/Makefile")
1774 (("(BIN_DIRECTORY=).*" all var)
1775 (string-append var out "/bin\n"))
1776 (("(CONFIGURE_FILE=).*" all var)
1777 (string-append var out "/etc/exim.conf\n"))
1778 (("(EXIM_USER=).*" all var)
1779 (string-append var "nobody\n"))
1780 (("(FIXED_NEVER_USERS=).*" all var)
15871b52 1781 (string-append var "\n")) ; XXX no root in build environment
dc1d3cde
KK
1782 (("(COMPRESS_COMMAND=).*" all var)
1783 (string-append var gzip "/bin/gzip\n"))
1784 (("(ZCAT_COMMAND=).*" all var)
cda8250b
TGR
1785 (string-append var gzip "/bin/zcat\n"))
1786 (("# (USE_GNUTLS(|_PC)=.*)" all line)
793713dc 1787 (string-append line "\n"))
1788 (("# (AUTH_CRAM_MD5=yes)" all line) line)
1789 (("# (AUTH_DOVECOT=yes)" all line) line)
1790 (("# (AUTH_EXTERNAL=yes)" all line) line)
1791 (("# (AUTH_PLAINTEXT=yes)" all line) line)
1792 (("# (AUTH_SPA=yes)" all line) line)
1793 (("# (AUTH_TLS=yes)" all line) line))
cda8250b
TGR
1794 ;; This file has hard-coded relative file names for tools despite
1795 ;; the zcat configuration above.
dc1d3cde
KK
1796 (substitute* '("src/exigrep.src")
1797 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1798 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1799 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1800 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1801 #t))
1802 (add-before 'build 'fix-sh-paths
1803 (lambda* (#:key inputs #:allow-other-keys)
1804 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1805 (("SHELL=/bin/sh") "SHELL=sh"))
1806 (substitute* '("scripts/Configure-config.h")
1807 (("\\| /bin/sh") "| sh"))
1808 (let ((bash (assoc-ref inputs "bash")))
1809 (substitute* '("scripts/Configure-eximon")
1810 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
bb335e84
TGR
1811 #t))
1812 (add-before 'build 'build-reproducibly
1813 (lambda _
1814 ;; The ‘compilation number’ is incremented for every build from the
1815 ;; same source tree. It appears to vary over different (parallel?)
1816 ;; builds. Make it a ‘constant number’ instead.
1817 (substitute* "src/version.c"
1818 (("#include \"cnumber.h\"") "1")))))
cda8250b
TGR
1819 #:make-flags
1820 (list "CC=gcc"
1821 "INSTALL_ARG=-no_chown")
1822 ;; No 'check' target. There is a test suite in test/, which assumes that
1823 ;; certain build options were (not) used and that it can freely ‘sudo’.
66cc3ab2 1824 #:tests? #f))
85a9ffcb 1825 (home-page "https://www.exim.org/")
66cc3ab2
TUBK
1826 (synopsis
1827 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1828 (description
1829 "Exim is a message transfer agent (MTA) developed at the University of
1830Cambridge for use on Unix systems connected to the Internet. In style it is
1831similar to Smail 3, but its facilities are more general. There is a great
1832deal of flexibility in the way mail can be routed, and there are extensive
1833facilities for checking incoming mail.")
7e3b537c 1834 (license license:gpl2+)))
66cc3ab2 1835
7d2b784b
MW
1836(define-public dovecot
1837 (package
1838 (name "dovecot")
3fc0f877 1839 ;; Also update dovecot-pigeonhole when updating to a new minor version.
1c8a3283 1840 (version "2.3.14")
7d2b784b
MW
1841 (source
1842 (origin
1843 (method url-fetch)
c8608faf 1844 (uri (string-append "https://www.dovecot.org/releases/"
7d2b784b 1845 (version-major+minor version) "/"
2fa1a3a8 1846 "dovecot-" version ".tar.gz"))
c03b355f 1847 (sha256
1c8a3283 1848 (base32 "0jm3p52z619v7ajh533g2g7d790k82fk0w7ry0zqlm8ymzrxgcy8"))))
7d2b784b
MW
1849 (build-system gnu-build-system)
1850 (native-inputs
1851 `(("pkg-config" ,pkg-config)))
1852 (inputs
2bc3ec3b 1853 `(("bzip2" ,bzip2)
9e2a49db
AA
1854 ("clucene" ,clucene)
1855 ("icu4c" ,icu4c)
8826b792 1856 ("libsodium" ,libsodium) ; extra password algorithms
c6872990 1857 ("libstemmer" ,libstemmer)
84ce7c5a
PL
1858 ;; FIXME: The 'test-backtrace' tests fail on arm when using glibc's
1859 ;; backtrace_symbol() function so fallback to using libunwind.
1860 ,@(if (target-arm?)
1861 `(("libunwind" ,libunwind))
1862 '())
2bc3ec3b
TGR
1863 ("linux-pam" ,linux-pam)
1864 ("lz4" ,lz4)
1865 ("openssl" ,openssl)
fd5c70f8 1866 ("sqlite" ,sqlite)
cc16c576
TGR
1867 ("zlib" ,zlib)
1868 ("zstd" ,zstd "lib")))
7d2b784b
MW
1869 (arguments
1870 `(#:configure-flags '("--sysconfdir=/etc"
d6894b95 1871 "--localstatedir=/var"
9e2a49db 1872 "--with-sqlite" ; not auto-detected
c6872990 1873 "--with-lucene") ; not auto-detected
f762e49f
TGR
1874 #:phases
1875 (modify-phases %standard-phases
f762e49f
TGR
1876 (add-after 'unpack 'patch-file-names
1877 (lambda _
1878 (substitute* "src/lib-program-client/test-program-client-local.c"
1879 (("(/bin/| )cat") (which "cat"))
1880 (("/bin/echo") (which "echo"))
1881 (("/bin/false") (which "false"))
1882 (("/bin/sh") (which "bash"))
1883 (("head") (which "head"))
1884 (("sleep") (which "sleep")))
1885 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1886 "src/lib-smtp/test-bin/sendmail-success.sh")
1887 (("cat") (which "cat")))
37fc44ea
TGR
1888 #t))
1889 (replace 'install
54151d1a 1890 (lambda* (#:key make-flags #:allow-other-keys)
37fc44ea
TGR
1891 ;; Simple hack to avoid installing a trivial README in /etc.
1892 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1893 make-flags))))))
c8608faf 1894 (home-page "https://www.dovecot.org")
7d2b784b
MW
1895 (synopsis "Secure POP3/IMAP server")
1896 (description
1897 "Dovecot is a mail server whose major goals are security and reliability.
1898It supports mbox/Maildir and its own dbox/mdbox formats.")
1899 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1900 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1901 ;; Unicode, Inc. License Agreement for Data Files and Software.
7e3b537c
TGR
1902 (license (list license:lgpl2.1 license:expat
1903 (license:non-copyleft "file://COPYING")))))
7d2b784b 1904
3fc0f877
AA
1905(define-public dovecot-pigeonhole
1906 (let ((dovecot-version (version-major+minor (package-version dovecot))))
1907 (package
1908 (name "dovecot-pigeonhole")
b12974ec 1909 (version "0.5.14")
3fc0f877
AA
1910 (source
1911 (origin
1912 (method url-fetch)
1913 (uri (string-append
1914 "https://pigeonhole.dovecot.org/releases/" dovecot-version "/"
1915 "dovecot-" dovecot-version "-pigeonhole-" version ".tar.gz"))
1916 (sha256
b12974ec 1917 (base32 "1lmjzz4kd90wbdslacybizd1dks4bhwmrx39lj8b19naldw0zjk8"))
3fc0f877
AA
1918 (modules '((guix build utils)))
1919 (snippet
1920 '(begin
1921 ;; RFC licencing is ad-hoc and rarely free. Remove them all.
1922 (delete-file-recursively "doc/rfc")
1923 (substitute* "configure"
1924 (("doc/rfc/Makefile") ""))
1925 (substitute* "doc/Makefile.in"
1926 (("rfc ") ""))
1927 #t))))
1928 (build-system gnu-build-system)
1929 (arguments
1930 `(#:configure-flags
1931 (list "--disable-static"
1932 "--with-dovecot-install-dirs=no"
1933 (string-append "--with-dovecot="
1934 (assoc-ref %build-inputs "dovecot")
1935 "/lib/dovecot")
1936 (string-append "--docdir="
1937 (assoc-ref %outputs "out")
1938 "/share/doc/" ,name "-" ,version)
1939 (string-append "--with-moduledir="
1940 (assoc-ref %outputs "out")
1941 "/lib/dovecot"))
1942 #:phases
1943 (modify-phases %standard-phases
1944 (add-after 'unpack 'patch-file-names
1945 (lambda* (#:key outputs #:allow-other-keys)
1946 (let* ((out (assoc-ref outputs "out"))
1947 (libexec (string-append out "/libexec/dovecot")))
1948 (substitute* "src/managesieve/managesieve-settings.c"
1949 (("\\.executable = \"managesieve\"")
1950 (string-append ".executable = \"" libexec
1951 "/managesieve\"")))
1952 (substitute* "src/managesieve-login/managesieve-login-settings.c"
1953 (("\\.executable = \"managesieve-login\"")
1954 (string-append ".executable = \"" libexec
1955 "/managesieve-login\"")))
1956 #t))))))
1957 (native-inputs
1958 `(("pkg-config" ,pkg-config)))
1959 (inputs
1960 `(("dovecot" ,dovecot)))
1961 (home-page "https://pigeonhole.dovecot.org")
1962 (synopsis "Dovecot Sieve mail filtering plug-in and ManageSieve service")
1963 (description
1964 "Pigeonhole adds support for the Sieve language (RFC 5228) and the
1965ManageSieve protocol (RFC 5804) to the Dovecot e-mail server.
1966
1967@dfn{Sieve} is a language for filtering incoming mail. Messages can be
1968forwarded or sorted into separate folders. Unwanted messages can be rejected
1969or discarded, and, when the user is not available, the Sieve interpreter can
1970send an automated reply.
1971
1972Sieve is meant to be simple, extensible, and system-independent. The
1973intention is to make it impossible to write anything more complex (and
1974dangerous) than simple mail filters. Unlike most other mail filtering script
1975languages, Sieve does not allow users to execute arbitrary programmes.
1976
1977Through the @dfn{ManageSieve} protocol, users can remotely manage their Sieve
1978scripts without needing file system access. The server accepts only valid
1979scripts to prevent embarrassing errors later on.")
1980 (license license:lgpl2.1))))
1981
944a5cdd 1982(define-public dovecot-trees
cf47a8a5 1983 (package
1984 (name "dovecot-trees")
1985 (version "2.1.0")
1986 (source
1987 (origin
1988 (method url-fetch)
1989 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1990 "archive.tar.gz?ref=v" version))
1991 (file-name (string-append name "-" version ".tar.gz"))
1992 (sha256
1993 (base32
0e66f4a1
TGR
1994 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1995 (patches
1996 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
cf47a8a5 1997 (build-system gnu-build-system)
1998 (native-inputs
1999 `(("automake" ,automake)
2000 ("autoconf" ,autoconf)
2001 ("libtool" ,libtool)
2002 ("dovecot" ,dovecot)
2003 ("pkg-config" ,pkg-config)))
2004 (inputs
2005 `(("libsodium" ,libsodium)))
2006 (arguments
2007 `(#:tests? #f ;No tests exist.
2008 #:configure-flags (list (string-append "--with-dovecot="
2009 (assoc-ref %build-inputs "dovecot")
7b0efd4c 2010 "/lib/dovecot"))))
cf47a8a5 2011 (home-page "https://0xacab.org/riseuplabs/trees")
2012 (synopsis "NaCL-based Dovecot email storage encryption plugin")
2013 (description
2014 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
944a5cdd 2015Dovecot encryption plugin. This plugin adds individually encrypted mail
2016storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
7230f6d5 2017which uses OpenSSL and RSA key pairs. TREES works in a similar way, but uses
944a5cdd 2018the Sodium crypto library (based on NaCL).
2019
2020How it works:
2021@enumerate
2022@item On IMAP log in, the user's cleartext password is passed to the plugin.
2023@item The plugin creates an argon2 digest from the password.
2024@item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
2025@item Inside the secretbox is stored a Curve25519 private key.
2026@item The Curve25519 private key is used to decrypt each individual message,
b3a47662 2027using libsodium sealed boxes.
944a5cdd 2028@item New mail is encrypted as it arrives using the Curve25519 public key.
2029@end enumerate\n")
7e3b537c 2030 (license license:agpl3)))
944a5cdd 2031
a4651f64 2032(define-public dovecot-libsodium-plugin
2033 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
2034 (revision "1"))
2035 (package
2036 (name "dovecot-libsodium-plugin")
2037 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
2038 (source
2039 (origin
2040 (method git-fetch)
2041 (uri (git-reference
2042 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
2043 (commit commit)))
2044 (file-name (string-append name "-" version "-checkout"))
2045 (sha256
2046 (base32
2047 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
2048 (build-system gnu-build-system)
2049 (native-inputs
2050 `(("automake" ,automake)
2051 ("autoconf" ,autoconf)
2052 ("libtool" ,libtool)
2053 ("dovecot" ,dovecot)
2054 ("pkg-config" ,pkg-config)))
2055 (inputs
2056 `(("libsodium" ,libsodium)))
2057 (arguments
2058 `(#:tests? #f ;No tests exist.
2059 #:configure-flags (list (string-append "--with-dovecot="
2060 (assoc-ref %build-inputs "dovecot")
1f53fdae 2061 "/lib/dovecot"))))
a4651f64 2062 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
2063 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
2064 (description
8826b792
TGR
2065 "@code{dovecot-libsodium-plugin} provides a libsodium password
2066hashing scheme (such as scrypt) plug-in for @code{Dovecot}.")
7e3b537c 2067 (license license:gpl3+))))
a4651f64 2068
81ce19f4
2069(define-public isync
2070 (package
2071 (name "isync")
ba9e29f1 2072 (version "1.4.1")
81ce19f4
2073 (source
2074 (origin
2075 (method url-fetch)
2076 (uri (string-append "mirror://sourceforge/isync/isync/"
2077 version "/isync-" version ".tar.gz"))
2078 (sha256 (base32
ba9e29f1 2079 "0l01880fcyqn6xq9n8236ha5n2a3wl5g8rmv22z8nv5hgfsxndhd"))))
81ce19f4 2080 (build-system gnu-build-system)
49490231
LF
2081 (native-inputs
2082 `(("perl" ,perl)))
81ce19f4
2083 (inputs
2084 `(("bdb" ,bdb)
a052d5ab 2085 ("cyrus-sasl" ,cyrus-sasl)
e1d3b07f 2086 ("openssl" ,openssl)
a66fb3a1 2087 ("zlib" ,zlib)))
0eea5596 2088 (home-page "https://isync.sourceforge.io/")
81ce19f4
2089 (synopsis "Mailbox synchronization program")
2090 (description
f6cd8586 2091 "isync/mbsync is a command-line tool for two-way synchronization of
81ce19f4 2092mailboxes. Currently Maildir and IMAP are supported types.")
7e3b537c 2093 (license license:gpl2+)))
81ce19f4 2094
26b8de19
EB
2095(define-public perl-email-abstract
2096 (package
2097 (name "perl-email-abstract")
2098 (version "3.008")
2099 (source
2100 (origin
2101 (method url-fetch)
2102 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2103 "Email-Abstract-" version ".tar.gz"))
2104 (sha256
2105 (base32
2106 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
2107 (build-system perl-build-system)
2108 (propagated-inputs
2109 `(("perl-email-simple" ,perl-email-simple)
a2190ccc 2110 ("perl-module-pluggable" ,perl-module-pluggable)
26b8de19 2111 ("perl-mro-compat" ,perl-mro-compat)))
9aba9b12 2112 (home-page "https://metacpan.org/release/Email-Abstract")
26b8de19
EB
2113 (synopsis "Interface to mail representations")
2114 (description "Email::Abstract provides module writers with the ability to
2115write simple, representation-independent mail handling code.")
7e3b537c 2116 (license license:perl-license)))
26b8de19 2117
ebda902f
EB
2118(define-public perl-email-address
2119 (package
2120 (name "perl-email-address")
b6c7df92 2121 (version "1.912")
ebda902f
EB
2122 (source
2123 (origin
2124 (method url-fetch)
2125 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2126 "Email-Address-" version ".tar.gz"))
2127 (sha256
b6c7df92 2128 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
ebda902f 2129 (build-system perl-build-system)
9aba9b12 2130 (home-page "https://metacpan.org/release/Email-Address")
ebda902f
EB
2131 (synopsis "Email address parsing and creation")
2132 (description "Email::Address implements a regex-based RFC 2822 parser that
2133locates email addresses in strings and returns a list of Email::Address
2134objects found. Alternatively you may construct objects manually.")
7e3b537c 2135 (license license:perl-license)))
ebda902f 2136
944d3b4b
SB
2137(define-public perl-email-address-xs
2138 (package
2139 (name "perl-email-address-xs")
2140 (version "1.04")
2141 (source
2142 (origin
2143 (method url-fetch)
2144 (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
2145 "Email-Address-XS-" version ".tar.gz"))
2146 (sha256
2147 (base32
2148 "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
2149 (build-system perl-build-system)
2150 (home-page "https://metacpan.org/release/Email-Address-XS")
2151 (synopsis "Parse and format RFC 5322 email addresses and groups")
2152 (description
2153 "Email::Address::XS implements RFC 5322 parser and formatter of email
2154addresses and groups. Unlike Email::Address, this module does not use regular
2155expressions for parsing but instead is implemented in XS and uses shared code
2156from Dovecot IMAP server.")
7e3b537c 2157 (license license:perl-license)))
944d3b4b 2158
aa86a3be
EB
2159(define-public perl-email-date-format
2160 (package
2161 (name "perl-email-date-format")
2162 (version "1.005")
2163 (source
2164 (origin
2165 (method url-fetch)
2166 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2167 "Email-Date-Format-" version ".tar.gz"))
2168 (sha256
2169 (base32
2170 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
2171 (build-system perl-build-system)
9aba9b12 2172 (home-page "https://metacpan.org/release/Email-Date-Format")
aa86a3be
EB
2173 (synopsis "Produce RFC 2822 date strings")
2174 (description "Email::Date::Format provides a means for generating an RFC
21752822 compliant datetime string.")
7e3b537c 2176 (license license:perl-license)))
aa86a3be 2177
08bf7095
EB
2178(define-public perl-email-messageid
2179 (package
2180 (name "perl-email-messageid")
1fb37ef0 2181 (version "1.406")
08bf7095
EB
2182 (source
2183 (origin
2184 (method url-fetch)
2185 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2186 "Email-MessageID-" version ".tar.gz"))
2187 (sha256
2188 (base32
1fb37ef0 2189 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
08bf7095 2190 (build-system perl-build-system)
9aba9b12 2191 (home-page "https://metacpan.org/release/Email-MessageID")
08bf7095
EB
2192 (synopsis "Generate world unique message-ids")
2193 (description "Email::MessageID generates recommended message-ids to
2194identify a message uniquely.")
7e3b537c 2195 (license license:perl-license)))
08bf7095 2196
0a4c49f6
EB
2197(define-public perl-email-mime
2198 (package
2199 (name "perl-email-mime")
4f50fd75 2200 (version "1.946")
0a4c49f6
EB
2201 (source
2202 (origin
2203 (method url-fetch)
2204 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2205 "Email-MIME-" version ".tar.gz"))
2206 (sha256
2207 (base32
4f50fd75 2208 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
0a4c49f6
EB
2209 (build-system perl-build-system)
2210 (propagated-inputs
2211 `(("perl-email-address" ,perl-email-address)
2212 ("perl-email-messageid" ,perl-email-messageid)
2213 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
2214 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
2215 ("perl-email-simple" ,perl-email-simple)
4f50fd75
TGR
2216 ("perl-mime-types" ,perl-mime-types)
2217 ("perl-module-runtime" ,perl-module-runtime)))
9aba9b12 2218 (home-page "https://metacpan.org/release/Email-MIME")
0a4c49f6
EB
2219 (synopsis "MIME message handling")
2220 (description "Email::MIME is an extension of the Email::Simple module, to
2221handle MIME encoded messages. It takes a message as a string, splits it up
2222into its constituent parts, and allows you access to various parts of the
2223message. Headers are decoded from MIME encoding.")
7e3b537c 2224 (license license:perl-license)))
0a4c49f6 2225
55025bb5
EB
2226(define-public perl-email-mime-contenttype
2227 (package
2228 (name "perl-email-mime-contenttype")
9b5fc20c 2229 (version "1.022")
55025bb5
EB
2230 (source
2231 (origin
2232 (method url-fetch)
2233 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2234 "Email-MIME-ContentType-" version ".tar.gz"))
2235 (sha256
2236 (base32
9b5fc20c 2237 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
55025bb5
EB
2238 (build-system perl-build-system)
2239 (native-inputs
2240 `(("perl-capture-tiny" ,perl-capture-tiny)))
9aba9b12 2241 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
55025bb5
EB
2242 (synopsis "Parse MIME Content-Type headers")
2243 (description "Email::MIME::ContentType parses a MIME Content-Type
2244header.")
7e3b537c 2245 (license license:perl-license)))
55025bb5 2246
02e29936
EB
2247(define-public perl-email-mime-encodings
2248 (package
2249 (name "perl-email-mime-encodings")
2250 (version "1.315")
2251 (source
2252 (origin
2253 (method url-fetch)
2254 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2255 "Email-MIME-Encodings-" version ".tar.gz"))
2256 (sha256
2257 (base32
2258 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
2259 (build-system perl-build-system)
2260 (native-inputs
2261 `(("perl-capture-tiny" ,perl-capture-tiny)))
9aba9b12 2262 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
02e29936
EB
2263 (synopsis "Unified interface to MIME encoding and decoding")
2264 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
7e3b537c 2265 (license license:perl-license)))
02e29936 2266
a24c5420
EB
2267(define-public perl-email-sender
2268 (package
2269 (name "perl-email-sender")
532db12e 2270 (version "1.300035")
a24c5420
EB
2271 (source
2272 (origin
2273 (method url-fetch)
2274 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2275 "Email-Sender-" version ".tar.gz"))
2276 (sha256
532db12e 2277 (base32 "0yfssp3rqdx1dmgvnygarzgkpkhqm28r5sd0gh87ksk8yxndhjql"))))
a24c5420
EB
2278 (build-system perl-build-system)
2279 (native-inputs
2280 `(("perl-capture-tiny" ,perl-capture-tiny)))
2281 (propagated-inputs
2282 `(("perl-email-abstract" ,perl-email-abstract)
2283 ("perl-email-address" ,perl-email-address)
2284 ("perl-email-simple" ,perl-email-simple)
2285 ("perl-list-moreutils" ,perl-list-moreutils)
2286 ("perl-module-runtime" ,perl-module-runtime)
2287 ("perl-moo" ,perl-moo)
2288 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
2289 ("perl-sub-exporter" ,perl-sub-exporter)
2290 ("perl-throwable" ,perl-throwable)
2291 ("perl-try-tiny" ,perl-try-tiny)))
9aba9b12 2292 (home-page "https://metacpan.org/release/Email-Sender")
a24c5420
EB
2293 (synopsis "Perl library for sending email")
2294 (description "Email::Sender replaces the old and sometimes problematic
2295Email::Send library.")
7e3b537c 2296 (license license:perl-license)))
a24c5420 2297
151ef3ed
EB
2298(define-public perl-email-simple
2299 (package
2300 (name "perl-email-simple")
3a2f1d93 2301 (version "2.216")
151ef3ed
EB
2302 (source
2303 (origin
2304 (method url-fetch)
2305 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2306 "Email-Simple-" version ".tar.gz"))
2307 (sha256
2308 (base32
3a2f1d93 2309 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
151ef3ed
EB
2310 (build-system perl-build-system)
2311 (propagated-inputs
2312 `(("perl-email-date-format" ,perl-email-date-format)))
9aba9b12 2313 (home-page "https://metacpan.org/release/Email-Simple")
151ef3ed
EB
2314 (synopsis "Parsing of RFC 2822 messages")
2315 (description "Email::Simple provides simple parsing of RFC 2822 message
2316format and headers.")
7e3b537c 2317 (license license:perl-license)))
151ef3ed 2318
f5dceecb
AW
2319(define-public libesmtp
2320 (package
2321 (name "libesmtp")
2322 (version "1.0.6")
2323 (source
2324 (origin
2325 (method url-fetch)
049e02ea
LF
2326 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
2327 "libesmtp/libesmtp-" version ".tar.bz2/"
2328 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
2329 version ".tar.bz2")
2330 ;; XXX This site is offline, so we fetch Fedora's cached copy
2331 ;; of the source tarball.
2332 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
2333 version ".tar.bz2")))
f5dceecb
AW
2334 (sha256
2335 (base32
2336 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
2337 (build-system gnu-build-system)
2338 (propagated-inputs
2339 `(("openssl" ,openssl)))
2340 (home-page "http://www.stafford.uklinux.net/libesmtp/")
2341 (synopsis "Library for sending mail via remote hosts using SMTP")
2342 (description "libESMTP is an SMTP client which manages posting (or
2343submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
2344It may be used as part of a Mail User Agent (MUA) or other program that must
2345be able to post electronic mail where mail functionality may not be that
2346program's primary purpose.")
7e3b537c 2347 (license (list license:lgpl2.1+ license:gpl2+))))
f5dceecb 2348
f8ae32a2
AW
2349(define-public esmtp
2350 (package
2351 (name "esmtp")
2352 (version "1.2")
2353 (source
2354 (origin
2355 (method git-fetch)
2356 (uri (git-reference
b0e7b699 2357 (url "https://github.com/andywingo/esmtp")
f8ae32a2
AW
2358 (commit "01bf9fc")))
2359 (sha256
2360 (base32
2361 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
2362 (file-name (string-append name "-" version "-checkout"))))
2363 (arguments
2364 `(#:phases (modify-phases %standard-phases
73c0e477
EF
2365 (replace 'bootstrap
2366 (lambda _ (invoke "autoreconf" "-vfi"))))))
f8ae32a2
AW
2367 (build-system gnu-build-system)
2368 (native-inputs
2369 `(("bison" ,bison)
2370 ("flex" ,flex)
2371 ("autoconf" ,autoconf)
2372 ("automake" ,automake)
2373 ("libtool" ,libtool)))
2374 (inputs
718c5dd6 2375 `(("libesmtp" ,libesmtp)))
3b3b60d0 2376 (home-page "https://sourceforge.net/projects/esmtp/")
f8ae32a2
AW
2377 (synopsis "Relay-only mail transfer agent (MTA)")
2378 (description "Esmtp is a simple relay-only mail transfer agent built using
2379libESMTP. It sends e-mail via a remote SMTP server using credentials from the
2380user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
2381page for more on configuration. This package also provides minimal
2382compatibility shims for the @command{sendmail}, @command{mailq}, and
2383@command{newaliases} commands.")
7e3b537c 2384 (license license:gpl2+)))
f8ae32a2 2385
34dd26af
CAW
2386(define-public fdm
2387 (package
2388 (name "fdm")
9a0681d1 2389 (version "2.0")
34dd26af
CAW
2390 (source (origin
2391 (method url-fetch)
2392 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
9a0681d1 2393 version "/fdm-" version ".tar.gz"))
34dd26af 2394 (sha256
9a0681d1 2395 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
34dd26af
CAW
2396 (build-system gnu-build-system)
2397 (inputs
2398 `(("tdb" ,tdb)
2399 ("openssl" ,openssl)
2400 ("zlib" ,zlib)))
2401 (home-page "https://github.com/nicm/fdm")
2402 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
2403 (description "fdm is a program designed to fetch mail from POP3
2404or IMAP servers, or receive local mail from stdin, and
2405deliver it in various ways.")
2406 (license
2407 ;; Why point to a source file? Well, all the individual files have a
2408 ;; copy of this license in their headers, but there's no seprate file
2409 ;; with that information.
7e3b537c
TGR
2410 (license:non-copyleft
2411 "https://github.com/nicm/fdm/blob/master/command.c"))))
34dd26af 2412
e90819c4
LG
2413
2414(define-public procmail
2415 (package
2416 (name "procmail")
2417 (version "3.22")
2418 (source
2419 (origin
2420 (method url-fetch)
2421 (uri (string-append
2422 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
2423 version
2424 ".tar.gz"))
2425 (sha256
2426 (base32
2427 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
2428 ;; The following patch fixes an ambiguous definition of
2429 ;; getline() in formail.c. The patch is provided by Debian as
2430 ;; patch 24.
1d982d78 2431 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
c297e965
LF
2432 "procmail-CVE-2014-3618.patch"
2433 "procmail-CVE-2017-16844.patch"))))
e90819c4
LG
2434 (arguments
2435 `(#:phases (modify-phases %standard-phases
2436 (replace 'configure
2437 (lambda _
2438 (substitute* "Makefile"
2439 (("/bin/sh")
2440 (which "sh"))
2441 (("/usr")
2442 (assoc-ref %outputs "out"))
2443 (("/bin/rm")
2444 (which "rm")))
2445 #t)))
2446 #:tests? #f)) ;; There are no tests indicating a successful
2447 ;; build. Some tests of basic locking mechanisms provided by the
8f65585b 2448 ;; file system are performed during 'make install'. However, these
e90819c4
LG
2449 ;; are performed before the actual build process.
2450 (build-system gnu-build-system)
05aa576b 2451 (inputs `(("exim" ,exim)))
e90819c4
LG
2452 (home-page "http://www.procmail.org/")
2453 (synopsis "Versatile mail delivery agent (MDA)")
2454 (description "Procmail is a mail delivery agent (MDA) featuring support
2455for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
2456can be sorted into separate files/directories and arbitrary commands can be
2457executed on mail arrival. Procmail is considered stable, but is no longer
2458maintained.")
7e3b537c
TGR
2459 (license license:gpl2+))) ;; procmail allows to choose the
2460 ;; nonfree Artistic License 1.0
2461 ;; as alternative to the GPL2+.
2462 ;; This option is not listed here.
e90819c4 2463
61c30e9d
LF
2464(define-public khard
2465 (package
2466 (name "khard")
9a95985f 2467 (version "0.17.0")
61c30e9d
LF
2468 (source (origin
2469 (method url-fetch)
2470 (uri (pypi-uri name version))
2471 (sha256
2472 (base32
9a95985f 2473 "062nv4xkfsjc11k9m52dh6xjn9z68a4a6x1s8z05wwv4jbp1lkhn"))))
61c30e9d
LF
2474 (build-system python-build-system)
2475 (arguments
2385012b
EF
2476 `(#:phases
2477 (modify-phases %standard-phases
70333ee6 2478 (add-after 'install 'install-completions
2385012b
EF
2479 (lambda* (#:key outputs #:allow-other-keys)
2480 (let* ((out (assoc-ref outputs "out"))
70333ee6
EF
2481 (zsh (string-append out "/share/zsh/site-functions")))
2482 (copy-recursively "misc/zsh" zsh)
2385012b 2483 #t))))))
82680f80
TLC
2484 (native-inputs
2485 `(("python-setuptools-scm" ,python-setuptools-scm)))
d312bbfa 2486 (inputs
224b1c83
EF
2487 `(("python-atomicwrites" ,python-atomicwrites)
2488 ("python-configobj" ,python-configobj)
224b1c83
EF
2489 ("python-ruamel.yaml" ,python-ruamel.yaml)
2490 ("python-unidecode" ,python-unidecode)
2491 ("python-vobject" ,python-vobject)))
61c30e9d
LF
2492 (synopsis "Console address book using CardDAV")
2493 (description "Khard is an address book for the console. It creates, reads,
2494modifies and removes CardDAV address book entries at your local machine. For
2495synchronizing with a remote address book, @command{vdirsyncer} is recommended.
2496Khard can also be used from within the email client @command{mutt}.")
2497 (home-page "https://github.com/scheibler/khard")
7e3b537c 2498 (license license:gpl3+)))
be0c5733
DM
2499
2500(define-public perl-mail-spf
27f172a9
TGR
2501 (package
2502 (name "perl-mail-spf")
2503 (version "2.9.0")
2504 (source
2505 (origin
2506 (method url-fetch)
2507 (uri (string-append
2508 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
be0c5733
DM
2509 version
2510 ".tar.gz"))
27f172a9
TGR
2511 (sha256
2512 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
2513 (build-system perl-build-system)
2514 (native-inputs
2515 `(("perl-module-build" ,perl-module-build)
2516 ("perl-net-dns-resolver-programmable"
2517 ,perl-net-dns-resolver-programmable)))
2518 (arguments
2519 `(#:phases
2520 (modify-phases %standard-phases
2521 (add-before 'configure 'modify-Build.PL
2522 (lambda* (#:key outputs #:allow-other-keys)
2523 (substitute* "Build.PL"
2524 (("'/usr/sbin'") (string-append "'"
2525 (assoc-ref outputs "out")
2526 "/sbin'")))
be0c5733 2527 #t)))))
27f172a9
TGR
2528 (inputs
2529 `(("perl-error" ,perl-error)
2530 ("perl-net-dns" ,perl-net-dns)
2531 ("perl-netaddr-ip" ,perl-netaddr-ip)
2532 ("perl-uri" ,perl-uri)))
2533 (home-page "https://metacpan.org/release/Mail-SPF")
2534 (synopsis "Perl implementation of Sender Policy Framework")
2535 (description "Mail::SPF is the Sender Policy Framework implemented
be0c5733 2536in Perl.")
7e3b537c 2537 (license license:bsd-3)))
24262239 2538
f115d817
JL
2539(define-public perl-mail-authenticationresults
2540 (package
2541 (name "perl-mail-authenticationresults")
2542 (version "1.20180923")
2543 (source (origin
2544 (method url-fetch)
2545 (uri (string-append
2546 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
2547 "Mail-AuthenticationResults-" version ".tar.gz"))
2548 (sha256
2549 (base32
2550 "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
2551 (build-system perl-build-system)
2552 (native-inputs
2553 `(("perl-test-exception" ,perl-test-exception)))
2554 (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
2555 (synopsis "Object Oriented Authentication-Results Headers")
2556 (description "Mail::AuthenticationResults parses the message header field
2557that indicates the message authentication status as per RFC7601. This module
2558is not fully compliant with the RFC but it tries to implement most styles of
2559Authentication-Results header seen in the wild.")
7e3b537c 2560 (license license:perl-license)))
f115d817 2561
930c52ae
JL
2562(define-public perl-mail-dkim
2563 (package
2564 (name "perl-mail-dkim")
3b27ffec 2565 (version "0.58")
930c52ae
JL
2566 (source (origin
2567 (method url-fetch)
2568 (uri (string-append
2569 "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
2570 version
2571 ".tar.gz"))
2572 (sha256
2573 (base32
3b27ffec 2574 "0cgkal65qqcy57b21lgij90ba36wl66byw9i76g5yhwaa8ms8hqa"))))
930c52ae
JL
2575 (build-system perl-build-system)
2576 (propagated-inputs
2577 `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2578 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2579 ("perl-mailtools" ,perl-mailtools)
2580 ("perl-net-dns" ,perl-net-dns)))
2581 (native-inputs
2582 `(("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
2583 ("perl-test-requiresinternet" ,perl-test-requiresinternet)
2584 ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
2585 (home-page "https://metacpan.org/release/Mail-DKIM")
2586 (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
2587 (description "Mail::DKIM is a Perl module that implements the new Domain
2588Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
2589both of which sign and verify emails using digital signatures and DNS records.
2590Mail-DKIM can be used by any Perl program that wants to provide support for
2591DKIM and/or DomainKeys.")
7e3b537c 2592 (license license:gpl3+)))
930c52ae 2593
8582202c
JL
2594(define-public dkimproxy
2595 (package
2596 (name "dkimproxy")
2597 (version "1.4.1")
2598 (source (origin
2599 (method url-fetch)
2600 (uri (string-append
2601 "mirror://sourceforge/dkimproxy/dkimproxy/"
2602 version "/dkimproxy-" version ".tar.gz"))
2603 (sha256
2604 (base32
66e39000
TGR
2605 "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
2606 (patches
2607 (search-patches "dkimproxy-add-ipv6-support.patch"))))
8582202c
JL
2608 (build-system gnu-build-system)
2609 (arguments
2610 `(#:phases
2611 (modify-phases %standard-phases
2612 (add-after 'install 'make-wrapper
2613 (lambda* (#:key inputs outputs #:allow-other-keys)
8c07824c
TGR
2614 (let* ((out (assoc-ref outputs "out"))
2615 (wrap.pl (lambda (scripts keys)
2616 (for-each
2617 (lambda (script)
2618 (wrap-program (string-append out script)
2619 `("PERL5LIB" ":" prefix
2620 ,(map (λ (input)
2621 (string-append
2622 (assoc-ref inputs input)
2623 "/lib/perl5/site_perl"))
2624 keys))))
2625 scripts))))
2626 (wrap.pl (list "/bin/dkimproxy.in"
2627 "/bin/dkimproxy.out")
2628 (list "perl-crypt-openssl-rsa"
2629 "perl-io-socket-inet6"
2630 "perl-mailtools"
2631 "perl-mail-authenticationresults"
2632 "perl-mail-dkim"
2633 "perl-net-dns"
2634 "perl-net-server"
2635 "perl-socket6"))
28e4c3bb
TGR
2636 (wrap.pl (list "/bin/dkim_responder.pl")
2637 (list "perl-crypt-openssl-rsa"
2638 "perl-mail-dkim"
2639 "perl-mailtools"
2640 "perl-mime-tools"
2641 "perl-net-dns"
2642 "perl-timedate"))
8c07824c 2643 #t))))))
8582202c
JL
2644 (inputs
2645 `(("perl" ,perl)
2646 ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
66e39000 2647 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
8582202c
JL
2648 ("perl-mailtools" ,perl-mailtools)
2649 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2650 ("perl-mail-dkim" ,perl-mail-dkim)
28e4c3bb 2651 ("perl-mime-tools" ,perl-mime-tools)
8582202c 2652 ("perl-net-dns" ,perl-net-dns)
66e39000 2653 ("perl-net-server" ,perl-net-server)
28e4c3bb
TGR
2654 ("perl-socket6" ,perl-socket6)
2655 ("perl-timedate" ,perl-timedate)))
8582202c 2656 (home-page "http://dkimproxy.sourceforge.net/")
d045dce1
TGR
2657 (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
2658 (description
2659 "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
2660@code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
8582202c 2661proxy for signing outgoing email, and an inbound proxy for verifying signatures
d045dce1
TGR
2662of incoming messages.
2663
2664It was designed for Postfix, but can be used to add DKIM support to nearly any
2665existing mail server. With Postfix, the proxies can operate as either
8582202c 2666@code{Before-Queue} or @code{After-Queue} content filters.")
7e3b537c 2667 (license license:gpl2+)))
8582202c 2668
24262239
CL
2669(define-public mb2md
2670 (package
2671 (name "mb2md")
2672 (version "3.20")
2673 (source (origin
2674 (method url-fetch)
2675 (uri (string-append
2676 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
2677 version ".pl.gz"))
2678 (sha256
2679 (base32
2680 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
2681 (build-system trivial-build-system)
2682 (arguments
2683 '(#:modules ((guix build utils))
2684 #:builder
2685 (begin
2686 (use-modules (guix build utils))
2687 (let* ((source (assoc-ref %build-inputs "source"))
2688 (out (assoc-ref %outputs "out"))
2689 (bin (string-append out "/bin"))
2690 (perl (assoc-ref %build-inputs "perl"))
2691 (gzip (assoc-ref %build-inputs "gzip"))
2692 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
2693 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
2694 (mkdir-p bin)
2695 (with-directory-excursion bin
2696 (copy-file source "mb2md.gz")
e3cfef22 2697 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
24262239
CL
2698 (substitute* "mb2md"
2699 (("#!/usr/bin/perl")
2700 (string-append "#!/usr/bin/perl -I " perl5lib)))
2701 (patch-shebang "mb2md" (list (string-append perl "/bin")))
2702 (chmod "mb2md" #o555))
2703 #t))))
c695fb76 2704 (native-inputs `(("gzip" ,gzip)))
24262239
CL
2705 (inputs `(("perl" ,perl)
2706 ("perl-timedate" ,perl-timedate)))
2707 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
2708 (synopsis "Mbox to maildir converter")
2709 (description
2710 "Mb2md is a Perl script that takes one or more mbox format files and
2711converts them to maildir format directories.")
7e3b537c 2712 (license license:public-domain)))
e0d7b421 2713
df661fb9
W
2714(define-public mblaze
2715 (package
2716 (name "mblaze")
976d072a 2717 (version "1.1")
df661fb9
W
2718 (source
2719 (origin
2720 (method git-fetch)
2721 (uri (git-reference
2722 (url "https://github.com/leahneukirchen/mblaze")
2723 (commit (string-append "v" version))))
2724 (file-name (git-file-name name version))
2725 (sha256
976d072a 2726 (base32 "1bir977vnqs76g8jgv1yivqw0wk2kn56l3l5r4w2ipix3fir138y"))))
df661fb9
W
2727 (build-system gnu-build-system)
2728 (native-inputs
2729 `(("perl" ,perl)))
2730 (arguments
2731 `(#:tests? #f ; XXX: Upstream tests appear to be broken
2732 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2733 "PREFIX="
2734 (string-append "DESTDIR=" %output))
2735 #:phases
2736 (modify-phases %standard-phases
2737 (delete 'configure))))
2738 (home-page "https://github.com/leahneukirchen/mblaze")
2739 (synopsis "Unix utilities to deal with Maildir")
2740 (description
2741 "The mblaze message system is a set of Unix utilities for processing and
2742interacting with mail messages which are stored in maildir folders.
2743
2744Its design is roughly inspired by MH, the RAND Message Handling System, but it
2745is a complete implementation from scratch.
2746
2747mblaze is a classic command line MUA and has no features for receiving or
2748transferring messages; you can operate on messages in a local maildir spool,
2749or fetch your messages using fdm(1), getmail(1), offlineimap(1), or similar
2750utilities, and send it using dma(8), msmtp(1), sendmail(8), as provided by
2751OpenSMTPD, Postfix, or similar.
2752
2753mblaze operates directly on maildir folders and doesn't use its own caches or
2754databases. There is no setup needed for many uses. All utilities have been
2755written with performance in mind. Enumeration of all messages in a maildir is
2756avoided unless necessary, and then optimized to limit syscalls. Parsing
2757message metadata is optimized to limit I/O requests. Initial operations on a
2758large maildir may feel slow, but as soon as they are in the file system cache,
2759everything is blazingly fast. The utilities are written to be memory
2760efficient (i.e. not wasteful), but whole messages are assumed to fit into RAM
2761easily (one at a time).")
2762 (license (list license:public-domain
2763 license:expat)))) ; mystrverscmp.c and mymemmem
2764
e0d7b421
AI
2765(define-public mpop
2766 (package
2767 (name "mpop")
f2d9174b 2768 (version "1.4.13")
e0d7b421
AI
2769 (source
2770 (origin
2771 (method url-fetch)
1497b95c 2772 (uri (string-append "https://marlam.de/mpop/releases/"
822c8501 2773 "mpop-" version ".tar.xz"))
e0d7b421 2774 (sha256
f2d9174b 2775 (base32 "1hbx69d6ivbvjajrcp54fdb3g1ms4ydj0ybf3bfhlravqrk88jdk"))))
e0d7b421
AI
2776 (build-system gnu-build-system)
2777 (inputs
fb5ecdec 2778 `(("gnutls" ,gnutls)))
e0d7b421
AI
2779 (native-inputs
2780 `(("pkg-config" ,pkg-config)))
1497b95c 2781 (home-page "https://marlam.de/mpop/")
e0d7b421
AI
2782 (synopsis "POP3 mail client")
2783 (description "mpop is a small and fast POP3 client suitable as a
2784fetchmail replacement.
2785
2786mpop supports multiple accounts, header based mail filtering, delivery
40b1cee6
TGR
2787to mbox files, maildir folders or an @acronym{MDA, Mail Delivery Agent},
2788TLS/SSL, several authentication methods, @acronym{IDN, Internationalized Domain
2789Names} and SOCKS proxies.")
7e3b537c 2790 (license license:gpl3+)))
74c0282c 2791
2792(define-public mhonarc
2793 (package
2794 (name "mhonarc")
2795 (version "2.6.19")
2796 (source
2797 (origin
2798 (method url-fetch)
2799 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
2800 version ".tar.gz"))
2801 (sha256
2802 (base32
2803 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
2804 (build-system perl-build-system)
2805 (home-page "https://www.mhonarc.org/")
2806 (synopsis "Create HTML archives of mail/news messages")
2807 (description
2808 "MHonArc is a Perl mail-to-HTML converter. MHonArc
2809provides HTML mail archiving with index, mail thread linking,
2810etc; plus other capabilities including support for MIME and
2811powerful user customization features.")
7e3b537c 2812 (license license:gpl2+)))
5d87088c 2813
5d87088c
JD
2814(define-public sendmail
2815 (package
2816 (name "sendmail")
2817 (version "8.15.2")
2818 (source
2819 (origin
2820 (method url-fetch)
2821 (uri (string-append
2822 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
2823 version ".tar.gz"))
2824 (sha256
2825 (base32
2826 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
2827 (build-system gnu-build-system)
2828 (arguments
2829 `(#:phases
2830 (modify-phases %standard-phases
2831 (add-before 'build 'replace-/bin/sh
2832 (lambda _
2833 (substitute*
2834 (append
2835 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2836 "contrib/mmuegel" "devtools/bin/configure.sh")
2837 (find-files "." ".*\\.m4")
2838 (find-files "." ".*\\.cf"))
19527952 2839 (("/bin/sh") (which "sh")))
5d87088c
JD
2840
2841 (substitute* "devtools/bin/Build"
19527952 2842 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
5d87088c
JD
2843 #t))
2844 (replace 'configure
2845 (lambda _
2846
2847 ;; Render harmless any attempts to chown or chgrp
2848 (substitute* "devtools/bin/install.sh"
2849 (("owner=\\$2") "owner=''")
2850 (("group=\\$2") "group=''"))
2851
2852 (with-output-to-file "devtools/Site/site.config.m4"
2853 (lambda ()
2854 (format #t "
2855define(`confCC', `gcc')
2856define(`confOPTIMIZE', `-g -O2')
2857define(`confLIBS', `-lresolv')
2858define(`confINSTALL', `~a/devtools/bin/install.sh')
2859define(`confDEPEND_TYPE', `CC-M')
2860define(`confINST_DEP', `')
55492129
TGR
2861" (getcwd))))
2862 #t))
5d87088c
JD
2863 (replace 'build
2864 (lambda _
55492129
TGR
2865 (invoke "sh" "Build")
2866 (with-directory-excursion "cf/cf"
2867 (copy-file "generic-linux.mc" "sendmail.mc")
2868 (invoke "sh" "Build" "sendmail.cf"))
2869 #t))
5d87088c
JD
2870 (add-before 'install 'pre-install
2871 (lambda _
2872 (let ((out (assoc-ref %outputs "out")))
2873 (mkdir-p (string-append out "/usr/bin"))
2874 (mkdir-p (string-append out "/usr/sbin"))
2875 (mkdir-p (string-append out "/etc/mail"))
2876 (setenv "DESTDIR" out)
2877 (with-directory-excursion "cf/cf"
55492129
TGR
2878 (invoke "sh" "Build" "install-cf"))
2879 #t))))
5d87088c
JD
2880 ;; There is no make check. There are some post installation tests, but those
2881 ;; require root privileges
2882 #:tests? #f))
2883 (inputs
2884 `(("m4" ,m4)
2885 ("perl" ,perl)))
2886 (home-page "http://sendmail.org")
2887 (synopsis
2888 "Highly configurable Mail Transfer Agent (MTA)")
2889 (description
2890 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2891Allman. It is highly configurable and supports many delivery methods and many
2892transfer protocols.")
7e3b537c
TGR
2893 (license (license:non-copyleft "file://LICENSE"
2894 "See LICENSE in the distribution."))))
5d87088c 2895
8cced06f
TGR
2896(define-public sieve-connect
2897 (package
2898 (name "sieve-connect")
2899 (version "0.90")
2900 (source
2901 (origin
2902 (method url-fetch)
2903 (uri (string-append "https://people.spodhuis.org/phil.pennock/software/"
2904 "sieve-connect-" version ".tar.bz2"))
2905 (sha256
2906 (base32 "00vnyzr67yr2ilnprbd388gfnwmrmbdx1jsig9d0n5q902jqn62a"))))
2907 (build-system gnu-build-system)
2908 (arguments
2909 `(#:make-flags
2910 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2911 #:tests? #f ; no test suite
2912 #:phases
2913 (modify-phases %standard-phases
2914 (delete 'configure) ; no configure script
2915 (add-before 'install 'create-output-directories
2916 (lambda* (#:key outputs #:allow-other-keys)
2917 (let ((out (assoc-ref outputs "out")))
2918 (for-each (lambda (subdirectory)
2919 (mkdir-p (string-append out "/" subdirectory)))
2920 (list "bin"
2921 "man/man1"))
2922 #t)))
2923 (add-after 'install 'wrap-program
2924 (lambda* (#:key inputs outputs #:allow-other-keys)
2925 (let ((out (assoc-ref outputs "out"))
2926 (path (getenv "PERL5LIB")))
2927 (wrap-script (string-append out "/bin/sieve-connect")
2928 `("PERL5LIB" ":" = (,path)))
2929 #t))))))
2930 (inputs
2931 `(("guile" ,guile-3.0) ; for wrap-script
2932 ("perl" ,perl)
2933 ("perl-authen-sasl" ,perl-authen-sasl)
2934 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2935 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
2936 ("perl-net-dns" ,perl-net-dns)
2937 ("perl-socket6" ,perl-socket6)
2938 ("perl-term-readkey" ,perl-term-readkey)
2939 ("perl-term-readline" ,perl-term-readline-gnu)))
2940 (home-page
2941 "https://people.spodhuis.org/phil.pennock/software/#sieve-connect")
2942 (synopsis "ManageSieve client for managing Sieve e-mail filters")
2943 (description
2944 "Sieve-connect lets you view, upload, edit, delete, and otherwise manage
2945Sieve scripts on any mail server that speaks the @dfn{ManageSieve} protocol,
7230f6d5 2946as specified in RFC 5804.
8cced06f
TGR
2947
2948@dfn{Sieve} (RFC 5228) is a specialised language for e-mail filtering. Sieve
2949scripts are stored on the server and run whenever mail arrives. They can
2950automatically sort new messages into folders, silently reject them, send an
2951automated response, and more.
2952
2953@command{sieve-connect} is designed to be both a tool which can be invoked
2954from scripts as well as a decent interactive client. It supports TLS for
2955connection privacy, as well as authentication with SASL or GSSAPI client
2956certificates. It should be a drop-in replacement for @command{sieveshell}
2957from the Cyrus IMAP project.")
2958 (license license:bsd-3)))
2959
8b53366c 2960(define-public opensmtpd
2961 (package
2962 (name "opensmtpd")
c9120aa1 2963 (version "6.8.0p2")
4eb57ca8
TGR
2964 (source
2965 (origin
2966 (method url-fetch)
2967 (uri (string-append "https://www.opensmtpd.org/archives/"
2968 "opensmtpd-" version ".tar.gz"))
2969 (sha256
c9120aa1 2970 (base32 "05sd7bmq29ibnqbl2z53hiyprfxzf0qydfdaixs68rz55wqhbgsi"))))
4eb57ca8
TGR
2971 (build-system gnu-build-system)
2972 (inputs
2973 `(("bdb" ,bdb)
2974 ("libasr" ,libasr)
2975 ("libevent" ,libevent)
ba6b48b8 2976 ("libressl" ,libressl) ; recommended, and supports e.g. ECDSA
4eb57ca8
TGR
2977 ("linux-pam" ,linux-pam)
2978 ("zlib" ,zlib)))
2979 (native-inputs
2980 `(("bison" ,bison)
2981 ("groff" ,groff))) ; for man pages
2982 (arguments
2983 `(#:configure-flags
2984 (list "--localstatedir=/var"
2985 ;; This is the default only if it exists at build time—it doesn't.
2986 "--with-path-socket=/var/run"
2987 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2988 "--with-user-smtpd=smtpd"
2989 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2990 "--with-auth-pam"
2991 "--with-table-db")
2992 #:phases
2993 (modify-phases %standard-phases
838c4b10
MC
2994 ;; See: https://github.com/OpenSMTPD/OpenSMTPD/issues/1069.
2995 (add-after 'unpack 'fix-smtpctl-encrypt-bug
2996 (lambda _
f6e06e8b 2997 (substitute* "usr.sbin/smtpd/smtpctl.c"
838c4b10
MC
2998 (("\"encrypt\", \"--\",")
2999 "\"encrypt\","))
3000 #t))
4eb57ca8
TGR
3001 ;; Fix some incorrectly hard-coded external tool file names.
3002 (add-after 'unpack 'patch-FHS-file-names
3003 (lambda _
f6e06e8b 3004 (substitute* "usr.sbin/smtpd/smtpctl.c"
4eb57ca8
TGR
3005 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
3006 (("/bin/cat") (which "cat")))
f6e06e8b 3007 (substitute* "usr.sbin/smtpd/mda_unpriv.c"
4eb57ca8
TGR
3008 (("/bin/sh") (which "sh")))
3009 #t))
3010 ;; OpenSMTPD provides a single smtpctl utility to control both the
3011 ;; daemon and the local submission subsystem. To accomodate systems
3012 ;; that require historical interfaces such as sendmail, newaliases or
3013 ;; makemap, smtpctl operates in compatibility mode if called with the
3014 ;; historical name.
3015 (add-after 'install 'install-compability-links
3016 (lambda* (#:key outputs #:allow-other-keys)
3017 (let* ((out (assoc-ref outputs "out"))
3018 (sbin (string-append out "/sbin/")))
3019 (for-each (lambda (command)
3020 (symlink "smtpctl" (string-append sbin command)))
3021 (list "mailq" "makemap" "newaliases"
3022 "send-mail" "sendmail")))
3023 #t)))))
3024 (synopsis "Lightweight SMTP daemon")
3025 (description
3026 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
3027Transfer Protocol}, with some additional standard extensions. It allows
3028ordinary machines to exchange e-mails with other systems speaking the SMTP
3029protocol, or to deliver them to local users.
3030
3031In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
3032functionality than those available in other SMTP daemons. The objective is to
3033provide enough features to satisfy typical usage at the risk of unsuitability
3034to esoteric or niche requirements.")
3035 (home-page "https://www.opensmtpd.org")
7e3b537c
TGR
3036 (license (list license:bsd-2 license:bsd-3 license:bsd-4
3037 (license:non-copyleft "file://COPYING")
3038 license:public-domain license:isc license:openssl))))
4eb57ca8 3039
152ffe7c 3040(define-public opensmtpd-extras
3041 (package
3042 (name "opensmtpd-extras")
4fdf4b6c 3043 (version "6.7.1")
152ffe7c 3044 (source (origin
3045 (method url-fetch)
3046 (uri (string-append "https://www.opensmtpd.org/archives/"
6422615f 3047 "opensmtpd-extras-" version ".tar.gz"))
152ffe7c 3048 (sha256
3049 (base32
4fdf4b6c 3050 "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq"))))
152ffe7c 3051 (build-system gnu-build-system)
4fdf4b6c
TGR
3052 (native-inputs
3053 `(("pkg-config" ,pkg-config)))
152ffe7c 3054 (inputs
3055 `(("libressl" ,libressl)
3056 ("libevent" ,libevent)
4fdf4b6c 3057 ("mysql" ,mysql)
152ffe7c 3058 ("opensmtpd" ,opensmtpd)
152ffe7c 3059 ("postgresql" ,postgresql)
4fdf4b6c
TGR
3060 ("python" ,python-2)
3061 ("sqlite" ,sqlite)))
152ffe7c 3062 (arguments
4fdf4b6c
TGR
3063 `(#:configure-flags
3064 (list "--sysconfdir=/etc"
3065 "--localstatedir=/var"
3066
3067 "--with-queue-null"
3068 "--with-queue-python"
3069 "--with-queue-ram"
3070 "--with-queue-stub"
3071
3072 "--with-table-ldap"
3073 "--with-table-mysql"
3074 "--with-table-postgres"
3075 ;; "--with-table-redis" ; TODO: package hiredis
3076 "--with-table-socketmap"
3077 "--with-table-passwd"
3078 "--with-table-python"
3079 "--with-table-sqlite"
3080 "--with-table-stub"
3081
3082 "--with-scheduler-ram"
3083 "--with-scheduler-stub"
3084 "--with-scheduler-python"
3085
3086 "--with-user-smtpd=smtpd"
3087
3088 ;; We have to configure it like this because the default checks for
3089 ;; for example Python in /usr/{,local/}bin and fails otherwise.
3090 (string-append "--with-python="
3091 (assoc-ref %build-inputs "python")))))
3092 (home-page "https://www.opensmtpd.org")
152ffe7c 3093 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
3094 (description
3095 "This package provides extra tables, filters, and various other addons
3096for OpenSMTPD to extend its functionality.")
7e3b537c
TGR
3097 (license (list license:bsd-2 license:bsd-3 ; openbsd-compat
3098 license:isc)))) ; everything else
6d3dda4f 3099
62035656
TGR
3100(define libopensmtpd
3101 ;; Private source dependency of opensmtpd-filter-dkimsign (by the same
3102 ;; author), until any project actually uses it in its compiled form.
3103 (let ((revision 48))
3104 (package
3105 (name "libopensmtpd")
3106 (version (format #f "0.0.0-~a" revision))
3107 (source
3108 (origin
3109 (method svn-fetch)
3110 (uri (svn-reference
3111 (url "http://imperialat.at/dev/libopensmtpd/")
3112 (revision revision)))
3113 (sha256
3114 (base32 "04fgibpi6q0c3468ww3z7gsvraz0gyfps0c2dj8mdyri636c0x0s"))
3115 (file-name (git-file-name name version))))
3116 (build-system gnu-build-system)
3117 (arguments
3118 `(#:make-flags
3119 (list "-f" "Makefile.gnu"
3120 (string-append "CC=" ,(cc-for-target))
3121 (string-append "LOCALBASE=" (assoc-ref %outputs "out")))
3122 #:tests? #f ; no test suite
3123 #:phases
3124 (modify-phases %standard-phases
3125 (add-after 'unpack 'inherit-ownership
3126 (lambda _
3127 (substitute* "Makefile.gnu"
3128 (("-o \\$\\{BINOWN\\} -g \\$\\{BINGRP\\}") ""))
3129 #t))
3130 (delete 'configure) ; no configure script
3131 (add-before 'install 'create-output-directories
3132 (lambda* (#:key outputs #:allow-other-keys)
3133 (let ((out (assoc-ref outputs "out")))
3134 (mkdir-p (string-append out "/lib"))
3135 #t)))
3136 (add-after 'install 'install-header-file
3137 (lambda* (#:key make-flags outputs #:allow-other-keys)
3138 (let ((out (assoc-ref outputs "out")))
3139 (mkdir-p (string-append out "/include"))
3140 (apply invoke "make" "includes" make-flags))))
3141 (add-after 'install 'install-man-page
3142 (lambda* (#:key outputs #:allow-other-keys)
3143 (let* ((out (assoc-ref outputs "out"))
3144 (man3 (string-append out "/share/man/man3")))
3145 ;; There is no make target for this.
3146 (install-file "osmtpd_run.3" man3)
3147 #t))))))
3148 (inputs
3149 `(("libevent" ,libevent)))
3150 (home-page "http://imperialat.at/dev/libopensmtpd/")
3151 (synopsis "OpenSMTPd filter C API")
3152 (description
3153 "The @code{osmtpd} API is an event-based C programming interface for
3154writing OpenSMTPd filters.")
3155 (license license:expat))))
3156
3157(define-public opensmtpd-filter-dkimsign
3158 (package
3159 (name "opensmtpd-filter-dkimsign")
3160 ;; The .arch repackaging provides not only a usable Makefile, but patches
3161 ;; the source to actually build on GNU, e.g., by making pledge() optional.
3162 ;; It's effectively the portable branch that upstream lacks at this time.
3163 (version "0.2.arch2") ; also update both native-inputs
3164 (source
3165 (origin
3166 (method git-fetch)
3167 (uri (git-reference
3168 (url "https://github.com/de-vri-es/filter-dkimsign")
3169 (commit (string-append "v" version))))
3170 (sha256
3171 (base32 "1dv6184h0gq2safnc7ln4za3arbafzc1xwkgwmiihqcjvdyxig0c"))
3172 (file-name (git-file-name name version))))
3173 (build-system gnu-build-system)
3174 (arguments
3175 `(#:make-flags
3176 (list (string-append "CC=" ,(cc-for-target)))
3177 #:tests? #f ; no test suite
3178 #:phases
3179 (modify-phases %standard-phases
3180 (replace 'unpack
3181 (lambda* (#:key source inputs #:allow-other-keys)
3182 (copy-recursively source "filter-dkimsign")
3183 (copy-recursively (assoc-ref inputs "libopensmtpd-source")
3184 "libopensmtpd")
3185 (copy-file (assoc-ref inputs "Makefile") "Makefile")
3186 #t))
3187 (delete 'configure) ; no configure script
3188 (replace 'install
3189 (lambda* (#:key outputs #:allow-other-keys)
3190 (let* ((out (assoc-ref outputs "out"))
3191 (libexec (string-append out "/libexec/opensmtpd"))
3192 (man8 (string-append out "/share/man/man8")))
3193 (chdir "filter-dkimsign")
3194 (install-file "filter-dkimsign" libexec)
3195 (install-file "filter-dkimsign.8" man8)
3196 #t))))))
3197 (native-inputs
3198 `(("Makefile"
3199 ,(origin
3200 (method url-fetch)
3201 (uri (string-append
3202 "https://aur.archlinux.org/cgit/aur.git/plain/Makefile"
3203 "?h=opensmtpd-filter-dkimsign"
3204 "&id=58393470477a2ff2a58f9d72f5d851698067539f"))
3205 (sha256
3206 (base32 "0da5qr9hfjkf07ybvfva967njmf2x0b82z020r6v5f93jzsbqx92"))
3207 (file-name (string-append name "-" version "-Makefile"))))
3208 ("libopensmtpd-source" ,(package-source libopensmtpd))))
3209 (inputs
3210 `(("libevent" ,libevent)
3211 ("libressl" ,libressl))) ; openssl works too but follow opensmtpd
3212 (home-page "http://imperialat.at/dev/filter-dkimsign/")
3213 (synopsis "OpenSMTPd filter for signing mail with DKIM")
3214 (description
3215 "The @command{filter-dkimsign} OpenSMTPd filter signs outgoing e-mail
3216messages with @acronym{DKIM, DomainKeys Identified Mail} (RFC 4871).")
3217 (license license:expat)))
3218
66d8dc3d
AA
3219(define-public opensmtpd-filter-rspamd
3220 (package
3221 (name "opensmtpd-filter-rspamd")
3222 (version "0.1.7")
3223 (source (origin
3224 (method git-fetch)
3225 (uri (git-reference
3226 (url "https://github.com/poolpOrg/filter-rspamd")
3227 (commit (string-append "v" version))))
3228 (sha256
3229 (base32 "1qhrw20q9y44ffgx5k14nvqc9dh47ihywgzza84g0zv9xgif7hd5"))
3230 (file-name (git-file-name name version))))
3231 (build-system go-build-system)
3232 (arguments
3233 `(#:import-path "github.com/poolpOrg/filter-rspamd"
3234 #:phases
3235 (modify-phases %standard-phases
3236 (add-before 'build 'set-bootstrap-variables
3237 (lambda* (#:key outputs inputs #:allow-other-keys)
3238 ;; Tell the build system where to install binaries
3239 (let* ((out (assoc-ref outputs "out"))
3240 (libexec (string-append out "/libexec/opensmtpd")))
3241 (setenv "GOBIN" libexec)))))))
3242 (native-inputs
3243 `(("opensmtpd" ,opensmtpd)))
3244 (home-page "https://github.com/poolpOrg/filter-rspamd")
3245 (synopsis "OpenSMTPd filter to request an Rspamd analysis")
3246 (description
3247 "The @command{filter-rspamd} OpenSMTPd filter implements the
3248Rspamd protocol and allows OpenSMTPd to request an Rspamd analysis of
3249an SMTP transaction before a message is committed to queue.")
3250 (license license:isc)))
3251
b0c8358f
EF
3252(define-public mailman
3253 (package
3254 (name "mailman")
c26a016e 3255 (version "3.3.2")
b0c8358f
EF
3256 (source
3257 (origin
3258 (method url-fetch)
3259 (uri (pypi-uri "mailman" version))
3260 (sha256
c26a016e 3261 (base32 "0a5ckbf8hc3y28b7p5psp0d4bxk601jlr5pd3hhh545xd8d9f0dg"))))
b0c8358f
EF
3262 (build-system python-build-system)
3263 (propagated-inputs
3264 `(("gunicorn" ,gunicorn)
3265 ("python-aiosmtpd" ,python-aiosmtpd)
3266 ("python-alembic" ,python-alembic)
3267 ("python-atpublic" ,python-atpublic)
3268 ("python-authheaders" ,python-authheaders)
3269 ("python-authres" ,python-authres)
3270 ("python-click" ,python-click)
3271 ("python-dateutil" ,python-dateutil)
3272 ("python-dnspython" ,python-dnspython)
3273 ("python-falcon" ,python-falcon)
3274 ("python-flufl-bounce" ,python-flufl-bounce)
3275 ("python-flufl-i18n" ,python-flufl-i18n)
3276 ("python-flufl-lock" ,python-flufl-lock)
3277 ("python-importlib-resources" ,python-importlib-resources)
3278 ("python-lazr-config" ,python-lazr-config)
3279 ("python-passlib" ,python-passlib)
3280 ("python-requests" ,python-requests)
3281 ("python-sqlalchemy" ,python-sqlalchemy)
3282 ("python-zope-component" ,python-zope-component)
3283 ("python-zope-configuration" ,python-zope-configuration)
3284 ("python-zope-event" ,python-zope-event)
3285 ("python-zope-interface" ,python-zope-interface)))
3286 (native-inputs
3287 `(("python-nose" ,python-nose)))
3288 (home-page "https://www.list.org")
3289 (synopsis "Mailing list manager")
3290 (description
3291 "GNU Mailman is software for managing email discussion and mailing
3292lists. Both users and administrators generally perform their actions in a
3293web interface, although email and command-line interfaces are also provided.
3294The system features built-in archiving, automatic bounce processing, content
3295filtering, digest delivery, and more.")
3296 (license license:gpl3+)))
3297
6d3dda4f 3298(define-public python-mailmanclient
3299 (package
3300 (name "python-mailmanclient")
f1742465 3301 (version "3.3.1")
6d3dda4f 3302 (source
3303 (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "mailmanclient" version))
3306 (sha256
3307 (base32
f1742465 3308 "0pjgzpvhdb6ql8asb20xr8d01m646zpghmcp9fmscks0n1k4di4g"))))
6d3dda4f 3309 (build-system python-build-system)
3310 (arguments
3311 `(#:tests? #f)) ; Requires mailman running
f22efa01 3312 (propagated-inputs
f1742465
EF
3313 `(("python-requests" ,python-requests)))
3314 ;(native-inputs
3315 ; `(("mailman" ,mailman)
3316 ; ("python-falcon" ,python-falcon)
3317 ; ("python-pytest" ,python-pytest)
3318 ; ("python-pytest-services" ,python-pytest-services)))
3319 (home-page "https://www.list.org/")
6d3dda4f 3320 (synopsis "Python bindings for the Mailman 3 REST API")
3321 (description
3322 "The mailmanclient library provides official Python bindings for
3323the GNU Mailman 3 REST API.")
f1742465 3324 (properties `((python2-variant . ,(delay python2-mailmanclient))))
7e3b537c 3325 (license license:lgpl3+)))
6d3dda4f 3326
f1742465 3327;; This is the last version which supports Python-2.
6d3dda4f 3328(define-public python2-mailmanclient
f1742465
EF
3329 (let ((base (package-with-python2
3330 (strip-python2-variant python-mailmanclient))))
3331 (package
3332 (inherit base)
3333 (version "3.1.1")
3334 (source
3335 (origin
3336 (method url-fetch)
3337 (uri (pypi-uri "mailmanclient" version))
3338 (sha256
3339 (base32
3340 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
3341 (propagated-inputs
3342 `(("python2-six" ,python2-six)
3343 ("python2-httplib2" ,python2-httplib2))))))
3163a289 3344
3345(define-public mlmmj
3346 (package
3347 (name "mlmmj")
28b48c87 3348 (version "1.3.0")
3163a289 3349 (source
3350 (origin
3351 (method url-fetch)
3352 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
3353 version ".tar.bz2"))
3354 (sha256
3355 (base32
28b48c87 3356 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
3163a289 3357 (build-system gnu-build-system)
3358 (inputs
3359 `(("perl" ,perl))) ; For "contrib/web/"
3360 (native-inputs
3361 `(("pkg-config" ,pkg-config)))
3362 (arguments
3363 `(#:configure-flags
3364 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
3365 ;; It opens the files control/mimedeny and control/mimestrip to get a list
3366 ;; of mimetypes for parts of multipart/mime messages that should be denied
3367 ;; or stripped. The parts then get stripped directly when the mail is
3368 ;; received. mlmmj-receive-strip also appends an extra header
3369 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
3370 ;; mime parts
3371 (list "--enable-receive-strip")
3372 #:phases
3373 (modify-phases %standard-phases
3374 (add-before 'install 'install-contrib
3375 (lambda* (#:key outputs #:allow-other-keys)
3376 (let* ((out (assoc-ref outputs "out"))
3377 (share (string-append out "/share/mlmmj"))
3378 (contrib (string-append share "/contrib/web"))
3379 (texts (string-append share "/listtexts")))
3380 (copy-recursively "contrib/web/" contrib)
3381 (copy-recursively "listtexts" texts)
3382 (rename-file texts (string-append share "/texts"))
3383 #t))))))
3384 (home-page "http://mlmmj.org")
3385 (synopsis "Mailing list managing made joyful")
3386 (description
3387 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
3388It works with many different Mail Transport Agents (MTAs) and is simple for a
d1e4ad1b 3389system administrator to install, configure and integrate with other software.
3163a289 3390As it uses very few resources, and requires no daemons, it is ideal for
3391installation on systems where resources are limited. Its features include:
3392@enumerate
3393@item Archive, Custom headers / footer,
3394@item Fully automated bounce handling (similar to ezmlm),
3395@item Complete requeueing functionality, Moderation functionality, Subject prefix,
3396@item Subscribers only posting, Regular expression access control,
3397@item Functionality to retrieve old posts, Web interface, Digests,
3398@item No-mail subscription, VERP support,
3399@item Delivery Status Notification (RFC1891) support,
3400@item Rich and customisable texts for automated operations.
3401@end enumerate\n")
3402 (license license:expat)))
3a263368 3403
ba7816a2
EF
3404(define-public python-django-mailman3
3405 (package
3406 (name "python-django-mailman3")
3407 (version "1.3.4")
3408 (source
3409 (origin
3410 (method url-fetch)
3411 (uri (pypi-uri "django-mailman3" version))
3412 (sha256
3413 (base32
3414 "1yrm7wpjy34xai72vn2vkhc9131cdrbqy08rrabf36kynj5vcdvy"))))
3415 (build-system python-build-system)
3416 (arguments
3417 '(#:phases
3418 (modify-phases %standard-phases
3419 (replace 'check
3420 (lambda _
3421 (setenv "DJANGO_SETTINGS_MODULE"
3422 "django_mailman3.tests.settings_test")
3423 (invoke "django-admin" "test"
3424 "--pythonpath=."))))))
3425 (propagated-inputs
3426 `(("python-django" ,python-django)
3427 ("python-django-allauth" ,python-django-allauth)
3428 ("python-django-gravatar2" ,python-django-gravatar2)
3429 ("python-mailmanclient" ,python-mailmanclient)
3430 ("python-pytz" ,python-pytz)))
3431 (native-inputs
3432 `(("python-mock" ,python-mock)))
3433 (home-page "https://gitlab.com/mailman/django-mailman3")
3434 (synopsis "Django library to help interaction with Mailman")
3435 (description
3436 "This package contains libraries and templates for Django-based interfaces
8a3741e6 3437interacting with Mailman.")
7e3b537c 3438 (license license:gpl3+)))
8a3741e6 3439
a3bdebef
EF
3440(define-public python-mailman-hyperkitty
3441 (package
3442 (name "python-mailman-hyperkitty")
3443 (version "1.1.0")
3444 (source
3445 (origin
3446 (method url-fetch)
3447 (uri (pypi-uri "mailman-hyperkitty" version))
3448 (sha256
3449 (base32
3450 "1lfqa9admhvdv71f528jmz2wl0i5cv77v6l64px2pm4zqr9ckkjx"))
3451 (patches
3452 (list
3453 (origin
3454 ;; see: https://gitlab.com/mailman/mailman-hyperkitty/issues/17
3455 ;; fixes test_archive_message_unserializable
3456 (method url-fetch)
3457 (uri "https://salsa.debian.org/mailman-team/mailman-hyperkitty/raw/debian/1.1.0-9/debian/patches/0002-Skip-the-test_archive_message_unserializable.patch")
3458 (sha256
3459 (base32
3460 "0p1fwm46c4bl81lvsg3kjhn2r1lwgkpgxamb3xyqn7h9qdrw10hw")))))))
3461 (build-system python-build-system)
3462 (propagated-inputs
3463 `(("python-requests" ,python-requests)
3464 ("python-zope-interface" ,python-zope-interface)))
3465 (inputs
3466 `(("mailman" ,mailman)))
3467 (native-inputs
3468 `(("python-mock" ,python-mock)
3469 ("python-nose" ,python-nose)
3470 ("python-nose2" ,python-nose2)))
3471 (home-page "https://gitlab.com/mailman/mailman-hyperkitty/")
3472 (synopsis "Mailman archiver plugin for HyperKitty")
3473 (description
3474 "Mailman3 allows emails sent to its mailing lists to be archived by any
3475software provided that there is a plugin (loadable by Mailman3) designed to
3476communicate with it properly. This module contains a Mailman3 archiver plugin
3477which sends emails to HyperKitty, the official Mailman3 web archiver.")
3478 (license license:gpl3+)))
3479
6fe7d216
EF
3480(define-public python-hyperkitty
3481 (package
3482 (name "python-hyperkitty")
3483 (version "1.3.3")
3484 (source
3485 (origin
3486 (method url-fetch)
3487 (uri (pypi-uri "HyperKitty" version))
3488 (sha256
3489 (base32
3490 "0p85r9q6mn5as5b39xp9hkkipnk0156acx540n2ygk3qb3jd4a5n"))))
3491 (build-system python-build-system)
3492 (arguments
3493 '(#:phases
3494 (modify-phases %standard-phases
3495 (replace 'check
3496 (lambda _
6fe7d216
EF
3497 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
3498 (invoke "example_project/manage.py" "test"
3499 "--settings=hyperkitty.tests.settings_test"))))))
3500 (propagated-inputs
3501 `(("python-dateutil" ,python-dateutil)
ac3103e8 3502 ("python-django" ,python-django-2.2)
6fe7d216
EF
3503 ("python-django-compressor" ,python-django-compressor)
3504 ("python-django-extensions" ,python-django-extensions)
3505 ("python-django-gravatar2" ,python-django-gravatar2)
3506 ("python-django-haystack" ,python-django-haystack)
3507 ("python-django-mailman3" ,python-django-mailman3)
3508 ("python-django-q" ,python-django-q)
3509 ("python-djangorestframework" ,python-djangorestframework)
3510 ("python-flufl-lock" ,python-flufl-lock)
3511 ("python-mailmanclient" ,python-mailmanclient)
3512 ("python-networkx" ,python-networkx)
3513 ("python-pytz" ,python-pytz)
3514 ("python-robot-detection" ,python-robot-detection)))
3515 (native-inputs
3516 `(("python-beautifulsoup4" ,python-beautifulsoup4)
3517 ("python-elasticsearch" ,python-elasticsearch)
3518 ("python-isort" ,python-isort)
3519 ("python-mock" ,python-mock)
3520 ("python-whoosh" ,python-whoosh)))
3521 (home-page "https://gitlab.com/mailman/hyperkitty")
3522 (synopsis "Web interface to access GNU Mailman v3 archives")
3523 (description
3524 "The hyperkitty Django app provides a web user interface to access GNU
3525Mailman3 archives, and manage it. This interface uses django, and requires
3526some configuration.")
3527 (license license:gpl3))) ; Some files are gpl2+
3528
d99a2add 3529(define-public postorius
3530 (package
3531 (name "postorius")
faec049c 3532 (version "1.3.3")
d99a2add 3533 (source
3534 (origin
3535 (method url-fetch)
faec049c 3536 (uri (pypi-uri "postorius" version))
d99a2add 3537 (sha256
3538 (base32
faec049c 3539 "08jn23gblbkfl09qlykbpsmp39mmach3sl69h1j5cd5kkx839rwa"))))
d99a2add 3540 (build-system python-build-system)
3541 (arguments
faec049c
EF
3542 '(#:phases
3543 (modify-phases %standard-phases
3544 (replace 'check
3545 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3546 (add-installed-pythonpath inputs outputs)
3547 (if tests?
3548 (invoke "python" "example_project/manage.py" "test"
3549 "--settings=test_settings" "postorius")
3550 #t))))
3551 #:tests? #f)) ; Tests try to run a mailman instance to test against.
d99a2add 3552 (inputs
faec049c
EF
3553 `(("python-django" ,python-django)
3554 ("python-django-mailman3" ,python-django-mailman3)
3555 ("python-mailmanclient" ,python-mailmanclient)
3556 ("python-readme-renderer" ,python-readme-renderer)))
3557 (native-inputs
3558 `(("python-beautifulsoup4" ,python-beautifulsoup4)
3559 ("python-isort" ,python-isort)
3560 ("python-mock" ,python-mock)
3561 ("python-vcrpy" ,python-vcrpy)))
d99a2add 3562 (home-page "https://gitlab.com/mailman/postorius")
3563 (synopsis "Web user interface for GNU Mailman")
3564 (description
3565 "Postorius is a Django app which provides a web user interface
3566to access GNU Mailman.")
7e3b537c 3567 (license (list license:gpl3+ license:lgpl3+))))
d99a2add 3568
3a263368 3569(define-public blists
3570 (package
3571 (name "blists")
18b1589b 3572 (version "2.0")
3a263368 3573 (source
3574 (origin
3575 (method url-fetch)
3576 (uri (string-append "http://download.openwall.net/pub/projects/"
3577 "blists/blists-" version ".tar.gz"))
3578 (sha256
3579 (base32
18b1589b 3580 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
3a263368 3581 (build-system gnu-build-system)
3582 (arguments
3583 `(#:tests? #f ; No tests
3584 #:phases
3585 (modify-phases %standard-phases
3586 (delete 'configure)
3587 (replace 'install
3588 (lambda* (#:key outputs #:allow-other-keys)
3589 (let* ((out (assoc-ref outputs "out"))
3590 (bin (string-append out "/bin")))
3591 (install-file "bindex" bin)
3592 (install-file "bit" bin)
3593 #t))))))
3594 (home-page "http://www.openwall.com/blists/")
3595 (synopsis "Web interface to mailing list archives")
3596 (description
3597 "Blists is a web interface to mailing list archives that works off
3598indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
3599@code{bindex} generates or updates the index file (incremental updates
3600are supported). @code{bit} is a CGI/SSI program that generates web pages
3601on the fly. Both programs are written in C and are very fast.")
3602 (license license:expat)))
ed428a58
AI
3603
3604(define-public swaks
3605 (package
3606 (name "swaks")
f04a7ef5 3607 (version "20201014.0")
ed428a58
AI
3608 (source
3609 (origin
ad8cdc7b
TGR
3610 (method git-fetch)
3611 (uri (git-reference
3612 (url "https://github.com/jetmore/swaks")
3613 (commit (string-append "v" version))))
3614 (file-name (git-file-name name version))
ed428a58 3615 (sha256
f04a7ef5 3616 (base32 "131i2b1yxhnbqkfk4kky40pfanqw2c5lcgbnjhfqp5cvpawpk2ai"))))
ed428a58
AI
3617 (build-system perl-build-system)
3618 (inputs
d6a0dbd6
TGR
3619 `(("perl-io-socket-inet6" ,perl-io-socket-inet6)
3620 ("perl-net-dns" ,perl-net-dns)
3621 ("perl-net-ssleay" ,perl-net-ssleay)
3622 ("perl-socket6" ,perl-socket6))) ; used by perl-io-socket-inet6
ed428a58 3623 (arguments
d6a0dbd6 3624 `(#:tests? #f ; no tests
ed428a58
AI
3625 #:phases
3626 (modify-phases %standard-phases
ad8cdc7b
TGR
3627 (add-after 'unpack 'set-build_version
3628 (lambda _
3629 (substitute* "swaks"
3630 (("\"DEVRELEASE\"") (format #f "\"~a\"" ,version)))
3631 #true))
ed428a58
AI
3632 (delete 'configure)
3633 (replace 'build
3634 (lambda _
ad8cdc7b 3635 (invoke "pod2man" "doc/base.pod" "swaks.1")))
ed428a58
AI
3636 (replace 'install
3637 (lambda* (#:key outputs #:allow-other-keys)
3638 (let ((out (assoc-ref outputs "out")))
3639 (install-file "swaks" (string-append out "/bin"))
3640 (install-file "swaks.1" (string-append out "/share/man/man1")))
3641 #t))
3642 (add-after 'install 'wrap-program
3643 (lambda* (#:key outputs #:allow-other-keys)
3644 (wrap-program (string-append (assoc-ref outputs "out")
3645 "/bin/swaks")
3646 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
3647 #t)))))
d72f59a4 3648 (home-page "https://jetmore.org/john/code/swaks/")
ed428a58
AI
3649 (synopsis "Featureful SMTP test tool")
3650 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
3651test tool. It handles SMTP features and extensions such as TLS,
3652authentication, and pipelining; multiple versions of the SMTP protocol
3653including SMTP, ESMTP, and LMTP; and multiple transport methods including
3654unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
3655Options can be specified in environment variables, configuration files, and
3656the command line allowing maximum configurability and ease of use for
3657operators and scripters.")
7e3b537c 3658 (license license:gpl2+)))
b0eb2af2 3659
3660(define-public alpine
3661 (package
3662 (name "alpine")
d395f422 3663 (version "2.24")
b0eb2af2 3664 (source
3665 (origin
0ca25073 3666 (method git-fetch)
b0eb2af2 3667 ;; There are two versions: the plain continuation of Alpine without extra
3668 ;; patches and the version which adds extra fixes. Every distro uses
3669 ;; the patched version, and so do we to not break expectations.
32f9cc33 3670 ;; http://alpine.freeiz.com/alpine/readme/README.patches
0ca25073
TGR
3671 (uri (git-reference
3672 (url "http://repo.or.cz/alpine.git")
0acbcaa9 3673 (commit (string-append "v" version))))
0ca25073 3674 (file-name (git-file-name name version))
b0eb2af2 3675 (sha256
d395f422 3676 (base32 "0d5ybnsv29gs8krl66db56avmssq28jlg0qj5i1wka05ncc3740d"))
bc0eb347
TGR
3677 (modules '((guix build utils)))
3678 (snippet
3679 '(begin
3680 ;; Remove pre-built binaries scattered across the source repository.
3681 (for-each delete-file (find-files "." "\\.(dll|exe)"))
3682 #t))))
b0eb2af2 3683 (build-system gnu-build-system)
3684 (arguments
aa784dc8 3685 `(#:make-flags
1ca44ae3 3686 (list (string-append "CC=" ,(cc-for-target)))
b0eb2af2 3687 #:configure-flags (list (string-append "--with-ssl-include-dir="
3688 (assoc-ref %build-inputs "openssl")
3689 "/include/openssl")
3690 (string-append "--with-ssl-dir="
3691 (assoc-ref %build-inputs "openssl"))
3692 (string-append "--with-ssl-certs-dir="
3693 "/etc/ssl/certs/")
3694 (string-append "--with-ssl-lib-dir="
3695 (assoc-ref %build-inputs "openssl")
3696 "/lib")
3697 (string-append "--with-interactive-spellcheck="
3698 (assoc-ref %build-inputs "aspell")
03b6c474
TGR
3699 "/bin/aspell")
3700 "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
b0eb2af2 3701 #:phases
3702 (modify-phases %standard-phases
d28692a7
TGR
3703 (add-after 'unpack 'assume-shadow-passwords
3704 ;; Alpine's configure script confuses ‘shadow password support’ with
3705 ;; ‘/etc/shadow exists in the build environment’. It does not.
3706 (lambda _
3707 (substitute* "configure"
3708 (("test -f /etc/shadow") "true"))
3709 #t))
b0eb2af2 3710 (add-after 'unpack 'make-reproducible
3711 (lambda _
3712 ;; This removes time-dependent code to make alpine reproducible.
3713 (substitute* "pico/blddate.c"
3714 (("%02d-%s-%d") "1970-01-01"))
b0eb2af2 3715 #t)))))
3716 (inputs
3717 `(("ncurses" ,ncurses)
3718 ("openssl" ,openssl)
3719 ("gnutls" ,gnutls)
3720 ("openldap" ,openldap)
3721 ("cyrus-sasl" ,cyrus-sasl)
3722 ("mit-krb5" ,mit-krb5)
3723 ("aspell" ,aspell)
3724 ("tcl" ,tcl)
3725 ("linux-pam" ,linux-pam)))
da83224d 3726 (home-page "https://repo.or.cz/alpine.git")
b0eb2af2 3727 (synopsis "Alternatively Licensed Program for Internet News and Email")
3728 (description
3729 "Alpine is a text-based mail and news client. Alpine includes several
3730tools and applications:
3731@enumerate
3732@item alpine, the Alpine mailer
3733@item pico, the standalone text editor, GNU nano's predecessor
3734@item pilot, the standalone file system navigator
3735@end enumerate\n")
7e3b537c 3736 (license license:asl2.0)))
7c16151a
RS
3737
3738(define-public balsa
3739 (package
3740 (name "balsa")
5f9b28b2 3741 (version "2.6.2")
7c16151a
RS
3742 (source
3743 (origin
3744 (method url-fetch)
e9201659 3745 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
8f3f2c9b 3746 "balsa-" version ".tar.bz2"))
7c16151a 3747 (sha256
5f9b28b2 3748 (base32 "1w0239i01mw4wwwy7xh8gz7zgl5khwvfm5wy35x0swvvax021mai"))))
7c16151a
RS
3749 (build-system gnu-build-system)
3750 (arguments
3751 `(#:configure-flags
3752 '(;; Balsa tries to install additional MIME icons
3753 ;; under gtk+ directory.
3754 "--enable-extra-mimeicons=no"
3755 "--with-gtksourceview"
3756 "--with-canberra"
3757 "--with-spell-checker=gtkspell"
3758 "--with-gpgme"
3759 "--with-sqlite"
3760 "--with-compface"
3761 "--with-ldap")))
3762 (inputs
3763 `(("cyrus-sasl" ,cyrus-sasl)
3764 ("enchant" ,enchant)
3765 ("gdk-pixbuf" ,gdk-pixbuf)
7ff2159b 3766 ("gmime" ,gmime)
7c16151a
RS
3767 ("gnutls" ,gnutls)
3768 ("gpgme" ,gpgme)
3769 ("gtk+" ,gtk+)
5f9b28b2 3770 ("gtksourceview" ,gtksourceview)
7c16151a 3771 ("gtkspell3" ,gtkspell3)
5f9b28b2 3772 ("libassuan" ,libassuan) ; in gpgme.pc Requires
7c16151a
RS
3773 ("libcanberra" ,libcanberra)
3774 ("libesmtp" ,libesmtp)
7ff2159b 3775 ("libical" ,libical)
7c16151a 3776 ("libnotify" ,libnotify)
7ff2159b 3777 ("libsecret" ,libsecret)
7c16151a
RS
3778 ("openldap" ,openldap)
3779 ("sqlite" ,sqlite)
3780 ("webkitgtk" ,webkitgtk)))
3781 (native-inputs
3782 `(("compface" ,compface)
3783 ("glib" ,glib "bin")
3784 ("intltool" ,intltool)
3785 ("pkg-config" ,pkg-config)
3786 ("yelp-tools" ,yelp-tools)))
3787 (home-page "https://pawsa.fedorapeople.org/balsa")
3788 (synopsis "E-mail client for GNOME")
3789 (description "Balsa is a highly configurable and robust mail client for
3790the GNOME desktop. It supports both POP3 and IMAP servers as well as the
3791mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
b95d5f62 3792the use of a local MTA such as Sendmail.")
7e3b537c 3793 (license license:gpl3+)))
1e52fd83
AI
3794
3795(define-public afew
3796 (package
3797 (name "afew")
30a1476b 3798 (version "3.0.1")
1e52fd83
AI
3799 (source
3800 (origin
3801 (method url-fetch)
3802 (uri (pypi-uri "afew" version))
3803 (sha256
3804 (base32
30a1476b 3805 "0wpfqbqjlfb9z0hafvdhkm7qw56cr9kfy6n8vb0q42dwlghpz1ff"))))
1e52fd83
AI
3806 (build-system python-build-system)
3807 (inputs
30a1476b
TLC
3808 `(("notmuch" ,notmuch)
3809 ("python-chardet" ,python-chardet)
3810 ("python-dkimpy" ,python-dkimpy)
1e52fd83
AI
3811 ("python-notmuch" ,python-notmuch)))
3812 (native-inputs
30a1476b
TLC
3813 `(("python-freezegun" ,python-freezegun)
3814 ("python-setuptools-scm" ,python-setuptools-scm)))
1e52fd83
AI
3815 (home-page "https://github.com/afewmail/afew")
3816 (synopsis "Initial tagging script for notmuch mail")
3817 (description "afew is an initial tagging script for notmuch mail. It
3818provides automatic tagging each time new mail is registered with notmuch. It
3819can add tags based on email headers or Maildir folders and can handle spam and
3820killed threads.")
7e3b537c 3821 (license license:isc)))
1679923a
DM
3822
3823(define-public pan
3824 (package
3825 (name "pan")
de227459 3826 (version "0.146")
1679923a
DM
3827 (source
3828 (origin
3829 (method url-fetch)
3830 (uri (string-append "http://pan.rebelbase.com/download/releases/"
3831 version "/source/" name "-" version ".tar.bz2"))
3832 (sha256
de227459 3833 (base32 "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55"))))
1679923a
DM
3834 (arguments
3835 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
3836 "--enable-libnotify" "--enable-manual"
3837 "--enable-gkr")
3838 #:phases
3839 (modify-phases %standard-phases
3840 (add-before 'configure 'patch-gpg2
3841 (lambda* (#:key inputs #:allow-other-keys)
3842 (substitute* "pan/usenet-utils/gpg.cc"
3843 (("\"gpg2\"") (string-append "\""
3844 (assoc-ref inputs "gnupg")
3845 "/bin/gpg\"")))
3846 #t)))))
3847 (inputs
8e020519 3848 `(("gmime" ,gmime-2.6)
1679923a
DM
3849 ("gnupg" ,gnupg)
3850 ("gnutls" ,gnutls)
3851 ("gtk+" ,gtk+)
3852 ("gtkspell3" ,gtkspell3)
3853 ("libnotify" ,libnotify)
3854 ("libsecret" ,libsecret)
3855 ("libxml2" ,libxml2)
3856 ("zlib" ,zlib)))
3857 (native-inputs
3858 `(("gettext-minimal" ,gettext-minimal)
3859 ("itstool" ,itstool)
3860 ("pkg-config" ,pkg-config)))
3861 (build-system gnu-build-system)
3862 (home-page "http://pan.rebelbase.com/")
3863 (synopsis "Pan newsreader")
3864 (description "@code{pan} is a Usenet newsreader that's good at both text
3865and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
3866PGP handling, multiple servers, and secure connections.")
3867 ;; License of the docs: fdl-1.1; Others: gpl2.
7e3b537c 3868 (license (list license:fdl1.1+ license:gpl2))))
ae7c1c37
JL
3869
3870(define-public imapfilter
3871 (package
3872 (name "imapfilter")
ac3af8f7 3873 (version "2.7.5")
ae7c1c37
JL
3874 (source
3875 (origin
b1d30f46
TGR
3876 (method git-fetch)
3877 (uri (git-reference
b0e7b699 3878 (url "https://github.com/lefcha/imapfilter")
b1d30f46
TGR
3879 (commit (string-append "v" version))))
3880 (file-name (git-file-name name version))
ae7c1c37 3881 (sha256
ac3af8f7 3882 (base32 "0a7f85r3axwclzw1s79zl2l8222nj2gklvvq33w9qv0dz5n71dcx"))))
ae7c1c37
JL
3883 (build-system gnu-build-system)
3884 (arguments
3885 `(#:tests? #f
3886 #:make-flags
3887 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
15586697 3888 (string-append "CC=" ,(cc-for-target)))
ae7c1c37
JL
3889 #:phases
3890 (modify-phases %standard-phases
29a87ed1 3891 (delete 'configure)))) ; no configure script
363aa80a 3892 (inputs
ae7c1c37 3893 `(("lua" ,lua)
6b23d48f 3894 ("pcre2" ,pcre2)
ae7c1c37
JL
3895 ("openssl" ,openssl)))
3896 (home-page "https://github.com/lefcha/imapfilter")
3897 (synopsis "IMAP mail filtering utility")
3898 (description "IMAPFilter is a mail filtering utility. It connects
3899to remote mail servers using IMAP, sends searching queries to the server and
3900processes mailboxes based on the results. It can be used to delete, copy,
3901move, flag, etc. messages residing in mailboxes at the same or different mail
3902servers. The 4rev1 and 4 versions of IMAP are supported.")
3903 (license license:expat)))
dc8675af
EF
3904
3905(define-public urlscan
3906 (package
3907 (name "urlscan")
6ebc3c41 3908 (version "0.9.6")
dc8675af
EF
3909 (source
3910 (origin
3911 (method url-fetch)
3912 (uri (pypi-uri "urlscan" version))
3913 (sha256
6ebc3c41 3914 (base32 "09lxi7dhn49fpb3ij4cgrhj3qqqqs9rcxbjb7p9smw5wblrqpzga"))))
dc8675af
EF
3915 (build-system python-build-system)
3916 (propagated-inputs
3917 `(("python-urwid" ,python-urwid)))
3918 (home-page "https://github.com/firecat53/urlscan")
3919 (synopsis "View/select the URLs in an email message or file")
3920 (description
3921 "Urlscan is a small program that is designed to integrate with the
0ac65c8b 3922Mutt mail reader to allow you to easily launch a Web browser for URLs
dc8675af
EF
3923contained in email messages. It parses an email message or file and scans it
3924for URLs and email addresses. It then displays the URLs and their context
3925within the message, and allows you to choose one or more URLs to send to your
0ac65c8b
TGR
3926Web browser. Alternatively, it send a list of all URLs to standard output.
3927It is a replacement for the @command{urlview} program.")
7e3b537c 3928 (license license:gpl2)))
829785c1
EB
3929
3930(define-public tnef
3931 (package
3932 (name "tnef")
fe147c97 3933 (version "1.4.18")
829785c1
EB
3934 (source
3935 (origin
3936 (method git-fetch)
3937 (uri (git-reference
b0e7b699 3938 (url "https://github.com/verdammelt/tnef")
829785c1
EB
3939 (commit version)))
3940 (sha256
fe147c97 3941 (base32 "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"))
829785c1
EB
3942 (file-name (git-file-name name version))))
3943 (build-system gnu-build-system)
3944 (native-inputs
3945 `(("autoconf" ,autoconf)
3946 ("automake" ,automake)))
3947 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
3948 (home-page "https://github.com/verdammelt/tnef")
3949 (synopsis "Unpack @code{application/ms-tnef} attachments")
3950 (description
3951 "TNEF is a tar-like program that unpacks MIME attachments of type
3952@code{application/ms-tnef}.")
7e3b537c 3953 (license license:gpl2+)))
e3a47031
RW
3954
3955(define-public mumi
6b703a9a
RW
3956 (let ((commit "9f070bd90adc67064cd8aff4e40f303d5957ef4a")
3957 (revision "5"))
e3a47031
RW
3958 (package
3959 (name "mumi")
bc950c2f 3960 (version (git-version "0.0.1" revision commit))
e3a47031
RW
3961 (source (origin
3962 (method git-fetch)
3963 (uri (git-reference
3964 (url "https://git.elephly.net/software/mumi.git")
3965 (commit commit)))
3966 (file-name (git-file-name name version))
3967 (sha256
3968 (base32
6b703a9a 3969 "1ym1j3nzy8qhd1ydadccbgm0nckkmnq3vnz9qh9x8rasx7zg1ldp"))))
e3a47031
RW
3970 (build-system gnu-build-system)
3971 (arguments
1214684b
LC
3972 `(#:modules ((guix build gnu-build-system)
3973 ((guix build guile-build-system)
3974 #:select (target-guile-effective-version))
3975 (guix build utils))
3976 #:imported-modules ((guix build guile-build-system)
3977 ,@%gnu-build-system-modules)
3978
8ff573d3
LC
3979 #:configure-flags '("--localstatedir=/var")
3980
1214684b 3981 #:phases
e3a47031
RW
3982 (modify-phases %standard-phases
3983 (add-after 'install 'wrap-executable
3984 (lambda* (#:key outputs #:allow-other-keys)
3985 (let* ((out (assoc-ref outputs "out"))
3986 (bin (string-append out "/bin"))
1214684b
LC
3987 (version (target-guile-effective-version))
3988 (scm (string-append out "/share/guile/site/" version))
3989 (go (string-append out "/lib/guile/" version
3990 "/site-ccache")))
e3a47031
RW
3991 (wrap-program (string-append bin "/mumi")
3992 `("GUILE_LOAD_PATH" ":" prefix
3993 (,scm ,(getenv "GUILE_LOAD_PATH")))
3994 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
3995 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
3996 #t))))))
3997 (inputs
8bc7015e 3998 `(("guile-email" ,guile-email-latest)
3fa02b2d 3999 ("guile-fibers" ,guile-fibers)
f00f52a1 4000 ("guile-gcrypt" ,guile-gcrypt)
170c6b03 4001 ("guile-json" ,guile-json-3)
f00f52a1 4002 ("guile-redis" ,guile-redis)
e3a47031 4003 ("guile-syntax-highlight" ,guile-syntax-highlight)
f00f52a1 4004 ("guile-webutils" ,guile-webutils)
decf7f6c 4005 ("guile-xapian" ,guile-xapian)
bc950c2f 4006 ("guile" ,guile-3.0)
decf7f6c 4007 ("mailutils" ,mailutils)))
e3a47031
RW
4008 (native-inputs
4009 `(("autoconf" ,autoconf)
4010 ("automake" ,automake)
4011 ("pkg-config" ,pkg-config)))
4012 (home-page "https://git.elephly.net/software/mumi.git")
4013 (synopsis "Debbugs web interface")
4014 (description "Mumi is a Debbugs web interface.")
7e3b537c 4015 (license license:agpl3+))))
e1c58440
RW
4016
4017(define-public ytnef
4018 (package
4019 (name "ytnef")
4020 (version "1.9.3")
4021 (source (origin
4022 (method git-fetch)
4023 (uri (git-reference
b0e7b699 4024 (url "https://github.com/Yeraze/ytnef")
e1c58440
RW
4025 (commit (string-append "v" version))))
4026 (file-name (git-file-name name version))
4027 (sha256
4028 (base32
090456da
LLB
4029 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))
4030 (patches (search-patches "ytnef-CVE-2021-3403.patch"
4031 "ytnef-CVE-2021-3404.patch"))))
e1c58440
RW
4032 (build-system gnu-build-system)
4033 (native-inputs
4034 `(("autoconf" ,autoconf)
4035 ("automake" ,automake)
4036 ("libtool" ,libtool)))
4037 (home-page "https://github.com/Yeraze/ytnef/")
4038 (synopsis "TNEF stream reader for winmail.dat files")
4039 (description "This package provides a TNEF stream reader library and
4040related tools to process winmail.dat files.")
7e3b537c 4041 (license license:gpl2+)))
eff3a9b2 4042
e06b1ebc
XC
4043(define-public l2md
4044 ;; No official release.
4045 (let ((commit "f7286b49bb5fce25c898c143712fe34ad4d7864e")
4046 (revision "1"))
4047 (package
4048 (name "l2md")
4049 (version (git-version "0.1.0" revision commit))
4050 (source
4051 (origin
4052 (method git-fetch)
4053 (uri (git-reference
4054 (url "https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git")
4055 (commit commit)))
4056 (file-name (git-file-name name version))
4057 (sha256
4058 (base32 "0hxz8i70v1xgv30zjclfvmjqszn073c7i8nwmswi2lr6vd7cklvp"))))
4059 (build-system gnu-build-system)
4060 (inputs
4061 `(("libgit2" ,libgit2)))
4062 (arguments
4063 `(#:phases
4064 (modify-phases %standard-phases
4065 (delete 'configure) ;no configure scripts
4066 (delete 'check) ;no tests
4067 (add-before 'install 'mkdir
4068 (lambda* (#:key outputs #:allow-other-keys)
4069 (let ((l2md (string-append (assoc-ref outputs "out") "/bin")))
4070 (mkdir-p l2md)))))
4071 #:make-flags
4072 (list ,(string-append "CC=" (cc-for-target))
4073 (string-append "PREFIX=" %output "/bin"))))
4074 (home-page
4075 "https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git")
4076 (synopsis "Import public-inbox archives via Git")
4077 (description
4078 "The @command{l2md} command line tool imports public-inbox archives via
4079Git and exports them in maildir format or to an MDA through a pipe.")
4080 (license license:gpl2))))
4081
eff3a9b2 4082(define-public public-inbox
c87d737d
AI
4083 (package
4084 (name "public-inbox")
4085 (version "1.5.0")
4086 (source
4087 (origin (method git-fetch)
4088 (uri (git-reference
4089 (url "https://public-inbox.org")
4090 (commit (string-append "v" version))))
4091 (sha256
4092 (base32
4093 "03zj7shdl3vibs7k5lr673bwcf8j1xx8is3mjz34ca4cdh6p5j2k"))
4094 (file-name (git-file-name name version))))
4095 (build-system perl-build-system)
4096 (arguments
4097 '(#:phases
4098 (modify-phases %standard-phases
4099 (add-before 'configure 'qualify-paths
4100 (lambda _
4101 ;; Use absolute paths for 'xapian-compact'.
4102 (let ((xapian-compact (which "xapian-compact")))
4103 (substitute* "script/public-inbox-compact"
4104 (("xapian-compact") xapian-compact)))
4105 #t))
4106 (add-before 'check 'pre-check
4107 (lambda _
4108 (substitute* "t/spawn.t"
4109 (("\\['env'\\]") (string-append "['" (which "env") "']")))
4110 (substitute* "t/ds-leak.t"
4111 (("/bin/sh") (which "sh")))
4112 (invoke "./certs/create-certs.perl")
4113 ;; XXX: This test fails due to zombie process is not reaped by
4114 ;; the builder.
4115 (substitute* "t/httpd-unix.t"
4116 (("^SKIP: \\{") "SKIP: { skip('Guix');"))
4117 #t))
4118 (add-after 'install 'wrap-programs
4119 (lambda* (#:key inputs outputs #:allow-other-keys)
4120 (let ((out (assoc-ref outputs "out")))
4121 (for-each
4122 (lambda (prog)
4123 (wrap-program prog
4124 ;; Let those scripts find their perl modules.
4125 `("PERL5LIB" ":" prefix
4126 (,(string-append out "/lib/perl5/site_perl")
4127 ,(getenv "PERL5LIB")))
4128 ;; 'git' is invoked in various files of the PublicInbox
4129 ;; perl module.
4130 `("PATH" ":" prefix
4131 (,(string-append (assoc-ref inputs "git") "/bin")))))
4132 (find-files (string-append out "/bin"))))
4133 #t)))))
4134 (native-inputs
4135 `(("xapian" ,xapian)
4136 ;; For testing.
4137 ("lsof" ,lsof)
4138 ("openssl" ,openssl)))
4139 (inputs
4140 `(("git" ,git)
4141 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
4142 ("perl-dbi" ,perl-dbi)
4143 ("perl-email-address-xs" ,perl-email-address-xs)
4144 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
4145 ("perl-email-mime" ,perl-email-mime)
4146 ("perl-email-simple" ,perl-email-simple)
4147 ("perl-net-server" ,perl-net-server)
4148 ("perl-filesys-notify-simple" ,perl-filesys-notify-simple)
4149 ("perl-plack-middleware-deflater" ,perl-plack-middleware-deflater)
4150 ("perl-plack-middleware-reverseproxy" ,perl-plack-middleware-reverseproxy)
4151 ("perl-plack" ,perl-plack)
4152 ("perl-search-xapian" ,perl-search-xapian)
4153 ("perl-timedate" ,perl-timedate)
4154 ("perl-uri-escape" ,perl-uri-escape)
4155 ;; For testing.
4156 ("perl-ipc-run" ,perl-ipc-run)
4157 ("perl-xml-feed" ,perl-xml-feed)))
4158 (home-page "https://public-inbox.org/README.html")
4159 (synopsis "Archive mailing lists in git repositories")
4160 (description
4161 "public-inbox implements the sharing of an email inbox via git to
eff3a9b2
SB
4162complement or replace traditional mailing lists. Readers may read via NNTP,
4163Atom feeds or HTML archives.")
c87d737d 4164 (license license:agpl3+)))
660611e5
EB
4165
4166(define-public sylpheed
4167 (package
4168 (name "sylpheed")
4169 (version "3.7.0")
4170 (source (origin
4171 (method url-fetch)
4172 (uri (string-append "https://sylpheed.sraoss.jp/sylpheed/v3.7/"
4173 name "-" version ".tar.xz"))
4174 (sha256
4175 (base32
4176 "0j9y5vdzch251s264diw9clrn88dn20bqqkwfmis9l7m8vmwasqd"))))
4177 (build-system gnu-build-system)
4178 (native-inputs
4179 `(("pkg-config" ,pkg-config)))
4180 (inputs
4181 `(("bogofilter" ,bogofilter)
4182 ("compface" ,compface)
4183 ("gnupg" ,gnupg-1)
4184 ("gpgme" ,gpgme)
4185 ("gtk+-2.0" ,gtk+-2)
4186 ("gtkspell" ,gtkspell3)
4187 ("libnsl" ,libnsl)
4188 ("openldap" ,openldap)
4189 ("openssl" ,openssl)))
4190 (home-page "https://sylpheed.sraoss.jp/en/")
4191 (synopsis "Lightweight GTK+ email client")
4192 (description
4193 "Sylpheed is a simple, lightweight but featureful, and easy-to-use e-mail
4194client. Sylpheed provides intuitive user-interface. Sylpheed is also
4195designed for keyboard-oriented operation.")
7e3b537c 4196 (license license:gpl2+)))
99d48f7a
EF
4197
4198(define-public python-authres
4199 (package
4200 (name "python-authres")
4201 (version "1.2.0")
4202 (source
4203 (origin
4204 (method url-fetch)
4205 (uri (pypi-uri "authres" version))
4206 (sha256
4207 (base32
4208 "1dr5zpqnb54h4f5ax8334l1dcp8j9083d7v4vdi1xqkwmnavklck"))))
4209 (build-system python-build-system)
4210 (arguments
4211 '(#:phases
4212 (modify-phases %standard-phases
4213 (replace 'check
4214 ;; Run doctests as described in the README.
4215 (lambda _
4216 (invoke "python" "-m" "authres" "-v"))))))
4217 (home-page "https://launchpad.net/authentication-results-python")
70134af9 4218 (synopsis "Authentication-Results email header creator and parser")
99d48f7a 4219 (description
70134af9
TGR
4220 "This Python module can be used to generate and parse RFC 5451/7001/7601
4221@code{Authentication-Results} email headers. It supports extensions such as:
99d48f7a
EF
4222@itemize
4223@item RFC 5617 DKIM/ADSP
70134af9
TGR
4224@item RFC 6008 DKIM signature identification (@code{header.b})
4225@item RFC 6212 @acronym{VBR, Vouch By Reference}
4226@item RFC 6577 @acronym{SPF, Sender Policy Framework}
4227@item RFC 7281 @code{Authentication-Results} registration for S/MIME
4228@item RFC 7293 The @code{Require-Recipient-Valid-Since} header field
4229@item RFC 7489 @acronym{DMARC, Domain-based Message Authentication Reporting
4230and Conformance}
4231@item @acronym{ARC, Authenticated Received Chain}
4232(draft-ietf-dmarc-arc-protocol-08)
4233@end itemize\n")
99d48f7a 4234 (license license:asl2.0)))
5c4332e5
EF
4235
4236(define-public python-dkimpy
4237 (package
4238 (name "python-dkimpy")
bf2727c1 4239 (version "1.0.5")
5c4332e5
EF
4240 (source
4241 (origin
4242 (method url-fetch)
4243 (uri (pypi-uri "dkimpy" version))
4244 (sha256
bf2727c1 4245 (base32 "088iz5cqjqh4c7141d94pvn13bh25aizqlrifwv6fs5g16zj094s"))))
5c4332e5
EF
4246 (build-system python-build-system)
4247 (arguments
4248 '(#:phases
4249 (modify-phases %standard-phases
4250 (add-after 'patch-source-shebangs 'patch-more-source
4251 (lambda* (#:key inputs #:allow-other-keys)
4252 (let ((openssl (assoc-ref inputs "openssl")))
4253 (substitute* "dkim/dknewkey.py"
4254 (("/usr/bin/openssl") (string-append openssl "/bin/openssl"))))
4255 #t))
4256 (replace 'check
4257 (lambda _
4258 (invoke "python" "test.py"))))))
4259 (propagated-inputs
4260 `(("python-dnspython" ,python-dnspython)))
4261 (native-inputs
4262 `(("python-authres" ,python-authres)
4263 ("python-pynacl" ,python-pynacl)))
4264 (inputs
4265 `(("openssl" ,openssl)))
4266 (home-page "https://launchpad.net/dkimpy")
4267 (synopsis "DKIM (DomainKeys Identified Mail)")
4268 (description "Python module that implements @dfn{DKIM} (DomainKeys
4269Identified Mail) email signing and verification (RFC6376). It also provides
4270helper scripts for command line signing and verification. It supports DKIM
4271signing/verifying of ed25519-sha256 signatures (RFC 8463). It also supports
4272the RFC 8617 Authenticated Received Chain (ARC) protocol.")
4273 (license license:bsd-3)))
83dd7825
EF
4274
4275(define-public python-authheaders
4276 (package
4277 (name "python-authheaders")
4278 (version "0.13.0")
4279 (source
4280 (origin
4281 (method url-fetch)
4282 (uri (pypi-uri "authheaders" version))
4283 (sha256
4284 (base32
4285 "14k6i72k5f8dyvps8vc0aq0cczc8lvqpgjfjzsy6qqychjvjcmwk"))))
4286 (build-system python-build-system)
4287 (propagated-inputs
4288 `(("python-authres" ,python-authres)
4289 ("python-dkimpy" ,python-dkimpy)
4290 ("python-dnspython" ,python-dnspython)
4291 ("python-publicsuffix2" ,python-publicsuffix2)))
4292 (home-page "https://github.com/ValiMail/authentication-headers")
4293 (synopsis "Library wrapping email authentication header verification and generation")
4294 (description
4295 "This is a Python library for the generation of email authentication
4296headers. The library can perform DKIM, SPF, and DMARC validation, and the
4297results are packaged into the Authentication-Results header. The library can
4298DKIM and ARC sign messages and output the corresponding signature headers.")
4299 ;; The package's metadata claims it were MIT licensed, but the source file
4300 ;; headers disagree. MPL-2 for the public suffix list.
4301 (license (list license:zpl2.1 license:zlib license:mpl2.0))))
3a98604f
EF
4302
4303(define-public python-aiosmtpd
4304 (package
4305 (name "python-aiosmtpd")
b9772f62 4306 (version "1.2.2")
3a98604f 4307 (source
525304e1
TGR
4308 (origin
4309 (method git-fetch)
4310 (uri (git-reference
4311 (url "https://github.com/aio-libs/aiosmtpd")
4312 (commit version)))
4313 (sha256
b9772f62 4314 (base32 "0083d6nf75xv8nq1il6jabz36v6c452svy4p402csxwwih5pw6sk"))
525304e1 4315 (file-name (git-file-name name version))))
3a98604f
EF
4316 (build-system python-build-system)
4317 (arguments
4318 '(#:phases
4319 (modify-phases %standard-phases
525304e1 4320 (add-after 'unpack 'delete-failing-tests
3a98604f 4321 (lambda _
525304e1 4322 ;; This test uses an expired certificate.
3a98604f
EF
4323 (delete-file "aiosmtpd/tests/test_smtps.py")
4324 #t))
4325 (replace 'check
4326 (lambda _
4327 (invoke "python" "-m" "nose2" "-v"))))))
4328 (native-inputs
4329 `(("python-flufl-testing" ,python-flufl-testing)
4330 ("python-nose2" ,python-nose2)))
4331 (propagated-inputs
4332 `(("python-atpublic" ,python-atpublic)))
4333 (home-page "https://aiosmtpd.readthedocs.io/")
4334 (synopsis "Asyncio based SMTP server")
4335 (description
4336 "This project is a reimplementation of the Python stdlib @code{smtpd.py}
4337based on asyncio.")
4338 (license (list license:asl2.0
4339 license:lgpl3)))) ; only for setup_helpers.py
7fb5084d
ASM
4340
4341(define-public rspamd
4342 (package
4343 (name "rspamd")
48632af5 4344 (version "2.7")
7fb5084d
ASM
4345 (source
4346 (origin
4347 (method git-fetch)
4348 (uri (git-reference
4349 (url "https://github.com/rspamd/rspamd")
4350 (commit version)))
4351 (sha256
48632af5 4352 (base32 "0fw6nbfc3xqapzq5nydakwgpw6cz6vb3qby2aqlr06lzf87d3hic"))
7fb5084d
ASM
4353 (file-name (git-file-name name version))))
4354 (build-system cmake-build-system)
4355 (arguments
4356 '(#:configure-flags '("-DENABLE_LUAJIT=ON")))
4357 (inputs
4358 `(("openssl" ,openssl)
4359 ("glib" ,glib)
4360 ("ragel" ,ragel)
4361 ("luajit" ,luajit)
4362 ("sqlite" ,sqlite)
4363 ("file" ,file)
4364 ("icu4c" ,icu4c)
4365 ("pcre" ,pcre)
4366 ("zlib" ,zlib)
4367 ("perl" ,perl)
4368 ("libsodium" ,libsodium)))
4369 (native-inputs
4370 `(("pkg-config" ,pkg-config)))
4371 (synopsis "Spam filtering system")
4372 (description "Rspamd is an advanced spam filtering system that
4373allows evaluation of messages by a number of rules including regular
4374expressions, statistical analysis and custom services such as URL
4375black lists. Each message is analysed by Rspamd and given a spam
4376score.")
4377 (home-page "https://www.rspamd.com/")
4378 (license license:asl2.0)))
ae5128e2
AI
4379
4380(define-public crm114
4381 (package
4382 (name "crm114")
4383 (version "20100106")
4384 (source
4385 (origin
4386 (method url-fetch)
4387 (uri (string-append "http://crm114.sourceforge.net/tarballs/crm114-"
4388 version "-BlameMichelson.src.tar.gz"))
4389 (sha256
4390 (base32
4391 "0awcjc5j2mclkkpbjyijj9mv8xjz3haljvaj0fyc4fm4xir68qpv"))))
4392 (build-system gnu-build-system)
4393 (arguments
4394 `(#:modules ((guix build gnu-build-system)
4395 ((guix build emacs-build-system) #:prefix emacs:)
4396 (guix build utils)
4397 (ice-9 string-fun))
4398 #:imported-modules (,@%gnu-build-system-modules
4399 (guix build emacs-build-system)
4400 (guix build emacs-utils))
4401 #:make-flags (list (string-append "prefix=" %output)
4402 "LDFLAGS=") ; disable static linking
4403 ;; Test suite is not fully automated. It requires a human to read the
4404 ;; results and determine if the tests have passed.
4405 #:tests? #f
4406 #:phases
4407 (modify-phases %standard-phases
4408 (delete 'configure)
4409 (add-before 'build 'fix-build
4410 (lambda _
4411 ;; Inline functions can only be used from the same compilation
4412 ;; unit. This causes the build to fail.
4413 (substitute* "crm_svm_matrix.c"
4414 (("^inline ") ""))))
4415 (add-before 'install 'pre-install
4416 (lambda* (#:key outputs #:allow-other-keys)
4417 (let ((out (assoc-ref outputs "out")))
4418 ;; Install maillib.crm library.
4419 (install-file "maillib.crm" (string-append out "/share/crm"))
4420 ;; Set absolute store paths.
4421 (substitute* "mailreaver.crm"
4422 (("insert maillib.crm")
4423 (string-append "insert " out "/share/crm/maillib.crm"))
4424 (("\\\\/bin\\\\/ls")
4425 (string-replace-substring (which "ls") "/" "\\/"))
4426 ((":\\*:trainer_invoke_command:")
4427 (string-append out "/bin/mailtrainer.crm")))
4428 ;; Install mail related crm scripts.
4429 (for-each (lambda (file)
4430 (install-file file (string-append out "/bin")))
4431 (list "mailfilter.crm" "mailreaver.crm" "mailtrainer.crm"))
4432 ;; Create emacs site-lisp directory so that the install phase
4433 ;; can install crm-mode.
4434 (mkdir-p (string-append out "/share/emacs/site-lisp")))))
4435 ;; Run phases from the emacs build system.
4436 (add-after 'install 'make-autoloads
4437 (assoc-ref emacs:%standard-phases 'make-autoloads))
4438 (add-after 'make-autoloads 'enable-autoloads-compilation
4439 (assoc-ref emacs:%standard-phases 'enable-autoloads-compilation))
4440 (add-after 'enable-autoloads-compilation 'emacs-build
4441 (assoc-ref emacs:%standard-phases 'build))
4442 (add-after 'emacs-build 'validate-compiled-autoloads
4443 (assoc-ref emacs:%standard-phases 'validate-compiled-autoloads)))))
4444 (inputs
4445 `(("tre" ,tre)))
4446 (native-inputs
4447 `(("emacs" ,emacs-minimal)))
4448 (home-page "http://crm114.sourceforge.net/")
4449 (synopsis "Controllable regex mutilator")
4450 (description "CRM114 is a system to examine incoming e-mail, system log
4451streams, data files or other data streams, and to sort, filter, or alter the
4452incoming files or data streams according to the user's wildest desires.
4453Criteria for categorization of data can be via a host of methods, including
4454regexes, approximate regexes, a Hidden Markov Model, Orthogonal Sparse
4455Bigrams, WINNOW, Correllation, KNN/Hyperspace, or Bit Entropy (or by other
4456means--it's all programmable).")
4457 (license license:gpl3)))