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