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