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