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