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