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