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