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