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