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