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