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