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