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