gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015, 2017, 2020 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
5 ;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
6 ;;; Copyright © 2014, 2019 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
9 ;;; Copyright © 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
10 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
11 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 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, 2017, 2018, 2019, 2020, 2021 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 Nikita <nikita@n0.is>
19 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 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–2021 Tobias Geerinckx-Rice <me@tobias.gr>
26 ;;; Copyright © 2017, 2018, 2020 Rene Saavedra <pacoon@protonmail.com>
27 ;;; Copyright © 2018, 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
28 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
29 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
30 ;;; Copyright © 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
31 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
32 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
33 ;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
34 ;;; Copyright © 2020 Eric Brown <ecbrown@ericcbrown.com>
35 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
36 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
37 ;;; Copyright © 2020, 2021 Alexey Abramov <levenson@mmer.org>
38 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
39 ;;; Copyright © 2020, 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro>
40 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
41 ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
42 ;;; Copyright © 2020 divoplade <d@divoplade.fr>
43 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
44 ;;; Copyright © 2021 Benoit Joly <benoit@benoitj.ca>
45 ;;;
46 ;;; This file is part of GNU Guix.
47 ;;;
48 ;;; GNU Guix is free software; you can redistribute it and/or modify it
49 ;;; under the terms of the GNU General Public License as published by
50 ;;; the Free Software Foundation; either version 3 of the License, or (at
51 ;;; your option) any later version.
52 ;;;
53 ;;; GNU Guix is distributed in the hope that it will be useful, but
54 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
55 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56 ;;; GNU General Public License for more details.
57 ;;;
58 ;;; You should have received a copy of the GNU General Public License
59 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
60
61 (define-module (gnu packages mail)
62 #:use-module (guix utils)
63 #:use-module (gnu packages)
64 #:use-module (gnu packages admin)
65 #:use-module (gnu packages aspell)
66 #:use-module (gnu packages autotools)
67 #:use-module (gnu packages backup)
68 #:use-module (gnu packages base)
69 #:use-module (gnu packages bash)
70 #:use-module (gnu packages bison)
71 #:use-module (gnu packages boost)
72 #:use-module (gnu packages calendar)
73 #:use-module (gnu packages check)
74 #:use-module (gnu packages compression)
75 #:use-module (gnu packages crypto)
76 #:use-module (gnu packages curl)
77 #:use-module (gnu packages cyrus-sasl)
78 #:use-module (gnu packages databases)
79 #:use-module (gnu packages dbm)
80 #:use-module (gnu packages dejagnu)
81 #:use-module (gnu packages django)
82 #:use-module (gnu packages dns)
83 #:use-module (gnu packages docbook)
84 #:use-module (gnu packages documentation)
85 #:use-module (gnu packages emacs)
86 #:use-module (gnu packages enchant)
87 #:use-module (gnu packages file)
88 #:use-module (gnu packages gdb)
89 #:use-module (gnu packages gettext)
90 #:use-module (gnu packages ghostscript)
91 #:use-module (gnu packages glib)
92 #:use-module (gnu packages golang)
93 #:use-module (gnu packages gnome)
94 #:use-module (gnu packages gnupg)
95 #:use-module (gnu packages groff)
96 #:use-module (gnu packages gsasl)
97 #:use-module (gnu packages gtk)
98 #:use-module (gnu packages guile)
99 #:use-module (gnu packages guile-xyz)
100 #:use-module (gnu packages flex)
101 #:use-module (gnu packages haskell-xyz)
102 #:use-module (gnu packages icu4c)
103 #:use-module (gnu packages kerberos)
104 #:use-module (gnu packages language)
105 #:use-module (gnu packages libcanberra)
106 #:use-module (gnu packages libevent)
107 #:use-module (gnu packages libidn)
108 #:use-module (gnu packages libunistring)
109 #:use-module (gnu packages libunwind)
110 #:use-module (gnu packages linux)
111 #:use-module (gnu packages lsof)
112 #:use-module (gnu packages lua)
113 #:use-module (gnu packages m4)
114 #:use-module (gnu packages man)
115 #:use-module (gnu packages ncurses)
116 #:use-module (gnu packages networking)
117 #:use-module (gnu packages ninja)
118 #:use-module (gnu packages openldap)
119 #:use-module (gnu packages onc-rpc)
120 #:use-module (gnu packages pcre)
121 #:use-module (gnu packages perl)
122 #:use-module (gnu packages perl-check)
123 #:use-module (gnu packages perl-web)
124 #:use-module (gnu packages pkg-config)
125 #:use-module (gnu packages protobuf)
126 #:use-module (gnu packages python)
127 #:use-module (gnu packages python-check)
128 #:use-module (gnu packages python-crypto)
129 #:use-module (gnu packages python-web)
130 #:use-module (gnu packages python-xyz)
131 #:use-module (gnu packages ragel)
132 #:use-module (gnu packages rdf)
133 #:use-module (gnu packages readline)
134 #:use-module (gnu packages ruby)
135 #:use-module (gnu packages search)
136 #:use-module (gnu packages serialization)
137 #:use-module (gnu packages samba)
138 #:use-module (gnu packages screen)
139 #:use-module (gnu packages sphinx)
140 #:use-module (gnu packages sqlite)
141 #:use-module (gnu packages tcl)
142 #:use-module (gnu packages texinfo)
143 #:use-module (gnu packages time)
144 #:use-module (gnu packages tls)
145 #:use-module (gnu packages version-control)
146 #:use-module (gnu packages w3m)
147 #:use-module (gnu packages web)
148 #:use-module (gnu packages webkit)
149 #:use-module (gnu packages xdisorg)
150 #:use-module (gnu packages xorg)
151 #:use-module (gnu packages xml)
152 #:use-module ((guix licenses) #:prefix license:)
153 #:use-module (guix packages)
154 #:use-module (guix download)
155 #:use-module (guix git-download)
156 #:use-module (guix svn-download)
157 #:use-module (guix utils)
158 #:use-module (guix build-system cmake)
159 #:use-module (guix build-system glib-or-gtk)
160 #:use-module (guix build-system go)
161 #:use-module (guix build-system gnu)
162 #:use-module (guix build-system go)
163 #:use-module (guix build-system guile)
164 #:use-module (guix build-system perl)
165 #:use-module (guix build-system python)
166 #:use-module (guix build-system trivial)
167 #:use-module (srfi srfi-1)
168 #:use-module (ice-9 match))
169
170 (define-public abook
171 (package
172 (name "abook")
173 (version "0.6.1")
174 (source
175 (origin
176 (method url-fetch)
177 (uri (string-append "https://abook.sourceforge.io/devel/abook-" version ".tar.gz"))
178 (sha256
179 (base32 "1yf0ifyjhq2r003pnpn92mn0924bn9yxjifxxj2ldcsgd7w0vagh"))))
180 (build-system gnu-build-system)
181 (arguments
182 `(#:phases
183 (modify-phases %standard-phases
184 ;; Fix "undefined reference to `field_id'" errors.
185 (add-after 'unpack 'fix-build-with-recent-gcc
186 (lambda _
187 (substitute* '("database.c" "database.h")
188 (("^inline int" all) (string-append "extern " all)))))
189 ;; Fix following error during bootstrap: "gettext infrastructure
190 ;; mismatch: using a Makefile.in.in from gettext version 0.18 but the
191 ;; autoconf macros are from gettext version 0.20".
192 (add-before 'bootstrap 'fix-gettext-macro-version
193 (lambda _
194 (substitute* "po/Makefile.in.in"
195 (("0.18") "0.20"))))
196 (replace 'bootstrap
197 (lambda _
198 (invoke "aclocal")
199 (invoke "automake" "--add-missing")
200 (invoke "autoconf"))))))
201 (native-inputs
202 `(("autoconf" ,autoconf)
203 ("automake" ,automake)
204 ("gettext" ,gettext-minimal)))
205 (inputs
206 `(("ncurses" ,ncurses)
207 ("readline" ,readline)))
208 (home-page "https://abook.sourceforge.io/")
209 (synopsis "Text-based addressbook")
210 (description
211 "Abook is a text-based addressbook program designed to use with Mutt mail
212 client.")
213 (license license:gpl2)))
214
215 (define-public anubis
216 (package
217 (name "anubis")
218 ;; This 4.2.90 alpha release adds support for Guile 3 and has fixes for
219 ;; other issues.
220 (version "4.2.90")
221 (source
222 (origin
223 (method url-fetch)
224 (uri (string-append "https://alpha.gnu.org/gnu/anubis/anubis-"
225 version ".tar.gz"))
226 (sha256
227 (base32
228 "0dvm6acl32dv8bixx9z50gzwfp6kj4kxnn1j3dcwjlp7sasjp41s"))))
229 (build-system gnu-build-system)
230 (native-inputs
231 `(("automake" ,automake)
232 ("autoconf" ,autoconf)
233 ("gettext" ,gettext-minimal)
234 ("m4" ,m4))) ;for the test suite
235 (inputs
236 `(("gdbm" ,gdbm)
237 ("gnutls" ,gnutls)
238 ("gpgme" ,gpgme)
239 ("gsasl" ,gsasl)
240 ("guile" ,guile-3.0)
241 ("libgcrypt" ,libgcrypt) ;gnutls support depends on libgcrypt
242 ("libgpg-error" ,libgpg-error)))
243 (outputs '("out" "debug"))
244 (synopsis "SMTP message submission daemon")
245 (description "Anubis is a daemon that sits between the Mail User
246 Agent (MUA) and the Mail Transfer Agent (MTA). When a mail is sent by a user
247 in the MUA, it is first passed to Anubis, which performs additional processing
248 to the message before passing it on for delivery by the MTA. Anubis may, for
249 example, modify the message headers or body, or encrypt or sign the message.")
250 (home-page "https://www.gnu.org/software/anubis/manual/")
251 (license license:gpl3+)))
252
253 (define-public mailutils
254 (package
255 (name "mailutils")
256 (version "3.10")
257 (source (origin
258 (method url-fetch)
259 (uri (string-append "mirror://gnu/mailutils/mailutils-"
260 version ".tar.xz"))
261 (sha256
262 (base32
263 "17smrxjdgbbzbzakik30vj46q4iib85ksqhb82jr4vjp57akszh9"))
264 (patches
265 ;; Fixes https://issues.guix.gnu.org/43088.
266 (search-patches "mailutils-fix-uninitialized-variable.patch"))))
267 (build-system gnu-build-system)
268 (arguments
269 `(#:phases
270 (modify-phases %standard-phases
271 (add-before 'check 'prepare-test-suite
272 (lambda _
273 ;; Use the right file name for `cat'.
274 (substitute* "testsuite/lib/mailutils.exp"
275 (("/bin/cat")
276 (which "cat")))
277
278 ;; Tests try to invoke 'mda' such that it looks up the
279 ;; 'root' user, which does not exist in the build
280 ;; environment.
281 (substitute* '("mda/mda/tests/testsuite"
282 "mda/lmtpd/tests/testsuite")
283 (("root <") "nobody <")
284 (("spool/root") "spool/nobody")
285 (("root@localhost") "nobody@localhost"))
286
287 ;; The 'pipeact.at' tests generate a shell script; make
288 ;; sure it uses the right shell.
289 (substitute* '("sieve/tests/testsuite"
290 "mh/tests/testsuite")
291 (("#! /bin/sh")
292 (string-append "#!" (which "sh"))))
293
294 (substitute* "mh/tests/testsuite"
295 (("moreproc: /bin/cat")
296 (string-append "moreproc: " (which "cat"))))
297
298 ;; XXX: The comsatd tests rely on being able to open
299 ;; /dev/tty, but that gives ENODEV in the build
300 ;; environment. Thus, ignore test failures here.
301 (substitute* "comsat/tests/Makefile.in"
302 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
303 (string-append "-" all)))
304
305 ;; XXX: The ‘moderator: program discard’ test does not specify
306 ;; an explicit From: but does expect an exact match. But why are
307 ;; all other tests unaffected?
308 (substitute* "sieve/tests/testsuite"
309 (("gray@")
310 "nixbld@"))
311
312 ;; 'frm' tests expect write access to $HOME.
313 (setenv "HOME" (getcwd))
314
315 ;; Avoid the message "I'm going to create the standard MH path
316 ;; for you", which would lead to one test failure (when diffing
317 ;; stdout of 'fmtcheck'.)
318 (call-with-output-file ".mh_profile"
319 (lambda (port)
320 (format port "Path: ~a/Mail-for-tests~%"
321 (getcwd))))
322
323 #t)))
324 ;; TODO: Add `--with-sql'.
325 #:configure-flags
326 (list "--sysconfdir=/etc"
327
328 ;; Add "/X.Y" to the installation directory.
329 (string-append "--with-guile-site-dir="
330 (assoc-ref %outputs "out")
331 "/share/guile/site/"
332 ,(match (assoc "guile"
333 (package-inputs this-package))
334 (("guile" guile)
335 (version-major+minor
336 (package-version guile))))))
337
338 #:parallel-tests? #f))
339 (native-inputs
340 `(("perl" ,perl) ;for 'gylwrap'
341 ("texinfo" ,texinfo)
342 ("dejagnu" ,dejagnu)))
343 (inputs
344 `(("m4" ,m4)
345 ("guile" ,guile-3.0)
346 ("gsasl" ,gsasl)
347 ("gnutls" ,gnutls)
348 ("ncurses" ,ncurses)
349 ("readline" ,readline)
350 ("linux-pam" ,linux-pam)
351 ("libltdl" ,libltdl)
352 ("gdbm" ,gdbm)
353
354 ;; Required for SEARCH CHARSET.
355 ("libiconv" ,libiconv)
356 ("libunistring" ,libunistring)))
357 (home-page "https://mailutils.org")
358 (synopsis "Utilities and library for reading and serving mail")
359 (description
360 "GNU Mailutils is a collection of programs for managing, viewing and
361 processing electronic mail. It contains both utilities and server daemons
362 and all operate in a protocol-agnostic way. The underlying libraries are
363 also available, simplifying the addition of mail capabilities to new
364 software.")
365 (license
366 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
367 (list license:gpl3+ license:lgpl3+))))
368
369 (define-public go-gitlab.com-shackra-goimapnotify
370 (let ((commit "832bc7112db9b28e28d69e90b91ea6c005244c9b")
371 (revision "0"))
372 (package
373 (name "go-gitlab.com-shackra-goimapnotify")
374 (version (git-version "0.0.0" revision commit))
375 (source (origin
376 (method git-fetch)
377 (uri (git-reference
378 (url "https://gitlab.com/shackra/goimapnotify")
379 (commit commit)))
380 (file-name (git-file-name name version))
381 (sha256
382 (base32
383 "1h27kshx4vwl5k6vc2szsq3d701fzs4gczjypz907f8hj0lrnjmy"))))
384 (build-system go-build-system)
385 (arguments
386 `(#:import-path "gitlab.com/shackra/goimapnotify"))
387 (propagated-inputs
388 `(("go-github-com-emersion-go-imap" ,go-github-com-emersion-go-imap)
389 ("go-github-com-emersion-go-imap-idle" ,go-github-com-emersion-go-imap-idle)
390 ("go-github-com-emersion-go-sasl" ,go-github-com-emersion-go-sasl)
391 ("go-github-com-sirupsen-logrus" ,go-github-com-sirupsen-logrus)
392 ("go-golang-org-x-text" ,go-golang-org-x-text)))
393 (synopsis "Execute scripts on IMAP mailbox changes.")
394 (description
395 "Script to execute scripts on IMAP mailbox changes (new/deleted/updated
396 messages) using IDLE. Implemented in Go.")
397 (home-page "https://gitlab.com/shackra/goimapnotify")
398 (license license:gpl3+))))
399
400 (define-public guile2.2-mailutils
401 (package
402 (inherit mailutils)
403 (name "guile2.2-mailutils")
404 (inputs
405 `(("guile" ,guile-2.2)
406 ,@(alist-delete "guile" (package-inputs mailutils))))))
407
408 (define-public guile3.0-mailutils
409 (deprecated-package "guile3.0-mailutils" mailutils))
410
411 (define-public nullmailer
412 (package
413 (name "nullmailer")
414 (version "2.2")
415 (source
416 (origin
417 (method url-fetch)
418 (uri (list
419 (string-append "https://untroubled.org/nullmailer/"
420 "nullmailer-" version ".tar.gz")
421 ;; Previous releases are moved to this subdirectory.
422 (string-append "https://untroubled.org/nullmailer/archive/"
423 "nullmailer-" version ".tar.gz")))
424 (sha256
425 (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
426 (build-system gnu-build-system)
427 (arguments
428 `(#:configure-flags
429 (list "--enable-tls"
430 "--localstatedir=/var"
431 "--sysconfdir=/etc")
432 #:phases
433 (modify-phases %standard-phases
434 (add-before 'check 'patch-test-FHS-file-names
435 (lambda _
436 (with-directory-excursion "test"
437 (substitute* (list "functions.in"
438 "tests/send")
439 ;; Fix some shebangs later generated on the fly.
440 (("/bin/sh") (which "bash"))))
441 #t))
442 (add-before 'check 'pass-PATH-to-tests
443 ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
444 ;; tests then source ‘functions’, which first demands a working $PATH
445 ;; only to clobber it later. Pass our $PATH to the test environment
446 ;; and don't touch it after that.
447 (lambda _
448 (with-directory-excursion "test"
449 (substitute* "runtests"
450 (("env - bash")
451 (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
452 (substitute* "functions.in"
453 (("export PATH=.*") "")))
454 #t))
455 (add-before 'check 'delete-failing-tests
456 (lambda _
457 (with-directory-excursion "test/tests"
458 (for-each delete-file
459 (list
460 ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
461 "inject/queue"
462 ;; XXX These require the not-yet-packaged tcpserver.
463 "protocols" "smtp-auth")))
464 #t))
465 (add-before 'install 'skip-install-data-local
466 ;; Don't attempt to install run-time files outside of the store.
467 (lambda _
468 (substitute* "Makefile"
469 ((" install-data-local") ""))
470 #t)))))
471 (native-inputs
472 ;; For tests.
473 `(("daemontools" ,daemontools))) ; for svc
474 (inputs
475 `(("gnutls" ,gnutls)))
476 (home-page "https://untroubled.org/nullmailer/")
477 (synopsis "Simple relay-only mail transfer agent")
478 (description
479 "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
480 hosts that receive no local mail and only relay mail to a fixed set of smart
481 relays. It's useful for systems such as Web servers that must be able to send
482 email notifications, without having to run a full-blown MTA such as sendmail
483 or qmail.
484
485 Nullmailer is designed to be simple to configure, easy to extend, and secure.
486 It requires little ongoing administration. The included @command{sendmail}
487 emulator front-end should allow most (if not all) sendmail-compatible programs
488 to run without any changes.")
489 (license (list license:lgpl2.1+ ; lib/cli++/ (but some files lack headers)
490 license:gpl2+)))) ; everything else
491
492 (define-public fetchmail
493 (package
494 (name "fetchmail")
495 (version "6.4.18")
496 (source
497 (origin
498 (method url-fetch)
499 (uri (string-append "mirror://sourceforge/fetchmail/branch_"
500 (version-major+minor version) "/"
501 "fetchmail-" version ".tar.xz"))
502 (sha256
503 (base32 "17r5zfk9yh7jhgdb360dlzx5fx9lsbmalasx6zgxw9v9vjycjb9h"))))
504 (build-system gnu-build-system)
505 (inputs
506 `(("openssl" ,openssl)))
507 (arguments
508 `(#:configure-flags
509 (list (string-append "--with-ssl="
510 (assoc-ref %build-inputs "openssl")))))
511 (home-page "https://www.fetchmail.info/")
512 (synopsis "Remote-mail retrieval and forwarding utility")
513 (description
514 "Fetchmail is a full-featured, robust, well-documented remote-mail
515 retrieval and forwarding utility intended to be used over on-demand
516 TCP/IP links (such as SLIP or PPP connections). It supports every
517 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
518 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
519 and IPSEC.
520
521 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
522 so it can then be read by normal mail user agents such as mutt, elm
523 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
524 aliasing facilities to work just as they would on normal mail.")
525 (license license:gpl2+))) ; most files are actually public domain or x11
526
527 (define-public mutt
528 (package
529 (name "mutt")
530 (version "2.0.6")
531 (source (origin
532 (method url-fetch)
533 (uri (list
534 (string-append "https://bitbucket.org/mutt/mutt/downloads/"
535 "mutt-" version ".tar.gz")
536 (string-append "http://ftp.mutt.org/pub/mutt/mutt-"
537 version ".tar.gz")))
538 (sha256
539 (base32
540 "165mpivdhvhavglykwlz0hss2akxd6i6l40rgxs29mjzi52irqw1"))
541 (patches (search-patches "mutt-store-references.patch"))))
542 (build-system gnu-build-system)
543 (inputs
544 `(("cyrus-sasl" ,cyrus-sasl)
545 ("gdbm" ,gdbm)
546 ("gpgme" ,gpgme)
547 ("libidn2" ,libidn2)
548 ("ncurses" ,ncurses)
549 ("openssl" ,openssl)
550 ("perl" ,perl)
551 ("sqlite" ,sqlite)))
552 (arguments
553 `(#:configure-flags '("--enable-smtp"
554 "--enable-imap"
555 "--enable-pop"
556 "--enable-gpgme"
557 "--enable-hcache" ; for header caching
558 "--enable-sidebar"
559 "--enable-autocrypt"
560 "--with-ssl"
561 "--with-sasl"
562 "--with-sqlite3" ; required for Autocrypt
563 "--with-idn2" ; recommended for Autocrypt
564 ;; So that mutt does not check whether the path
565 ;; exists, which it does not in the chroot.
566 "--with-mailpath=/var/mail")))
567 (home-page "http://www.mutt.org/")
568 (synopsis "Mail client")
569 (description
570 "Mutt is a small but very powerful text-based mail client for Unix
571 operating systems.")
572 (license license:gpl2+)))
573
574 (define-public neomutt
575 (package
576 (name "neomutt")
577 (version "20210205")
578 (source
579 (origin
580 (method git-fetch)
581 (uri (git-reference
582 (url "https://github.com/neomutt/neomutt")
583 (commit version)))
584 (file-name (git-file-name name version))
585 (sha256
586 (base32 "15kr9nvb4j8lx5rl2yapv231rbp4sbn709vv82pfhx5717x3yf00"))))
587 (build-system gnu-build-system)
588 (inputs
589 `(("cyrus-sasl" ,cyrus-sasl)
590 ("gdbm" ,gdbm)
591 ("gpgme" ,gpgme)
592 ("ncurses" ,ncurses)
593 ("gnutls" ,gnutls)
594 ("openssl" ,openssl) ; for S/MIME
595 ("perl" ,perl)
596 ("kyotocabinet" ,kyotocabinet)
597 ("libxslt" ,libxslt)
598 ("libidn2" ,libidn2)
599 ("libxml2" ,libxml2)
600 ("lmdb" ,lmdb)
601 ("notmuch" ,notmuch)))
602 (native-inputs
603 `(("automake" ,automake)
604 ("gettext-minimal" ,gettext-minimal)
605 ("pkg-config" ,pkg-config)
606 ("docbook-xsl" ,docbook-xsl)
607 ("docbook-xml" ,docbook-xml-4.2)
608 ("w3m" ,w3m)
609 ("tcl" ,tcl)
610
611 ;; Test file data for the unit tests included in the neomutt source.
612 ("neomutt-test-files"
613 ,(let ((commit "8629adab700a75c54e8e28bf05ad092503a98f75"))
614 (origin
615 (method git-fetch)
616 (uri (git-reference
617 (url "https://github.com/neomutt/neomutt-test-files")
618 (commit commit)))
619 (file-name (git-file-name "neomutt-test-files" commit))
620 (sha256
621 (base32 "1ci04nqkab9mh60zzm66sd6mhsr6lya8wp92njpbvafc86vvwdlr")))))))
622 (arguments
623 `(#:test-target "test"
624 #:configure-flags
625 (list "--gpgme"
626
627 ;; Database, implies header caching.
628 "--disable-tokyocabinet"
629 "--disable-qdbm"
630 "--disable-bdb"
631 "--lmdb"
632 "--kyotocabinet"
633
634 "--gdbm"
635
636 "--gnutls"
637 "--disable-ssl"
638 "--sasl"
639 (string-append "--with-sasl="
640 (assoc-ref %build-inputs "cyrus-sasl"))
641
642
643 "--smime"
644 "--notmuch"
645 "--disable-idn"
646 "--idn2"
647
648 ;; If we do not set this, neomutt wants to check
649 ;; whether the path exists, which it does not
650 ;; in the chroot.
651 "--with-mailpath=/var/mail"
652
653 "--with-ui=ncurses"
654 (string-append "--with-ncurses="
655 (assoc-ref %build-inputs "ncurses"))
656 (string-append "--prefix="
657 (assoc-ref %outputs "out"))
658 "--debug")
659 #:phases
660 (modify-phases %standard-phases
661 ;; TODO: autosetup is meant to be included in the source,
662 ;; but we should package autosetup and use our own version of it.
663 (replace 'configure
664 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
665 (let* ((out (assoc-ref outputs "out"))
666 (flags `(,@configure-flags))
667 (bash (which "bash")))
668 (setenv "SHELL" bash)
669 (setenv "CONFIG_SHELL" bash)
670 (apply invoke bash
671 (string-append (getcwd) "/configure")
672 flags))))
673 (add-before 'check 'prepare-test-files
674 (lambda* (#:key inputs #:allow-other-keys)
675 (copy-recursively (assoc-ref inputs "neomutt-test-files") "tests")
676 (with-directory-excursion "tests"
677 (setenv "NEOMUTT_TEST_DIR" (getcwd)) ; must be absolute
678 (invoke "bash" "setup.sh")
679 #t))))))
680 (home-page "https://neomutt.org/")
681 (synopsis "Command-line mail reader based on Mutt")
682 (description
683 "NeoMutt is a command-line mail reader which is based on mutt.
684 It adds a large amount of new and improved features to mutt.")
685 (license license:gpl2+)))
686
687 (define-public gmime
688 (package
689 (name "gmime")
690 (version "3.2.7")
691 (source (origin
692 (method url-fetch)
693 (uri (string-append "mirror://gnome/sources/gmime/"
694 (version-major+minor version)
695 "/gmime-" version ".tar.xz"))
696 (sha256
697 (base32
698 "0i3xfc84qn1z99i70q68kbnp9rmgqrnprqb418ba52s6g9j9dsia"))))
699 (build-system gnu-build-system)
700 (native-inputs
701 `(("pkg-config" ,pkg-config)
702 ("gnupg" ,gnupg) ; for tests only
703 ("gobject-introspection" ,gobject-introspection)))
704 (inputs `(("glib" ,glib)
705 ("gpgme" ,gpgme)
706 ("zlib" ,zlib)))
707 (arguments
708 `(#:configure-flags
709 (list "--enable-introspection=yes")
710 #:phases
711 (modify-phases %standard-phases
712 (add-after
713 'unpack 'patch-paths-in-tests
714 (lambda _
715 ;; The test programs run several programs using 'system' with
716 ;; hard-coded paths. Here we patch them all.
717 ;; We use ISO-8859-1 here because test-iconv.c contains
718 ;; raw byte sequences in several different encodings.
719 (with-fluids ((%default-port-encoding #f))
720 (substitute* (find-files "tests" "\\.c$")
721 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
722 (let* ((base (basename prog-path))
723 (prog (which base)))
724 (string-append pre
725 (or prog (error "not found: " base)))))))
726 #t)))))
727 (home-page "http://spruce.sourceforge.net/gmime/")
728 (synopsis "MIME message parser and creator library")
729 (description
730 "GMime provides a core library and set of utilities which may be used for
731 the creation and parsing of messages using the Multipurpose Internet Mail
732 Extension (MIME).")
733 (license (list license:lgpl2.1+ license:gpl2+ license:gpl3+))))
734
735 ;; Some packages are not ready for GMime 3 yet.
736 (define-public gmime-2.6
737 (package
738 (inherit gmime)
739 (version "2.6.23")
740 (source (origin
741 (method url-fetch)
742 (uri (string-append "mirror://gnome/sources/gmime/"
743 (version-major+minor version)
744 "/gmime-" version ".tar.xz"))
745 (sha256
746 (base32
747 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
748
749 (define-public altermime
750 (package
751 (name "altermime")
752 (version "0.3.11")
753 (source (origin
754 (method url-fetch)
755 (uri (string-append "http://pldaniels.com/altermime/altermime-"
756 version ".tar.gz"))
757 (sha256
758 (base32
759 "15zxg6spcmd35r6xbidq2fgcg2nzyv1sbbqds08lzll70mqx4pj7"))))
760 (build-system gnu-build-system)
761 (arguments
762 `(#:make-flags (list "CC=gcc"
763 (string-append "PREFIX=" (assoc-ref %outputs "out")))
764 #:tests? #f ; there are none
765 #:phases
766 (modify-phases %standard-phases
767 (delete 'configure)
768 (add-after 'unpack 'fix-bugs
769 (lambda _
770 (substitute* "MIME_headers.c"
771 (("hinfo->filename, sizeof\\(hinfo->name\\)")
772 "hinfo->filename, sizeof(hinfo->filename)")
773 (("memset\\(hinfo->defects, 0, _MIMEH_DEFECT_ARRAY_SIZE\\);")
774 "memset(hinfo->defects, 0, sizeof(hinfo->defects));"))
775 (substitute* "pldstr.c"
776 (("if \\(\\(st->start\\)&&\\(st->start != '\\\\0'\\)\\)")
777 "if ((st->start)&&(*st->start != '\\0'))"))
778 (substitute* "qpe.c"
779 (("if \\(lineend != '\\\\0'\\)")
780 "if (*lineend != '\\0')"))
781 #t))
782 (add-after 'unpack 'install-to-prefix
783 (lambda _
784 (substitute* "Makefile"
785 (("/usr/local") "${PREFIX}")
786 (("cp altermime.*") "install -D -t ${PREFIX}/bin altermime\n"))
787 #t))
788 (add-after 'unpack 'disable-Werror
789 (lambda _
790 (substitute* "Makefile"
791 (("-Werror") ""))
792 #t)))))
793 (home-page "https://pldaniels.com/altermime/")
794 (synopsis "Modify MIME-encoded messages")
795 (description
796 "alterMIME is a small program which is used to alter your mime-encoded
797 mailpack. What can alterMIME do?
798
799 @enumerate
800 @item Insert disclaimers,
801 @item insert arbitrary X-headers,
802 @item modify existing headers,
803 @item remove attachments based on filename or content-type,
804 @item replace attachments based on filename.
805 @end enumerate
806 .")
807 ;; MIME_headers.c is distributed under BSD-3; the rest of the code is
808 ;; published under the alterMIME license.
809 (license (list (license:non-copyleft "file://LICENSE")
810 license:bsd-3))))
811
812 (define-public astroid
813 (package
814 (name "astroid")
815 (version "0.15")
816 (source
817 (origin
818 (method git-fetch)
819 (uri (git-reference
820 (url "https://github.com/astroidmail/astroid")
821 (commit (string-append "v" version))))
822 (file-name (git-file-name name version))
823 (sha256
824 (base32 "11cxbva9ni98gii59xmbxh4c6idcg3mg0pgdsp1c3j0yg7ix0lj3"))
825 (modules '((guix build utils)))
826 (snippet
827 '(begin
828 ;; https://github.com/astroidmail/astroid/pull/685
829 (substitute* "tests/test_composed_message.cc"
830 (("\\\\n\\.\\.\\.") "\\n...\\n"))
831 #t))))
832 (build-system cmake-build-system)
833 (arguments
834 `(#:modules ((guix build cmake-build-system)
835 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
836 (guix build utils)
837 (ice-9 match))
838 #:imported-modules ((guix build glib-or-gtk-build-system)
839 ,@%cmake-build-system-modules)
840 #:configure-flags (list "-GNinja")
841 #:phases
842 (modify-phases %standard-phases
843 (add-after 'unpack 'skip-markdown-test
844 ;; This test relies on the plugins and the test suite
845 ;; cannot find the Astroid module.
846 ;; gi.require_version ('Astroid', '0.2')
847 ;; ValueError: Namespace Astroid not available
848 (lambda _
849 (substitute* "tests/CMakeLists.txt"
850 ((".*markdown.*") ""))
851 #t))
852 (replace 'build
853 (lambda _
854 (invoke "ninja" "-j" (number->string (parallel-job-count)))))
855 (add-before 'check 'start-xserver
856 (lambda* (#:key inputs #:allow-other-keys)
857 (let ((xorg-server (assoc-ref inputs "xorg-server")))
858 (setenv "HOME" (getcwd))
859 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
860 (setenv "DISPLAY" ":1")
861 #t)))
862 (replace 'check
863 (lambda* (#:key tests? #:allow-other-keys)
864 (when tests?
865 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
866 (invoke "ctest" "."))
867 #t))
868 (replace 'install
869 (lambda _
870 (invoke "ninja" "install")))
871 (add-after 'install 'wrap-with-GI_TYPELIB_PATH
872 (lambda* (#:key inputs outputs #:allow-other-keys)
873 (let ((out (assoc-ref outputs "out"))
874 (paths (map (match-lambda
875 ((outputs . directory)
876 (let ((girepodir (string-append
877 directory
878 "/lib/girepository-1.0")))
879 (if (file-exists? girepodir)
880 girepodir
881 #f))))
882 inputs)))
883 (wrap-program (string-append out "/bin/astroid")
884 `("GI_TYPELIB_PATH" ":" prefix ,(filter identity paths))))
885 #t))
886 (add-after 'install 'glib-or-gtk-compile-schemas
887 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
888 (add-after 'install 'glib-or-gtk-wrap
889 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
890 (native-inputs
891 `(("glib-networking" ,glib-networking)
892 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
893 ("gnupg" ,gnupg)
894 ("ninja" ,ninja)
895 ("pkg-config" ,pkg-config)
896 ("ronn" ,ronn)
897 ("w3m" ,w3m)
898 ("xorg-server" ,xorg-server)))
899 (inputs
900 `(("boost" ,boost)
901 ("gmime" ,gmime)
902 ("gobject-introspection" ,gobject-introspection) ; it is referenced
903 ("gtkmm" ,gtkmm)
904 ("libpeas" ,libpeas)
905 ("libsass" ,libsass)
906 ("notmuch" ,notmuch)
907 ("protobuf" ,protobuf)
908 ("python" ,python-wrapper)
909 ("python-pygobject" ,python-pygobject)
910 ("webkitgtk" ,webkitgtk)))
911 (propagated-inputs
912 `(("adwaita-icon-theme" ,adwaita-icon-theme))) ; Required for the thread view
913 (home-page "https://astroidmail.github.io/")
914 (synopsis "GTK frontend to the notmuch mail system")
915 (description
916 "Astroid is a lightweight and fast Mail User Agent that provides a
917 graphical interface to searching, display and composing email, organized in
918 thread and tags. Astroid uses the notmuch backend for searches through tons of
919 email. Astroid searches, displays and compose emails — and relies on other
920 programs for fetching, syncing and sending email.")
921 (license (list license:gpl3+ ; 'this program'
922 license:lgpl2.1+)))) ; code from geary, gmime
923
924 (define-public ripmime
925 ;; Upstream does not tag or otherwise provide any releases (only a version
926 ;; number in the source)
927 (let ((commit "a556ffe08d620602475c976732e8e1a82f3169e9")
928 (revision "1"))
929 (package
930 (name "ripmime")
931 (version (git-version "1.4.0.10" revision commit))
932 (source (origin
933 (method git-fetch)
934 (uri (git-reference
935 (url "https://github.com/inflex/ripMIME")
936 (commit commit)))
937 (file-name (git-file-name name version))
938 (sha256
939 (base32
940 "1z8ar8flvkd9q3ax4x28sj5pyq8ykk5pq249y967lj2406lxparh"))))
941 (build-system gnu-build-system)
942 (arguments
943 `(#:phases
944 (modify-phases %standard-phases
945 ;; Source has no configure script
946 (delete 'configure)
947 ;; Buildcodes make the build non-reproducible; remove them
948 (add-after 'unpack 'strip-buildcodes
949 (lambda _
950 (substitute* "generate-buildcodes.sh"
951 (("`date \\+%s`") "0")
952 (("`date`") "0")
953 (("`uname -a`") "Guix"))
954 #t))
955 ;; https://github.com/inflex/ripMIME/pull/16 makes 'mkdir-p-bin-man unnecessary
956 (add-before 'install 'mkdir-p-bin-man
957 (lambda _
958 (mkdir-p (string-append (assoc-ref %outputs "out") "/bin"))
959 (mkdir-p (string-append (assoc-ref %outputs "out") "/man"))
960 #t)))
961 ;; Makefile has no tests
962 #:tests? #f
963 #:make-flags (list (string-append "LOCATION=" (assoc-ref %outputs "out"))
964 "CC=gcc")))
965 (synopsis "Extract attachments from MIME-encoded email")
966 (description
967 "ripMIME is a small program to extract the attached files out of a
968 MIME-encoded email package.")
969 (home-page "https://github.com/inflex/ripMIME")
970 (license license:bsd-3))))
971
972 (define-public mailcap
973 (let* ((version "2.1.49")
974 (tag ;; mailcap tags their releases like this: rMajor-minor-patch
975 (string-append "r" (string-join (string-split version #\.) "-"))))
976 (package
977 (name "mailcap")
978 (version version)
979 (source
980 (origin
981 (method git-fetch)
982 (uri (git-reference
983 (url "https://pagure.io/mailcap.git")
984 (commit tag)))
985 (file-name (git-file-name name version))
986 (sha256
987 (base32
988 "0ck1fw6gqn51phcfakhfpfq1yziv3gnmgjvswzhj9x0p162n6alj"))))
989 (build-system gnu-build-system)
990 (arguments
991 '(#:phases
992 (modify-phases %standard-phases
993 (delete 'configure)
994 (add-before 'install 'set-dest-dir
995 (lambda* (#:key outputs #:allow-other-keys)
996 (let ((out (assoc-ref outputs "out")))
997 (setenv "DESTDIR" out)
998 (substitute* "Makefile"
999 (("/usr") "")) ; This allows the man page to install.
1000 #t))))))
1001 (native-inputs
1002 `(("python" ,python))) ; for tests
1003 (synopsis "MIME type associations for file types")
1004 (description
1005 "This package provides MIME type associations for file types.")
1006 (home-page "https://pagure.io/mailcap")
1007 (license (list license:expat ; mailcap.5
1008 license:public-domain))))) ; mailcap and mime.types
1009
1010 (define-public bogofilter
1011 (package
1012 (name "bogofilter")
1013 (version "1.2.5")
1014 (source
1015 (origin
1016 (method url-fetch)
1017 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-stable/"
1018 "bogofilter-" version ".tar.xz"))
1019 (sha256
1020 (base32 "1sl9xrnnlk2sn8gmibhn8li09vnansjbxb9l1182qmgz7cvs2j1j"))))
1021 (build-system gnu-build-system)
1022 (arguments
1023 '(#:phases
1024 (modify-phases %standard-phases
1025 (add-before 'check 'pre-check
1026 (lambda _
1027 (substitute* "src/tests/t.frame"
1028 (("GREP=/bin/grep")
1029 (string-append "GREP=" (which "grep") "\n")))
1030 #t)))))
1031 (native-inputs `(("flex" ,flex)))
1032 (inputs `(("bdb" ,bdb)))
1033 (home-page "https://bogofilter.sourceforge.io/")
1034 (synopsis "Mail classifier based on a Bayesian filter")
1035 (description
1036 "Bogofilter is a mail filter that classifies mail as spam or ham
1037 (non-spam) by a statistical analysis of the message's header and
1038 content (body). The program is able to learn from the user's classifications
1039 and corrections. It is based on a Bayesian filter.")
1040 (license license:gpl3+)))
1041
1042 (define-public offlineimap
1043 (package
1044 (name "offlineimap")
1045 (version "7.3.3")
1046 (source (origin
1047 (method git-fetch)
1048 (uri (git-reference
1049 (url "https://github.com/OfflineIMAP/offlineimap")
1050 (commit (string-append "v" version))))
1051 (file-name (git-file-name name version))
1052 (sha256
1053 (base32
1054 "1gg8ry67i20qapj4z20am9bm67m2q28kixcj7ja75m897vhzarnq"))))
1055 (build-system python-build-system)
1056 (native-inputs
1057 `(("asciidoc" ,asciidoc)))
1058 (inputs
1059 `(("python2-pysqlite" ,python2-pysqlite)
1060 ("python2-rfc6555" ,python2-rfc6555)
1061 ("python2-six" ,python2-six)))
1062 (arguments
1063 ;; The setup.py script expects python-2.
1064 `(#:python ,python-2
1065 ;; Tests require a modifiable IMAP account.
1066 #:tests? #f
1067 #:phases
1068 (modify-phases %standard-phases
1069 (add-after 'build 'build-documentation
1070 (lambda _
1071 (substitute* "docs/Makefile"
1072 ;; Prevent xmllint and xsltproc from downloading a DTD file.
1073 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
1074 (invoke "make" "-C" "docs" "man")))
1075 (add-after 'install 'install-documentation
1076 (lambda* (#:key outputs #:allow-other-keys)
1077 (let* ((out (assoc-ref outputs "out"))
1078 (man (string-append out "/share/man")))
1079 (install-file "docs/offlineimap.1" (string-append man "/man1"))
1080 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
1081 #t))))))
1082 (home-page "https://www.offlineimap.org")
1083 (synopsis "Sync emails between two repositories")
1084 (description
1085 "OfflineImap synchronizes emails between two repositories, so that you
1086 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
1087 repository and Maildir/IMAP as LOCAL repository.")
1088 (license license:gpl2+)))
1089
1090 (define-public emacs-mew
1091 (package
1092 (name "emacs-mew")
1093 (version "6.8")
1094 (source (origin
1095 (method url-fetch)
1096 (uri (string-append "https://mew.org/Release/mew-"
1097 version ".tar.gz"))
1098 (sha256
1099 (base32
1100 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
1101 (native-inputs
1102 `(("emacs" ,emacs)))
1103 (propagated-inputs
1104 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
1105 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
1106 (build-system gnu-build-system)
1107 (arguments
1108 (let ((elisp-dir "/share/emacs/site-lisp")
1109 (icon-dir "/share/mew"))
1110 `(#:modules ((guix build gnu-build-system)
1111 (guix build utils)
1112 (guix build emacs-utils))
1113 #:imported-modules (,@%gnu-build-system-modules
1114 (guix build emacs-utils))
1115 #:configure-flags
1116 (list (string-append "--with-elispdir=" %output ,elisp-dir)
1117 (string-append "--with-etcdir=" %output ,icon-dir))
1118 #:phases
1119 (modify-phases %standard-phases
1120 (add-after 'configure 'patch-mew-icon-directory
1121 (lambda* (#:key outputs #:allow-other-keys)
1122 (emacs-substitute-sexps "mew-key.el"
1123 ("(def.* mew-icon-directory"
1124 `(progn
1125 (add-to-list 'image-load-path 'mew-icon-directory)
1126 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
1127 #t))
1128 (add-after 'install 'generate-autoloads
1129 (lambda* (#:key outputs #:allow-other-keys)
1130 (emacs-generate-autoloads
1131 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
1132 #t)))
1133 #:tests? #f)))
1134 (home-page "https://mew.org")
1135 (synopsis "Emacs e-mail client")
1136 (description "Mew (Messaging in the Emacs World) is a user interface
1137 for text messages, multimedia messages (MIME), news articles and
1138 security functionality including PGP, S/MIME, SSH, and SSL.")
1139 (license license:bsd-3)))
1140
1141 (define-public mu
1142 (package
1143 (name "mu")
1144 (version "1.4.15")
1145 (source (origin
1146 (method url-fetch)
1147 (uri (string-append "https://github.com/djcb/mu/releases/"
1148 "download/" version "/"
1149 "mu-" version ".tar.xz"))
1150 (sha256
1151 (base32
1152 "0ailz0k5fdgq6gdl5m7jxy315b7qn5ckj6xwd49hsiq9vqblwlpp"))))
1153 (build-system gnu-build-system)
1154 (native-inputs
1155 `(("pkg-config" ,pkg-config)
1156 ("glib" ,glib "bin") ; for gtester
1157 ("emacs" ,emacs-minimal)
1158 ("tzdata" ,tzdata-for-tests))) ; for mu/test/test-mu-query.c
1159 (inputs
1160 `(("xapian" ,xapian)
1161 ("guile" ,guile-2.2)
1162 ("glib" ,glib)
1163 ("gmime" ,gmime)))
1164 (arguments
1165 `(#:modules ((guix build gnu-build-system)
1166 (guix build utils)
1167 (guix build emacs-utils))
1168 #:imported-modules (,@%gnu-build-system-modules
1169 (guix build emacs-utils))
1170 #:phases
1171 (modify-phases %standard-phases
1172 (add-after 'unpack 'patch-configure
1173 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
1174 ;; so our Emacs package can't find it. Setting "--with-lispdir"
1175 ;; configure flag doesn't help because "mu4e" will be added to
1176 ;; the lispdir anyway, so we have to modify "configure.ac".
1177 (lambda _
1178 (substitute* "configure"
1179 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
1180 ;; Use latest Guile
1181 (("guile-2.0") "guile-2.2"))
1182 (substitute* '("guile/Makefile.in"
1183 "guile/mu/Makefile.in")
1184 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
1185 #t))
1186 (add-after 'unpack 'patch-bin-sh-in-tests
1187 (lambda _
1188 (substitute* '("guile/tests/test-mu-guile.c"
1189 "mu/test-mu-cmd.c"
1190 "mu/test-mu-cmd-cfind.c"
1191 "mu/test-mu-query.c"
1192 "mu/test-mu-threads.c")
1193 (("/bin/sh") (which "sh")))
1194 #t))
1195 (add-before 'install 'fix-ffi
1196 (lambda* (#:key outputs #:allow-other-keys)
1197 (substitute* "guile/mu.scm"
1198 (("\"libguile-mu\"")
1199 (format #f "\"~a/lib/libguile-mu\""
1200 (assoc-ref outputs "out"))))
1201 #t))
1202 (add-before 'check 'check-tz-setup
1203 (lambda* (#:key inputs #:allow-other-keys)
1204 ;; For mu/test/test-mu-query.c
1205 (setenv "TZDIR"
1206 (string-append (assoc-ref inputs "tzdata")
1207 "/share/zoneinfo"))
1208 #t))
1209 (add-after 'install 'install-emacs-autoloads
1210 (lambda* (#:key outputs #:allow-other-keys)
1211 (emacs-generate-autoloads
1212 "mu4e"
1213 (string-append (assoc-ref outputs "out")
1214 "/share/emacs/site-lisp"))
1215 #t)))))
1216 (home-page "https://www.djcbsoftware.nl/code/mu/")
1217 (synopsis "Quickly find emails")
1218 (description
1219 "Mu is a tool for dealing with e-mail messages stored in the
1220 Maildir-format. Mu's purpose in life is to help you to quickly find the
1221 messages you need; in addition, it allows you to view messages, extract
1222 attachments, create new maildirs, and so on.")
1223 (license license:gpl3+)))
1224
1225 (define-public alot
1226 (package
1227 (name "alot")
1228 (version "0.9.1")
1229 (source (origin
1230 (method git-fetch)
1231 ;; package author intends on distributing via github rather
1232 ;; than pypi:
1233 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
1234 (uri (git-reference
1235 (url "https://github.com/pazz/alot")
1236 (commit version)))
1237 (file-name (git-file-name name version))
1238 (sha256
1239 (base32
1240 "0s94m17yph1gq9f2svipb3bbwbw1s4j3zf2xkg5h91006v8286r6"))))
1241 (build-system python-build-system)
1242 (arguments
1243 `(#:phases
1244 (modify-phases %standard-phases
1245 (add-before 'check 'fix-tests
1246 (lambda* (#:key inputs #:allow-other-keys)
1247 (let ((gnupg (assoc-ref inputs "gnupg")))
1248 (substitute* "tests/test_crypto.py"
1249 (("gpg2") (string-append gnupg "/bin/gpg")))
1250 #t)))
1251 (add-before 'check 'disable-failing-tests
1252 ;; FIXME: Investigate why these tests are failing.
1253 (lambda _
1254 (substitute* "tests/test_helper.py"
1255 (("def test_env_set") "def _test_env_set"))
1256 (substitute* "tests/commands/test_global.py"
1257 (("def test_no_spawn_no_stdin_attached")
1258 "def _test_no_spawn_no_stdin_attached"))
1259 #t)))))
1260 (native-inputs
1261 `(("procps" ,procps)
1262 ("python-mock" ,python-mock)))
1263 (inputs
1264 `(("gnupg" ,gnupg)
1265 ("python-magic" ,python-magic)
1266 ("python-configobj" ,python-configobj)
1267 ("python-twisted" ,python-twisted)
1268 ("python-service-identity" ,python-service-identity)
1269 ("python-urwid" ,python-urwid)
1270 ("python-urwidtrees" ,python-urwidtrees)
1271 ("python-gpg" ,python-gpg)
1272 ("python-notmuch" ,python-notmuch)))
1273 (home-page "https://github.com/pazz/alot")
1274 (synopsis "Command-line MUA using Notmuch")
1275 (description
1276 "Alot is a terminal-based mail user agent based on the Notmuch mail
1277 indexer. It is written in Python using the @code{urwid} toolkit and features
1278 a modular and command prompt driven interface to provide a full mail user
1279 agent (@dfn{MUA}) experience as an alternative to the Emacs mode shipped with
1280 Notmuch.")
1281 (license license:gpl3+)))
1282
1283 (define-public notifymuch
1284 (let
1285 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
1286 (revision "1"))
1287 (package
1288 (name "notifymuch")
1289 (version (string-append "0.1-" revision "." (string-take commit 7)))
1290 (source
1291 (origin
1292 (method git-fetch)
1293 (uri (git-reference
1294 (url "https://github.com/kspi/notifymuch")
1295 (commit commit)))
1296 (sha256
1297 (base32
1298 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
1299 (file-name (string-append name "-" version "-checkout"))))
1300 (build-system python-build-system)
1301 (inputs
1302 `(("python-notmuch" ,python-notmuch)
1303 ("python-pygobject" ,python-pygobject)
1304 ("gobject-introspection" ,gobject-introspection)
1305 ("libnotify" ,libnotify)
1306 ("gtk+" ,gtk+)))
1307 (arguments
1308 `(#:phases
1309 (modify-phases %standard-phases
1310 (add-after 'install 'wrap-binary
1311 (lambda* (#:key outputs #:allow-other-keys)
1312 (let* ((out (assoc-ref outputs "out"))
1313 (bin (string-append out "/bin/notifymuch")))
1314 (wrap-program bin
1315 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
1316 `("GI_TYPELIB_PATH" ":" prefix
1317 (,(getenv "GI_TYPELIB_PATH")
1318 ,(string-append out "/lib/girepository-1.0")))))
1319 #t)))))
1320 (home-page "https://github.com/kspi/notifymuch")
1321 (synopsis "Displays notifications for changes in the notmuch email database")
1322 (description "notifymuch displays desktop notifications for messages in
1323 the notmuch database. The notifications are sent using libnotify to a
1324 notification daemon. The query to find messages to send a notification about
1325 is configurable, and a notification for the same message will not be send
1326 within a configurable period (defaults to 48 hours). To use notifymuch, run
1327 @command{notifymuch} after new mail is indexed, this can be automated by
1328 invoking @command{notifymuch} from the post-new hook.")
1329 (license license:gpl3))))
1330
1331 (define-public notmuch
1332 (package
1333 (name "notmuch")
1334 (version "0.31.4")
1335 (source (origin
1336 (method url-fetch)
1337 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
1338 version ".tar.xz"))
1339 (sha256
1340 (base32
1341 "0magnyjjhhv11nwcm2596hdxszrj61y69i0hmwqdc3v6cxjvcqc6"))))
1342 (build-system gnu-build-system)
1343 (arguments
1344 `(#:modules ((guix build gnu-build-system)
1345 ((guix build emacs-build-system) #:prefix emacs:)
1346 (guix build utils))
1347 #:imported-modules (,@%gnu-build-system-modules
1348 (guix build emacs-build-system)
1349 (guix build emacs-utils))
1350 #:make-flags
1351 (list "V=1" ; verbose test output
1352 "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
1353 #:phases (modify-phases %standard-phases
1354 (add-after 'unpack 'patch-notmuch-lib.el
1355 (lambda _
1356 (substitute* "emacs/notmuch-lib.el"
1357 (("/bin/sh") (which "sh")))
1358 #t))
1359 (replace 'configure
1360 (lambda* (#:key outputs #:allow-other-keys)
1361 (setenv "CC" "gcc")
1362 (setenv "CONFIG_SHELL" (which "sh"))
1363
1364 (let* ((out (assoc-ref outputs "out"))
1365 (elisp
1366 (string-append out "/share/emacs/site-lisp/")))
1367 (invoke "./configure"
1368 (string-append "--prefix=" out)
1369 (string-append "--emacslispdir=" elisp)
1370 (string-append "--emacsetcdir=" elisp)))))
1371 (add-before 'check 'disable-failing-tests
1372 ;; FIXME: Investigate why these tests are failing,
1373 ;; and try removing this for notmuch versions > 0.31.
1374 (lambda _
1375 (substitute* "test/T356-protected-headers.sh"
1376 (("\\$NOTMUCH_GMIME_X509_CERT_VALIDITY") "0"))
1377 #t))
1378 (add-before 'check 'prepare-test-environment
1379 (lambda _
1380 (setenv "TEST_CC" "gcc")
1381 ;; Patch various inline shell invocations.
1382 (substitute* (find-files "test" "\\.sh$")
1383 (("/bin/sh") (which "sh")))
1384 #t))
1385 (add-after 'install 'make-autoloads
1386 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
1387 (native-inputs
1388 `(("bash-completion" ,bash-completion)
1389 ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
1390 ("pkg-config" ,pkg-config)
1391 ("python" ,python)
1392 ("python-docutils" ,python-docutils)
1393 ("sphinx" ,python-sphinx)
1394
1395 ;; The following are required for tests only.
1396 ("which" ,which)
1397 ("dtach" ,dtach)
1398 ("gnupg" ,gnupg)
1399 ("man" ,man-db)
1400 ("perl" ,perl)))
1401 (inputs
1402 `(("glib" ,glib)
1403 ("gmime" ,gmime)
1404 ("talloc" ,talloc)
1405 ("xapian" ,xapian)
1406 ("zlib" ,zlib)))
1407 (home-page "https://notmuchmail.org/")
1408 (synopsis "Thread-based email index, search, and tagging")
1409 (description
1410 "Notmuch is a command-line based program for indexing, searching, read-
1411 ing, and tagging large collections of email messages.")
1412 (license license:gpl3+)))
1413
1414 (define-public notmuch-addrlookup-c
1415 (package
1416 (name "notmuch-addrlookup-c")
1417 (version (string-append "9"))
1418 (source (origin
1419 (method git-fetch)
1420 (uri (git-reference
1421 (url "https://github.com/aperezdc/notmuch-addrlookup-c")
1422 (commit (string-append "v" version))))
1423 (file-name (string-append name "-" version "-checkout"))
1424 (sha256
1425 (base32
1426 "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
1427 (build-system gnu-build-system)
1428 (arguments
1429 '(#:tests? #f ; no tests
1430 #:make-flags (list "CC=gcc")
1431 #:phases (modify-phases %standard-phases
1432 (delete 'configure)
1433 ;; Remove vim code completion config, it's not needed to
1434 ;; build (or be patched).
1435 (add-before 'patch-source-shebangs 'delete-ycm-file
1436 (lambda _ (delete-file ".ycm_extra_conf.py")))
1437 (replace 'install
1438 (lambda* (#:key outputs #:allow-other-keys)
1439 (let ((bin (string-append
1440 (assoc-ref outputs "out") "/bin")))
1441 (install-file "notmuch-addrlookup" bin)))))))
1442 (native-inputs
1443 `(("pkg-config" ,pkg-config)))
1444 (inputs
1445 `(("glib" ,glib)
1446 ("notmuch" ,notmuch)))
1447 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
1448 (synopsis "Address lookup tool for Notmuch")
1449 (description "This is an address lookup tool using a Notmuch database,
1450 useful for email address completion.")
1451 (license license:expat)))
1452
1453 (define-public python-notmuch
1454 (package
1455 (name "python-notmuch")
1456 (version (package-version notmuch))
1457 ;; Notmuch python bindings are now unavailable on pypi. The
1458 ;; bindings are distributed via the notmuch release tarball.
1459 (source (package-source notmuch))
1460 (build-system python-build-system)
1461 (inputs `(("notmuch" ,notmuch)))
1462 (arguments
1463 `(#:tests? #f ; no "test" target
1464 #:phases
1465 (modify-phases %standard-phases
1466 ;; This python package lives in a subdirectory of the notmuch source
1467 ;; tree, so chdir into it before building.
1468 (add-after 'unpack 'enter-python-dir
1469 (lambda _ (chdir "bindings/python") #t))
1470 ;; Make sure the correct notmuch shared library gets loaded.
1471 (add-before 'build 'set-libnotmuch-file-name
1472 (lambda* (#:key inputs #:allow-other-keys)
1473 (let ((notmuch (assoc-ref inputs "notmuch")))
1474 (substitute* "notmuch/globals.py"
1475 (("libnotmuch\\.so\\.")
1476 (string-append notmuch "/lib/libnotmuch.so.")))
1477 #t))))))
1478 (home-page (package-home-page notmuch))
1479 (synopsis "Python bindings of the Notmuch mail indexing library")
1480 (description
1481 "This package provides Python bindings to use the Notmuch mail indexing
1482 and search library.")
1483 (license license:gpl3+)))
1484
1485 (define-public python2-notmuch
1486 (package-with-python2 python-notmuch))
1487
1488 (define-public muchsync
1489 (package
1490 (name "muchsync")
1491 (version "6")
1492 (source
1493 (origin
1494 (method url-fetch)
1495 (uri (string-append "http://www.muchsync.org/src/"
1496 "muchsync-" version ".tar.gz"))
1497 (sha256
1498 (base32 "1s799kx16nm5ry1fcqcc0grgxrwnnp4cnzd0hzwbkvc5v2sf6g8b"))))
1499 (build-system gnu-build-system)
1500 (native-inputs
1501 `(("pandoc" ,pandoc)
1502 ("pkg-config" ,pkg-config)))
1503 (inputs
1504 `(("libcrypto" ,openssl)
1505 ("notmuch" ,notmuch)
1506 ("sqlite" ,sqlite)
1507 ("xapian" ,xapian)))
1508 (home-page "http://www.muchsync.org/")
1509 (synopsis "Synchronize notmuch mail across machines")
1510 (description
1511 "Muchsync brings Notmuch to all of your computers by synchronizing your
1512 mail messages and Notmuch tags across machines. The protocol is heavily
1513 pipelined to work efficiently over high-latency networks such as mobile
1514 broadband. Muchsync supports arbitrary pairwise synchronization among
1515 replicas. A version-vector-based algorithm allows it to exchange only the
1516 minimum information necessary to bring replicas up to date regardless of which
1517 pairs have previously synchronized.")
1518 (license license:gpl2+))) ; with OpenSSL libcrypto exception
1519
1520 (define-public getmail
1521 (package
1522 (name "getmail")
1523 (version "5.15")
1524 (source
1525 (origin
1526 (method url-fetch)
1527 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
1528 "getmail-" version ".tar.gz"))
1529 (sha256
1530 (base32 "0ahn2jyj4ka996qzs99id59pwxv6sqxp61g7drcf53rzzigq0lyl"))))
1531 (build-system python-build-system)
1532 (arguments
1533 `(#:tests? #f ; no tests
1534 #:python ,python-2))
1535 (home-page "http://pyropus.ca/software/getmail/")
1536 (synopsis "Mail retriever")
1537 (description
1538 "A flexible, extensible mail retrieval system with support for
1539 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1540 arbitrary message filtering, single-user and domain-mailboxes, and many other
1541 useful features.")
1542
1543 ;; License is specified in file '__init__.py'.
1544 (license license:gpl2)))
1545
1546 (define-public libetpan
1547 (package
1548 (name "libetpan")
1549 (version "1.9.4")
1550 (source (origin
1551 (method git-fetch)
1552 (uri (git-reference
1553 (url "https://github.com/dinhviethoa/libetpan")
1554 (commit version)))
1555 (file-name (git-file-name name version))
1556 (sha256
1557 (base32 "0g7an003simfdn7ihg9yjv7hl2czsmjsndjrp39i7cad8icixscn"))))
1558 (build-system gnu-build-system)
1559 (native-inputs `(("autoconf" ,autoconf)
1560 ("automake" ,automake)
1561 ("libtool" ,libtool)
1562 ("pkg-config" ,pkg-config)))
1563 (propagated-inputs
1564 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1565 ;; libraries need to be propagated.
1566 `(("cyrus-sasl" ,cyrus-sasl)
1567 ("openssl" ,openssl)))
1568 (inputs
1569 `(("curl" ,curl)
1570 ("expat" ,expat)
1571 ("zlib" ,zlib)))
1572 (arguments
1573 '(#:configure-flags
1574 '("--disable-static" "--disable-db")))
1575 (home-page "https://www.etpan.org/libetpan.html")
1576 (synopsis "Portable middleware for email access")
1577 (description
1578 "The purpose of this mail library is to provide a portable, efficient
1579 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1580 provides an API for C language. It's the low-level API used by MailCore and
1581 MailCore 2.")
1582 (license license:bsd-3)))
1583
1584 (define-public compface
1585 (package
1586 (name "compface")
1587 (version "1.5.2")
1588 (source (origin
1589 (method url-fetch)
1590 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1591 "ftp.xemacs.org/aux/"
1592 "compface-" version ".tar.gz"))
1593 (sha256
1594 (base32
1595 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1596 (build-system gnu-build-system)
1597 (arguments
1598 `(#:tests? #f))
1599 (synopsis "Portrait image compressor")
1600 (description "This package takes your 48x48x1 portrait image and
1601 compresses it.")
1602 (home-page "https://legacy.cs.indiana.edu/ftp/faces/")
1603 (license (license:x11-style "file://README"))))
1604
1605 (define-public claws-mail
1606 (package
1607 (name "claws-mail")
1608 (version "3.17.8")
1609 (source
1610 (origin
1611 (method url-fetch)
1612 (uri
1613 (string-append "https://www.claws-mail.org/releases/claws-mail-"
1614 version ".tar.xz"))
1615 (sha256
1616 (base32 "1byxmz68lnm2m8q1gnp0lpr3qp7dcwabrw5iqflz9mlm960v5dyd"))))
1617 (build-system glib-or-gtk-build-system)
1618 (arguments
1619 `(#:configure-flags
1620 (list
1621 "--enable-gnutls"
1622 "--enable-pgpmime-plugin"
1623 "--enable-enchant"
1624 "--enable-ldap")
1625 #:make-flags
1626 ;; Disable updating icon cache since it's done by the profile hook.
1627 ;; Conflict with other packages in the profile would be inevitable
1628 ;; otherwise.
1629 (list
1630 "gtk_update_icon_cache=true")
1631 #:phases
1632 (modify-phases %standard-phases
1633 (add-before 'build 'patch-mime
1634 (lambda* (#:key inputs #:allow-other-keys)
1635 (substitute* "src/procmime.c"
1636 (("/usr/share/mime/globs")
1637 (string-append (assoc-ref inputs "mime-info")
1638 "/share/mime/globs"))))))))
1639 (native-inputs
1640 `(("pkg-config" ,pkg-config)))
1641 (inputs
1642 `(("bogofilter" ,bogofilter)
1643 ("curl" ,curl)
1644 ("dbus-glib" ,dbus-glib)
1645 ("enchant" ,enchant)
1646 ("expat" ,expat)
1647 ("ghostscript" ,ghostscript)
1648 ("hicolor-icon-theme" ,hicolor-icon-theme)
1649 ("gnupg" ,gnupg)
1650 ("gnutls" ,gnutls)
1651 ("gpgme" ,gpgme)
1652 ("gtk" ,gtk+-2)
1653 ("libarchive" ,libarchive)
1654 ("libcanberra" ,libcanberra)
1655 ("libetpan" ,libetpan)
1656 ("libical" ,libical)
1657 ("libnotify" ,libnotify)
1658 ("libsm" ,libsm)
1659 ("libxml2" ,libxml2)
1660 ("perl" ,perl)
1661 ("python-2" ,python-2)
1662 ("mime-info" ,shared-mime-info)
1663 ("startup-notification" ,startup-notification)))
1664 (synopsis "GTK-based Email client")
1665 (description "Claws-Mail is an email client (and news reader) based on GTK+.
1666 The appearance and interface are designed to be familiar to new users coming
1667 from other popular email clients, as well as experienced users. Almost all
1668 commands are accessible with the keyboard. Plus, Claws-Mail is extensible via
1669 addons which can add many functionalities to the base client.")
1670 (home-page "https://www.claws-mail.org/")
1671 (license license:gpl3+))) ; most files are actually public domain or x11
1672
1673 (define-public msmtp
1674 (package
1675 (name "msmtp")
1676 (version "1.8.15")
1677 (source
1678 (origin
1679 (method url-fetch)
1680 (uri (string-append "https://marlam.de/msmtp/releases/"
1681 "/msmtp-" version ".tar.xz"))
1682 (sha256
1683 (base32 "1klrj2a77671xb6xa0a0iyszhjb7swxhmzpzd4qdybmzkrixqr92"))))
1684 (build-system gnu-build-system)
1685 (inputs
1686 `(("libsecret" ,libsecret)
1687 ("gnutls" ,gnutls)
1688 ("zlib" ,zlib)
1689 ("gsasl" ,gsasl)))
1690 (native-inputs
1691 `(("pkg-config" ,pkg-config)))
1692 (home-page "https://marlam.de/msmtp/")
1693 (arguments
1694 `(#:configure-flags (list "--with-libgsasl"
1695 "--with-libidn"
1696 "--with-tls=gnutls")
1697 #:phases
1698 (modify-phases %standard-phases
1699 (add-after 'install 'install-additional-files
1700 (lambda* (#:key outputs #:allow-other-keys)
1701 (let* ((out (assoc-ref outputs "out"))
1702 (bin (string-append out "/bin"))
1703 (doc (string-append out "/share/doc/msmtp"))
1704 (msmtpq "scripts/msmtpq")
1705 (vimfiles (string-append out "/share/vim/vimfiles/plugin")))
1706 (install-file (string-append msmtpq "/msmtpq") bin)
1707 (install-file (string-append msmtpq "/msmtp-queue") bin)
1708 (install-file (string-append msmtpq "/README.msmtpq") doc)
1709 (install-file "scripts/vim/msmtp.vim" vimfiles)
1710 ;; Don't rely on netcat being in the PATH to test for a
1711 ;; connection, instead try tp ing debian.org.
1712 (substitute* (string-append bin "/msmtpq")
1713 (("EMAIL_CONN_TEST=n") "EMAIL_CONN_TEST=p"))
1714 #t))))))
1715 (synopsis
1716 "Simple and easy to use SMTP client with decent sendmail compatibility")
1717 (description
1718 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1719 an SMTP server (for example at a free mail provider) which takes care of further
1720 delivery.")
1721 (license license:gpl3+)))
1722
1723 (define-public exim
1724 (package
1725 (name "exim")
1726 (version "4.94")
1727 (source
1728 (origin
1729 (method url-fetch)
1730 (uri (let ((file-name (string-append "exim-" version ".tar.xz")))
1731 (list (string-append "https://ftp.exim.org/pub/exim/exim4/"
1732 file-name)
1733 ;; ‘Fix’ releases (exim-x.y.z.f) are kept separately.
1734 (string-append "https://ftp.exim.org/pub/exim/exim4/fixes/"
1735 file-name)
1736 ;; After a new non-fix release, the old one is moved here.
1737 (string-append "https://ftp.exim.org/pub/exim/exim4/old/"
1738 file-name))))
1739 (sha256
1740 (base32 "1nsb2i5mqxfz1sl1bmbxmpb2qiaf3wffhfiw4j9vfpagy3xfhzpp"))))
1741 (build-system gnu-build-system)
1742 (inputs
1743 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
1744 ("gnutls" ,gnutls/dane)
1745 ("gzip" ,gzip)
1746 ("bzip2" ,bzip2)
1747 ("xz" ,xz)
1748 ("perl" ,perl)
1749 ("libnsl" ,libnsl)
1750 ("libxt" ,libxt)
1751 ("libxaw" ,libxaw)))
1752 (native-inputs
1753 `(("pcre" ,pcre "bin")
1754 ("perl" ,perl)
1755 ("pkg-config" ,pkg-config)))
1756 (arguments
1757 '(#:phases
1758 (modify-phases %standard-phases
1759 (replace 'configure
1760 ;; We'd use #:make-flags but the top-level Makefile calls others
1761 ;; recursively, so just set all variables this way.
1762 (lambda* (#:key outputs inputs #:allow-other-keys)
1763 (substitute* '("Makefile" "OS/Makefile-Default")
1764 (("(RM_COMMAND=).*" all var)
1765 (string-append var "rm\n")))
1766 (copy-file "src/EDITME" "Local/Makefile")
1767 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1768 (let ((out (assoc-ref outputs "out"))
1769 (gzip (assoc-ref inputs "gzip"))
1770 (bzip2 (assoc-ref inputs "bzip2"))
1771 (xz (assoc-ref inputs "xz")))
1772 (substitute* '("Local/Makefile")
1773 (("(BIN_DIRECTORY=).*" all var)
1774 (string-append var out "/bin\n"))
1775 (("(CONFIGURE_FILE=).*" all var)
1776 (string-append var out "/etc/exim.conf\n"))
1777 (("(EXIM_USER=).*" all var)
1778 (string-append var "nobody\n"))
1779 (("(FIXED_NEVER_USERS=).*" all var)
1780 (string-append var "\n")) ; XXX no root in build environment
1781 (("(COMPRESS_COMMAND=).*" all var)
1782 (string-append var gzip "/bin/gzip\n"))
1783 (("(ZCAT_COMMAND=).*" all var)
1784 (string-append var gzip "/bin/zcat\n"))
1785 (("# (USE_GNUTLS(|_PC)=.*)" all line)
1786 (string-append line "\n"))
1787 (("# (AUTH_CRAM_MD5=yes)" all line) line)
1788 (("# (AUTH_DOVECOT=yes)" all line) line)
1789 (("# (AUTH_EXTERNAL=yes)" all line) line)
1790 (("# (AUTH_PLAINTEXT=yes)" all line) line)
1791 (("# (AUTH_SPA=yes)" all line) line)
1792 (("# (AUTH_TLS=yes)" all line) line))
1793 ;; This file has hard-coded relative file names for tools despite
1794 ;; the zcat configuration above.
1795 (substitute* '("src/exigrep.src")
1796 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1797 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1798 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1799 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1800 #t))
1801 (add-before 'build 'fix-sh-paths
1802 (lambda* (#:key inputs #:allow-other-keys)
1803 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1804 (("SHELL=/bin/sh") "SHELL=sh"))
1805 (substitute* '("scripts/Configure-config.h")
1806 (("\\| /bin/sh") "| sh"))
1807 (let ((bash (assoc-ref inputs "bash")))
1808 (substitute* '("scripts/Configure-eximon")
1809 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1810 #t))
1811 (add-before 'build 'build-reproducibly
1812 (lambda _
1813 ;; The ‘compilation number’ is incremented for every build from the
1814 ;; same source tree. It appears to vary over different (parallel?)
1815 ;; builds. Make it a ‘constant number’ instead.
1816 (substitute* "src/version.c"
1817 (("#include \"cnumber.h\"") "1")))))
1818 #:make-flags
1819 (list "CC=gcc"
1820 "INSTALL_ARG=-no_chown")
1821 ;; No 'check' target. There is a test suite in test/, which assumes that
1822 ;; certain build options were (not) used and that it can freely ‘sudo’.
1823 #:tests? #f))
1824 (home-page "https://www.exim.org/")
1825 (synopsis
1826 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1827 (description
1828 "Exim is a message transfer agent (MTA) developed at the University of
1829 Cambridge for use on Unix systems connected to the Internet. In style it is
1830 similar to Smail 3, but its facilities are more general. There is a great
1831 deal of flexibility in the way mail can be routed, and there are extensive
1832 facilities for checking incoming mail.")
1833 (license license:gpl2+)))
1834
1835 (define-public dovecot
1836 (package
1837 (name "dovecot")
1838 ;; Also update dovecot-pigeonhole when updating to a new minor version.
1839 (version "2.3.14")
1840 (source
1841 (origin
1842 (method url-fetch)
1843 (uri (string-append "https://www.dovecot.org/releases/"
1844 (version-major+minor version) "/"
1845 "dovecot-" version ".tar.gz"))
1846 (sha256
1847 (base32 "0jm3p52z619v7ajh533g2g7d790k82fk0w7ry0zqlm8ymzrxgcy8"))))
1848 (build-system gnu-build-system)
1849 (native-inputs
1850 `(("pkg-config" ,pkg-config)))
1851 (inputs
1852 `(("bzip2" ,bzip2)
1853 ("clucene" ,clucene)
1854 ("icu4c" ,icu4c)
1855 ("libsodium" ,libsodium) ; extra password algorithms
1856 ("libstemmer" ,libstemmer)
1857 ;; FIXME: The 'test-backtrace' tests fail on arm when using glibc's
1858 ;; backtrace_symbol() function so fallback to using libunwind.
1859 ,@(if (target-arm?)
1860 `(("libunwind" ,libunwind))
1861 '())
1862 ("linux-pam" ,linux-pam)
1863 ("lz4" ,lz4)
1864 ("openssl" ,openssl)
1865 ("sqlite" ,sqlite)
1866 ("zlib" ,zlib)
1867 ("zstd" ,zstd "lib")))
1868 (arguments
1869 `(#:configure-flags '("--sysconfdir=/etc"
1870 "--localstatedir=/var"
1871 "--with-sqlite" ; not auto-detected
1872 "--with-lucene") ; not auto-detected
1873 #:phases
1874 (modify-phases %standard-phases
1875 (add-after 'unpack 'patch-file-names
1876 (lambda _
1877 (substitute* "src/lib-program-client/test-program-client-local.c"
1878 (("(/bin/| )cat") (which "cat"))
1879 (("/bin/echo") (which "echo"))
1880 (("/bin/false") (which "false"))
1881 (("/bin/sh") (which "bash"))
1882 (("head") (which "head"))
1883 (("sleep") (which "sleep")))
1884 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1885 "src/lib-smtp/test-bin/sendmail-success.sh")
1886 (("cat") (which "cat")))
1887 #t))
1888 (replace 'install
1889 (lambda* (#:key make-flags #:allow-other-keys)
1890 ;; Simple hack to avoid installing a trivial README in /etc.
1891 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1892 make-flags))))))
1893 (home-page "https://www.dovecot.org")
1894 (synopsis "Secure POP3/IMAP server")
1895 (description
1896 "Dovecot is a mail server whose major goals are security and reliability.
1897 It supports mbox/Maildir and its own dbox/mdbox formats.")
1898 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1899 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1900 ;; Unicode, Inc. License Agreement for Data Files and Software.
1901 (license (list license:lgpl2.1 license:expat
1902 (license:non-copyleft "file://COPYING")))))
1903
1904 (define-public dovecot-pigeonhole
1905 (let ((dovecot-version (version-major+minor (package-version dovecot))))
1906 (package
1907 (name "dovecot-pigeonhole")
1908 (version "0.5.14")
1909 (source
1910 (origin
1911 (method url-fetch)
1912 (uri (string-append
1913 "https://pigeonhole.dovecot.org/releases/" dovecot-version "/"
1914 "dovecot-" dovecot-version "-pigeonhole-" version ".tar.gz"))
1915 (sha256
1916 (base32 "1lmjzz4kd90wbdslacybizd1dks4bhwmrx39lj8b19naldw0zjk8"))
1917 (modules '((guix build utils)))
1918 (snippet
1919 '(begin
1920 ;; RFC licencing is ad-hoc and rarely free. Remove them all.
1921 (delete-file-recursively "doc/rfc")
1922 (substitute* "configure"
1923 (("doc/rfc/Makefile") ""))
1924 (substitute* "doc/Makefile.in"
1925 (("rfc ") ""))
1926 #t))))
1927 (build-system gnu-build-system)
1928 (arguments
1929 `(#:configure-flags
1930 (list "--disable-static"
1931 "--with-dovecot-install-dirs=no"
1932 (string-append "--with-dovecot="
1933 (assoc-ref %build-inputs "dovecot")
1934 "/lib/dovecot")
1935 (string-append "--docdir="
1936 (assoc-ref %outputs "out")
1937 "/share/doc/" ,name "-" ,version)
1938 (string-append "--with-moduledir="
1939 (assoc-ref %outputs "out")
1940 "/lib/dovecot"))
1941 #:phases
1942 (modify-phases %standard-phases
1943 (add-after 'unpack 'patch-file-names
1944 (lambda* (#:key outputs #:allow-other-keys)
1945 (let* ((out (assoc-ref outputs "out"))
1946 (libexec (string-append out "/libexec/dovecot")))
1947 (substitute* "src/managesieve/managesieve-settings.c"
1948 (("\\.executable = \"managesieve\"")
1949 (string-append ".executable = \"" libexec
1950 "/managesieve\"")))
1951 (substitute* "src/managesieve-login/managesieve-login-settings.c"
1952 (("\\.executable = \"managesieve-login\"")
1953 (string-append ".executable = \"" libexec
1954 "/managesieve-login\"")))
1955 #t))))))
1956 (native-inputs
1957 `(("pkg-config" ,pkg-config)))
1958 (inputs
1959 `(("dovecot" ,dovecot)))
1960 (home-page "https://pigeonhole.dovecot.org")
1961 (synopsis "Dovecot Sieve mail filtering plug-in and ManageSieve service")
1962 (description
1963 "Pigeonhole adds support for the Sieve language (RFC 5228) and the
1964 ManageSieve protocol (RFC 5804) to the Dovecot e-mail server.
1965
1966 @dfn{Sieve} is a language for filtering incoming mail. Messages can be
1967 forwarded or sorted into separate folders. Unwanted messages can be rejected
1968 or discarded, and, when the user is not available, the Sieve interpreter can
1969 send an automated reply.
1970
1971 Sieve is meant to be simple, extensible, and system-independent. The
1972 intention is to make it impossible to write anything more complex (and
1973 dangerous) than simple mail filters. Unlike most other mail filtering script
1974 languages, Sieve does not allow users to execute arbitrary programmes.
1975
1976 Through the @dfn{ManageSieve} protocol, users can remotely manage their Sieve
1977 scripts without needing file system access. The server accepts only valid
1978 scripts to prevent embarrassing errors later on.")
1979 (license license:lgpl2.1))))
1980
1981 (define-public dovecot-trees
1982 (package
1983 (name "dovecot-trees")
1984 (version "2.1.0")
1985 (source
1986 (origin
1987 (method url-fetch)
1988 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1989 "archive.tar.gz?ref=v" version))
1990 (file-name (string-append name "-" version ".tar.gz"))
1991 (sha256
1992 (base32
1993 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1994 (patches
1995 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
1996 (build-system gnu-build-system)
1997 (native-inputs
1998 `(("automake" ,automake)
1999 ("autoconf" ,autoconf)
2000 ("libtool" ,libtool)
2001 ("dovecot" ,dovecot)
2002 ("pkg-config" ,pkg-config)))
2003 (inputs
2004 `(("libsodium" ,libsodium)))
2005 (arguments
2006 `(#:tests? #f ;No tests exist.
2007 #:configure-flags (list (string-append "--with-dovecot="
2008 (assoc-ref %build-inputs "dovecot")
2009 "/lib/dovecot"))))
2010 (home-page "https://0xacab.org/riseuplabs/trees")
2011 (synopsis "NaCL-based Dovecot email storage encryption plugin")
2012 (description
2013 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
2014 Dovecot encryption plugin. This plugin adds individually encrypted mail
2015 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
2016 which uses OpenSSL and RSA key pairs. TREES works in a similar way, but uses
2017 the Sodium crypto library (based on NaCL).
2018
2019 How it works:
2020 @enumerate
2021 @item On IMAP log in, the user's cleartext password is passed to the plugin.
2022 @item The plugin creates an argon2 digest from the password.
2023 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
2024 @item Inside the secretbox is stored a Curve25519 private key.
2025 @item The Curve25519 private key is used to decrypt each individual message,
2026 using libsodium sealed boxes.
2027 @item New mail is encrypted as it arrives using the Curve25519 public key.
2028 @end enumerate\n")
2029 (license license:agpl3)))
2030
2031 (define-public dovecot-libsodium-plugin
2032 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
2033 (revision "1"))
2034 (package
2035 (name "dovecot-libsodium-plugin")
2036 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
2037 (source
2038 (origin
2039 (method git-fetch)
2040 (uri (git-reference
2041 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
2042 (commit commit)))
2043 (file-name (string-append name "-" version "-checkout"))
2044 (sha256
2045 (base32
2046 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
2047 (build-system gnu-build-system)
2048 (native-inputs
2049 `(("automake" ,automake)
2050 ("autoconf" ,autoconf)
2051 ("libtool" ,libtool)
2052 ("dovecot" ,dovecot)
2053 ("pkg-config" ,pkg-config)))
2054 (inputs
2055 `(("libsodium" ,libsodium)))
2056 (arguments
2057 `(#:tests? #f ;No tests exist.
2058 #:configure-flags (list (string-append "--with-dovecot="
2059 (assoc-ref %build-inputs "dovecot")
2060 "/lib/dovecot"))))
2061 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
2062 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
2063 (description
2064 "@code{dovecot-libsodium-plugin} provides a libsodium password
2065 hashing scheme (such as scrypt) plug-in for @code{Dovecot}.")
2066 (license license:gpl3+))))
2067
2068 (define-public isync
2069 (package
2070 (name "isync")
2071 (version "1.4.1")
2072 (source
2073 (origin
2074 (method url-fetch)
2075 (uri (string-append "mirror://sourceforge/isync/isync/"
2076 version "/isync-" version ".tar.gz"))
2077 (sha256 (base32
2078 "0l01880fcyqn6xq9n8236ha5n2a3wl5g8rmv22z8nv5hgfsxndhd"))))
2079 (build-system gnu-build-system)
2080 (native-inputs
2081 `(("perl" ,perl)))
2082 (inputs
2083 `(("bdb" ,bdb)
2084 ("cyrus-sasl" ,cyrus-sasl)
2085 ("openssl" ,openssl)
2086 ("zlib" ,zlib)))
2087 (home-page "https://isync.sourceforge.io/")
2088 (synopsis "Mailbox synchronization program")
2089 (description
2090 "isync/mbsync is a command-line tool for two-way synchronization of
2091 mailboxes. Currently Maildir and IMAP are supported types.")
2092 (license license:gpl2+)))
2093
2094 (define-public perl-email-abstract
2095 (package
2096 (name "perl-email-abstract")
2097 (version "3.008")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2102 "Email-Abstract-" version ".tar.gz"))
2103 (sha256
2104 (base32
2105 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
2106 (build-system perl-build-system)
2107 (propagated-inputs
2108 `(("perl-email-simple" ,perl-email-simple)
2109 ("perl-module-pluggable" ,perl-module-pluggable)
2110 ("perl-mro-compat" ,perl-mro-compat)))
2111 (home-page "https://metacpan.org/release/Email-Abstract")
2112 (synopsis "Interface to mail representations")
2113 (description "Email::Abstract provides module writers with the ability to
2114 write simple, representation-independent mail handling code.")
2115 (license license:perl-license)))
2116
2117 (define-public perl-email-address
2118 (package
2119 (name "perl-email-address")
2120 (version "1.912")
2121 (source
2122 (origin
2123 (method url-fetch)
2124 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2125 "Email-Address-" version ".tar.gz"))
2126 (sha256
2127 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
2128 (build-system perl-build-system)
2129 (home-page "https://metacpan.org/release/Email-Address")
2130 (synopsis "Email address parsing and creation")
2131 (description "Email::Address implements a regex-based RFC 2822 parser that
2132 locates email addresses in strings and returns a list of Email::Address
2133 objects found. Alternatively you may construct objects manually.")
2134 (license license:perl-license)))
2135
2136 (define-public perl-email-address-xs
2137 (package
2138 (name "perl-email-address-xs")
2139 (version "1.04")
2140 (source
2141 (origin
2142 (method url-fetch)
2143 (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
2144 "Email-Address-XS-" version ".tar.gz"))
2145 (sha256
2146 (base32
2147 "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
2148 (build-system perl-build-system)
2149 (home-page "https://metacpan.org/release/Email-Address-XS")
2150 (synopsis "Parse and format RFC 5322 email addresses and groups")
2151 (description
2152 "Email::Address::XS implements RFC 5322 parser and formatter of email
2153 addresses and groups. Unlike Email::Address, this module does not use regular
2154 expressions for parsing but instead is implemented in XS and uses shared code
2155 from Dovecot IMAP server.")
2156 (license license:perl-license)))
2157
2158 (define-public perl-email-date-format
2159 (package
2160 (name "perl-email-date-format")
2161 (version "1.005")
2162 (source
2163 (origin
2164 (method url-fetch)
2165 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2166 "Email-Date-Format-" version ".tar.gz"))
2167 (sha256
2168 (base32
2169 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
2170 (build-system perl-build-system)
2171 (home-page "https://metacpan.org/release/Email-Date-Format")
2172 (synopsis "Produce RFC 2822 date strings")
2173 (description "Email::Date::Format provides a means for generating an RFC
2174 2822 compliant datetime string.")
2175 (license license:perl-license)))
2176
2177 (define-public perl-email-messageid
2178 (package
2179 (name "perl-email-messageid")
2180 (version "1.406")
2181 (source
2182 (origin
2183 (method url-fetch)
2184 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2185 "Email-MessageID-" version ".tar.gz"))
2186 (sha256
2187 (base32
2188 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
2189 (build-system perl-build-system)
2190 (home-page "https://metacpan.org/release/Email-MessageID")
2191 (synopsis "Generate world unique message-ids")
2192 (description "Email::MessageID generates recommended message-ids to
2193 identify a message uniquely.")
2194 (license license:perl-license)))
2195
2196 (define-public perl-email-mime
2197 (package
2198 (name "perl-email-mime")
2199 (version "1.946")
2200 (source
2201 (origin
2202 (method url-fetch)
2203 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2204 "Email-MIME-" version ".tar.gz"))
2205 (sha256
2206 (base32
2207 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
2208 (build-system perl-build-system)
2209 (propagated-inputs
2210 `(("perl-email-address" ,perl-email-address)
2211 ("perl-email-messageid" ,perl-email-messageid)
2212 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
2213 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
2214 ("perl-email-simple" ,perl-email-simple)
2215 ("perl-mime-types" ,perl-mime-types)
2216 ("perl-module-runtime" ,perl-module-runtime)))
2217 (home-page "https://metacpan.org/release/Email-MIME")
2218 (synopsis "MIME message handling")
2219 (description "Email::MIME is an extension of the Email::Simple module, to
2220 handle MIME encoded messages. It takes a message as a string, splits it up
2221 into its constituent parts, and allows you access to various parts of the
2222 message. Headers are decoded from MIME encoding.")
2223 (license license:perl-license)))
2224
2225 (define-public perl-email-mime-contenttype
2226 (package
2227 (name "perl-email-mime-contenttype")
2228 (version "1.022")
2229 (source
2230 (origin
2231 (method url-fetch)
2232 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2233 "Email-MIME-ContentType-" version ".tar.gz"))
2234 (sha256
2235 (base32
2236 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
2237 (build-system perl-build-system)
2238 (native-inputs
2239 `(("perl-capture-tiny" ,perl-capture-tiny)))
2240 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
2241 (synopsis "Parse MIME Content-Type headers")
2242 (description "Email::MIME::ContentType parses a MIME Content-Type
2243 header.")
2244 (license license:perl-license)))
2245
2246 (define-public perl-email-mime-encodings
2247 (package
2248 (name "perl-email-mime-encodings")
2249 (version "1.315")
2250 (source
2251 (origin
2252 (method url-fetch)
2253 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2254 "Email-MIME-Encodings-" version ".tar.gz"))
2255 (sha256
2256 (base32
2257 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
2258 (build-system perl-build-system)
2259 (native-inputs
2260 `(("perl-capture-tiny" ,perl-capture-tiny)))
2261 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
2262 (synopsis "Unified interface to MIME encoding and decoding")
2263 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
2264 (license license:perl-license)))
2265
2266 (define-public perl-email-sender
2267 (package
2268 (name "perl-email-sender")
2269 (version "1.300035")
2270 (source
2271 (origin
2272 (method url-fetch)
2273 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2274 "Email-Sender-" version ".tar.gz"))
2275 (sha256
2276 (base32 "0yfssp3rqdx1dmgvnygarzgkpkhqm28r5sd0gh87ksk8yxndhjql"))))
2277 (build-system perl-build-system)
2278 (native-inputs
2279 `(("perl-capture-tiny" ,perl-capture-tiny)))
2280 (propagated-inputs
2281 `(("perl-email-abstract" ,perl-email-abstract)
2282 ("perl-email-address" ,perl-email-address)
2283 ("perl-email-simple" ,perl-email-simple)
2284 ("perl-list-moreutils" ,perl-list-moreutils)
2285 ("perl-module-runtime" ,perl-module-runtime)
2286 ("perl-moo" ,perl-moo)
2287 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
2288 ("perl-sub-exporter" ,perl-sub-exporter)
2289 ("perl-throwable" ,perl-throwable)
2290 ("perl-try-tiny" ,perl-try-tiny)))
2291 (home-page "https://metacpan.org/release/Email-Sender")
2292 (synopsis "Perl library for sending email")
2293 (description "Email::Sender replaces the old and sometimes problematic
2294 Email::Send library.")
2295 (license license:perl-license)))
2296
2297 (define-public perl-email-simple
2298 (package
2299 (name "perl-email-simple")
2300 (version "2.216")
2301 (source
2302 (origin
2303 (method url-fetch)
2304 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2305 "Email-Simple-" version ".tar.gz"))
2306 (sha256
2307 (base32
2308 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
2309 (build-system perl-build-system)
2310 (propagated-inputs
2311 `(("perl-email-date-format" ,perl-email-date-format)))
2312 (home-page "https://metacpan.org/release/Email-Simple")
2313 (synopsis "Parsing of RFC 2822 messages")
2314 (description "Email::Simple provides simple parsing of RFC 2822 message
2315 format and headers.")
2316 (license license:perl-license)))
2317
2318 (define-public libesmtp
2319 (package
2320 (name "libesmtp")
2321 (version "1.0.6")
2322 (source
2323 (origin
2324 (method url-fetch)
2325 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
2326 "libesmtp/libesmtp-" version ".tar.bz2/"
2327 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
2328 version ".tar.bz2")
2329 ;; XXX This site is offline, so we fetch Fedora's cached copy
2330 ;; of the source tarball.
2331 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
2332 version ".tar.bz2")))
2333 (sha256
2334 (base32
2335 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
2336 (build-system gnu-build-system)
2337 (propagated-inputs
2338 `(("openssl" ,openssl)))
2339 (home-page "http://www.stafford.uklinux.net/libesmtp/")
2340 (synopsis "Library for sending mail via remote hosts using SMTP")
2341 (description "libESMTP is an SMTP client which manages posting (or
2342 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
2343 It may be used as part of a Mail User Agent (MUA) or other program that must
2344 be able to post electronic mail where mail functionality may not be that
2345 program's primary purpose.")
2346 (license (list license:lgpl2.1+ license:gpl2+))))
2347
2348 (define-public esmtp
2349 (package
2350 (name "esmtp")
2351 (version "1.2")
2352 (source
2353 (origin
2354 (method git-fetch)
2355 (uri (git-reference
2356 (url "https://github.com/andywingo/esmtp")
2357 (commit "01bf9fc")))
2358 (sha256
2359 (base32
2360 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
2361 (file-name (string-append name "-" version "-checkout"))))
2362 (arguments
2363 `(#:phases (modify-phases %standard-phases
2364 (replace 'bootstrap
2365 (lambda _ (invoke "autoreconf" "-vfi"))))))
2366 (build-system gnu-build-system)
2367 (native-inputs
2368 `(("bison" ,bison)
2369 ("flex" ,flex)
2370 ("autoconf" ,autoconf)
2371 ("automake" ,automake)
2372 ("libtool" ,libtool)))
2373 (inputs
2374 `(("libesmtp" ,libesmtp)))
2375 (home-page "https://sourceforge.net/projects/esmtp/")
2376 (synopsis "Relay-only mail transfer agent (MTA)")
2377 (description "Esmtp is a simple relay-only mail transfer agent built using
2378 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
2379 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
2380 page for more on configuration. This package also provides minimal
2381 compatibility shims for the @command{sendmail}, @command{mailq}, and
2382 @command{newaliases} commands.")
2383 (license license:gpl2+)))
2384
2385 (define-public fdm
2386 (package
2387 (name "fdm")
2388 (version "2.0")
2389 (source (origin
2390 (method url-fetch)
2391 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
2392 version "/fdm-" version ".tar.gz"))
2393 (sha256
2394 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
2395 (build-system gnu-build-system)
2396 (inputs
2397 `(("tdb" ,tdb)
2398 ("openssl" ,openssl)
2399 ("zlib" ,zlib)))
2400 (home-page "https://github.com/nicm/fdm")
2401 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
2402 (description "fdm is a program designed to fetch mail from POP3
2403 or IMAP servers, or receive local mail from stdin, and
2404 deliver it in various ways.")
2405 (license
2406 ;; Why point to a source file? Well, all the individual files have a
2407 ;; copy of this license in their headers, but there's no seprate file
2408 ;; with that information.
2409 (license:non-copyleft
2410 "https://github.com/nicm/fdm/blob/master/command.c"))))
2411
2412
2413 (define-public procmail
2414 (package
2415 (name "procmail")
2416 (version "3.22")
2417 (source
2418 (origin
2419 (method url-fetch)
2420 (uri (string-append
2421 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
2422 version
2423 ".tar.gz"))
2424 (sha256
2425 (base32
2426 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
2427 ;; The following patch fixes an ambiguous definition of
2428 ;; getline() in formail.c. The patch is provided by Debian as
2429 ;; patch 24.
2430 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
2431 "procmail-CVE-2014-3618.patch"
2432 "procmail-CVE-2017-16844.patch"))))
2433 (arguments
2434 `(#:phases (modify-phases %standard-phases
2435 (replace 'configure
2436 (lambda _
2437 (substitute* "Makefile"
2438 (("/bin/sh")
2439 (which "sh"))
2440 (("/usr")
2441 (assoc-ref %outputs "out"))
2442 (("/bin/rm")
2443 (which "rm")))
2444 #t)))
2445 #:tests? #f)) ;; There are no tests indicating a successful
2446 ;; build. Some tests of basic locking mechanisms provided by the
2447 ;; file system are performed during 'make install'. However, these
2448 ;; are performed before the actual build process.
2449 (build-system gnu-build-system)
2450 (inputs `(("exim" ,exim)))
2451 (home-page "http://www.procmail.org/")
2452 (synopsis "Versatile mail delivery agent (MDA)")
2453 (description "Procmail is a mail delivery agent (MDA) featuring support
2454 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
2455 can be sorted into separate files/directories and arbitrary commands can be
2456 executed on mail arrival. Procmail is considered stable, but is no longer
2457 maintained.")
2458 (license license:gpl2+))) ;; procmail allows to choose the
2459 ;; nonfree Artistic License 1.0
2460 ;; as alternative to the GPL2+.
2461 ;; This option is not listed here.
2462
2463 (define-public khard
2464 (package
2465 (name "khard")
2466 (version "0.17.0")
2467 (source (origin
2468 (method url-fetch)
2469 (uri (pypi-uri name version))
2470 (sha256
2471 (base32
2472 "062nv4xkfsjc11k9m52dh6xjn9z68a4a6x1s8z05wwv4jbp1lkhn"))))
2473 (build-system python-build-system)
2474 (arguments
2475 `(#:phases
2476 (modify-phases %standard-phases
2477 (add-after 'install 'install-completions
2478 (lambda* (#:key outputs #:allow-other-keys)
2479 (let* ((out (assoc-ref outputs "out"))
2480 (zsh (string-append out "/share/zsh/site-functions")))
2481 (copy-recursively "misc/zsh" zsh)
2482 #t))))))
2483 (native-inputs
2484 `(("python-setuptools-scm" ,python-setuptools-scm)))
2485 (inputs
2486 `(("python-atomicwrites" ,python-atomicwrites)
2487 ("python-configobj" ,python-configobj)
2488 ("python-ruamel.yaml" ,python-ruamel.yaml)
2489 ("python-unidecode" ,python-unidecode)
2490 ("python-vobject" ,python-vobject)))
2491 (synopsis "Console address book using CardDAV")
2492 (description "Khard is an address book for the console. It creates, reads,
2493 modifies and removes CardDAV address book entries at your local machine. For
2494 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
2495 Khard can also be used from within the email client @command{mutt}.")
2496 (home-page "https://github.com/scheibler/khard")
2497 (license license:gpl3+)))
2498
2499 (define-public perl-mail-spf
2500 (package
2501 (name "perl-mail-spf")
2502 (version "2.9.0")
2503 (source
2504 (origin
2505 (method url-fetch)
2506 (uri (string-append
2507 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
2508 version
2509 ".tar.gz"))
2510 (sha256
2511 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
2512 (build-system perl-build-system)
2513 (native-inputs
2514 `(("perl-module-build" ,perl-module-build)
2515 ("perl-net-dns-resolver-programmable"
2516 ,perl-net-dns-resolver-programmable)))
2517 (arguments
2518 `(#:phases
2519 (modify-phases %standard-phases
2520 (add-before 'configure 'modify-Build.PL
2521 (lambda* (#:key outputs #:allow-other-keys)
2522 (substitute* "Build.PL"
2523 (("'/usr/sbin'") (string-append "'"
2524 (assoc-ref outputs "out")
2525 "/sbin'")))
2526 #t)))))
2527 (inputs
2528 `(("perl-error" ,perl-error)
2529 ("perl-net-dns" ,perl-net-dns)
2530 ("perl-netaddr-ip" ,perl-netaddr-ip)
2531 ("perl-uri" ,perl-uri)))
2532 (home-page "https://metacpan.org/release/Mail-SPF")
2533 (synopsis "Perl implementation of Sender Policy Framework")
2534 (description "Mail::SPF is the Sender Policy Framework implemented
2535 in Perl.")
2536 (license license:bsd-3)))
2537
2538 (define-public perl-mail-authenticationresults
2539 (package
2540 (name "perl-mail-authenticationresults")
2541 (version "1.20180923")
2542 (source (origin
2543 (method url-fetch)
2544 (uri (string-append
2545 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
2546 "Mail-AuthenticationResults-" version ".tar.gz"))
2547 (sha256
2548 (base32
2549 "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
2550 (build-system perl-build-system)
2551 (native-inputs
2552 `(("perl-test-exception" ,perl-test-exception)))
2553 (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
2554 (synopsis "Object Oriented Authentication-Results Headers")
2555 (description "Mail::AuthenticationResults parses the message header field
2556 that indicates the message authentication status as per RFC7601. This module
2557 is not fully compliant with the RFC but it tries to implement most styles of
2558 Authentication-Results header seen in the wild.")
2559 (license license:perl-license)))
2560
2561 (define-public perl-mail-dkim
2562 (package
2563 (name "perl-mail-dkim")
2564 (version "0.58")
2565 (source (origin
2566 (method url-fetch)
2567 (uri (string-append
2568 "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
2569 version
2570 ".tar.gz"))
2571 (sha256
2572 (base32
2573 "0cgkal65qqcy57b21lgij90ba36wl66byw9i76g5yhwaa8ms8hqa"))))
2574 (build-system perl-build-system)
2575 (propagated-inputs
2576 `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2577 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2578 ("perl-mailtools" ,perl-mailtools)
2579 ("perl-net-dns" ,perl-net-dns)))
2580 (native-inputs
2581 `(("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
2582 ("perl-test-requiresinternet" ,perl-test-requiresinternet)
2583 ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
2584 (home-page "https://metacpan.org/release/Mail-DKIM")
2585 (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
2586 (description "Mail::DKIM is a Perl module that implements the new Domain
2587 Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
2588 both of which sign and verify emails using digital signatures and DNS records.
2589 Mail-DKIM can be used by any Perl program that wants to provide support for
2590 DKIM and/or DomainKeys.")
2591 (license license:gpl3+)))
2592
2593 (define-public dkimproxy
2594 (package
2595 (name "dkimproxy")
2596 (version "1.4.1")
2597 (source (origin
2598 (method url-fetch)
2599 (uri (string-append
2600 "mirror://sourceforge/dkimproxy/dkimproxy/"
2601 version "/dkimproxy-" version ".tar.gz"))
2602 (sha256
2603 (base32
2604 "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
2605 (patches
2606 (search-patches "dkimproxy-add-ipv6-support.patch"))))
2607 (build-system gnu-build-system)
2608 (arguments
2609 `(#:phases
2610 (modify-phases %standard-phases
2611 (add-after 'install 'make-wrapper
2612 (lambda* (#:key inputs outputs #:allow-other-keys)
2613 (let* ((out (assoc-ref outputs "out"))
2614 (wrap.pl (lambda (scripts keys)
2615 (for-each
2616 (lambda (script)
2617 (wrap-program (string-append out script)
2618 `("PERL5LIB" ":" prefix
2619 ,(map (λ (input)
2620 (string-append
2621 (assoc-ref inputs input)
2622 "/lib/perl5/site_perl"))
2623 keys))))
2624 scripts))))
2625 (wrap.pl (list "/bin/dkimproxy.in"
2626 "/bin/dkimproxy.out")
2627 (list "perl-crypt-openssl-rsa"
2628 "perl-io-socket-inet6"
2629 "perl-mailtools"
2630 "perl-mail-authenticationresults"
2631 "perl-mail-dkim"
2632 "perl-net-dns"
2633 "perl-net-server"
2634 "perl-socket6"))
2635 (wrap.pl (list "/bin/dkim_responder.pl")
2636 (list "perl-crypt-openssl-rsa"
2637 "perl-mail-dkim"
2638 "perl-mailtools"
2639 "perl-mime-tools"
2640 "perl-net-dns"
2641 "perl-timedate"))
2642 #t))))))
2643 (inputs
2644 `(("perl" ,perl)
2645 ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2646 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2647 ("perl-mailtools" ,perl-mailtools)
2648 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2649 ("perl-mail-dkim" ,perl-mail-dkim)
2650 ("perl-mime-tools" ,perl-mime-tools)
2651 ("perl-net-dns" ,perl-net-dns)
2652 ("perl-net-server" ,perl-net-server)
2653 ("perl-socket6" ,perl-socket6)
2654 ("perl-timedate" ,perl-timedate)))
2655 (home-page "http://dkimproxy.sourceforge.net/")
2656 (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
2657 (description
2658 "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
2659 @code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
2660 proxy for signing outgoing email, and an inbound proxy for verifying signatures
2661 of incoming messages.
2662
2663 It was designed for Postfix, but can be used to add DKIM support to nearly any
2664 existing mail server. With Postfix, the proxies can operate as either
2665 @code{Before-Queue} or @code{After-Queue} content filters.")
2666 (license license:gpl2+)))
2667
2668 (define-public mb2md
2669 (package
2670 (name "mb2md")
2671 (version "3.20")
2672 (source (origin
2673 (method url-fetch)
2674 (uri (string-append
2675 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
2676 version ".pl.gz"))
2677 (sha256
2678 (base32
2679 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
2680 (build-system trivial-build-system)
2681 (arguments
2682 '(#:modules ((guix build utils))
2683 #:builder
2684 (begin
2685 (use-modules (guix build utils))
2686 (let* ((source (assoc-ref %build-inputs "source"))
2687 (out (assoc-ref %outputs "out"))
2688 (bin (string-append out "/bin"))
2689 (perl (assoc-ref %build-inputs "perl"))
2690 (gzip (assoc-ref %build-inputs "gzip"))
2691 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
2692 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
2693 (mkdir-p bin)
2694 (with-directory-excursion bin
2695 (copy-file source "mb2md.gz")
2696 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
2697 (substitute* "mb2md"
2698 (("#!/usr/bin/perl")
2699 (string-append "#!/usr/bin/perl -I " perl5lib)))
2700 (patch-shebang "mb2md" (list (string-append perl "/bin")))
2701 (chmod "mb2md" #o555))
2702 #t))))
2703 (native-inputs `(("gzip" ,gzip)))
2704 (inputs `(("perl" ,perl)
2705 ("perl-timedate" ,perl-timedate)))
2706 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
2707 (synopsis "Mbox to maildir converter")
2708 (description
2709 "Mb2md is a Perl script that takes one or more mbox format files and
2710 converts them to maildir format directories.")
2711 (license license:public-domain)))
2712
2713 (define-public mblaze
2714 (package
2715 (name "mblaze")
2716 (version "1.1")
2717 (source
2718 (origin
2719 (method git-fetch)
2720 (uri (git-reference
2721 (url "https://github.com/leahneukirchen/mblaze")
2722 (commit (string-append "v" version))))
2723 (file-name (git-file-name name version))
2724 (sha256
2725 (base32 "1bir977vnqs76g8jgv1yivqw0wk2kn56l3l5r4w2ipix3fir138y"))))
2726 (build-system gnu-build-system)
2727 (native-inputs
2728 `(("perl" ,perl)))
2729 (arguments
2730 `(#:tests? #f ; XXX: Upstream tests appear to be broken
2731 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2732 "PREFIX="
2733 (string-append "DESTDIR=" %output))
2734 #:phases
2735 (modify-phases %standard-phases
2736 (delete 'configure))))
2737 (home-page "https://github.com/leahneukirchen/mblaze")
2738 (synopsis "Unix utilities to deal with Maildir")
2739 (description
2740 "The mblaze message system is a set of Unix utilities for processing and
2741 interacting with mail messages which are stored in maildir folders.
2742
2743 Its design is roughly inspired by MH, the RAND Message Handling System, but it
2744 is a complete implementation from scratch.
2745
2746 mblaze is a classic command line MUA and has no features for receiving or
2747 transferring messages; you can operate on messages in a local maildir spool,
2748 or fetch your messages using fdm(1), getmail(1), offlineimap(1), or similar
2749 utilities, and send it using dma(8), msmtp(1), sendmail(8), as provided by
2750 OpenSMTPD, Postfix, or similar.
2751
2752 mblaze operates directly on maildir folders and doesn't use its own caches or
2753 databases. There is no setup needed for many uses. All utilities have been
2754 written with performance in mind. Enumeration of all messages in a maildir is
2755 avoided unless necessary, and then optimized to limit syscalls. Parsing
2756 message metadata is optimized to limit I/O requests. Initial operations on a
2757 large maildir may feel slow, but as soon as they are in the file system cache,
2758 everything is blazingly fast. The utilities are written to be memory
2759 efficient (i.e. not wasteful), but whole messages are assumed to fit into RAM
2760 easily (one at a time).")
2761 (license (list license:public-domain
2762 license:expat)))) ; mystrverscmp.c and mymemmem
2763
2764 (define-public mpop
2765 (package
2766 (name "mpop")
2767 (version "1.4.13")
2768 (source
2769 (origin
2770 (method url-fetch)
2771 (uri (string-append "https://marlam.de/mpop/releases/"
2772 "mpop-" version ".tar.xz"))
2773 (sha256
2774 (base32 "1hbx69d6ivbvjajrcp54fdb3g1ms4ydj0ybf3bfhlravqrk88jdk"))))
2775 (build-system gnu-build-system)
2776 (inputs
2777 `(("gnutls" ,gnutls)))
2778 (native-inputs
2779 `(("pkg-config" ,pkg-config)))
2780 (home-page "https://marlam.de/mpop/")
2781 (synopsis "POP3 mail client")
2782 (description "mpop is a small and fast POP3 client suitable as a
2783 fetchmail replacement.
2784
2785 mpop supports multiple accounts, header based mail filtering, delivery
2786 to mbox files, maildir folders or an @acronym{MDA, Mail Delivery Agent},
2787 TLS/SSL, several authentication methods, @acronym{IDN, Internationalized Domain
2788 Names} and SOCKS proxies.")
2789 (license license:gpl3+)))
2790
2791 (define-public mhonarc
2792 (package
2793 (name "mhonarc")
2794 (version "2.6.19")
2795 (source
2796 (origin
2797 (method url-fetch)
2798 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
2799 version ".tar.gz"))
2800 (sha256
2801 (base32
2802 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
2803 (build-system perl-build-system)
2804 (home-page "https://www.mhonarc.org/")
2805 (synopsis "Create HTML archives of mail/news messages")
2806 (description
2807 "MHonArc is a Perl mail-to-HTML converter. MHonArc
2808 provides HTML mail archiving with index, mail thread linking,
2809 etc; plus other capabilities including support for MIME and
2810 powerful user customization features.")
2811 (license license:gpl2+)))
2812
2813 (define-public sendmail
2814 (package
2815 (name "sendmail")
2816 (version "8.15.2")
2817 (source
2818 (origin
2819 (method url-fetch)
2820 (uri (string-append
2821 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
2822 version ".tar.gz"))
2823 (sha256
2824 (base32
2825 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
2826 (build-system gnu-build-system)
2827 (arguments
2828 `(#:phases
2829 (modify-phases %standard-phases
2830 (add-before 'build 'replace-/bin/sh
2831 (lambda _
2832 (substitute*
2833 (append
2834 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2835 "contrib/mmuegel" "devtools/bin/configure.sh")
2836 (find-files "." ".*\\.m4")
2837 (find-files "." ".*\\.cf"))
2838 (("/bin/sh") (which "sh")))
2839
2840 (substitute* "devtools/bin/Build"
2841 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
2842 #t))
2843 (replace 'configure
2844 (lambda _
2845
2846 ;; Render harmless any attempts to chown or chgrp
2847 (substitute* "devtools/bin/install.sh"
2848 (("owner=\\$2") "owner=''")
2849 (("group=\\$2") "group=''"))
2850
2851 (with-output-to-file "devtools/Site/site.config.m4"
2852 (lambda ()
2853 (format #t "
2854 define(`confCC', `gcc')
2855 define(`confOPTIMIZE', `-g -O2')
2856 define(`confLIBS', `-lresolv')
2857 define(`confINSTALL', `~a/devtools/bin/install.sh')
2858 define(`confDEPEND_TYPE', `CC-M')
2859 define(`confINST_DEP', `')
2860 " (getcwd))))
2861 #t))
2862 (replace 'build
2863 (lambda _
2864 (invoke "sh" "Build")
2865 (with-directory-excursion "cf/cf"
2866 (copy-file "generic-linux.mc" "sendmail.mc")
2867 (invoke "sh" "Build" "sendmail.cf"))
2868 #t))
2869 (add-before 'install 'pre-install
2870 (lambda _
2871 (let ((out (assoc-ref %outputs "out")))
2872 (mkdir-p (string-append out "/usr/bin"))
2873 (mkdir-p (string-append out "/usr/sbin"))
2874 (mkdir-p (string-append out "/etc/mail"))
2875 (setenv "DESTDIR" out)
2876 (with-directory-excursion "cf/cf"
2877 (invoke "sh" "Build" "install-cf"))
2878 #t))))
2879 ;; There is no make check. There are some post installation tests, but those
2880 ;; require root privileges
2881 #:tests? #f))
2882 (inputs
2883 `(("m4" ,m4)
2884 ("perl" ,perl)))
2885 (home-page "http://sendmail.org")
2886 (synopsis
2887 "Highly configurable Mail Transfer Agent (MTA)")
2888 (description
2889 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2890 Allman. It is highly configurable and supports many delivery methods and many
2891 transfer protocols.")
2892 (license (license:non-copyleft "file://LICENSE"
2893 "See LICENSE in the distribution."))))
2894
2895 (define-public sieve-connect
2896 (package
2897 (name "sieve-connect")
2898 (version "0.90")
2899 (source
2900 (origin
2901 (method url-fetch)
2902 (uri (string-append "https://people.spodhuis.org/phil.pennock/software/"
2903 "sieve-connect-" version ".tar.bz2"))
2904 (sha256
2905 (base32 "00vnyzr67yr2ilnprbd388gfnwmrmbdx1jsig9d0n5q902jqn62a"))))
2906 (build-system gnu-build-system)
2907 (arguments
2908 `(#:make-flags
2909 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2910 #:tests? #f ; no test suite
2911 #:phases
2912 (modify-phases %standard-phases
2913 (delete 'configure) ; no configure script
2914 (add-before 'install 'create-output-directories
2915 (lambda* (#:key outputs #:allow-other-keys)
2916 (let ((out (assoc-ref outputs "out")))
2917 (for-each (lambda (subdirectory)
2918 (mkdir-p (string-append out "/" subdirectory)))
2919 (list "bin"
2920 "man/man1"))
2921 #t)))
2922 (add-after 'install 'wrap-program
2923 (lambda* (#:key inputs outputs #:allow-other-keys)
2924 (let ((out (assoc-ref outputs "out"))
2925 (path (getenv "PERL5LIB")))
2926 (wrap-script (string-append out "/bin/sieve-connect")
2927 `("PERL5LIB" ":" = (,path)))
2928 #t))))))
2929 (inputs
2930 `(("guile" ,guile-3.0) ; for wrap-script
2931 ("perl" ,perl)
2932 ("perl-authen-sasl" ,perl-authen-sasl)
2933 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2934 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
2935 ("perl-net-dns" ,perl-net-dns)
2936 ("perl-socket6" ,perl-socket6)
2937 ("perl-term-readkey" ,perl-term-readkey)
2938 ("perl-term-readline" ,perl-term-readline-gnu)))
2939 (home-page
2940 "https://people.spodhuis.org/phil.pennock/software/#sieve-connect")
2941 (synopsis "ManageSieve client for managing Sieve e-mail filters")
2942 (description
2943 "Sieve-connect lets you view, upload, edit, delete, and otherwise manage
2944 Sieve scripts on any mail server that speaks the @dfn{ManageSieve} protocol,
2945 as specified in RFC 5804.
2946
2947 @dfn{Sieve} (RFC 5228) is a specialised language for e-mail filtering. Sieve
2948 scripts are stored on the server and run whenever mail arrives. They can
2949 automatically sort new messages into folders, silently reject them, send an
2950 automated response, and more.
2951
2952 @command{sieve-connect} is designed to be both a tool which can be invoked
2953 from scripts as well as a decent interactive client. It supports TLS for
2954 connection privacy, as well as authentication with SASL or GSSAPI client
2955 certificates. It should be a drop-in replacement for @command{sieveshell}
2956 from the Cyrus IMAP project.")
2957 (license license:bsd-3)))
2958
2959 (define-public opensmtpd
2960 (package
2961 (name "opensmtpd")
2962 (version "6.8.0p2")
2963 (source
2964 (origin
2965 (method url-fetch)
2966 (uri (string-append "https://www.opensmtpd.org/archives/"
2967 "opensmtpd-" version ".tar.gz"))
2968 (sha256
2969 (base32 "05sd7bmq29ibnqbl2z53hiyprfxzf0qydfdaixs68rz55wqhbgsi"))))
2970 (build-system gnu-build-system)
2971 (inputs
2972 `(("bdb" ,bdb)
2973 ("libasr" ,libasr)
2974 ("libevent" ,libevent)
2975 ("libressl" ,libressl) ; recommended, and supports e.g. ECDSA
2976 ("linux-pam" ,linux-pam)
2977 ("zlib" ,zlib)))
2978 (native-inputs
2979 `(("bison" ,bison)
2980 ("groff" ,groff))) ; for man pages
2981 (arguments
2982 `(#:configure-flags
2983 (list "--localstatedir=/var"
2984 ;; This is the default only if it exists at build time—it doesn't.
2985 "--with-path-socket=/var/run"
2986 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2987 "--with-user-smtpd=smtpd"
2988 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2989 "--with-auth-pam"
2990 "--with-table-db")
2991 #:phases
2992 (modify-phases %standard-phases
2993 ;; See: https://github.com/OpenSMTPD/OpenSMTPD/issues/1069.
2994 (add-after 'unpack 'fix-smtpctl-encrypt-bug
2995 (lambda _
2996 (substitute* "usr.sbin/smtpd/smtpctl.c"
2997 (("\"encrypt\", \"--\",")
2998 "\"encrypt\","))
2999 #t))
3000 ;; Fix some incorrectly hard-coded external tool file names.
3001 (add-after 'unpack 'patch-FHS-file-names
3002 (lambda _
3003 (substitute* "usr.sbin/smtpd/smtpctl.c"
3004 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
3005 (("/bin/cat") (which "cat")))
3006 (substitute* "usr.sbin/smtpd/mda_unpriv.c"
3007 (("/bin/sh") (which "sh")))
3008 #t))
3009 ;; OpenSMTPD provides a single smtpctl utility to control both the
3010 ;; daemon and the local submission subsystem. To accomodate systems
3011 ;; that require historical interfaces such as sendmail, newaliases or
3012 ;; makemap, smtpctl operates in compatibility mode if called with the
3013 ;; historical name.
3014 (add-after 'install 'install-compability-links
3015 (lambda* (#:key outputs #:allow-other-keys)
3016 (let* ((out (assoc-ref outputs "out"))
3017 (sbin (string-append out "/sbin/")))
3018 (for-each (lambda (command)
3019 (symlink "smtpctl" (string-append sbin command)))
3020 (list "mailq" "makemap" "newaliases"
3021 "send-mail" "sendmail")))
3022 #t)))))
3023 (synopsis "Lightweight SMTP daemon")
3024 (description
3025 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
3026 Transfer Protocol}, with some additional standard extensions. It allows
3027 ordinary machines to exchange e-mails with other systems speaking the SMTP
3028 protocol, or to deliver them to local users.
3029
3030 In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
3031 functionality than those available in other SMTP daemons. The objective is to
3032 provide enough features to satisfy typical usage at the risk of unsuitability
3033 to esoteric or niche requirements.")
3034 (home-page "https://www.opensmtpd.org")
3035 (license (list license:bsd-2 license:bsd-3 license:bsd-4
3036 (license:non-copyleft "file://COPYING")
3037 license:public-domain license:isc license:openssl))))
3038
3039 (define-public opensmtpd-extras
3040 (package
3041 (name "opensmtpd-extras")
3042 (version "6.7.1")
3043 (source (origin
3044 (method url-fetch)
3045 (uri (string-append "https://www.opensmtpd.org/archives/"
3046 "opensmtpd-extras-" version ".tar.gz"))
3047 (sha256
3048 (base32
3049 "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq"))))
3050 (build-system gnu-build-system)
3051 (native-inputs
3052 `(("pkg-config" ,pkg-config)))
3053 (inputs
3054 `(("libressl" ,libressl)
3055 ("libevent" ,libevent)
3056 ("mysql" ,mysql)
3057 ("opensmtpd" ,opensmtpd)
3058 ("postgresql" ,postgresql)
3059 ("python" ,python-2)
3060 ("sqlite" ,sqlite)))
3061 (arguments
3062 `(#:configure-flags
3063 (list "--sysconfdir=/etc"
3064 "--localstatedir=/var"
3065
3066 "--with-queue-null"
3067 "--with-queue-python"
3068 "--with-queue-ram"
3069 "--with-queue-stub"
3070
3071 "--with-table-ldap"
3072 "--with-table-mysql"
3073 "--with-table-postgres"
3074 ;; "--with-table-redis" ; TODO: package hiredis
3075 "--with-table-socketmap"
3076 "--with-table-passwd"
3077 "--with-table-python"
3078 "--with-table-sqlite"
3079 "--with-table-stub"
3080
3081 "--with-scheduler-ram"
3082 "--with-scheduler-stub"
3083 "--with-scheduler-python"
3084
3085 "--with-user-smtpd=smtpd"
3086
3087 ;; We have to configure it like this because the default checks for
3088 ;; for example Python in /usr/{,local/}bin and fails otherwise.
3089 (string-append "--with-python="
3090 (assoc-ref %build-inputs "python")))))
3091 (home-page "https://www.opensmtpd.org")
3092 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
3093 (description
3094 "This package provides extra tables, filters, and various other addons
3095 for OpenSMTPD to extend its functionality.")
3096 (license (list license:bsd-2 license:bsd-3 ; openbsd-compat
3097 license:isc)))) ; everything else
3098
3099 (define libopensmtpd
3100 ;; Private source dependency of opensmtpd-filter-dkimsign (by the same
3101 ;; author), until any project actually uses it in its compiled form.
3102 (let ((revision 48))
3103 (package
3104 (name "libopensmtpd")
3105 (version (format #f "0.0.0-~a" revision))
3106 (source
3107 (origin
3108 (method svn-fetch)
3109 (uri (svn-reference
3110 (url "http://imperialat.at/dev/libopensmtpd/")
3111 (revision revision)))
3112 (sha256
3113 (base32 "04fgibpi6q0c3468ww3z7gsvraz0gyfps0c2dj8mdyri636c0x0s"))
3114 (file-name (git-file-name name version))))
3115 (build-system gnu-build-system)
3116 (arguments
3117 `(#:make-flags
3118 (list "-f" "Makefile.gnu"
3119 (string-append "CC=" ,(cc-for-target))
3120 (string-append "LOCALBASE=" (assoc-ref %outputs "out")))
3121 #:tests? #f ; no test suite
3122 #:phases
3123 (modify-phases %standard-phases
3124 (add-after 'unpack 'inherit-ownership
3125 (lambda _
3126 (substitute* "Makefile.gnu"
3127 (("-o \\$\\{BINOWN\\} -g \\$\\{BINGRP\\}") ""))
3128 #t))
3129 (delete 'configure) ; no configure script
3130 (add-before 'install 'create-output-directories
3131 (lambda* (#:key outputs #:allow-other-keys)
3132 (let ((out (assoc-ref outputs "out")))
3133 (mkdir-p (string-append out "/lib"))
3134 #t)))
3135 (add-after 'install 'install-header-file
3136 (lambda* (#:key make-flags outputs #:allow-other-keys)
3137 (let ((out (assoc-ref outputs "out")))
3138 (mkdir-p (string-append out "/include"))
3139 (apply invoke "make" "includes" make-flags))))
3140 (add-after 'install 'install-man-page
3141 (lambda* (#:key outputs #:allow-other-keys)
3142 (let* ((out (assoc-ref outputs "out"))
3143 (man3 (string-append out "/share/man/man3")))
3144 ;; There is no make target for this.
3145 (install-file "osmtpd_run.3" man3)
3146 #t))))))
3147 (inputs
3148 `(("libevent" ,libevent)))
3149 (home-page "http://imperialat.at/dev/libopensmtpd/")
3150 (synopsis "OpenSMTPd filter C API")
3151 (description
3152 "The @code{osmtpd} API is an event-based C programming interface for
3153 writing OpenSMTPd filters.")
3154 (license license:expat))))
3155
3156 (define-public opensmtpd-filter-dkimsign
3157 (package
3158 (name "opensmtpd-filter-dkimsign")
3159 ;; The .arch repackaging provides not only a usable Makefile, but patches
3160 ;; the source to actually build on GNU, e.g., by making pledge() optional.
3161 ;; It's effectively the portable branch that upstream lacks at this time.
3162 (version "0.2.arch2") ; also update both native-inputs
3163 (source
3164 (origin
3165 (method git-fetch)
3166 (uri (git-reference
3167 (url "https://github.com/de-vri-es/filter-dkimsign")
3168 (commit (string-append "v" version))))
3169 (sha256
3170 (base32 "1dv6184h0gq2safnc7ln4za3arbafzc1xwkgwmiihqcjvdyxig0c"))
3171 (file-name (git-file-name name version))))
3172 (build-system gnu-build-system)
3173 (arguments
3174 `(#:make-flags
3175 (list (string-append "CC=" ,(cc-for-target)))
3176 #:tests? #f ; no test suite
3177 #:phases
3178 (modify-phases %standard-phases
3179 (replace 'unpack
3180 (lambda* (#:key source inputs #:allow-other-keys)
3181 (copy-recursively source "filter-dkimsign")
3182 (copy-recursively (assoc-ref inputs "libopensmtpd-source")
3183 "libopensmtpd")
3184 (copy-file (assoc-ref inputs "Makefile") "Makefile")
3185 #t))
3186 (delete 'configure) ; no configure script
3187 (replace 'install
3188 (lambda* (#:key outputs #:allow-other-keys)
3189 (let* ((out (assoc-ref outputs "out"))
3190 (libexec (string-append out "/libexec/opensmtpd"))
3191 (man8 (string-append out "/share/man/man8")))
3192 (chdir "filter-dkimsign")
3193 (install-file "filter-dkimsign" libexec)
3194 (install-file "filter-dkimsign.8" man8)
3195 #t))))))
3196 (native-inputs
3197 `(("Makefile"
3198 ,(origin
3199 (method url-fetch)
3200 (uri (string-append
3201 "https://aur.archlinux.org/cgit/aur.git/plain/Makefile"
3202 "?h=opensmtpd-filter-dkimsign"
3203 "&id=58393470477a2ff2a58f9d72f5d851698067539f"))
3204 (sha256
3205 (base32 "0da5qr9hfjkf07ybvfva967njmf2x0b82z020r6v5f93jzsbqx92"))
3206 (file-name (string-append name "-" version "-Makefile"))))
3207 ("libopensmtpd-source" ,(package-source libopensmtpd))))
3208 (inputs
3209 `(("libevent" ,libevent)
3210 ("libressl" ,libressl))) ; openssl works too but follow opensmtpd
3211 (home-page "http://imperialat.at/dev/filter-dkimsign/")
3212 (synopsis "OpenSMTPd filter for signing mail with DKIM")
3213 (description
3214 "The @command{filter-dkimsign} OpenSMTPd filter signs outgoing e-mail
3215 messages with @acronym{DKIM, DomainKeys Identified Mail} (RFC 4871).")
3216 (license license:expat)))
3217
3218 (define-public opensmtpd-filter-rspamd
3219 (package
3220 (name "opensmtpd-filter-rspamd")
3221 (version "0.1.7")
3222 (source (origin
3223 (method git-fetch)
3224 (uri (git-reference
3225 (url "https://github.com/poolpOrg/filter-rspamd")
3226 (commit (string-append "v" version))))
3227 (sha256
3228 (base32 "1qhrw20q9y44ffgx5k14nvqc9dh47ihywgzza84g0zv9xgif7hd5"))
3229 (file-name (git-file-name name version))))
3230 (build-system go-build-system)
3231 (arguments
3232 `(#:import-path "github.com/poolpOrg/filter-rspamd"
3233 #:phases
3234 (modify-phases %standard-phases
3235 (add-before 'build 'set-bootstrap-variables
3236 (lambda* (#:key outputs inputs #:allow-other-keys)
3237 ;; Tell the build system where to install binaries
3238 (let* ((out (assoc-ref outputs "out"))
3239 (libexec (string-append out "/libexec/opensmtpd")))
3240 (setenv "GOBIN" libexec)))))))
3241 (native-inputs
3242 `(("opensmtpd" ,opensmtpd)))
3243 (home-page "https://github.com/poolpOrg/filter-rspamd")
3244 (synopsis "OpenSMTPd filter to request an Rspamd analysis")
3245 (description
3246 "The @command{filter-rspamd} OpenSMTPd filter implements the
3247 Rspamd protocol and allows OpenSMTPd to request an Rspamd analysis of
3248 an SMTP transaction before a message is committed to queue.")
3249 (license license:isc)))
3250
3251 (define-public mailman
3252 (package
3253 (name "mailman")
3254 (version "3.3.2")
3255 (source
3256 (origin
3257 (method url-fetch)
3258 (uri (pypi-uri "mailman" version))
3259 (sha256
3260 (base32 "0a5ckbf8hc3y28b7p5psp0d4bxk601jlr5pd3hhh545xd8d9f0dg"))))
3261 (build-system python-build-system)
3262 (propagated-inputs
3263 `(("gunicorn" ,gunicorn)
3264 ("python-aiosmtpd" ,python-aiosmtpd)
3265 ("python-alembic" ,python-alembic)
3266 ("python-atpublic" ,python-atpublic)
3267 ("python-authheaders" ,python-authheaders)
3268 ("python-authres" ,python-authres)
3269 ("python-click" ,python-click)
3270 ("python-dateutil" ,python-dateutil)
3271 ("python-dnspython" ,python-dnspython)
3272 ("python-falcon" ,python-falcon)
3273 ("python-flufl-bounce" ,python-flufl-bounce)
3274 ("python-flufl-i18n" ,python-flufl-i18n)
3275 ("python-flufl-lock" ,python-flufl-lock)
3276 ("python-importlib-resources" ,python-importlib-resources)
3277 ("python-lazr-config" ,python-lazr-config)
3278 ("python-passlib" ,python-passlib)
3279 ("python-requests" ,python-requests)
3280 ("python-sqlalchemy" ,python-sqlalchemy)
3281 ("python-zope-component" ,python-zope-component)
3282 ("python-zope-configuration" ,python-zope-configuration)
3283 ("python-zope-event" ,python-zope-event)
3284 ("python-zope-interface" ,python-zope-interface)))
3285 (native-inputs
3286 `(("python-nose" ,python-nose)))
3287 (home-page "https://www.list.org")
3288 (synopsis "Mailing list manager")
3289 (description
3290 "GNU Mailman is software for managing email discussion and mailing
3291 lists. Both users and administrators generally perform their actions in a
3292 web interface, although email and command-line interfaces are also provided.
3293 The system features built-in archiving, automatic bounce processing, content
3294 filtering, digest delivery, and more.")
3295 (license license:gpl3+)))
3296
3297 (define-public python-mailmanclient
3298 (package
3299 (name "python-mailmanclient")
3300 (version "3.3.1")
3301 (source
3302 (origin
3303 (method url-fetch)
3304 (uri (pypi-uri "mailmanclient" version))
3305 (sha256
3306 (base32
3307 "0pjgzpvhdb6ql8asb20xr8d01m646zpghmcp9fmscks0n1k4di4g"))))
3308 (build-system python-build-system)
3309 (arguments
3310 `(#:tests? #f)) ; Requires mailman running
3311 (propagated-inputs
3312 `(("python-requests" ,python-requests)))
3313 ;(native-inputs
3314 ; `(("mailman" ,mailman)
3315 ; ("python-falcon" ,python-falcon)
3316 ; ("python-pytest" ,python-pytest)
3317 ; ("python-pytest-services" ,python-pytest-services)))
3318 (home-page "https://www.list.org/")
3319 (synopsis "Python bindings for the Mailman 3 REST API")
3320 (description
3321 "The mailmanclient library provides official Python bindings for
3322 the GNU Mailman 3 REST API.")
3323 (properties `((python2-variant . ,(delay python2-mailmanclient))))
3324 (license license:lgpl3+)))
3325
3326 ;; This is the last version which supports Python-2.
3327 (define-public python2-mailmanclient
3328 (let ((base (package-with-python2
3329 (strip-python2-variant python-mailmanclient))))
3330 (package
3331 (inherit base)
3332 (version "3.1.1")
3333 (source
3334 (origin
3335 (method url-fetch)
3336 (uri (pypi-uri "mailmanclient" version))
3337 (sha256
3338 (base32
3339 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
3340 (propagated-inputs
3341 `(("python2-six" ,python2-six)
3342 ("python2-httplib2" ,python2-httplib2))))))
3343
3344 (define-public mlmmj
3345 (package
3346 (name "mlmmj")
3347 (version "1.3.0")
3348 (source
3349 (origin
3350 (method url-fetch)
3351 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
3352 version ".tar.bz2"))
3353 (sha256
3354 (base32
3355 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
3356 (build-system gnu-build-system)
3357 (inputs
3358 `(("perl" ,perl))) ; For "contrib/web/"
3359 (native-inputs
3360 `(("pkg-config" ,pkg-config)))
3361 (arguments
3362 `(#:configure-flags
3363 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
3364 ;; It opens the files control/mimedeny and control/mimestrip to get a list
3365 ;; of mimetypes for parts of multipart/mime messages that should be denied
3366 ;; or stripped. The parts then get stripped directly when the mail is
3367 ;; received. mlmmj-receive-strip also appends an extra header
3368 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
3369 ;; mime parts
3370 (list "--enable-receive-strip")
3371 #:phases
3372 (modify-phases %standard-phases
3373 (add-before 'install 'install-contrib
3374 (lambda* (#:key outputs #:allow-other-keys)
3375 (let* ((out (assoc-ref outputs "out"))
3376 (share (string-append out "/share/mlmmj"))
3377 (contrib (string-append share "/contrib/web"))
3378 (texts (string-append share "/listtexts")))
3379 (copy-recursively "contrib/web/" contrib)
3380 (copy-recursively "listtexts" texts)
3381 (rename-file texts (string-append share "/texts"))
3382 #t))))))
3383 (home-page "http://mlmmj.org")
3384 (synopsis "Mailing list managing made joyful")
3385 (description
3386 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
3387 It works with many different Mail Transport Agents (MTAs) and is simple for a
3388 system administrator to install, configure and integrate with other software.
3389 As it uses very few resources, and requires no daemons, it is ideal for
3390 installation on systems where resources are limited. Its features include:
3391 @enumerate
3392 @item Archive, Custom headers / footer,
3393 @item Fully automated bounce handling (similar to ezmlm),
3394 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
3395 @item Subscribers only posting, Regular expression access control,
3396 @item Functionality to retrieve old posts, Web interface, Digests,
3397 @item No-mail subscription, VERP support,
3398 @item Delivery Status Notification (RFC1891) support,
3399 @item Rich and customisable texts for automated operations.
3400 @end enumerate\n")
3401 (license license:expat)))
3402
3403 (define-public python-django-mailman3
3404 (package
3405 (name "python-django-mailman3")
3406 (version "1.3.4")
3407 (source
3408 (origin
3409 (method url-fetch)
3410 (uri (pypi-uri "django-mailman3" version))
3411 (sha256
3412 (base32
3413 "1yrm7wpjy34xai72vn2vkhc9131cdrbqy08rrabf36kynj5vcdvy"))))
3414 (build-system python-build-system)
3415 (arguments
3416 '(#:phases
3417 (modify-phases %standard-phases
3418 (replace 'check
3419 (lambda _
3420 (setenv "DJANGO_SETTINGS_MODULE"
3421 "django_mailman3.tests.settings_test")
3422 (invoke "django-admin" "test"
3423 "--pythonpath=."))))))
3424 (propagated-inputs
3425 `(("python-django" ,python-django)
3426 ("python-django-allauth" ,python-django-allauth)
3427 ("python-django-gravatar2" ,python-django-gravatar2)
3428 ("python-mailmanclient" ,python-mailmanclient)
3429 ("python-pytz" ,python-pytz)))
3430 (native-inputs
3431 `(("python-mock" ,python-mock)))
3432 (home-page "https://gitlab.com/mailman/django-mailman3")
3433 (synopsis "Django library to help interaction with Mailman")
3434 (description
3435 "This package contains libraries and templates for Django-based interfaces
3436 interacting with Mailman.")
3437 (license license:gpl3+)))
3438
3439 (define-public python-mailman-hyperkitty
3440 (package
3441 (name "python-mailman-hyperkitty")
3442 (version "1.1.0")
3443 (source
3444 (origin
3445 (method url-fetch)
3446 (uri (pypi-uri "mailman-hyperkitty" version))
3447 (sha256
3448 (base32
3449 "1lfqa9admhvdv71f528jmz2wl0i5cv77v6l64px2pm4zqr9ckkjx"))
3450 (patches
3451 (list
3452 (origin
3453 ;; see: https://gitlab.com/mailman/mailman-hyperkitty/issues/17
3454 ;; fixes test_archive_message_unserializable
3455 (method url-fetch)
3456 (uri "https://salsa.debian.org/mailman-team/mailman-hyperkitty/raw/debian/1.1.0-9/debian/patches/0002-Skip-the-test_archive_message_unserializable.patch")
3457 (sha256
3458 (base32
3459 "0p1fwm46c4bl81lvsg3kjhn2r1lwgkpgxamb3xyqn7h9qdrw10hw")))))))
3460 (build-system python-build-system)
3461 (propagated-inputs
3462 `(("python-requests" ,python-requests)
3463 ("python-zope-interface" ,python-zope-interface)))
3464 (inputs
3465 `(("mailman" ,mailman)))
3466 (native-inputs
3467 `(("python-mock" ,python-mock)
3468 ("python-nose" ,python-nose)
3469 ("python-nose2" ,python-nose2)))
3470 (home-page "https://gitlab.com/mailman/mailman-hyperkitty/")
3471 (synopsis "Mailman archiver plugin for HyperKitty")
3472 (description
3473 "Mailman3 allows emails sent to its mailing lists to be archived by any
3474 software provided that there is a plugin (loadable by Mailman3) designed to
3475 communicate with it properly. This module contains a Mailman3 archiver plugin
3476 which sends emails to HyperKitty, the official Mailman3 web archiver.")
3477 (license license:gpl3+)))
3478
3479 (define-public python-hyperkitty
3480 (package
3481 (name "python-hyperkitty")
3482 (version "1.3.3")
3483 (source
3484 (origin
3485 (method url-fetch)
3486 (uri (pypi-uri "HyperKitty" version))
3487 (sha256
3488 (base32
3489 "0p85r9q6mn5as5b39xp9hkkipnk0156acx540n2ygk3qb3jd4a5n"))))
3490 (build-system python-build-system)
3491 (arguments
3492 '(#:phases
3493 (modify-phases %standard-phases
3494 (replace 'check
3495 (lambda _
3496 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
3497 (invoke "example_project/manage.py" "test"
3498 "--settings=hyperkitty.tests.settings_test"))))))
3499 (propagated-inputs
3500 `(("python-dateutil" ,python-dateutil)
3501 ("python-django" ,python-django-2.2)
3502 ("python-django-compressor" ,python-django-compressor)
3503 ("python-django-extensions" ,python-django-extensions)
3504 ("python-django-gravatar2" ,python-django-gravatar2)
3505 ("python-django-haystack" ,python-django-haystack)
3506 ("python-django-mailman3" ,python-django-mailman3)
3507 ("python-django-q" ,python-django-q)
3508 ("python-djangorestframework" ,python-djangorestframework)
3509 ("python-flufl-lock" ,python-flufl-lock)
3510 ("python-mailmanclient" ,python-mailmanclient)
3511 ("python-networkx" ,python-networkx)
3512 ("python-pytz" ,python-pytz)
3513 ("python-robot-detection" ,python-robot-detection)))
3514 (native-inputs
3515 `(("python-beautifulsoup4" ,python-beautifulsoup4)
3516 ("python-elasticsearch" ,python-elasticsearch)
3517 ("python-isort" ,python-isort)
3518 ("python-mock" ,python-mock)
3519 ("python-whoosh" ,python-whoosh)))
3520 (home-page "https://gitlab.com/mailman/hyperkitty")
3521 (synopsis "Web interface to access GNU Mailman v3 archives")
3522 (description
3523 "The hyperkitty Django app provides a web user interface to access GNU
3524 Mailman3 archives, and manage it. This interface uses django, and requires
3525 some configuration.")
3526 (license license:gpl3))) ; Some files are gpl2+
3527
3528 (define-public postorius
3529 (package
3530 (name "postorius")
3531 (version "1.3.3")
3532 (source
3533 (origin
3534 (method url-fetch)
3535 (uri (pypi-uri "postorius" version))
3536 (sha256
3537 (base32
3538 "08jn23gblbkfl09qlykbpsmp39mmach3sl69h1j5cd5kkx839rwa"))))
3539 (build-system python-build-system)
3540 (arguments
3541 '(#:phases
3542 (modify-phases %standard-phases
3543 (replace 'check
3544 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3545 (add-installed-pythonpath inputs outputs)
3546 (if tests?
3547 (invoke "python" "example_project/manage.py" "test"
3548 "--settings=test_settings" "postorius")
3549 #t))))
3550 #:tests? #f)) ; Tests try to run a mailman instance to test against.
3551 (inputs
3552 `(("python-django" ,python-django)
3553 ("python-django-mailman3" ,python-django-mailman3)
3554 ("python-mailmanclient" ,python-mailmanclient)
3555 ("python-readme-renderer" ,python-readme-renderer)))
3556 (native-inputs
3557 `(("python-beautifulsoup4" ,python-beautifulsoup4)
3558 ("python-isort" ,python-isort)
3559 ("python-mock" ,python-mock)
3560 ("python-vcrpy" ,python-vcrpy)))
3561 (home-page "https://gitlab.com/mailman/postorius")
3562 (synopsis "Web user interface for GNU Mailman")
3563 (description
3564 "Postorius is a Django app which provides a web user interface
3565 to access GNU Mailman.")
3566 (license (list license:gpl3+ license:lgpl3+))))
3567
3568 (define-public blists
3569 (package
3570 (name "blists")
3571 (version "2.0")
3572 (source
3573 (origin
3574 (method url-fetch)
3575 (uri (string-append "http://download.openwall.net/pub/projects/"
3576 "blists/blists-" version ".tar.gz"))
3577 (sha256
3578 (base32
3579 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
3580 (build-system gnu-build-system)
3581 (arguments
3582 `(#:tests? #f ; No tests
3583 #:phases
3584 (modify-phases %standard-phases
3585 (delete 'configure)
3586 (replace 'install
3587 (lambda* (#:key outputs #:allow-other-keys)
3588 (let* ((out (assoc-ref outputs "out"))
3589 (bin (string-append out "/bin")))
3590 (install-file "bindex" bin)
3591 (install-file "bit" bin)
3592 #t))))))
3593 (home-page "http://www.openwall.com/blists/")
3594 (synopsis "Web interface to mailing list archives")
3595 (description
3596 "Blists is a web interface to mailing list archives that works off
3597 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
3598 @code{bindex} generates or updates the index file (incremental updates
3599 are supported). @code{bit} is a CGI/SSI program that generates web pages
3600 on the fly. Both programs are written in C and are very fast.")
3601 (license license:expat)))
3602
3603 (define-public swaks
3604 (package
3605 (name "swaks")
3606 (version "20201014.0")
3607 (source
3608 (origin
3609 (method git-fetch)
3610 (uri (git-reference
3611 (url "https://github.com/jetmore/swaks")
3612 (commit (string-append "v" version))))
3613 (file-name (git-file-name name version))
3614 (sha256
3615 (base32 "131i2b1yxhnbqkfk4kky40pfanqw2c5lcgbnjhfqp5cvpawpk2ai"))))
3616 (build-system perl-build-system)
3617 (inputs
3618 `(("perl-io-socket-inet6" ,perl-io-socket-inet6)
3619 ("perl-net-dns" ,perl-net-dns)
3620 ("perl-net-ssleay" ,perl-net-ssleay)
3621 ("perl-socket6" ,perl-socket6))) ; used by perl-io-socket-inet6
3622 (arguments
3623 `(#:tests? #f ; no tests
3624 #:phases
3625 (modify-phases %standard-phases
3626 (add-after 'unpack 'set-build_version
3627 (lambda _
3628 (substitute* "swaks"
3629 (("\"DEVRELEASE\"") (format #f "\"~a\"" ,version)))
3630 #true))
3631 (delete 'configure)
3632 (replace 'build
3633 (lambda _
3634 (invoke "pod2man" "doc/base.pod" "swaks.1")))
3635 (replace 'install
3636 (lambda* (#:key outputs #:allow-other-keys)
3637 (let ((out (assoc-ref outputs "out")))
3638 (install-file "swaks" (string-append out "/bin"))
3639 (install-file "swaks.1" (string-append out "/share/man/man1")))
3640 #t))
3641 (add-after 'install 'wrap-program
3642 (lambda* (#:key outputs #:allow-other-keys)
3643 (wrap-program (string-append (assoc-ref outputs "out")
3644 "/bin/swaks")
3645 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
3646 #t)))))
3647 (home-page "https://jetmore.org/john/code/swaks/")
3648 (synopsis "Featureful SMTP test tool")
3649 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
3650 test tool. It handles SMTP features and extensions such as TLS,
3651 authentication, and pipelining; multiple versions of the SMTP protocol
3652 including SMTP, ESMTP, and LMTP; and multiple transport methods including
3653 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
3654 Options can be specified in environment variables, configuration files, and
3655 the command line allowing maximum configurability and ease of use for
3656 operators and scripters.")
3657 (license license:gpl2+)))
3658
3659 (define-public alpine
3660 (package
3661 (name "alpine")
3662 (version "2.24")
3663 (source
3664 (origin
3665 (method git-fetch)
3666 ;; There are two versions: the plain continuation of Alpine without extra
3667 ;; patches and the version which adds extra fixes. Every distro uses
3668 ;; the patched version, and so do we to not break expectations.
3669 ;; http://alpine.freeiz.com/alpine/readme/README.patches
3670 (uri (git-reference
3671 (url "http://repo.or.cz/alpine.git")
3672 (commit (string-append "v" version))))
3673 (file-name (git-file-name name version))
3674 (sha256
3675 (base32 "0d5ybnsv29gs8krl66db56avmssq28jlg0qj5i1wka05ncc3740d"))
3676 (modules '((guix build utils)))
3677 (snippet
3678 '(begin
3679 ;; Remove pre-built binaries scattered across the source repository.
3680 (for-each delete-file (find-files "." "\\.(dll|exe)"))
3681 #t))))
3682 (build-system gnu-build-system)
3683 (arguments
3684 `(#:make-flags
3685 (list (string-append "CC=" ,(cc-for-target)))
3686 #:configure-flags (list (string-append "--with-ssl-include-dir="
3687 (assoc-ref %build-inputs "openssl")
3688 "/include/openssl")
3689 (string-append "--with-ssl-dir="
3690 (assoc-ref %build-inputs "openssl"))
3691 (string-append "--with-ssl-certs-dir="
3692 "/etc/ssl/certs/")
3693 (string-append "--with-ssl-lib-dir="
3694 (assoc-ref %build-inputs "openssl")
3695 "/lib")
3696 (string-append "--with-interactive-spellcheck="
3697 (assoc-ref %build-inputs "aspell")
3698 "/bin/aspell")
3699 "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
3700 #:phases
3701 (modify-phases %standard-phases
3702 (add-after 'unpack 'assume-shadow-passwords
3703 ;; Alpine's configure script confuses ‘shadow password support’ with
3704 ;; ‘/etc/shadow exists in the build environment’. It does not.
3705 (lambda _
3706 (substitute* "configure"
3707 (("test -f /etc/shadow") "true"))
3708 #t))
3709 (add-after 'unpack 'make-reproducible
3710 (lambda _
3711 ;; This removes time-dependent code to make alpine reproducible.
3712 (substitute* "pico/blddate.c"
3713 (("%02d-%s-%d") "1970-01-01"))
3714 #t)))))
3715 (inputs
3716 `(("ncurses" ,ncurses)
3717 ("openssl" ,openssl)
3718 ("gnutls" ,gnutls)
3719 ("openldap" ,openldap)
3720 ("cyrus-sasl" ,cyrus-sasl)
3721 ("mit-krb5" ,mit-krb5)
3722 ("aspell" ,aspell)
3723 ("tcl" ,tcl)
3724 ("linux-pam" ,linux-pam)))
3725 (home-page "https://repo.or.cz/alpine.git")
3726 (synopsis "Alternatively Licensed Program for Internet News and Email")
3727 (description
3728 "Alpine is a text-based mail and news client. Alpine includes several
3729 tools and applications:
3730 @enumerate
3731 @item alpine, the Alpine mailer
3732 @item pico, the standalone text editor, GNU nano's predecessor
3733 @item pilot, the standalone file system navigator
3734 @end enumerate\n")
3735 (license license:asl2.0)))
3736
3737 (define-public balsa
3738 (package
3739 (name "balsa")
3740 (version "2.6.2")
3741 (source
3742 (origin
3743 (method url-fetch)
3744 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
3745 "balsa-" version ".tar.bz2"))
3746 (sha256
3747 (base32 "1w0239i01mw4wwwy7xh8gz7zgl5khwvfm5wy35x0swvvax021mai"))))
3748 (build-system gnu-build-system)
3749 (arguments
3750 `(#:configure-flags
3751 '(;; Balsa tries to install additional MIME icons
3752 ;; under gtk+ directory.
3753 "--enable-extra-mimeicons=no"
3754 "--with-gtksourceview"
3755 "--with-canberra"
3756 "--with-spell-checker=gtkspell"
3757 "--with-gpgme"
3758 "--with-sqlite"
3759 "--with-compface"
3760 "--with-ldap")))
3761 (inputs
3762 `(("cyrus-sasl" ,cyrus-sasl)
3763 ("enchant" ,enchant)
3764 ("gdk-pixbuf" ,gdk-pixbuf)
3765 ("gmime" ,gmime)
3766 ("gnutls" ,gnutls)
3767 ("gpgme" ,gpgme)
3768 ("gtk+" ,gtk+)
3769 ("gtksourceview" ,gtksourceview)
3770 ("gtkspell3" ,gtkspell3)
3771 ("libassuan" ,libassuan) ; in gpgme.pc Requires
3772 ("libcanberra" ,libcanberra)
3773 ("libesmtp" ,libesmtp)
3774 ("libical" ,libical)
3775 ("libnotify" ,libnotify)
3776 ("libsecret" ,libsecret)
3777 ("openldap" ,openldap)
3778 ("sqlite" ,sqlite)
3779 ("webkitgtk" ,webkitgtk)))
3780 (native-inputs
3781 `(("compface" ,compface)
3782 ("glib" ,glib "bin")
3783 ("intltool" ,intltool)
3784 ("pkg-config" ,pkg-config)
3785 ("yelp-tools" ,yelp-tools)))
3786 (home-page "https://pawsa.fedorapeople.org/balsa")
3787 (synopsis "E-mail client for GNOME")
3788 (description "Balsa is a highly configurable and robust mail client for
3789 the GNOME desktop. It supports both POP3 and IMAP servers as well as the
3790 mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
3791 the use of a local MTA such as Sendmail.")
3792 (license license:gpl3+)))
3793
3794 (define-public afew
3795 (package
3796 (name "afew")
3797 (version "3.0.1")
3798 (source
3799 (origin
3800 (method url-fetch)
3801 (uri (pypi-uri "afew" version))
3802 (sha256
3803 (base32
3804 "0wpfqbqjlfb9z0hafvdhkm7qw56cr9kfy6n8vb0q42dwlghpz1ff"))))
3805 (build-system python-build-system)
3806 (inputs
3807 `(("notmuch" ,notmuch)
3808 ("python-chardet" ,python-chardet)
3809 ("python-dkimpy" ,python-dkimpy)
3810 ("python-notmuch" ,python-notmuch)))
3811 (native-inputs
3812 `(("python-freezegun" ,python-freezegun)
3813 ("python-setuptools-scm" ,python-setuptools-scm)))
3814 (home-page "https://github.com/afewmail/afew")
3815 (synopsis "Initial tagging script for notmuch mail")
3816 (description "afew is an initial tagging script for notmuch mail. It
3817 provides automatic tagging each time new mail is registered with notmuch. It
3818 can add tags based on email headers or Maildir folders and can handle spam and
3819 killed threads.")
3820 (license license:isc)))
3821
3822 (define-public pan
3823 (package
3824 (name "pan")
3825 (version "0.146")
3826 (source
3827 (origin
3828 (method url-fetch)
3829 (uri (string-append "http://pan.rebelbase.com/download/releases/"
3830 version "/source/" name "-" version ".tar.bz2"))
3831 (sha256
3832 (base32 "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55"))))
3833 (arguments
3834 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
3835 "--enable-libnotify" "--enable-manual"
3836 "--enable-gkr")
3837 #:phases
3838 (modify-phases %standard-phases
3839 (add-before 'configure 'patch-gpg2
3840 (lambda* (#:key inputs #:allow-other-keys)
3841 (substitute* "pan/usenet-utils/gpg.cc"
3842 (("\"gpg2\"") (string-append "\""
3843 (assoc-ref inputs "gnupg")
3844 "/bin/gpg\"")))
3845 #t)))))
3846 (inputs
3847 `(("gmime" ,gmime-2.6)
3848 ("gnupg" ,gnupg)
3849 ("gnutls" ,gnutls)
3850 ("gtk+" ,gtk+)
3851 ("gtkspell3" ,gtkspell3)
3852 ("libnotify" ,libnotify)
3853 ("libsecret" ,libsecret)
3854 ("libxml2" ,libxml2)
3855 ("zlib" ,zlib)))
3856 (native-inputs
3857 `(("gettext-minimal" ,gettext-minimal)
3858 ("itstool" ,itstool)
3859 ("pkg-config" ,pkg-config)))
3860 (build-system gnu-build-system)
3861 (home-page "http://pan.rebelbase.com/")
3862 (synopsis "Pan newsreader")
3863 (description "@code{pan} is a Usenet newsreader that's good at both text
3864 and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
3865 PGP handling, multiple servers, and secure connections.")
3866 ;; License of the docs: fdl-1.1; Others: gpl2.
3867 (license (list license:fdl1.1+ license:gpl2))))
3868
3869 (define-public imapfilter
3870 (package
3871 (name "imapfilter")
3872 (version "2.7.5")
3873 (source
3874 (origin
3875 (method git-fetch)
3876 (uri (git-reference
3877 (url "https://github.com/lefcha/imapfilter")
3878 (commit (string-append "v" version))))
3879 (file-name (git-file-name name version))
3880 (sha256
3881 (base32 "0a7f85r3axwclzw1s79zl2l8222nj2gklvvq33w9qv0dz5n71dcx"))))
3882 (build-system gnu-build-system)
3883 (arguments
3884 `(#:tests? #f
3885 #:make-flags
3886 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3887 (string-append "CC=" ,(cc-for-target)))
3888 #:phases
3889 (modify-phases %standard-phases
3890 (delete 'configure)))) ; no configure script
3891 (inputs
3892 `(("lua" ,lua)
3893 ("pcre2" ,pcre2)
3894 ("openssl" ,openssl)))
3895 (home-page "https://github.com/lefcha/imapfilter")
3896 (synopsis "IMAP mail filtering utility")
3897 (description "IMAPFilter is a mail filtering utility. It connects
3898 to remote mail servers using IMAP, sends searching queries to the server and
3899 processes mailboxes based on the results. It can be used to delete, copy,
3900 move, flag, etc. messages residing in mailboxes at the same or different mail
3901 servers. The 4rev1 and 4 versions of IMAP are supported.")
3902 (license license:expat)))
3903
3904 (define-public urlscan
3905 (package
3906 (name "urlscan")
3907 (version "0.9.6")
3908 (source
3909 (origin
3910 (method url-fetch)
3911 (uri (pypi-uri "urlscan" version))
3912 (sha256
3913 (base32 "09lxi7dhn49fpb3ij4cgrhj3qqqqs9rcxbjb7p9smw5wblrqpzga"))))
3914 (build-system python-build-system)
3915 (propagated-inputs
3916 `(("python-urwid" ,python-urwid)))
3917 (home-page "https://github.com/firecat53/urlscan")
3918 (synopsis "View/select the URLs in an email message or file")
3919 (description
3920 "Urlscan is a small program that is designed to integrate with the
3921 Mutt mail reader to allow you to easily launch a Web browser for URLs
3922 contained in email messages. It parses an email message or file and scans it
3923 for URLs and email addresses. It then displays the URLs and their context
3924 within the message, and allows you to choose one or more URLs to send to your
3925 Web browser. Alternatively, it send a list of all URLs to standard output.
3926 It is a replacement for the @command{urlview} program.")
3927 (license license:gpl2)))
3928
3929 (define-public tnef
3930 (package
3931 (name "tnef")
3932 (version "1.4.18")
3933 (source
3934 (origin
3935 (method git-fetch)
3936 (uri (git-reference
3937 (url "https://github.com/verdammelt/tnef")
3938 (commit version)))
3939 (sha256
3940 (base32 "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"))
3941 (file-name (git-file-name name version))))
3942 (build-system gnu-build-system)
3943 (native-inputs
3944 `(("autoconf" ,autoconf)
3945 ("automake" ,automake)))
3946 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
3947 (home-page "https://github.com/verdammelt/tnef")
3948 (synopsis "Unpack @code{application/ms-tnef} attachments")
3949 (description
3950 "TNEF is a tar-like program that unpacks MIME attachments of type
3951 @code{application/ms-tnef}.")
3952 (license license:gpl2+)))
3953
3954 (define-public mumi
3955 (let ((commit "9f070bd90adc67064cd8aff4e40f303d5957ef4a")
3956 (revision "5"))
3957 (package
3958 (name "mumi")
3959 (version (git-version "0.0.1" revision commit))
3960 (source (origin
3961 (method git-fetch)
3962 (uri (git-reference
3963 (url "https://git.elephly.net/software/mumi.git")
3964 (commit commit)))
3965 (file-name (git-file-name name version))
3966 (sha256
3967 (base32
3968 "1ym1j3nzy8qhd1ydadccbgm0nckkmnq3vnz9qh9x8rasx7zg1ldp"))))
3969 (build-system gnu-build-system)
3970 (arguments
3971 `(#:modules ((guix build gnu-build-system)
3972 ((guix build guile-build-system)
3973 #:select (target-guile-effective-version))
3974 (guix build utils))
3975 #:imported-modules ((guix build guile-build-system)
3976 ,@%gnu-build-system-modules)
3977
3978 #:configure-flags '("--localstatedir=/var")
3979
3980 #:phases
3981 (modify-phases %standard-phases
3982 (add-after 'install 'wrap-executable
3983 (lambda* (#:key outputs #:allow-other-keys)
3984 (let* ((out (assoc-ref outputs "out"))
3985 (bin (string-append out "/bin"))
3986 (version (target-guile-effective-version))
3987 (scm (string-append out "/share/guile/site/" version))
3988 (go (string-append out "/lib/guile/" version
3989 "/site-ccache")))
3990 (wrap-program (string-append bin "/mumi")
3991 `("GUILE_LOAD_PATH" ":" prefix
3992 (,scm ,(getenv "GUILE_LOAD_PATH")))
3993 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
3994 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
3995 #t))))))
3996 (inputs
3997 `(("guile-email" ,guile-email-latest)
3998 ("guile-fibers" ,guile-fibers)
3999 ("guile-gcrypt" ,guile-gcrypt)
4000 ("guile-json" ,guile-json-3)
4001 ("guile-redis" ,guile-redis)
4002 ("guile-syntax-highlight" ,guile-syntax-highlight)
4003 ("guile-webutils" ,guile-webutils)
4004 ("guile-xapian" ,guile-xapian)
4005 ("guile" ,guile-3.0)
4006 ("mailutils" ,mailutils)))
4007 (native-inputs
4008 `(("autoconf" ,autoconf)
4009 ("automake" ,automake)
4010 ("pkg-config" ,pkg-config)))
4011 (home-page "https://git.elephly.net/software/mumi.git")
4012 (synopsis "Debbugs web interface")
4013 (description "Mumi is a Debbugs web interface.")
4014 (license license:agpl3+))))
4015
4016 (define-public ytnef
4017 (package
4018 (name "ytnef")
4019 (version "1.9.3")
4020 (source (origin
4021 (method git-fetch)
4022 (uri (git-reference
4023 (url "https://github.com/Yeraze/ytnef")
4024 (commit (string-append "v" version))))
4025 (file-name (git-file-name name version))
4026 (sha256
4027 (base32
4028 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))
4029 (patches (search-patches "ytnef-CVE-2021-3403.patch"
4030 "ytnef-CVE-2021-3404.patch"))))
4031 (build-system gnu-build-system)
4032 (native-inputs
4033 `(("autoconf" ,autoconf)
4034 ("automake" ,automake)
4035 ("libtool" ,libtool)))
4036 (home-page "https://github.com/Yeraze/ytnef/")
4037 (synopsis "TNEF stream reader for winmail.dat files")
4038 (description "This package provides a TNEF stream reader library and
4039 related tools to process winmail.dat files.")
4040 (license license:gpl2+)))
4041
4042 (define-public l2md
4043 ;; No official release.
4044 (let ((commit "f7286b49bb5fce25c898c143712fe34ad4d7864e")
4045 (revision "1"))
4046 (package
4047 (name "l2md")
4048 (version (git-version "0.1.0" revision commit))
4049 (source
4050 (origin
4051 (method git-fetch)
4052 (uri (git-reference
4053 (url "https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git")
4054 (commit commit)))
4055 (file-name (git-file-name name version))
4056 (sha256
4057 (base32 "0hxz8i70v1xgv30zjclfvmjqszn073c7i8nwmswi2lr6vd7cklvp"))))
4058 (build-system gnu-build-system)
4059 (inputs
4060 `(("libgit2" ,libgit2)))
4061 (arguments
4062 `(#:phases
4063 (modify-phases %standard-phases
4064 (delete 'configure) ;no configure scripts
4065 (delete 'check) ;no tests
4066 (add-before 'install 'mkdir
4067 (lambda* (#:key outputs #:allow-other-keys)
4068 (let ((l2md (string-append (assoc-ref outputs "out") "/bin")))
4069 (mkdir-p l2md)))))
4070 #:make-flags
4071 (list ,(string-append "CC=" (cc-for-target))
4072 (string-append "PREFIX=" %output "/bin"))))
4073 (home-page
4074 "https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git")
4075 (synopsis "Import public-inbox archives via Git")
4076 (description
4077 "The @command{l2md} command line tool imports public-inbox archives via
4078 Git and exports them in maildir format or to an MDA through a pipe.")
4079 (license license:gpl2))))
4080
4081 (define-public public-inbox
4082 (package
4083 (name "public-inbox")
4084 (version "1.5.0")
4085 (source
4086 (origin (method git-fetch)
4087 (uri (git-reference
4088 (url "https://public-inbox.org")
4089 (commit (string-append "v" version))))
4090 (sha256
4091 (base32
4092 "03zj7shdl3vibs7k5lr673bwcf8j1xx8is3mjz34ca4cdh6p5j2k"))
4093 (file-name (git-file-name name version))))
4094 (build-system perl-build-system)
4095 (arguments
4096 '(#:phases
4097 (modify-phases %standard-phases
4098 (add-before 'configure 'qualify-paths
4099 (lambda _
4100 ;; Use absolute paths for 'xapian-compact'.
4101 (let ((xapian-compact (which "xapian-compact")))
4102 (substitute* "script/public-inbox-compact"
4103 (("xapian-compact") xapian-compact)))
4104 #t))
4105 (add-before 'check 'pre-check
4106 (lambda _
4107 (substitute* "t/spawn.t"
4108 (("\\['env'\\]") (string-append "['" (which "env") "']")))
4109 (substitute* "t/ds-leak.t"
4110 (("/bin/sh") (which "sh")))
4111 (invoke "./certs/create-certs.perl")
4112 ;; XXX: This test fails due to zombie process is not reaped by
4113 ;; the builder.
4114 (substitute* "t/httpd-unix.t"
4115 (("^SKIP: \\{") "SKIP: { skip('Guix');"))
4116 #t))
4117 (add-after 'install 'wrap-programs
4118 (lambda* (#:key inputs outputs #:allow-other-keys)
4119 (let ((out (assoc-ref outputs "out")))
4120 (for-each
4121 (lambda (prog)
4122 (wrap-program prog
4123 ;; Let those scripts find their perl modules.
4124 `("PERL5LIB" ":" prefix
4125 (,(string-append out "/lib/perl5/site_perl")
4126 ,(getenv "PERL5LIB")))
4127 ;; 'git' is invoked in various files of the PublicInbox
4128 ;; perl module.
4129 `("PATH" ":" prefix
4130 (,(string-append (assoc-ref inputs "git") "/bin")))))
4131 (find-files (string-append out "/bin"))))
4132 #t)))))
4133 (native-inputs
4134 `(("xapian" ,xapian)
4135 ;; For testing.
4136 ("lsof" ,lsof)
4137 ("openssl" ,openssl)))
4138 (inputs
4139 `(("git" ,git)
4140 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
4141 ("perl-dbi" ,perl-dbi)
4142 ("perl-email-address-xs" ,perl-email-address-xs)
4143 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
4144 ("perl-email-mime" ,perl-email-mime)
4145 ("perl-email-simple" ,perl-email-simple)
4146 ("perl-net-server" ,perl-net-server)
4147 ("perl-filesys-notify-simple" ,perl-filesys-notify-simple)
4148 ("perl-plack-middleware-deflater" ,perl-plack-middleware-deflater)
4149 ("perl-plack-middleware-reverseproxy" ,perl-plack-middleware-reverseproxy)
4150 ("perl-plack" ,perl-plack)
4151 ("perl-search-xapian" ,perl-search-xapian)
4152 ("perl-timedate" ,perl-timedate)
4153 ("perl-uri-escape" ,perl-uri-escape)
4154 ;; For testing.
4155 ("perl-ipc-run" ,perl-ipc-run)
4156 ("perl-xml-feed" ,perl-xml-feed)))
4157 (home-page "https://public-inbox.org/README.html")
4158 (synopsis "Archive mailing lists in git repositories")
4159 (description
4160 "public-inbox implements the sharing of an email inbox via git to
4161 complement or replace traditional mailing lists. Readers may read via NNTP,
4162 Atom feeds or HTML archives.")
4163 (license license:agpl3+)))
4164
4165 (define-public sylpheed
4166 (package
4167 (name "sylpheed")
4168 (version "3.7.0")
4169 (source (origin
4170 (method url-fetch)
4171 (uri (string-append "https://sylpheed.sraoss.jp/sylpheed/v3.7/"
4172 name "-" version ".tar.xz"))
4173 (sha256
4174 (base32
4175 "0j9y5vdzch251s264diw9clrn88dn20bqqkwfmis9l7m8vmwasqd"))))
4176 (build-system gnu-build-system)
4177 (native-inputs
4178 `(("pkg-config" ,pkg-config)))
4179 (inputs
4180 `(("bogofilter" ,bogofilter)
4181 ("compface" ,compface)
4182 ("gnupg" ,gnupg-1)
4183 ("gpgme" ,gpgme)
4184 ("gtk+-2.0" ,gtk+-2)
4185 ("gtkspell" ,gtkspell3)
4186 ("libnsl" ,libnsl)
4187 ("openldap" ,openldap)
4188 ("openssl" ,openssl)))
4189 (home-page "https://sylpheed.sraoss.jp/en/")
4190 (synopsis "Lightweight GTK+ email client")
4191 (description
4192 "Sylpheed is a simple, lightweight but featureful, and easy-to-use e-mail
4193 client. Sylpheed provides intuitive user-interface. Sylpheed is also
4194 designed for keyboard-oriented operation.")
4195 (license license:gpl2+)))
4196
4197 (define-public python-authres
4198 (package
4199 (name "python-authres")
4200 (version "1.2.0")
4201 (source
4202 (origin
4203 (method url-fetch)
4204 (uri (pypi-uri "authres" version))
4205 (sha256
4206 (base32
4207 "1dr5zpqnb54h4f5ax8334l1dcp8j9083d7v4vdi1xqkwmnavklck"))))
4208 (build-system python-build-system)
4209 (arguments
4210 '(#:phases
4211 (modify-phases %standard-phases
4212 (replace 'check
4213 ;; Run doctests as described in the README.
4214 (lambda _
4215 (invoke "python" "-m" "authres" "-v"))))))
4216 (home-page "https://launchpad.net/authentication-results-python")
4217 (synopsis "Authentication-Results email header creator and parser")
4218 (description
4219 "This Python module can be used to generate and parse RFC 5451/7001/7601
4220 @code{Authentication-Results} email headers. It supports extensions such as:
4221 @itemize
4222 @item RFC 5617 DKIM/ADSP
4223 @item RFC 6008 DKIM signature identification (@code{header.b})
4224 @item RFC 6212 @acronym{VBR, Vouch By Reference}
4225 @item RFC 6577 @acronym{SPF, Sender Policy Framework}
4226 @item RFC 7281 @code{Authentication-Results} registration for S/MIME
4227 @item RFC 7293 The @code{Require-Recipient-Valid-Since} header field
4228 @item RFC 7489 @acronym{DMARC, Domain-based Message Authentication Reporting
4229 and Conformance}
4230 @item @acronym{ARC, Authenticated Received Chain}
4231 (draft-ietf-dmarc-arc-protocol-08)
4232 @end itemize\n")
4233 (license license:asl2.0)))
4234
4235 (define-public python-dkimpy
4236 (package
4237 (name "python-dkimpy")
4238 (version "1.0.5")
4239 (source
4240 (origin
4241 (method url-fetch)
4242 (uri (pypi-uri "dkimpy" version))
4243 (sha256
4244 (base32 "088iz5cqjqh4c7141d94pvn13bh25aizqlrifwv6fs5g16zj094s"))))
4245 (build-system python-build-system)
4246 (arguments
4247 '(#:phases
4248 (modify-phases %standard-phases
4249 (add-after 'patch-source-shebangs 'patch-more-source
4250 (lambda* (#:key inputs #:allow-other-keys)
4251 (let ((openssl (assoc-ref inputs "openssl")))
4252 (substitute* "dkim/dknewkey.py"
4253 (("/usr/bin/openssl") (string-append openssl "/bin/openssl"))))
4254 #t))
4255 (replace 'check
4256 (lambda _
4257 (invoke "python" "test.py"))))))
4258 (propagated-inputs
4259 `(("python-dnspython" ,python-dnspython)))
4260 (native-inputs
4261 `(("python-authres" ,python-authres)
4262 ("python-pynacl" ,python-pynacl)))
4263 (inputs
4264 `(("openssl" ,openssl)))
4265 (home-page "https://launchpad.net/dkimpy")
4266 (synopsis "DKIM (DomainKeys Identified Mail)")
4267 (description "Python module that implements @dfn{DKIM} (DomainKeys
4268 Identified Mail) email signing and verification (RFC6376). It also provides
4269 helper scripts for command line signing and verification. It supports DKIM
4270 signing/verifying of ed25519-sha256 signatures (RFC 8463). It also supports
4271 the RFC 8617 Authenticated Received Chain (ARC) protocol.")
4272 (license license:bsd-3)))
4273
4274 (define-public python-authheaders
4275 (package
4276 (name "python-authheaders")
4277 (version "0.13.0")
4278 (source
4279 (origin
4280 (method url-fetch)
4281 (uri (pypi-uri "authheaders" version))
4282 (sha256
4283 (base32
4284 "14k6i72k5f8dyvps8vc0aq0cczc8lvqpgjfjzsy6qqychjvjcmwk"))))
4285 (build-system python-build-system)
4286 (propagated-inputs
4287 `(("python-authres" ,python-authres)
4288 ("python-dkimpy" ,python-dkimpy)
4289 ("python-dnspython" ,python-dnspython)
4290 ("python-publicsuffix2" ,python-publicsuffix2)))
4291 (home-page "https://github.com/ValiMail/authentication-headers")
4292 (synopsis "Library wrapping email authentication header verification and generation")
4293 (description
4294 "This is a Python library for the generation of email authentication
4295 headers. The library can perform DKIM, SPF, and DMARC validation, and the
4296 results are packaged into the Authentication-Results header. The library can
4297 DKIM and ARC sign messages and output the corresponding signature headers.")
4298 ;; The package's metadata claims it were MIT licensed, but the source file
4299 ;; headers disagree. MPL-2 for the public suffix list.
4300 (license (list license:zpl2.1 license:zlib license:mpl2.0))))
4301
4302 (define-public python-aiosmtpd
4303 (package
4304 (name "python-aiosmtpd")
4305 (version "1.2.2")
4306 (source
4307 (origin
4308 (method git-fetch)
4309 (uri (git-reference
4310 (url "https://github.com/aio-libs/aiosmtpd")
4311 (commit version)))
4312 (sha256
4313 (base32 "0083d6nf75xv8nq1il6jabz36v6c452svy4p402csxwwih5pw6sk"))
4314 (file-name (git-file-name name version))))
4315 (build-system python-build-system)
4316 (arguments
4317 '(#:phases
4318 (modify-phases %standard-phases
4319 (add-after 'unpack 'delete-failing-tests
4320 (lambda _
4321 ;; This test uses an expired certificate.
4322 (delete-file "aiosmtpd/tests/test_smtps.py")
4323 #t))
4324 (replace 'check
4325 (lambda _
4326 (invoke "python" "-m" "nose2" "-v"))))))
4327 (native-inputs
4328 `(("python-flufl-testing" ,python-flufl-testing)
4329 ("python-nose2" ,python-nose2)))
4330 (propagated-inputs
4331 `(("python-atpublic" ,python-atpublic)))
4332 (home-page "https://aiosmtpd.readthedocs.io/")
4333 (synopsis "Asyncio based SMTP server")
4334 (description
4335 "This project is a reimplementation of the Python stdlib @code{smtpd.py}
4336 based on asyncio.")
4337 (license (list license:asl2.0
4338 license:lgpl3)))) ; only for setup_helpers.py
4339
4340 (define-public rspamd
4341 (package
4342 (name "rspamd")
4343 (version "2.7")
4344 (source
4345 (origin
4346 (method git-fetch)
4347 (uri (git-reference
4348 (url "https://github.com/rspamd/rspamd")
4349 (commit version)))
4350 (sha256
4351 (base32 "0fw6nbfc3xqapzq5nydakwgpw6cz6vb3qby2aqlr06lzf87d3hic"))
4352 (file-name (git-file-name name version))))
4353 (build-system cmake-build-system)
4354 (arguments
4355 '(#:configure-flags '("-DENABLE_LUAJIT=ON")))
4356 (inputs
4357 `(("openssl" ,openssl)
4358 ("glib" ,glib)
4359 ("ragel" ,ragel)
4360 ("luajit" ,luajit)
4361 ("sqlite" ,sqlite)
4362 ("file" ,file)
4363 ("icu4c" ,icu4c)
4364 ("pcre" ,pcre)
4365 ("zlib" ,zlib)
4366 ("perl" ,perl)
4367 ("libsodium" ,libsodium)))
4368 (native-inputs
4369 `(("pkg-config" ,pkg-config)))
4370 (synopsis "Spam filtering system")
4371 (description "Rspamd is an advanced spam filtering system that
4372 allows evaluation of messages by a number of rules including regular
4373 expressions, statistical analysis and custom services such as URL
4374 black lists. Each message is analysed by Rspamd and given a spam
4375 score.")
4376 (home-page "https://www.rspamd.com/")
4377 (license license:asl2.0)))