gnu: libretro-lowresnx: Update to 1.2.
[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.18")
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 "17r5zfk9yh7jhgdb360dlzx5fx9lsbmalasx6zgxw9v9vjycjb9h"))))
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.49")
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
989 "0ck1fw6gqn51phcfakhfpfq1yziv3gnmgjvswzhj9x0p162n6alj"))))
990 (build-system gnu-build-system)
991 (arguments
992 '(#:phases
993 (modify-phases %standard-phases
994 (delete 'configure)
995 (add-before 'install 'set-dest-dir
996 (lambda* (#:key outputs #:allow-other-keys)
997 (let ((out (assoc-ref outputs "out")))
998 (setenv "DESTDIR" out)
999 (substitute* "Makefile"
1000 (("/usr") "")) ; This allows the man page to install.
1001 #t))))))
1002 (native-inputs
1003 `(("python" ,python))) ; for tests
1004 (synopsis "MIME type associations for file types")
1005 (description
1006 "This package provides MIME type associations for file types.")
1007 (home-page "https://pagure.io/mailcap")
1008 (license (list license:expat ; mailcap.5
1009 license:public-domain))))) ; mailcap and mime.types
1010
1011 (define-public bogofilter
1012 (package
1013 (name "bogofilter")
1014 (version "1.2.5")
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-stable/"
1019 "bogofilter-" version ".tar.xz"))
1020 (sha256
1021 (base32 "1sl9xrnnlk2sn8gmibhn8li09vnansjbxb9l1182qmgz7cvs2j1j"))))
1022 (build-system gnu-build-system)
1023 (arguments
1024 '(#:phases
1025 (modify-phases %standard-phases
1026 (add-before 'check 'pre-check
1027 (lambda _
1028 (substitute* "src/tests/t.frame"
1029 (("GREP=/bin/grep")
1030 (string-append "GREP=" (which "grep") "\n")))
1031 #t)))))
1032 (native-inputs `(("flex" ,flex)))
1033 (inputs `(("bdb" ,bdb)))
1034 (home-page "https://bogofilter.sourceforge.io/")
1035 (synopsis "Mail classifier based on a Bayesian filter")
1036 (description
1037 "Bogofilter is a mail filter that classifies mail as spam or ham
1038 (non-spam) by a statistical analysis of the message's header and
1039 content (body). The program is able to learn from the user's classifications
1040 and corrections. It is based on a Bayesian filter.")
1041 (license license:gpl3+)))
1042
1043 (define-public offlineimap
1044 (package
1045 (name "offlineimap")
1046 (version "7.3.3")
1047 (source (origin
1048 (method git-fetch)
1049 (uri (git-reference
1050 (url "https://github.com/OfflineIMAP/offlineimap")
1051 (commit (string-append "v" version))))
1052 (file-name (git-file-name name version))
1053 (sha256
1054 (base32
1055 "1gg8ry67i20qapj4z20am9bm67m2q28kixcj7ja75m897vhzarnq"))))
1056 (build-system python-build-system)
1057 (native-inputs
1058 `(("asciidoc" ,asciidoc)))
1059 (inputs
1060 `(("python2-pysqlite" ,python2-pysqlite)
1061 ("python2-rfc6555" ,python2-rfc6555)
1062 ("python2-six" ,python2-six)))
1063 (arguments
1064 ;; The setup.py script expects python-2.
1065 `(#:python ,python-2
1066 ;; Tests require a modifiable IMAP account.
1067 #:tests? #f
1068 #:phases
1069 (modify-phases %standard-phases
1070 (add-after 'build 'build-documentation
1071 (lambda _
1072 (substitute* "docs/Makefile"
1073 ;; Prevent xmllint and xsltproc from downloading a DTD file.
1074 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
1075 (invoke "make" "-C" "docs" "man")))
1076 (add-after 'install 'install-documentation
1077 (lambda* (#:key outputs #:allow-other-keys)
1078 (let* ((out (assoc-ref outputs "out"))
1079 (man (string-append out "/share/man")))
1080 (install-file "docs/offlineimap.1" (string-append man "/man1"))
1081 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
1082 #t))))))
1083 (home-page "https://www.offlineimap.org")
1084 (synopsis "Sync emails between two repositories")
1085 (description
1086 "OfflineImap synchronizes emails between two repositories, so that you
1087 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
1088 repository and Maildir/IMAP as LOCAL repository.")
1089 (license license:gpl2+)))
1090
1091 (define-public emacs-mew
1092 (package
1093 (name "emacs-mew")
1094 (version "6.8")
1095 (source (origin
1096 (method url-fetch)
1097 (uri (string-append "https://mew.org/Release/mew-"
1098 version ".tar.gz"))
1099 (sha256
1100 (base32
1101 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
1102 (native-inputs
1103 `(("emacs" ,emacs)))
1104 (propagated-inputs
1105 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
1106 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
1107 (build-system gnu-build-system)
1108 (arguments
1109 (let ((elisp-dir "/share/emacs/site-lisp")
1110 (icon-dir "/share/mew"))
1111 `(#:modules ((guix build gnu-build-system)
1112 (guix build utils)
1113 (guix build emacs-utils))
1114 #:imported-modules (,@%gnu-build-system-modules
1115 (guix build emacs-utils))
1116 #:configure-flags
1117 (list (string-append "--with-elispdir=" %output ,elisp-dir)
1118 (string-append "--with-etcdir=" %output ,icon-dir))
1119 #:phases
1120 (modify-phases %standard-phases
1121 (add-after 'configure 'patch-mew-icon-directory
1122 (lambda* (#:key outputs #:allow-other-keys)
1123 (emacs-substitute-sexps "mew-key.el"
1124 ("(def.* mew-icon-directory"
1125 `(progn
1126 (add-to-list 'image-load-path 'mew-icon-directory)
1127 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
1128 #t))
1129 (add-after 'install 'generate-autoloads
1130 (lambda* (#:key outputs #:allow-other-keys)
1131 (emacs-generate-autoloads
1132 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
1133 #t)))
1134 #:tests? #f)))
1135 (home-page "https://mew.org")
1136 (synopsis "Emacs e-mail client")
1137 (description "Mew (Messaging in the Emacs World) is a user interface
1138 for text messages, multimedia messages (MIME), news articles and
1139 security functionality including PGP, S/MIME, SSH, and SSL.")
1140 (license license:bsd-3)))
1141
1142 (define-public mu
1143 (package
1144 (name "mu")
1145 (version "1.4.15")
1146 (source (origin
1147 (method url-fetch)
1148 (uri (string-append "https://github.com/djcb/mu/releases/"
1149 "download/" version "/"
1150 "mu-" version ".tar.xz"))
1151 (sha256
1152 (base32
1153 "0ailz0k5fdgq6gdl5m7jxy315b7qn5ckj6xwd49hsiq9vqblwlpp"))))
1154 (build-system gnu-build-system)
1155 (native-inputs
1156 `(("pkg-config" ,pkg-config)
1157 ("glib" ,glib "bin") ; for gtester
1158 ("emacs" ,emacs-minimal)
1159 ("tzdata" ,tzdata-for-tests))) ; for mu/test/test-mu-query.c
1160 (inputs
1161 `(("xapian" ,xapian)
1162 ("guile" ,guile-2.2)
1163 ("glib" ,glib)
1164 ("gmime" ,gmime)))
1165 (arguments
1166 `(#:modules ((guix build gnu-build-system)
1167 (guix build utils)
1168 (guix build emacs-utils))
1169 #:imported-modules (,@%gnu-build-system-modules
1170 (guix build emacs-utils))
1171 #:phases
1172 (modify-phases %standard-phases
1173 (add-after 'unpack 'patch-configure
1174 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
1175 ;; so our Emacs package can't find it. Setting "--with-lispdir"
1176 ;; configure flag doesn't help because "mu4e" will be added to
1177 ;; the lispdir anyway, so we have to modify "configure.ac".
1178 (lambda _
1179 (substitute* "configure"
1180 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
1181 ;; Use latest Guile
1182 (("guile-2.0") "guile-2.2"))
1183 (substitute* '("guile/Makefile.in"
1184 "guile/mu/Makefile.in")
1185 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
1186 #t))
1187 (add-after 'unpack 'patch-bin-sh-in-tests
1188 (lambda _
1189 (substitute* '("guile/tests/test-mu-guile.c"
1190 "mu/test-mu-cmd.c"
1191 "mu/test-mu-cmd-cfind.c"
1192 "mu/test-mu-query.c"
1193 "mu/test-mu-threads.c")
1194 (("/bin/sh") (which "sh")))
1195 #t))
1196 (add-before 'install 'fix-ffi
1197 (lambda* (#:key outputs #:allow-other-keys)
1198 (substitute* "guile/mu.scm"
1199 (("\"libguile-mu\"")
1200 (format #f "\"~a/lib/libguile-mu\""
1201 (assoc-ref outputs "out"))))
1202 #t))
1203 (add-before 'check 'check-tz-setup
1204 (lambda* (#:key inputs #:allow-other-keys)
1205 ;; For mu/test/test-mu-query.c
1206 (setenv "TZDIR"
1207 (string-append (assoc-ref inputs "tzdata")
1208 "/share/zoneinfo"))
1209 #t))
1210 (add-after 'install 'install-emacs-autoloads
1211 (lambda* (#:key outputs #:allow-other-keys)
1212 (emacs-generate-autoloads
1213 "mu4e"
1214 (string-append (assoc-ref outputs "out")
1215 "/share/emacs/site-lisp"))
1216 #t)))))
1217 (home-page "https://www.djcbsoftware.nl/code/mu/")
1218 (synopsis "Quickly find emails")
1219 (description
1220 "Mu is a tool for dealing with e-mail messages stored in the
1221 Maildir-format. Mu's purpose in life is to help you to quickly find the
1222 messages you need; in addition, it allows you to view messages, extract
1223 attachments, create new maildirs, and so on.")
1224 (license license:gpl3+)))
1225
1226 (define-public alot
1227 (package
1228 (name "alot")
1229 (version "0.9.1")
1230 (source (origin
1231 (method git-fetch)
1232 ;; package author intends on distributing via github rather
1233 ;; than pypi:
1234 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
1235 (uri (git-reference
1236 (url "https://github.com/pazz/alot")
1237 (commit version)))
1238 (file-name (git-file-name name version))
1239 (sha256
1240 (base32
1241 "0s94m17yph1gq9f2svipb3bbwbw1s4j3zf2xkg5h91006v8286r6"))))
1242 (build-system python-build-system)
1243 (arguments
1244 `(#:phases
1245 (modify-phases %standard-phases
1246 (add-before 'check 'fix-tests
1247 (lambda* (#:key inputs #:allow-other-keys)
1248 (let ((gnupg (assoc-ref inputs "gnupg")))
1249 (substitute* "tests/test_crypto.py"
1250 (("gpg2") (string-append gnupg "/bin/gpg")))
1251 #t)))
1252 (add-before 'check 'disable-failing-tests
1253 ;; FIXME: Investigate why these tests are failing.
1254 (lambda _
1255 (substitute* "tests/test_helper.py"
1256 (("def test_env_set") "def _test_env_set"))
1257 (substitute* "tests/commands/test_global.py"
1258 (("def test_no_spawn_no_stdin_attached")
1259 "def _test_no_spawn_no_stdin_attached"))
1260 #t)))))
1261 (native-inputs
1262 `(("procps" ,procps)
1263 ("python-mock" ,python-mock)))
1264 (inputs
1265 `(("gnupg" ,gnupg)
1266 ("python-magic" ,python-magic)
1267 ("python-configobj" ,python-configobj)
1268 ("python-twisted" ,python-twisted)
1269 ("python-service-identity" ,python-service-identity)
1270 ("python-urwid" ,python-urwid)
1271 ("python-urwidtrees" ,python-urwidtrees)
1272 ("python-gpg" ,python-gpg)
1273 ("python-notmuch" ,python-notmuch)))
1274 (home-page "https://github.com/pazz/alot")
1275 (synopsis "Command-line MUA using Notmuch")
1276 (description
1277 "Alot is a terminal-based mail user agent based on the Notmuch mail
1278 indexer. It is written in Python using the @code{urwid} toolkit and features
1279 a modular and command prompt driven interface to provide a full mail user
1280 agent (@dfn{MUA}) experience as an alternative to the Emacs mode shipped with
1281 Notmuch.")
1282 (license license:gpl3+)))
1283
1284 (define-public notifymuch
1285 (let
1286 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
1287 (revision "1"))
1288 (package
1289 (name "notifymuch")
1290 (version (string-append "0.1-" revision "." (string-take commit 7)))
1291 (source
1292 (origin
1293 (method git-fetch)
1294 (uri (git-reference
1295 (url "https://github.com/kspi/notifymuch")
1296 (commit commit)))
1297 (sha256
1298 (base32
1299 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
1300 (file-name (string-append name "-" version "-checkout"))))
1301 (build-system python-build-system)
1302 (inputs
1303 `(("python-notmuch" ,python-notmuch)
1304 ("python-pygobject" ,python-pygobject)
1305 ("gobject-introspection" ,gobject-introspection)
1306 ("libnotify" ,libnotify)
1307 ("gtk+" ,gtk+)))
1308 (arguments
1309 `(#:phases
1310 (modify-phases %standard-phases
1311 (add-after 'install 'wrap-binary
1312 (lambda* (#:key outputs #:allow-other-keys)
1313 (let* ((out (assoc-ref outputs "out"))
1314 (bin (string-append out "/bin/notifymuch")))
1315 (wrap-program bin
1316 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
1317 `("GI_TYPELIB_PATH" ":" prefix
1318 (,(getenv "GI_TYPELIB_PATH")
1319 ,(string-append out "/lib/girepository-1.0")))))
1320 #t)))))
1321 (home-page "https://github.com/kspi/notifymuch")
1322 (synopsis "Displays notifications for changes in the notmuch email database")
1323 (description "notifymuch displays desktop notifications for messages in
1324 the notmuch database. The notifications are sent using libnotify to a
1325 notification daemon. The query to find messages to send a notification about
1326 is configurable, and a notification for the same message will not be send
1327 within a configurable period (defaults to 48 hours). To use notifymuch, run
1328 @command{notifymuch} after new mail is indexed, this can be automated by
1329 invoking @command{notifymuch} from the post-new hook.")
1330 (license license:gpl3))))
1331
1332 (define-public notmuch
1333 (package
1334 (name "notmuch")
1335 (version "0.31.4")
1336 (source (origin
1337 (method url-fetch)
1338 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
1339 version ".tar.xz"))
1340 (sha256
1341 (base32
1342 "0magnyjjhhv11nwcm2596hdxszrj61y69i0hmwqdc3v6cxjvcqc6"))))
1343 (build-system gnu-build-system)
1344 (arguments
1345 `(#:modules ((guix build gnu-build-system)
1346 ((guix build emacs-build-system) #:prefix emacs:)
1347 (guix build utils))
1348 #:imported-modules (,@%gnu-build-system-modules
1349 (guix build emacs-build-system)
1350 (guix build emacs-utils))
1351 #:make-flags
1352 (list "V=1" ; verbose test output
1353 "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
1354 #:phases (modify-phases %standard-phases
1355 (add-after 'unpack 'patch-notmuch-lib.el
1356 (lambda _
1357 (substitute* "emacs/notmuch-lib.el"
1358 (("/bin/sh") (which "sh")))
1359 #t))
1360 (replace 'configure
1361 (lambda* (#:key outputs #:allow-other-keys)
1362 (setenv "CC" "gcc")
1363 (setenv "CONFIG_SHELL" (which "sh"))
1364
1365 (let* ((out (assoc-ref outputs "out"))
1366 (elisp
1367 (string-append out "/share/emacs/site-lisp/")))
1368 (invoke "./configure"
1369 (string-append "--prefix=" out)
1370 (string-append "--emacslispdir=" elisp)
1371 (string-append "--emacsetcdir=" elisp)))))
1372 (add-before 'check 'disable-failing-tests
1373 ;; FIXME: Investigate why these tests are failing,
1374 ;; and try removing this for notmuch versions > 0.31.
1375 (lambda _
1376 (substitute* "test/T356-protected-headers.sh"
1377 (("\\$NOTMUCH_GMIME_X509_CERT_VALIDITY") "0"))
1378 #t))
1379 (add-before 'check 'prepare-test-environment
1380 (lambda _
1381 (setenv "TEST_CC" "gcc")
1382 ;; Patch various inline shell invocations.
1383 (substitute* (find-files "test" "\\.sh$")
1384 (("/bin/sh") (which "sh")))
1385 #t))
1386 (add-after 'install 'make-autoloads
1387 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
1388 (native-inputs
1389 `(("bash-completion" ,bash-completion)
1390 ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
1391 ("pkg-config" ,pkg-config)
1392 ("python" ,python)
1393 ("python-docutils" ,python-docutils)
1394 ("sphinx" ,python-sphinx)
1395
1396 ;; The following are required for tests only.
1397 ("which" ,which)
1398 ("dtach" ,dtach)
1399 ("gnupg" ,gnupg)
1400 ("man" ,man-db)
1401 ("perl" ,perl)))
1402 (inputs
1403 `(("glib" ,glib)
1404 ("gmime" ,gmime)
1405 ("talloc" ,talloc)
1406 ("xapian" ,xapian)
1407 ("zlib" ,zlib)))
1408 (home-page "https://notmuchmail.org/")
1409 (synopsis "Thread-based email index, search, and tagging")
1410 (description
1411 "Notmuch is a command-line based program for indexing, searching, read-
1412 ing, and tagging large collections of email messages.")
1413 (license license:gpl3+)))
1414
1415 (define-public notmuch-addrlookup-c
1416 (package
1417 (name "notmuch-addrlookup-c")
1418 (version (string-append "9"))
1419 (source (origin
1420 (method git-fetch)
1421 (uri (git-reference
1422 (url "https://github.com/aperezdc/notmuch-addrlookup-c")
1423 (commit (string-append "v" version))))
1424 (file-name (string-append name "-" version "-checkout"))
1425 (sha256
1426 (base32
1427 "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
1428 (build-system gnu-build-system)
1429 (arguments
1430 '(#:tests? #f ; no tests
1431 #:make-flags (list "CC=gcc")
1432 #:phases (modify-phases %standard-phases
1433 (delete 'configure)
1434 ;; Remove vim code completion config, it's not needed to
1435 ;; build (or be patched).
1436 (add-before 'patch-source-shebangs 'delete-ycm-file
1437 (lambda _ (delete-file ".ycm_extra_conf.py")))
1438 (replace 'install
1439 (lambda* (#:key outputs #:allow-other-keys)
1440 (let ((bin (string-append
1441 (assoc-ref outputs "out") "/bin")))
1442 (install-file "notmuch-addrlookup" bin)))))))
1443 (native-inputs
1444 `(("pkg-config" ,pkg-config)))
1445 (inputs
1446 `(("glib" ,glib)
1447 ("notmuch" ,notmuch)))
1448 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
1449 (synopsis "Address lookup tool for Notmuch")
1450 (description "This is an address lookup tool using a Notmuch database,
1451 useful for email address completion.")
1452 (license license:expat)))
1453
1454 (define-public python-notmuch
1455 (package
1456 (name "python-notmuch")
1457 (version (package-version notmuch))
1458 ;; Notmuch python bindings are now unavailable on pypi. The
1459 ;; bindings are distributed via the notmuch release tarball.
1460 (source (package-source notmuch))
1461 (build-system python-build-system)
1462 (inputs `(("notmuch" ,notmuch)))
1463 (arguments
1464 `(#:tests? #f ; no "test" target
1465 #:phases
1466 (modify-phases %standard-phases
1467 ;; This python package lives in a subdirectory of the notmuch source
1468 ;; tree, so chdir into it before building.
1469 (add-after 'unpack 'enter-python-dir
1470 (lambda _ (chdir "bindings/python") #t))
1471 ;; Make sure the correct notmuch shared library gets loaded.
1472 (add-before 'build 'set-libnotmuch-file-name
1473 (lambda* (#:key inputs #:allow-other-keys)
1474 (let ((notmuch (assoc-ref inputs "notmuch")))
1475 (substitute* "notmuch/globals.py"
1476 (("libnotmuch\\.so\\.")
1477 (string-append notmuch "/lib/libnotmuch.so.")))
1478 #t))))))
1479 (home-page (package-home-page notmuch))
1480 (synopsis "Python bindings of the Notmuch mail indexing library")
1481 (description
1482 "This package provides Python bindings to use the Notmuch mail indexing
1483 and search library.")
1484 (license license:gpl3+)))
1485
1486 (define-public python2-notmuch
1487 (package-with-python2 python-notmuch))
1488
1489 (define-public muchsync
1490 (package
1491 (name "muchsync")
1492 (version "6")
1493 (source
1494 (origin
1495 (method url-fetch)
1496 (uri (string-append "http://www.muchsync.org/src/"
1497 "muchsync-" version ".tar.gz"))
1498 (sha256
1499 (base32 "1s799kx16nm5ry1fcqcc0grgxrwnnp4cnzd0hzwbkvc5v2sf6g8b"))))
1500 (build-system gnu-build-system)
1501 (native-inputs
1502 `(("pandoc" ,pandoc)
1503 ("pkg-config" ,pkg-config)))
1504 (inputs
1505 `(("libcrypto" ,openssl)
1506 ("notmuch" ,notmuch)
1507 ("sqlite" ,sqlite)
1508 ("xapian" ,xapian)))
1509 (home-page "http://www.muchsync.org/")
1510 (synopsis "Synchronize notmuch mail across machines")
1511 (description
1512 "Muchsync brings Notmuch to all of your computers by synchronizing your
1513 mail messages and Notmuch tags across machines. The protocol is heavily
1514 pipelined to work efficiently over high-latency networks such as mobile
1515 broadband. Muchsync supports arbitrary pairwise synchronization among
1516 replicas. A version-vector-based algorithm allows it to exchange only the
1517 minimum information necessary to bring replicas up to date regardless of which
1518 pairs have previously synchronized.")
1519 (license license:gpl2+))) ; with OpenSSL libcrypto exception
1520
1521 (define-public getmail
1522 (package
1523 (name "getmail")
1524 (version "5.15")
1525 (source
1526 (origin
1527 (method url-fetch)
1528 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
1529 "getmail-" version ".tar.gz"))
1530 (sha256
1531 (base32 "0ahn2jyj4ka996qzs99id59pwxv6sqxp61g7drcf53rzzigq0lyl"))))
1532 (build-system python-build-system)
1533 (arguments
1534 `(#:tests? #f ; no tests
1535 #:python ,python-2))
1536 (home-page "http://pyropus.ca/software/getmail/")
1537 (synopsis "Mail retriever")
1538 (description
1539 "A flexible, extensible mail retrieval system with support for
1540 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1541 arbitrary message filtering, single-user and domain-mailboxes, and many other
1542 useful features.")
1543
1544 ;; License is specified in file '__init__.py'.
1545 (license license:gpl2)))
1546
1547 (define-public libetpan
1548 (package
1549 (name "libetpan")
1550 (version "1.9.4")
1551 (source (origin
1552 (method git-fetch)
1553 (uri (git-reference
1554 (url "https://github.com/dinhviethoa/libetpan")
1555 (commit version)))
1556 (file-name (git-file-name name version))
1557 (sha256
1558 (base32 "0g7an003simfdn7ihg9yjv7hl2czsmjsndjrp39i7cad8icixscn"))))
1559 (build-system gnu-build-system)
1560 (native-inputs `(("autoconf" ,autoconf)
1561 ("automake" ,automake)
1562 ("libtool" ,libtool)
1563 ("pkg-config" ,pkg-config)))
1564 (propagated-inputs
1565 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1566 ;; libraries need to be propagated.
1567 `(("cyrus-sasl" ,cyrus-sasl)
1568 ("openssl" ,openssl)))
1569 (inputs
1570 `(("curl" ,curl)
1571 ("expat" ,expat)
1572 ("zlib" ,zlib)))
1573 (arguments
1574 '(#:configure-flags
1575 '("--disable-static" "--disable-db")))
1576 (home-page "https://www.etpan.org/libetpan.html")
1577 (synopsis "Portable middleware for email access")
1578 (description
1579 "The purpose of this mail library is to provide a portable, efficient
1580 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1581 provides an API for C language. It's the low-level API used by MailCore and
1582 MailCore 2.")
1583 (license license:bsd-3)))
1584
1585 (define-public compface
1586 (package
1587 (name "compface")
1588 (version "1.5.2")
1589 (source (origin
1590 (method url-fetch)
1591 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1592 "ftp.xemacs.org/aux/"
1593 "compface-" version ".tar.gz"))
1594 (sha256
1595 (base32
1596 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1597 (build-system gnu-build-system)
1598 (arguments
1599 `(#:tests? #f))
1600 (synopsis "Portrait image compressor")
1601 (description "This package takes your 48x48x1 portrait image and
1602 compresses it.")
1603 (home-page "https://legacy.cs.indiana.edu/ftp/faces/")
1604 (license (license:x11-style "file://README"))))
1605
1606 (define-public claws-mail
1607 (package
1608 (name "claws-mail")
1609 (version "3.17.8")
1610 (source
1611 (origin
1612 (method url-fetch)
1613 (uri
1614 (string-append "https://www.claws-mail.org/releases/claws-mail-"
1615 version ".tar.xz"))
1616 (sha256
1617 (base32 "1byxmz68lnm2m8q1gnp0lpr3qp7dcwabrw5iqflz9mlm960v5dyd"))))
1618 (build-system glib-or-gtk-build-system)
1619 (arguments
1620 `(#:configure-flags
1621 (list
1622 "--enable-gnutls"
1623 "--enable-pgpmime-plugin"
1624 "--enable-enchant"
1625 "--enable-ldap")
1626 #:make-flags
1627 ;; Disable updating icon cache since it's done by the profile hook.
1628 ;; Conflict with other packages in the profile would be inevitable
1629 ;; otherwise.
1630 (list
1631 "gtk_update_icon_cache=true")
1632 #:phases
1633 (modify-phases %standard-phases
1634 (add-before 'build 'patch-mime
1635 (lambda* (#:key inputs #:allow-other-keys)
1636 (substitute* "src/procmime.c"
1637 (("/usr/share/mime/globs")
1638 (string-append (assoc-ref inputs "mime-info")
1639 "/share/mime/globs"))))))))
1640 (native-inputs
1641 `(("pkg-config" ,pkg-config)))
1642 (inputs
1643 `(("bogofilter" ,bogofilter)
1644 ("curl" ,curl)
1645 ("dbus-glib" ,dbus-glib)
1646 ("enchant" ,enchant)
1647 ("expat" ,expat)
1648 ("ghostscript" ,ghostscript)
1649 ("hicolor-icon-theme" ,hicolor-icon-theme)
1650 ("gnupg" ,gnupg)
1651 ("gnutls" ,gnutls)
1652 ("gpgme" ,gpgme)
1653 ("gtk" ,gtk+-2)
1654 ("libarchive" ,libarchive)
1655 ("libcanberra" ,libcanberra)
1656 ("libetpan" ,libetpan)
1657 ("libical" ,libical)
1658 ("libnotify" ,libnotify)
1659 ("libsm" ,libsm)
1660 ("libxml2" ,libxml2)
1661 ("perl" ,perl)
1662 ("python-2" ,python-2)
1663 ("mime-info" ,shared-mime-info)
1664 ("startup-notification" ,startup-notification)))
1665 (synopsis "GTK-based Email client")
1666 (description "Claws-Mail is an email client (and news reader) based on GTK+.
1667 The appearance and interface are designed to be familiar to new users coming
1668 from other popular email clients, as well as experienced users. Almost all
1669 commands are accessible with the keyboard. Plus, Claws-Mail is extensible via
1670 addons which can add many functionalities to the base client.")
1671 (home-page "https://www.claws-mail.org/")
1672 (license license:gpl3+))) ; most files are actually public domain or x11
1673
1674 (define-public msmtp
1675 (package
1676 (name "msmtp")
1677 (version "1.8.15")
1678 (source
1679 (origin
1680 (method url-fetch)
1681 (uri (string-append "https://marlam.de/msmtp/releases/"
1682 "/msmtp-" version ".tar.xz"))
1683 (sha256
1684 (base32 "1klrj2a77671xb6xa0a0iyszhjb7swxhmzpzd4qdybmzkrixqr92"))))
1685 (build-system gnu-build-system)
1686 (inputs
1687 `(("libsecret" ,libsecret)
1688 ("gnutls" ,gnutls)
1689 ("zlib" ,zlib)
1690 ("gsasl" ,gsasl)))
1691 (native-inputs
1692 `(("pkg-config" ,pkg-config)))
1693 (home-page "https://marlam.de/msmtp/")
1694 (arguments
1695 `(#:configure-flags (list "--with-libgsasl"
1696 "--with-libidn"
1697 "--with-tls=gnutls")
1698 #:phases
1699 (modify-phases %standard-phases
1700 (add-after 'install 'install-additional-files
1701 (lambda* (#:key outputs #:allow-other-keys)
1702 (let* ((out (assoc-ref outputs "out"))
1703 (bin (string-append out "/bin"))
1704 (doc (string-append out "/share/doc/msmtp"))
1705 (msmtpq "scripts/msmtpq")
1706 (vimfiles (string-append out "/share/vim/vimfiles/plugin")))
1707 (install-file (string-append msmtpq "/msmtpq") bin)
1708 (install-file (string-append msmtpq "/msmtp-queue") bin)
1709 (install-file (string-append msmtpq "/README.msmtpq") doc)
1710 (install-file "scripts/vim/msmtp.vim" vimfiles)
1711 ;; Don't rely on netcat being in the PATH to test for a
1712 ;; connection, instead try tp ing debian.org.
1713 (substitute* (string-append bin "/msmtpq")
1714 (("EMAIL_CONN_TEST=n") "EMAIL_CONN_TEST=p"))
1715 #t))))))
1716 (synopsis
1717 "Simple and easy to use SMTP client with decent sendmail compatibility")
1718 (description
1719 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1720 an SMTP server (for example at a free mail provider) which takes care of further
1721 delivery.")
1722 (license license:gpl3+)))
1723
1724 (define-public exim
1725 (package
1726 (name "exim")
1727 (version "4.94")
1728 (source
1729 (origin
1730 (method url-fetch)
1731 (uri (let ((file-name (string-append "exim-" version ".tar.xz")))
1732 (list (string-append "https://ftp.exim.org/pub/exim/exim4/"
1733 file-name)
1734 ;; ‘Fix’ releases (exim-x.y.z.f) are kept separately.
1735 (string-append "https://ftp.exim.org/pub/exim/exim4/fixes/"
1736 file-name)
1737 ;; After a new non-fix release, the old one is moved here.
1738 (string-append "https://ftp.exim.org/pub/exim/exim4/old/"
1739 file-name))))
1740 (sha256
1741 (base32 "1nsb2i5mqxfz1sl1bmbxmpb2qiaf3wffhfiw4j9vfpagy3xfhzpp"))))
1742 (build-system gnu-build-system)
1743 (inputs
1744 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
1745 ("gnutls" ,gnutls/dane)
1746 ("gzip" ,gzip)
1747 ("bzip2" ,bzip2)
1748 ("xz" ,xz)
1749 ("perl" ,perl)
1750 ("libnsl" ,libnsl)
1751 ("libxt" ,libxt)
1752 ("libxaw" ,libxaw)))
1753 (native-inputs
1754 `(("pcre" ,pcre "bin")
1755 ("perl" ,perl)
1756 ("pkg-config" ,pkg-config)))
1757 (arguments
1758 '(#:phases
1759 (modify-phases %standard-phases
1760 (replace 'configure
1761 ;; We'd use #:make-flags but the top-level Makefile calls others
1762 ;; recursively, so just set all variables this way.
1763 (lambda* (#:key outputs inputs #:allow-other-keys)
1764 (substitute* '("Makefile" "OS/Makefile-Default")
1765 (("(RM_COMMAND=).*" all var)
1766 (string-append var "rm\n")))
1767 (copy-file "src/EDITME" "Local/Makefile")
1768 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1769 (let ((out (assoc-ref outputs "out"))
1770 (gzip (assoc-ref inputs "gzip"))
1771 (bzip2 (assoc-ref inputs "bzip2"))
1772 (xz (assoc-ref inputs "xz")))
1773 (substitute* '("Local/Makefile")
1774 (("(BIN_DIRECTORY=).*" all var)
1775 (string-append var out "/bin\n"))
1776 (("(CONFIGURE_FILE=).*" all var)
1777 (string-append var out "/etc/exim.conf\n"))
1778 (("(EXIM_USER=).*" all var)
1779 (string-append var "nobody\n"))
1780 (("(FIXED_NEVER_USERS=).*" all var)
1781 (string-append var "\n")) ; XXX no root in build environment
1782 (("(COMPRESS_COMMAND=).*" all var)
1783 (string-append var gzip "/bin/gzip\n"))
1784 (("(ZCAT_COMMAND=).*" all var)
1785 (string-append var gzip "/bin/zcat\n"))
1786 (("# (USE_GNUTLS(|_PC)=.*)" all line)
1787 (string-append line "\n"))
1788 (("# (AUTH_CRAM_MD5=yes)" all line) line)
1789 (("# (AUTH_DOVECOT=yes)" all line) line)
1790 (("# (AUTH_EXTERNAL=yes)" all line) line)
1791 (("# (AUTH_PLAINTEXT=yes)" all line) line)
1792 (("# (AUTH_SPA=yes)" all line) line)
1793 (("# (AUTH_TLS=yes)" all line) line))
1794 ;; This file has hard-coded relative file names for tools despite
1795 ;; the zcat configuration above.
1796 (substitute* '("src/exigrep.src")
1797 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1798 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1799 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1800 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1801 #t))
1802 (add-before 'build 'fix-sh-paths
1803 (lambda* (#:key inputs #:allow-other-keys)
1804 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1805 (("SHELL=/bin/sh") "SHELL=sh"))
1806 (substitute* '("scripts/Configure-config.h")
1807 (("\\| /bin/sh") "| sh"))
1808 (let ((bash (assoc-ref inputs "bash")))
1809 (substitute* '("scripts/Configure-eximon")
1810 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1811 #t))
1812 (add-before 'build 'build-reproducibly
1813 (lambda _
1814 ;; The ‘compilation number’ is incremented for every build from the
1815 ;; same source tree. It appears to vary over different (parallel?)
1816 ;; builds. Make it a ‘constant number’ instead.
1817 (substitute* "src/version.c"
1818 (("#include \"cnumber.h\"") "1")))))
1819 #:make-flags
1820 (list "CC=gcc"
1821 "INSTALL_ARG=-no_chown")
1822 ;; No 'check' target. There is a test suite in test/, which assumes that
1823 ;; certain build options were (not) used and that it can freely ‘sudo’.
1824 #:tests? #f))
1825 (home-page "https://www.exim.org/")
1826 (synopsis
1827 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1828 (description
1829 "Exim is a message transfer agent (MTA) developed at the University of
1830 Cambridge for use on Unix systems connected to the Internet. In style it is
1831 similar to Smail 3, but its facilities are more general. There is a great
1832 deal of flexibility in the way mail can be routed, and there are extensive
1833 facilities for checking incoming mail.")
1834 (license license:gpl2+)))
1835
1836 (define-public dovecot
1837 (package
1838 (name "dovecot")
1839 ;; Also update dovecot-pigeonhole when updating to a new minor version.
1840 (version "2.3.14")
1841 (source
1842 (origin
1843 (method url-fetch)
1844 (uri (string-append "https://www.dovecot.org/releases/"
1845 (version-major+minor version) "/"
1846 "dovecot-" version ".tar.gz"))
1847 (sha256
1848 (base32 "0jm3p52z619v7ajh533g2g7d790k82fk0w7ry0zqlm8ymzrxgcy8"))))
1849 (build-system gnu-build-system)
1850 (native-inputs
1851 `(("pkg-config" ,pkg-config)))
1852 (inputs
1853 `(("bzip2" ,bzip2)
1854 ("clucene" ,clucene)
1855 ("icu4c" ,icu4c)
1856 ("libsodium" ,libsodium) ; extra password algorithms
1857 ("libstemmer" ,libstemmer)
1858 ;; FIXME: The 'test-backtrace' tests fail on arm when using glibc's
1859 ;; backtrace_symbol() function so fallback to using libunwind.
1860 ,@(if (target-arm?)
1861 `(("libunwind" ,libunwind))
1862 '())
1863 ("linux-pam" ,linux-pam)
1864 ("lz4" ,lz4)
1865 ("openssl" ,openssl)
1866 ("sqlite" ,sqlite)
1867 ("zlib" ,zlib)
1868 ("zstd" ,zstd "lib")))
1869 (arguments
1870 `(#:configure-flags '("--sysconfdir=/etc"
1871 "--localstatedir=/var"
1872 "--with-sqlite" ; not auto-detected
1873 "--with-lucene") ; not auto-detected
1874 #:phases
1875 (modify-phases %standard-phases
1876 (add-after 'unpack 'patch-file-names
1877 (lambda _
1878 (substitute* "src/lib-program-client/test-program-client-local.c"
1879 (("(/bin/| )cat") (which "cat"))
1880 (("/bin/echo") (which "echo"))
1881 (("/bin/false") (which "false"))
1882 (("/bin/sh") (which "bash"))
1883 (("head") (which "head"))
1884 (("sleep") (which "sleep")))
1885 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1886 "src/lib-smtp/test-bin/sendmail-success.sh")
1887 (("cat") (which "cat")))
1888 #t))
1889 (replace 'install
1890 (lambda* (#:key make-flags #:allow-other-keys)
1891 ;; Simple hack to avoid installing a trivial README in /etc.
1892 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1893 make-flags))))))
1894 (home-page "https://www.dovecot.org")
1895 (synopsis "Secure POP3/IMAP server")
1896 (description
1897 "Dovecot is a mail server whose major goals are security and reliability.
1898 It supports mbox/Maildir and its own dbox/mdbox formats.")
1899 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1900 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1901 ;; Unicode, Inc. License Agreement for Data Files and Software.
1902 (license (list license:lgpl2.1 license:expat
1903 (license:non-copyleft "file://COPYING")))))
1904
1905 (define-public dovecot-pigeonhole
1906 (let ((dovecot-version (version-major+minor (package-version dovecot))))
1907 (package
1908 (name "dovecot-pigeonhole")
1909 (version "0.5.14")
1910 (source
1911 (origin
1912 (method url-fetch)
1913 (uri (string-append
1914 "https://pigeonhole.dovecot.org/releases/" dovecot-version "/"
1915 "dovecot-" dovecot-version "-pigeonhole-" version ".tar.gz"))
1916 (sha256
1917 (base32 "1lmjzz4kd90wbdslacybizd1dks4bhwmrx39lj8b19naldw0zjk8"))
1918 (modules '((guix build utils)))
1919 (snippet
1920 '(begin
1921 ;; RFC licencing is ad-hoc and rarely free. Remove them all.
1922 (delete-file-recursively "doc/rfc")
1923 (substitute* "configure"
1924 (("doc/rfc/Makefile") ""))
1925 (substitute* "doc/Makefile.in"
1926 (("rfc ") ""))
1927 #t))))
1928 (build-system gnu-build-system)
1929 (arguments
1930 `(#:configure-flags
1931 (list "--disable-static"
1932 "--with-dovecot-install-dirs=no"
1933 (string-append "--with-dovecot="
1934 (assoc-ref %build-inputs "dovecot")
1935 "/lib/dovecot")
1936 (string-append "--docdir="
1937 (assoc-ref %outputs "out")
1938 "/share/doc/" ,name "-" ,version)
1939 (string-append "--with-moduledir="
1940 (assoc-ref %outputs "out")
1941 "/lib/dovecot"))
1942 #:phases
1943 (modify-phases %standard-phases
1944 (add-after 'unpack 'patch-file-names
1945 (lambda* (#:key outputs #:allow-other-keys)
1946 (let* ((out (assoc-ref outputs "out"))
1947 (libexec (string-append out "/libexec/dovecot")))
1948 (substitute* "src/managesieve/managesieve-settings.c"
1949 (("\\.executable = \"managesieve\"")
1950 (string-append ".executable = \"" libexec
1951 "/managesieve\"")))
1952 (substitute* "src/managesieve-login/managesieve-login-settings.c"
1953 (("\\.executable = \"managesieve-login\"")
1954 (string-append ".executable = \"" libexec
1955 "/managesieve-login\"")))
1956 #t))))))
1957 (native-inputs
1958 `(("pkg-config" ,pkg-config)))
1959 (inputs
1960 `(("dovecot" ,dovecot)))
1961 (home-page "https://pigeonhole.dovecot.org")
1962 (synopsis "Dovecot Sieve mail filtering plug-in and ManageSieve service")
1963 (description
1964 "Pigeonhole adds support for the Sieve language (RFC 5228) and the
1965 ManageSieve protocol (RFC 5804) to the Dovecot e-mail server.
1966
1967 @dfn{Sieve} is a language for filtering incoming mail. Messages can be
1968 forwarded or sorted into separate folders. Unwanted messages can be rejected
1969 or discarded, and, when the user is not available, the Sieve interpreter can
1970 send an automated reply.
1971
1972 Sieve is meant to be simple, extensible, and system-independent. The
1973 intention is to make it impossible to write anything more complex (and
1974 dangerous) than simple mail filters. Unlike most other mail filtering script
1975 languages, Sieve does not allow users to execute arbitrary programmes.
1976
1977 Through the @dfn{ManageSieve} protocol, users can remotely manage their Sieve
1978 scripts without needing file system access. The server accepts only valid
1979 scripts to prevent embarrassing errors later on.")
1980 (license license:lgpl2.1))))
1981
1982 (define-public dovecot-trees
1983 (package
1984 (name "dovecot-trees")
1985 (version "2.1.0")
1986 (source
1987 (origin
1988 (method url-fetch)
1989 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1990 "archive.tar.gz?ref=v" version))
1991 (file-name (string-append name "-" version ".tar.gz"))
1992 (sha256
1993 (base32
1994 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1995 (patches
1996 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
1997 (build-system gnu-build-system)
1998 (native-inputs
1999 `(("automake" ,automake)
2000 ("autoconf" ,autoconf)
2001 ("libtool" ,libtool)
2002 ("dovecot" ,dovecot)
2003 ("pkg-config" ,pkg-config)))
2004 (inputs
2005 `(("libsodium" ,libsodium)))
2006 (arguments
2007 `(#:tests? #f ;No tests exist.
2008 #:configure-flags (list (string-append "--with-dovecot="
2009 (assoc-ref %build-inputs "dovecot")
2010 "/lib/dovecot"))))
2011 (home-page "https://0xacab.org/riseuplabs/trees")
2012 (synopsis "NaCL-based Dovecot email storage encryption plugin")
2013 (description
2014 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
2015 Dovecot encryption plugin. This plugin adds individually encrypted mail
2016 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
2017 which uses OpenSSL and RSA key pairs. TREES works in a similar way, but uses
2018 the Sodium crypto library (based on NaCL).
2019
2020 How it works:
2021 @enumerate
2022 @item On IMAP log in, the user's cleartext password is passed to the plugin.
2023 @item The plugin creates an argon2 digest from the password.
2024 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
2025 @item Inside the secretbox is stored a Curve25519 private key.
2026 @item The Curve25519 private key is used to decrypt each individual message,
2027 using libsodium sealed boxes.
2028 @item New mail is encrypted as it arrives using the Curve25519 public key.
2029 @end enumerate\n")
2030 (license license:agpl3)))
2031
2032 (define-public dovecot-libsodium-plugin
2033 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
2034 (revision "1"))
2035 (package
2036 (name "dovecot-libsodium-plugin")
2037 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
2038 (source
2039 (origin
2040 (method git-fetch)
2041 (uri (git-reference
2042 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
2043 (commit commit)))
2044 (file-name (string-append name "-" version "-checkout"))
2045 (sha256
2046 (base32
2047 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
2048 (build-system gnu-build-system)
2049 (native-inputs
2050 `(("automake" ,automake)
2051 ("autoconf" ,autoconf)
2052 ("libtool" ,libtool)
2053 ("dovecot" ,dovecot)
2054 ("pkg-config" ,pkg-config)))
2055 (inputs
2056 `(("libsodium" ,libsodium)))
2057 (arguments
2058 `(#:tests? #f ;No tests exist.
2059 #:configure-flags (list (string-append "--with-dovecot="
2060 (assoc-ref %build-inputs "dovecot")
2061 "/lib/dovecot"))))
2062 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
2063 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
2064 (description
2065 "@code{dovecot-libsodium-plugin} provides a libsodium password
2066 hashing scheme (such as scrypt) plug-in for @code{Dovecot}.")
2067 (license license:gpl3+))))
2068
2069 (define-public isync
2070 (package
2071 (name "isync")
2072 (version "1.4.1")
2073 (source
2074 (origin
2075 (method url-fetch)
2076 (uri (string-append "mirror://sourceforge/isync/isync/"
2077 version "/isync-" version ".tar.gz"))
2078 (sha256 (base32
2079 "0l01880fcyqn6xq9n8236ha5n2a3wl5g8rmv22z8nv5hgfsxndhd"))))
2080 (build-system gnu-build-system)
2081 (native-inputs
2082 `(("perl" ,perl)))
2083 (inputs
2084 `(("bdb" ,bdb)
2085 ("cyrus-sasl" ,cyrus-sasl)
2086 ("openssl" ,openssl)
2087 ("zlib" ,zlib)))
2088 (home-page "https://isync.sourceforge.io/")
2089 (synopsis "Mailbox synchronization program")
2090 (description
2091 "isync/mbsync is a command-line tool for two-way synchronization of
2092 mailboxes. Currently Maildir and IMAP are supported types.")
2093 (license license:gpl2+)))
2094
2095 (define-public perl-email-abstract
2096 (package
2097 (name "perl-email-abstract")
2098 (version "3.008")
2099 (source
2100 (origin
2101 (method url-fetch)
2102 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2103 "Email-Abstract-" version ".tar.gz"))
2104 (sha256
2105 (base32
2106 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
2107 (build-system perl-build-system)
2108 (propagated-inputs
2109 `(("perl-email-simple" ,perl-email-simple)
2110 ("perl-module-pluggable" ,perl-module-pluggable)
2111 ("perl-mro-compat" ,perl-mro-compat)))
2112 (home-page "https://metacpan.org/release/Email-Abstract")
2113 (synopsis "Interface to mail representations")
2114 (description "Email::Abstract provides module writers with the ability to
2115 write simple, representation-independent mail handling code.")
2116 (license license:perl-license)))
2117
2118 (define-public perl-email-address
2119 (package
2120 (name "perl-email-address")
2121 (version "1.912")
2122 (source
2123 (origin
2124 (method url-fetch)
2125 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2126 "Email-Address-" version ".tar.gz"))
2127 (sha256
2128 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
2129 (build-system perl-build-system)
2130 (home-page "https://metacpan.org/release/Email-Address")
2131 (synopsis "Email address parsing and creation")
2132 (description "Email::Address implements a regex-based RFC 2822 parser that
2133 locates email addresses in strings and returns a list of Email::Address
2134 objects found. Alternatively you may construct objects manually.")
2135 (license license:perl-license)))
2136
2137 (define-public perl-email-address-xs
2138 (package
2139 (name "perl-email-address-xs")
2140 (version "1.04")
2141 (source
2142 (origin
2143 (method url-fetch)
2144 (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
2145 "Email-Address-XS-" version ".tar.gz"))
2146 (sha256
2147 (base32
2148 "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
2149 (build-system perl-build-system)
2150 (home-page "https://metacpan.org/release/Email-Address-XS")
2151 (synopsis "Parse and format RFC 5322 email addresses and groups")
2152 (description
2153 "Email::Address::XS implements RFC 5322 parser and formatter of email
2154 addresses and groups. Unlike Email::Address, this module does not use regular
2155 expressions for parsing but instead is implemented in XS and uses shared code
2156 from Dovecot IMAP server.")
2157 (license license:perl-license)))
2158
2159 (define-public perl-email-date-format
2160 (package
2161 (name "perl-email-date-format")
2162 (version "1.005")
2163 (source
2164 (origin
2165 (method url-fetch)
2166 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2167 "Email-Date-Format-" version ".tar.gz"))
2168 (sha256
2169 (base32
2170 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
2171 (build-system perl-build-system)
2172 (home-page "https://metacpan.org/release/Email-Date-Format")
2173 (synopsis "Produce RFC 2822 date strings")
2174 (description "Email::Date::Format provides a means for generating an RFC
2175 2822 compliant datetime string.")
2176 (license license:perl-license)))
2177
2178 (define-public perl-email-messageid
2179 (package
2180 (name "perl-email-messageid")
2181 (version "1.406")
2182 (source
2183 (origin
2184 (method url-fetch)
2185 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2186 "Email-MessageID-" version ".tar.gz"))
2187 (sha256
2188 (base32
2189 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
2190 (build-system perl-build-system)
2191 (home-page "https://metacpan.org/release/Email-MessageID")
2192 (synopsis "Generate world unique message-ids")
2193 (description "Email::MessageID generates recommended message-ids to
2194 identify a message uniquely.")
2195 (license license:perl-license)))
2196
2197 (define-public perl-email-mime
2198 (package
2199 (name "perl-email-mime")
2200 (version "1.946")
2201 (source
2202 (origin
2203 (method url-fetch)
2204 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2205 "Email-MIME-" version ".tar.gz"))
2206 (sha256
2207 (base32
2208 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
2209 (build-system perl-build-system)
2210 (propagated-inputs
2211 `(("perl-email-address" ,perl-email-address)
2212 ("perl-email-messageid" ,perl-email-messageid)
2213 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
2214 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
2215 ("perl-email-simple" ,perl-email-simple)
2216 ("perl-mime-types" ,perl-mime-types)
2217 ("perl-module-runtime" ,perl-module-runtime)))
2218 (home-page "https://metacpan.org/release/Email-MIME")
2219 (synopsis "MIME message handling")
2220 (description "Email::MIME is an extension of the Email::Simple module, to
2221 handle MIME encoded messages. It takes a message as a string, splits it up
2222 into its constituent parts, and allows you access to various parts of the
2223 message. Headers are decoded from MIME encoding.")
2224 (license license:perl-license)))
2225
2226 (define-public perl-email-mime-contenttype
2227 (package
2228 (name "perl-email-mime-contenttype")
2229 (version "1.022")
2230 (source
2231 (origin
2232 (method url-fetch)
2233 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2234 "Email-MIME-ContentType-" version ".tar.gz"))
2235 (sha256
2236 (base32
2237 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
2238 (build-system perl-build-system)
2239 (native-inputs
2240 `(("perl-capture-tiny" ,perl-capture-tiny)))
2241 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
2242 (synopsis "Parse MIME Content-Type headers")
2243 (description "Email::MIME::ContentType parses a MIME Content-Type
2244 header.")
2245 (license license:perl-license)))
2246
2247 (define-public perl-email-mime-encodings
2248 (package
2249 (name "perl-email-mime-encodings")
2250 (version "1.315")
2251 (source
2252 (origin
2253 (method url-fetch)
2254 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2255 "Email-MIME-Encodings-" version ".tar.gz"))
2256 (sha256
2257 (base32
2258 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
2259 (build-system perl-build-system)
2260 (native-inputs
2261 `(("perl-capture-tiny" ,perl-capture-tiny)))
2262 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
2263 (synopsis "Unified interface to MIME encoding and decoding")
2264 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
2265 (license license:perl-license)))
2266
2267 (define-public perl-email-sender
2268 (package
2269 (name "perl-email-sender")
2270 (version "1.300035")
2271 (source
2272 (origin
2273 (method url-fetch)
2274 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2275 "Email-Sender-" version ".tar.gz"))
2276 (sha256
2277 (base32 "0yfssp3rqdx1dmgvnygarzgkpkhqm28r5sd0gh87ksk8yxndhjql"))))
2278 (build-system perl-build-system)
2279 (native-inputs
2280 `(("perl-capture-tiny" ,perl-capture-tiny)))
2281 (propagated-inputs
2282 `(("perl-email-abstract" ,perl-email-abstract)
2283 ("perl-email-address" ,perl-email-address)
2284 ("perl-email-simple" ,perl-email-simple)
2285 ("perl-list-moreutils" ,perl-list-moreutils)
2286 ("perl-module-runtime" ,perl-module-runtime)
2287 ("perl-moo" ,perl-moo)
2288 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
2289 ("perl-sub-exporter" ,perl-sub-exporter)
2290 ("perl-throwable" ,perl-throwable)
2291 ("perl-try-tiny" ,perl-try-tiny)))
2292 (home-page "https://metacpan.org/release/Email-Sender")
2293 (synopsis "Perl library for sending email")
2294 (description "Email::Sender replaces the old and sometimes problematic
2295 Email::Send library.")
2296 (license license:perl-license)))
2297
2298 (define-public perl-email-simple
2299 (package
2300 (name "perl-email-simple")
2301 (version "2.216")
2302 (source
2303 (origin
2304 (method url-fetch)
2305 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2306 "Email-Simple-" version ".tar.gz"))
2307 (sha256
2308 (base32
2309 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
2310 (build-system perl-build-system)
2311 (propagated-inputs
2312 `(("perl-email-date-format" ,perl-email-date-format)))
2313 (home-page "https://metacpan.org/release/Email-Simple")
2314 (synopsis "Parsing of RFC 2822 messages")
2315 (description "Email::Simple provides simple parsing of RFC 2822 message
2316 format and headers.")
2317 (license license:perl-license)))
2318
2319 (define-public libesmtp
2320 (package
2321 (name "libesmtp")
2322 (version "1.0.6")
2323 (source
2324 (origin
2325 (method url-fetch)
2326 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
2327 "libesmtp/libesmtp-" version ".tar.bz2/"
2328 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
2329 version ".tar.bz2")
2330 ;; XXX This site is offline, so we fetch Fedora's cached copy
2331 ;; of the source tarball.
2332 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
2333 version ".tar.bz2")))
2334 (sha256
2335 (base32
2336 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
2337 (build-system gnu-build-system)
2338 (propagated-inputs
2339 `(("openssl" ,openssl)))
2340 (home-page "http://www.stafford.uklinux.net/libesmtp/")
2341 (synopsis "Library for sending mail via remote hosts using SMTP")
2342 (description "libESMTP is an SMTP client which manages posting (or
2343 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
2344 It may be used as part of a Mail User Agent (MUA) or other program that must
2345 be able to post electronic mail where mail functionality may not be that
2346 program's primary purpose.")
2347 (license (list license:lgpl2.1+ license:gpl2+))))
2348
2349 (define-public esmtp
2350 (package
2351 (name "esmtp")
2352 (version "1.2")
2353 (source
2354 (origin
2355 (method git-fetch)
2356 (uri (git-reference
2357 (url "https://github.com/andywingo/esmtp")
2358 (commit "01bf9fc")))
2359 (sha256
2360 (base32
2361 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
2362 (file-name (string-append name "-" version "-checkout"))))
2363 (arguments
2364 `(#:phases (modify-phases %standard-phases
2365 (replace 'bootstrap
2366 (lambda _ (invoke "autoreconf" "-vfi"))))))
2367 (build-system gnu-build-system)
2368 (native-inputs
2369 `(("bison" ,bison)
2370 ("flex" ,flex)
2371 ("autoconf" ,autoconf)
2372 ("automake" ,automake)
2373 ("libtool" ,libtool)))
2374 (inputs
2375 `(("libesmtp" ,libesmtp)))
2376 (home-page "https://sourceforge.net/projects/esmtp/")
2377 (synopsis "Relay-only mail transfer agent (MTA)")
2378 (description "Esmtp is a simple relay-only mail transfer agent built using
2379 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
2380 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
2381 page for more on configuration. This package also provides minimal
2382 compatibility shims for the @command{sendmail}, @command{mailq}, and
2383 @command{newaliases} commands.")
2384 (license license:gpl2+)))
2385
2386 (define-public fdm
2387 (package
2388 (name "fdm")
2389 (version "2.0")
2390 (source (origin
2391 (method url-fetch)
2392 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
2393 version "/fdm-" version ".tar.gz"))
2394 (sha256
2395 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
2396 (build-system gnu-build-system)
2397 (inputs
2398 `(("tdb" ,tdb)
2399 ("openssl" ,openssl)
2400 ("zlib" ,zlib)))
2401 (home-page "https://github.com/nicm/fdm")
2402 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
2403 (description "fdm is a program designed to fetch mail from POP3
2404 or IMAP servers, or receive local mail from stdin, and
2405 deliver it in various ways.")
2406 (license
2407 ;; Why point to a source file? Well, all the individual files have a
2408 ;; copy of this license in their headers, but there's no seprate file
2409 ;; with that information.
2410 (license:non-copyleft
2411 "https://github.com/nicm/fdm/blob/master/command.c"))))
2412
2413
2414 (define-public procmail
2415 (package
2416 (name "procmail")
2417 (version "3.22")
2418 (source
2419 (origin
2420 (method url-fetch)
2421 (uri (string-append
2422 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
2423 version
2424 ".tar.gz"))
2425 (sha256
2426 (base32
2427 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
2428 ;; The following patch fixes an ambiguous definition of
2429 ;; getline() in formail.c. The patch is provided by Debian as
2430 ;; patch 24.
2431 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
2432 "procmail-CVE-2014-3618.patch"
2433 "procmail-CVE-2017-16844.patch"))))
2434 (arguments
2435 `(#:phases (modify-phases %standard-phases
2436 (replace 'configure
2437 (lambda _
2438 (substitute* "Makefile"
2439 (("/bin/sh")
2440 (which "sh"))
2441 (("/usr")
2442 (assoc-ref %outputs "out"))
2443 (("/bin/rm")
2444 (which "rm")))
2445 #t)))
2446 #:tests? #f)) ;; There are no tests indicating a successful
2447 ;; build. Some tests of basic locking mechanisms provided by the
2448 ;; file system are performed during 'make install'. However, these
2449 ;; are performed before the actual build process.
2450 (build-system gnu-build-system)
2451 (inputs `(("exim" ,exim)))
2452 (home-page "http://www.procmail.org/")
2453 (synopsis "Versatile mail delivery agent (MDA)")
2454 (description "Procmail is a mail delivery agent (MDA) featuring support
2455 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
2456 can be sorted into separate files/directories and arbitrary commands can be
2457 executed on mail arrival. Procmail is considered stable, but is no longer
2458 maintained.")
2459 (license license:gpl2+))) ;; procmail allows to choose the
2460 ;; nonfree Artistic License 1.0
2461 ;; as alternative to the GPL2+.
2462 ;; This option is not listed here.
2463
2464 (define-public khard
2465 (package
2466 (name "khard")
2467 (version "0.17.0")
2468 (source (origin
2469 (method url-fetch)
2470 (uri (pypi-uri name version))
2471 (sha256
2472 (base32
2473 "062nv4xkfsjc11k9m52dh6xjn9z68a4a6x1s8z05wwv4jbp1lkhn"))))
2474 (build-system python-build-system)
2475 (arguments
2476 `(#:phases
2477 (modify-phases %standard-phases
2478 (add-after 'install 'install-completions
2479 (lambda* (#:key outputs #:allow-other-keys)
2480 (let* ((out (assoc-ref outputs "out"))
2481 (zsh (string-append out "/share/zsh/site-functions")))
2482 (copy-recursively "misc/zsh" zsh)
2483 #t))))))
2484 (native-inputs
2485 `(("python-setuptools-scm" ,python-setuptools-scm)))
2486 (inputs
2487 `(("python-atomicwrites" ,python-atomicwrites)
2488 ("python-configobj" ,python-configobj)
2489 ("python-ruamel.yaml" ,python-ruamel.yaml)
2490 ("python-unidecode" ,python-unidecode)
2491 ("python-vobject" ,python-vobject)))
2492 (synopsis "Console address book using CardDAV")
2493 (description "Khard is an address book for the console. It creates, reads,
2494 modifies and removes CardDAV address book entries at your local machine. For
2495 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
2496 Khard can also be used from within the email client @command{mutt}.")
2497 (home-page "https://github.com/scheibler/khard")
2498 (license license:gpl3+)))
2499
2500 (define-public perl-mail-spf
2501 (package
2502 (name "perl-mail-spf")
2503 (version "2.9.0")
2504 (source
2505 (origin
2506 (method url-fetch)
2507 (uri (string-append
2508 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
2509 version
2510 ".tar.gz"))
2511 (sha256
2512 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
2513 (build-system perl-build-system)
2514 (native-inputs
2515 `(("perl-module-build" ,perl-module-build)
2516 ("perl-net-dns-resolver-programmable"
2517 ,perl-net-dns-resolver-programmable)))
2518 (arguments
2519 `(#:phases
2520 (modify-phases %standard-phases
2521 (add-before 'configure 'modify-Build.PL
2522 (lambda* (#:key outputs #:allow-other-keys)
2523 (substitute* "Build.PL"
2524 (("'/usr/sbin'") (string-append "'"
2525 (assoc-ref outputs "out")
2526 "/sbin'")))
2527 #t)))))
2528 (inputs
2529 `(("perl-error" ,perl-error)
2530 ("perl-net-dns" ,perl-net-dns)
2531 ("perl-netaddr-ip" ,perl-netaddr-ip)
2532 ("perl-uri" ,perl-uri)))
2533 (home-page "https://metacpan.org/release/Mail-SPF")
2534 (synopsis "Perl implementation of Sender Policy Framework")
2535 (description "Mail::SPF is the Sender Policy Framework implemented
2536 in Perl.")
2537 (license license:bsd-3)))
2538
2539 (define-public perl-mail-authenticationresults
2540 (package
2541 (name "perl-mail-authenticationresults")
2542 (version "1.20180923")
2543 (source (origin
2544 (method url-fetch)
2545 (uri (string-append
2546 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
2547 "Mail-AuthenticationResults-" version ".tar.gz"))
2548 (sha256
2549 (base32
2550 "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
2551 (build-system perl-build-system)
2552 (native-inputs
2553 `(("perl-test-exception" ,perl-test-exception)))
2554 (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
2555 (synopsis "Object Oriented Authentication-Results Headers")
2556 (description "Mail::AuthenticationResults parses the message header field
2557 that indicates the message authentication status as per RFC7601. This module
2558 is not fully compliant with the RFC but it tries to implement most styles of
2559 Authentication-Results header seen in the wild.")
2560 (license license:perl-license)))
2561
2562 (define-public perl-mail-dkim
2563 (package
2564 (name "perl-mail-dkim")
2565 (version "0.58")
2566 (source (origin
2567 (method url-fetch)
2568 (uri (string-append
2569 "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
2570 version
2571 ".tar.gz"))
2572 (sha256
2573 (base32
2574 "0cgkal65qqcy57b21lgij90ba36wl66byw9i76g5yhwaa8ms8hqa"))))
2575 (build-system perl-build-system)
2576 (propagated-inputs
2577 `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2578 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2579 ("perl-mailtools" ,perl-mailtools)
2580 ("perl-net-dns" ,perl-net-dns)))
2581 (native-inputs
2582 `(("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
2583 ("perl-test-requiresinternet" ,perl-test-requiresinternet)
2584 ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
2585 (home-page "https://metacpan.org/release/Mail-DKIM")
2586 (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
2587 (description "Mail::DKIM is a Perl module that implements the new Domain
2588 Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
2589 both of which sign and verify emails using digital signatures and DNS records.
2590 Mail-DKIM can be used by any Perl program that wants to provide support for
2591 DKIM and/or DomainKeys.")
2592 (license license:gpl3+)))
2593
2594 (define-public dkimproxy
2595 (package
2596 (name "dkimproxy")
2597 (version "1.4.1")
2598 (source (origin
2599 (method url-fetch)
2600 (uri (string-append
2601 "mirror://sourceforge/dkimproxy/dkimproxy/"
2602 version "/dkimproxy-" version ".tar.gz"))
2603 (sha256
2604 (base32
2605 "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
2606 (patches
2607 (search-patches "dkimproxy-add-ipv6-support.patch"))))
2608 (build-system gnu-build-system)
2609 (arguments
2610 `(#:phases
2611 (modify-phases %standard-phases
2612 (add-after 'install 'make-wrapper
2613 (lambda* (#:key inputs outputs #:allow-other-keys)
2614 (let* ((out (assoc-ref outputs "out"))
2615 (wrap.pl (lambda (scripts keys)
2616 (for-each
2617 (lambda (script)
2618 (wrap-program (string-append out script)
2619 `("PERL5LIB" ":" prefix
2620 ,(map (λ (input)
2621 (string-append
2622 (assoc-ref inputs input)
2623 "/lib/perl5/site_perl"))
2624 keys))))
2625 scripts))))
2626 (wrap.pl (list "/bin/dkimproxy.in"
2627 "/bin/dkimproxy.out")
2628 (list "perl-crypt-openssl-rsa"
2629 "perl-io-socket-inet6"
2630 "perl-mailtools"
2631 "perl-mail-authenticationresults"
2632 "perl-mail-dkim"
2633 "perl-net-dns"
2634 "perl-net-server"
2635 "perl-socket6"))
2636 (wrap.pl (list "/bin/dkim_responder.pl")
2637 (list "perl-crypt-openssl-rsa"
2638 "perl-mail-dkim"
2639 "perl-mailtools"
2640 "perl-mime-tools"
2641 "perl-net-dns"
2642 "perl-timedate"))
2643 #t))))))
2644 (inputs
2645 `(("perl" ,perl)
2646 ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2647 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2648 ("perl-mailtools" ,perl-mailtools)
2649 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2650 ("perl-mail-dkim" ,perl-mail-dkim)
2651 ("perl-mime-tools" ,perl-mime-tools)
2652 ("perl-net-dns" ,perl-net-dns)
2653 ("perl-net-server" ,perl-net-server)
2654 ("perl-socket6" ,perl-socket6)
2655 ("perl-timedate" ,perl-timedate)))
2656 (home-page "http://dkimproxy.sourceforge.net/")
2657 (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
2658 (description
2659 "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
2660 @code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
2661 proxy for signing outgoing email, and an inbound proxy for verifying signatures
2662 of incoming messages.
2663
2664 It was designed for Postfix, but can be used to add DKIM support to nearly any
2665 existing mail server. With Postfix, the proxies can operate as either
2666 @code{Before-Queue} or @code{After-Queue} content filters.")
2667 (license license:gpl2+)))
2668
2669 (define-public mb2md
2670 (package
2671 (name "mb2md")
2672 (version "3.20")
2673 (source (origin
2674 (method url-fetch)
2675 (uri (string-append
2676 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
2677 version ".pl.gz"))
2678 (sha256
2679 (base32
2680 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
2681 (build-system trivial-build-system)
2682 (arguments
2683 '(#:modules ((guix build utils))
2684 #:builder
2685 (begin
2686 (use-modules (guix build utils))
2687 (let* ((source (assoc-ref %build-inputs "source"))
2688 (out (assoc-ref %outputs "out"))
2689 (bin (string-append out "/bin"))
2690 (perl (assoc-ref %build-inputs "perl"))
2691 (gzip (assoc-ref %build-inputs "gzip"))
2692 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
2693 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
2694 (mkdir-p bin)
2695 (with-directory-excursion bin
2696 (copy-file source "mb2md.gz")
2697 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
2698 (substitute* "mb2md"
2699 (("#!/usr/bin/perl")
2700 (string-append "#!/usr/bin/perl -I " perl5lib)))
2701 (patch-shebang "mb2md" (list (string-append perl "/bin")))
2702 (chmod "mb2md" #o555))
2703 #t))))
2704 (native-inputs `(("gzip" ,gzip)))
2705 (inputs `(("perl" ,perl)
2706 ("perl-timedate" ,perl-timedate)))
2707 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
2708 (synopsis "Mbox to maildir converter")
2709 (description
2710 "Mb2md is a Perl script that takes one or more mbox format files and
2711 converts them to maildir format directories.")
2712 (license license:public-domain)))
2713
2714 (define-public mblaze
2715 (package
2716 (name "mblaze")
2717 (version "1.1")
2718 (source
2719 (origin
2720 (method git-fetch)
2721 (uri (git-reference
2722 (url "https://github.com/leahneukirchen/mblaze")
2723 (commit (string-append "v" version))))
2724 (file-name (git-file-name name version))
2725 (sha256
2726 (base32 "1bir977vnqs76g8jgv1yivqw0wk2kn56l3l5r4w2ipix3fir138y"))))
2727 (build-system gnu-build-system)
2728 (native-inputs
2729 `(("perl" ,perl)))
2730 (arguments
2731 `(#:tests? #f ; XXX: Upstream tests appear to be broken
2732 #:make-flags (list (string-append "CC=" ,(cc-for-target))
2733 "PREFIX="
2734 (string-append "DESTDIR=" %output))
2735 #:phases
2736 (modify-phases %standard-phases
2737 (delete 'configure))))
2738 (home-page "https://github.com/leahneukirchen/mblaze")
2739 (synopsis "Unix utilities to deal with Maildir")
2740 (description
2741 "The mblaze message system is a set of Unix utilities for processing and
2742 interacting with mail messages which are stored in maildir folders.
2743
2744 Its design is roughly inspired by MH, the RAND Message Handling System, but it
2745 is a complete implementation from scratch.
2746
2747 mblaze is a classic command line MUA and has no features for receiving or
2748 transferring messages; you can operate on messages in a local maildir spool,
2749 or fetch your messages using fdm(1), getmail(1), offlineimap(1), or similar
2750 utilities, and send it using dma(8), msmtp(1), sendmail(8), as provided by
2751 OpenSMTPD, Postfix, or similar.
2752
2753 mblaze operates directly on maildir folders and doesn't use its own caches or
2754 databases. There is no setup needed for many uses. All utilities have been
2755 written with performance in mind. Enumeration of all messages in a maildir is
2756 avoided unless necessary, and then optimized to limit syscalls. Parsing
2757 message metadata is optimized to limit I/O requests. Initial operations on a
2758 large maildir may feel slow, but as soon as they are in the file system cache,
2759 everything is blazingly fast. The utilities are written to be memory
2760 efficient (i.e. not wasteful), but whole messages are assumed to fit into RAM
2761 easily (one at a time).")
2762 (license (list license:public-domain
2763 license:expat)))) ; mystrverscmp.c and mymemmem
2764
2765 (define-public mpop
2766 (package
2767 (name "mpop")
2768 (version "1.4.13")
2769 (source
2770 (origin
2771 (method url-fetch)
2772 (uri (string-append "https://marlam.de/mpop/releases/"
2773 "mpop-" version ".tar.xz"))
2774 (sha256
2775 (base32 "1hbx69d6ivbvjajrcp54fdb3g1ms4ydj0ybf3bfhlravqrk88jdk"))))
2776 (build-system gnu-build-system)
2777 (inputs
2778 `(("gnutls" ,gnutls)))
2779 (native-inputs
2780 `(("pkg-config" ,pkg-config)))
2781 (home-page "https://marlam.de/mpop/")
2782 (synopsis "POP3 mail client")
2783 (description "mpop is a small and fast POP3 client suitable as a
2784 fetchmail replacement.
2785
2786 mpop supports multiple accounts, header based mail filtering, delivery
2787 to mbox files, maildir folders or an @acronym{MDA, Mail Delivery Agent},
2788 TLS/SSL, several authentication methods, @acronym{IDN, Internationalized Domain
2789 Names} and SOCKS proxies.")
2790 (license license:gpl3+)))
2791
2792 (define-public mhonarc
2793 (package
2794 (name "mhonarc")
2795 (version "2.6.19")
2796 (source
2797 (origin
2798 (method url-fetch)
2799 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
2800 version ".tar.gz"))
2801 (sha256
2802 (base32
2803 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
2804 (build-system perl-build-system)
2805 (home-page "https://www.mhonarc.org/")
2806 (synopsis "Create HTML archives of mail/news messages")
2807 (description
2808 "MHonArc is a Perl mail-to-HTML converter. MHonArc
2809 provides HTML mail archiving with index, mail thread linking,
2810 etc; plus other capabilities including support for MIME and
2811 powerful user customization features.")
2812 (license license:gpl2+)))
2813
2814 (define-public sendmail
2815 (package
2816 (name "sendmail")
2817 (version "8.15.2")
2818 (source
2819 (origin
2820 (method url-fetch)
2821 (uri (string-append
2822 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
2823 version ".tar.gz"))
2824 (sha256
2825 (base32
2826 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
2827 (build-system gnu-build-system)
2828 (arguments
2829 `(#:phases
2830 (modify-phases %standard-phases
2831 (add-before 'build 'replace-/bin/sh
2832 (lambda _
2833 (substitute*
2834 (append
2835 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2836 "contrib/mmuegel" "devtools/bin/configure.sh")
2837 (find-files "." ".*\\.m4")
2838 (find-files "." ".*\\.cf"))
2839 (("/bin/sh") (which "sh")))
2840
2841 (substitute* "devtools/bin/Build"
2842 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
2843 #t))
2844 (replace 'configure
2845 (lambda _
2846
2847 ;; Render harmless any attempts to chown or chgrp
2848 (substitute* "devtools/bin/install.sh"
2849 (("owner=\\$2") "owner=''")
2850 (("group=\\$2") "group=''"))
2851
2852 (with-output-to-file "devtools/Site/site.config.m4"
2853 (lambda ()
2854 (format #t "
2855 define(`confCC', `gcc')
2856 define(`confOPTIMIZE', `-g -O2')
2857 define(`confLIBS', `-lresolv')
2858 define(`confINSTALL', `~a/devtools/bin/install.sh')
2859 define(`confDEPEND_TYPE', `CC-M')
2860 define(`confINST_DEP', `')
2861 " (getcwd))))
2862 #t))
2863 (replace 'build
2864 (lambda _
2865 (invoke "sh" "Build")
2866 (with-directory-excursion "cf/cf"
2867 (copy-file "generic-linux.mc" "sendmail.mc")
2868 (invoke "sh" "Build" "sendmail.cf"))
2869 #t))
2870 (add-before 'install 'pre-install
2871 (lambda _
2872 (let ((out (assoc-ref %outputs "out")))
2873 (mkdir-p (string-append out "/usr/bin"))
2874 (mkdir-p (string-append out "/usr/sbin"))
2875 (mkdir-p (string-append out "/etc/mail"))
2876 (setenv "DESTDIR" out)
2877 (with-directory-excursion "cf/cf"
2878 (invoke "sh" "Build" "install-cf"))
2879 #t))))
2880 ;; There is no make check. There are some post installation tests, but those
2881 ;; require root privileges
2882 #:tests? #f))
2883 (inputs
2884 `(("m4" ,m4)
2885 ("perl" ,perl)))
2886 (home-page "http://sendmail.org")
2887 (synopsis
2888 "Highly configurable Mail Transfer Agent (MTA)")
2889 (description
2890 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2891 Allman. It is highly configurable and supports many delivery methods and many
2892 transfer protocols.")
2893 (license (license:non-copyleft "file://LICENSE"
2894 "See LICENSE in the distribution."))))
2895
2896 (define-public sieve-connect
2897 (package
2898 (name "sieve-connect")
2899 (version "0.90")
2900 (source
2901 (origin
2902 (method url-fetch)
2903 (uri (string-append "https://people.spodhuis.org/phil.pennock/software/"
2904 "sieve-connect-" version ".tar.bz2"))
2905 (sha256
2906 (base32 "00vnyzr67yr2ilnprbd388gfnwmrmbdx1jsig9d0n5q902jqn62a"))))
2907 (build-system gnu-build-system)
2908 (arguments
2909 `(#:make-flags
2910 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2911 #:tests? #f ; no test suite
2912 #:phases
2913 (modify-phases %standard-phases
2914 (delete 'configure) ; no configure script
2915 (add-before 'install 'create-output-directories
2916 (lambda* (#:key outputs #:allow-other-keys)
2917 (let ((out (assoc-ref outputs "out")))
2918 (for-each (lambda (subdirectory)
2919 (mkdir-p (string-append out "/" subdirectory)))
2920 (list "bin"
2921 "man/man1"))
2922 #t)))
2923 (add-after 'install 'wrap-program
2924 (lambda* (#:key inputs outputs #:allow-other-keys)
2925 (let ((out (assoc-ref outputs "out"))
2926 (path (getenv "PERL5LIB")))
2927 (wrap-script (string-append out "/bin/sieve-connect")
2928 `("PERL5LIB" ":" = (,path)))
2929 #t))))))
2930 (inputs
2931 `(("guile" ,guile-3.0) ; for wrap-script
2932 ("perl" ,perl)
2933 ("perl-authen-sasl" ,perl-authen-sasl)
2934 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2935 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
2936 ("perl-net-dns" ,perl-net-dns)
2937 ("perl-socket6" ,perl-socket6)
2938 ("perl-term-readkey" ,perl-term-readkey)
2939 ("perl-term-readline" ,perl-term-readline-gnu)))
2940 (home-page
2941 "https://people.spodhuis.org/phil.pennock/software/#sieve-connect")
2942 (synopsis "ManageSieve client for managing Sieve e-mail filters")
2943 (description
2944 "Sieve-connect lets you view, upload, edit, delete, and otherwise manage
2945 Sieve scripts on any mail server that speaks the @dfn{ManageSieve} protocol,
2946 as specified in RFC 5804.
2947
2948 @dfn{Sieve} (RFC 5228) is a specialised language for e-mail filtering. Sieve
2949 scripts are stored on the server and run whenever mail arrives. They can
2950 automatically sort new messages into folders, silently reject them, send an
2951 automated response, and more.
2952
2953 @command{sieve-connect} is designed to be both a tool which can be invoked
2954 from scripts as well as a decent interactive client. It supports TLS for
2955 connection privacy, as well as authentication with SASL or GSSAPI client
2956 certificates. It should be a drop-in replacement for @command{sieveshell}
2957 from the Cyrus IMAP project.")
2958 (license license:bsd-3)))
2959
2960 (define-public opensmtpd
2961 (package
2962 (name "opensmtpd")
2963 (version "6.8.0p2")
2964 (source
2965 (origin
2966 (method url-fetch)
2967 (uri (string-append "https://www.opensmtpd.org/archives/"
2968 "opensmtpd-" version ".tar.gz"))
2969 (sha256
2970 (base32 "05sd7bmq29ibnqbl2z53hiyprfxzf0qydfdaixs68rz55wqhbgsi"))))
2971 (build-system gnu-build-system)
2972 (inputs
2973 `(("bdb" ,bdb)
2974 ("libasr" ,libasr)
2975 ("libevent" ,libevent)
2976 ("libressl" ,libressl) ; recommended, and supports e.g. ECDSA
2977 ("linux-pam" ,linux-pam)
2978 ("zlib" ,zlib)))
2979 (native-inputs
2980 `(("bison" ,bison)
2981 ("groff" ,groff))) ; for man pages
2982 (arguments
2983 `(#:configure-flags
2984 (list "--localstatedir=/var"
2985 ;; This is the default only if it exists at build time—it doesn't.
2986 "--with-path-socket=/var/run"
2987 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2988 "--with-user-smtpd=smtpd"
2989 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2990 "--with-auth-pam"
2991 "--with-table-db")
2992 #:phases
2993 (modify-phases %standard-phases
2994 ;; See: https://github.com/OpenSMTPD/OpenSMTPD/issues/1069.
2995 (add-after 'unpack 'fix-smtpctl-encrypt-bug
2996 (lambda _
2997 (substitute* "usr.sbin/smtpd/smtpctl.c"
2998 (("\"encrypt\", \"--\",")
2999 "\"encrypt\","))
3000 #t))
3001 ;; Fix some incorrectly hard-coded external tool file names.
3002 (add-after 'unpack 'patch-FHS-file-names
3003 (lambda _
3004 (substitute* "usr.sbin/smtpd/smtpctl.c"
3005 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
3006 (("/bin/cat") (which "cat")))
3007 (substitute* "usr.sbin/smtpd/mda_unpriv.c"
3008 (("/bin/sh") (which "sh")))
3009 #t))
3010 ;; OpenSMTPD provides a single smtpctl utility to control both the
3011 ;; daemon and the local submission subsystem. To accomodate systems
3012 ;; that require historical interfaces such as sendmail, newaliases or
3013 ;; makemap, smtpctl operates in compatibility mode if called with the
3014 ;; historical name.
3015 (add-after 'install 'install-compability-links
3016 (lambda* (#:key outputs #:allow-other-keys)
3017 (let* ((out (assoc-ref outputs "out"))
3018 (sbin (string-append out "/sbin/")))
3019 (for-each (lambda (command)
3020 (symlink "smtpctl" (string-append sbin command)))
3021 (list "mailq" "makemap" "newaliases"
3022 "send-mail" "sendmail")))
3023 #t)))))
3024 (synopsis "Lightweight SMTP daemon")
3025 (description
3026 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
3027 Transfer Protocol}, with some additional standard extensions. It allows
3028 ordinary machines to exchange e-mails with other systems speaking the SMTP
3029 protocol, or to deliver them to local users.
3030
3031 In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
3032 functionality than those available in other SMTP daemons. The objective is to
3033 provide enough features to satisfy typical usage at the risk of unsuitability
3034 to esoteric or niche requirements.")
3035 (home-page "https://www.opensmtpd.org")
3036 (license (list license:bsd-2 license:bsd-3 license:bsd-4
3037 (license:non-copyleft "file://COPYING")
3038 license:public-domain license:isc license:openssl))))
3039
3040 (define-public opensmtpd-extras
3041 (package
3042 (name "opensmtpd-extras")
3043 (version "6.7.1")
3044 (source (origin
3045 (method url-fetch)
3046 (uri (string-append "https://www.opensmtpd.org/archives/"
3047 "opensmtpd-extras-" version ".tar.gz"))
3048 (sha256
3049 (base32
3050 "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq"))))
3051 (build-system gnu-build-system)
3052 (native-inputs
3053 `(("pkg-config" ,pkg-config)))
3054 (inputs
3055 `(("libressl" ,libressl)
3056 ("libevent" ,libevent)
3057 ("mysql" ,mysql)
3058 ("opensmtpd" ,opensmtpd)
3059 ("postgresql" ,postgresql)
3060 ("python" ,python-2)
3061 ("sqlite" ,sqlite)))
3062 (arguments
3063 `(#:configure-flags
3064 (list "--sysconfdir=/etc"
3065 "--localstatedir=/var"
3066
3067 "--with-queue-null"
3068 "--with-queue-python"
3069 "--with-queue-ram"
3070 "--with-queue-stub"
3071
3072 "--with-table-ldap"
3073 "--with-table-mysql"
3074 "--with-table-postgres"
3075 ;; "--with-table-redis" ; TODO: package hiredis
3076 "--with-table-socketmap"
3077 "--with-table-passwd"
3078 "--with-table-python"
3079 "--with-table-sqlite"
3080 "--with-table-stub"
3081
3082 "--with-scheduler-ram"
3083 "--with-scheduler-stub"
3084 "--with-scheduler-python"
3085
3086 "--with-user-smtpd=smtpd"
3087
3088 ;; We have to configure it like this because the default checks for
3089 ;; for example Python in /usr/{,local/}bin and fails otherwise.
3090 (string-append "--with-python="
3091 (assoc-ref %build-inputs "python")))))
3092 (home-page "https://www.opensmtpd.org")
3093 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
3094 (description
3095 "This package provides extra tables, filters, and various other addons
3096 for OpenSMTPD to extend its functionality.")
3097 (license (list license:bsd-2 license:bsd-3 ; openbsd-compat
3098 license:isc)))) ; everything else
3099
3100 (define libopensmtpd
3101 ;; Private source dependency of opensmtpd-filter-dkimsign (by the same
3102 ;; author), until any project actually uses it in its compiled form.
3103 (let ((revision 48))
3104 (package
3105 (name "libopensmtpd")
3106 (version (format #f "0.0.0-~a" revision))
3107 (source
3108 (origin
3109 (method svn-fetch)
3110 (uri (svn-reference
3111 (url "http://imperialat.at/dev/libopensmtpd/")
3112 (revision revision)))
3113 (sha256
3114 (base32 "04fgibpi6q0c3468ww3z7gsvraz0gyfps0c2dj8mdyri636c0x0s"))
3115 (file-name (git-file-name name version))))
3116 (build-system gnu-build-system)
3117 (arguments
3118 `(#:make-flags
3119 (list "-f" "Makefile.gnu"
3120 (string-append "CC=" ,(cc-for-target))
3121 (string-append "LOCALBASE=" (assoc-ref %outputs "out")))
3122 #:tests? #f ; no test suite
3123 #:phases
3124 (modify-phases %standard-phases
3125 (add-after 'unpack 'inherit-ownership
3126 (lambda _
3127 (substitute* "Makefile.gnu"
3128 (("-o \\$\\{BINOWN\\} -g \\$\\{BINGRP\\}") ""))
3129 #t))
3130 (delete 'configure) ; no configure script
3131 (add-before 'install 'create-output-directories
3132 (lambda* (#:key outputs #:allow-other-keys)
3133 (let ((out (assoc-ref outputs "out")))
3134 (mkdir-p (string-append out "/lib"))
3135 #t)))
3136 (add-after 'install 'install-header-file
3137 (lambda* (#:key make-flags outputs #:allow-other-keys)
3138 (let ((out (assoc-ref outputs "out")))
3139 (mkdir-p (string-append out "/include"))
3140 (apply invoke "make" "includes" make-flags))))
3141 (add-after 'install 'install-man-page
3142 (lambda* (#:key outputs #:allow-other-keys)
3143 (let* ((out (assoc-ref outputs "out"))
3144 (man3 (string-append out "/share/man/man3")))
3145 ;; There is no make target for this.
3146 (install-file "osmtpd_run.3" man3)
3147 #t))))))
3148 (inputs
3149 `(("libevent" ,libevent)))
3150 (home-page "http://imperialat.at/dev/libopensmtpd/")
3151 (synopsis "OpenSMTPd filter C API")
3152 (description
3153 "The @code{osmtpd} API is an event-based C programming interface for
3154 writing OpenSMTPd filters.")
3155 (license license:expat))))
3156
3157 (define-public opensmtpd-filter-dkimsign
3158 (package
3159 (name "opensmtpd-filter-dkimsign")
3160 ;; The .arch repackaging provides not only a usable Makefile, but patches
3161 ;; the source to actually build on GNU, e.g., by making pledge() optional.
3162 ;; It's effectively the portable branch that upstream lacks at this time.
3163 (version "0.2.arch2") ; also update both native-inputs
3164 (source
3165 (origin
3166 (method git-fetch)
3167 (uri (git-reference
3168 (url "https://github.com/de-vri-es/filter-dkimsign")
3169 (commit (string-append "v" version))))
3170 (sha256
3171 (base32 "1dv6184h0gq2safnc7ln4za3arbafzc1xwkgwmiihqcjvdyxig0c"))
3172 (file-name (git-file-name name version))))
3173 (build-system gnu-build-system)
3174 (arguments
3175 `(#:make-flags
3176 (list (string-append "CC=" ,(cc-for-target)))
3177 #:tests? #f ; no test suite
3178 #:phases
3179 (modify-phases %standard-phases
3180 (replace 'unpack
3181 (lambda* (#:key source inputs #:allow-other-keys)
3182 (copy-recursively source "filter-dkimsign")
3183 (copy-recursively (assoc-ref inputs "libopensmtpd-source")
3184 "libopensmtpd")
3185 (copy-file (assoc-ref inputs "Makefile") "Makefile")
3186 #t))
3187 (delete 'configure) ; no configure script
3188 (replace 'install
3189 (lambda* (#:key outputs #:allow-other-keys)
3190 (let* ((out (assoc-ref outputs "out"))
3191 (libexec (string-append out "/libexec/opensmtpd"))
3192 (man8 (string-append out "/share/man/man8")))
3193 (chdir "filter-dkimsign")
3194 (install-file "filter-dkimsign" libexec)
3195 (install-file "filter-dkimsign.8" man8)
3196 #t))))))
3197 (native-inputs
3198 `(("Makefile"
3199 ,(origin
3200 (method url-fetch)
3201 (uri (string-append
3202 "https://aur.archlinux.org/cgit/aur.git/plain/Makefile"
3203 "?h=opensmtpd-filter-dkimsign"
3204 "&id=58393470477a2ff2a58f9d72f5d851698067539f"))
3205 (sha256
3206 (base32 "0da5qr9hfjkf07ybvfva967njmf2x0b82z020r6v5f93jzsbqx92"))
3207 (file-name (string-append name "-" version "-Makefile"))))
3208 ("libopensmtpd-source" ,(package-source libopensmtpd))))
3209 (inputs
3210 `(("libevent" ,libevent)
3211 ("libressl" ,libressl))) ; openssl works too but follow opensmtpd
3212 (home-page "http://imperialat.at/dev/filter-dkimsign/")
3213 (synopsis "OpenSMTPd filter for signing mail with DKIM")
3214 (description
3215 "The @command{filter-dkimsign} OpenSMTPd filter signs outgoing e-mail
3216 messages with @acronym{DKIM, DomainKeys Identified Mail} (RFC 4871).")
3217 (license license:expat)))
3218
3219 (define-public opensmtpd-filter-rspamd
3220 (package
3221 (name "opensmtpd-filter-rspamd")
3222 (version "0.1.7")
3223 (source (origin
3224 (method git-fetch)
3225 (uri (git-reference
3226 (url "https://github.com/poolpOrg/filter-rspamd")
3227 (commit (string-append "v" version))))
3228 (sha256
3229 (base32 "1qhrw20q9y44ffgx5k14nvqc9dh47ihywgzza84g0zv9xgif7hd5"))
3230 (file-name (git-file-name name version))))
3231 (build-system go-build-system)
3232 (arguments
3233 `(#:import-path "github.com/poolpOrg/filter-rspamd"
3234 #:phases
3235 (modify-phases %standard-phases
3236 (add-before 'build 'set-bootstrap-variables
3237 (lambda* (#:key outputs inputs #:allow-other-keys)
3238 ;; Tell the build system where to install binaries
3239 (let* ((out (assoc-ref outputs "out"))
3240 (libexec (string-append out "/libexec/opensmtpd")))
3241 (setenv "GOBIN" libexec)))))))
3242 (native-inputs
3243 `(("opensmtpd" ,opensmtpd)))
3244 (home-page "https://github.com/poolpOrg/filter-rspamd")
3245 (synopsis "OpenSMTPd filter to request an Rspamd analysis")
3246 (description
3247 "The @command{filter-rspamd} OpenSMTPd filter implements the
3248 Rspamd protocol and allows OpenSMTPd to request an Rspamd analysis of
3249 an SMTP transaction before a message is committed to queue.")
3250 (license license:isc)))
3251
3252 (define-public mailman
3253 (package
3254 (name "mailman")
3255 (version "3.3.2")
3256 (source
3257 (origin
3258 (method url-fetch)
3259 (uri (pypi-uri "mailman" version))
3260 (sha256
3261 (base32 "0a5ckbf8hc3y28b7p5psp0d4bxk601jlr5pd3hhh545xd8d9f0dg"))))
3262 (build-system python-build-system)
3263 (propagated-inputs
3264 `(("gunicorn" ,gunicorn)
3265 ("python-aiosmtpd" ,python-aiosmtpd)
3266 ("python-alembic" ,python-alembic)
3267 ("python-atpublic" ,python-atpublic)
3268 ("python-authheaders" ,python-authheaders)
3269 ("python-authres" ,python-authres)
3270 ("python-click" ,python-click)
3271 ("python-dateutil" ,python-dateutil)
3272 ("python-dnspython" ,python-dnspython)
3273 ("python-falcon" ,python-falcon)
3274 ("python-flufl-bounce" ,python-flufl-bounce)
3275 ("python-flufl-i18n" ,python-flufl-i18n)
3276 ("python-flufl-lock" ,python-flufl-lock)
3277 ("python-importlib-resources" ,python-importlib-resources)
3278 ("python-lazr-config" ,python-lazr-config)
3279 ("python-passlib" ,python-passlib)
3280 ("python-requests" ,python-requests)
3281 ("python-sqlalchemy" ,python-sqlalchemy)
3282 ("python-zope-component" ,python-zope-component)
3283 ("python-zope-configuration" ,python-zope-configuration)
3284 ("python-zope-event" ,python-zope-event)
3285 ("python-zope-interface" ,python-zope-interface)))
3286 (native-inputs
3287 `(("python-nose" ,python-nose)))
3288 (home-page "https://www.list.org")
3289 (synopsis "Mailing list manager")
3290 (description
3291 "GNU Mailman is software for managing email discussion and mailing
3292 lists. Both users and administrators generally perform their actions in a
3293 web interface, although email and command-line interfaces are also provided.
3294 The system features built-in archiving, automatic bounce processing, content
3295 filtering, digest delivery, and more.")
3296 (license license:gpl3+)))
3297
3298 (define-public python-mailmanclient
3299 (package
3300 (name "python-mailmanclient")
3301 (version "3.3.1")
3302 (source
3303 (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "mailmanclient" version))
3306 (sha256
3307 (base32
3308 "0pjgzpvhdb6ql8asb20xr8d01m646zpghmcp9fmscks0n1k4di4g"))))
3309 (build-system python-build-system)
3310 (arguments
3311 `(#:tests? #f)) ; Requires mailman running
3312 (propagated-inputs
3313 `(("python-requests" ,python-requests)))
3314 ;(native-inputs
3315 ; `(("mailman" ,mailman)
3316 ; ("python-falcon" ,python-falcon)
3317 ; ("python-pytest" ,python-pytest)
3318 ; ("python-pytest-services" ,python-pytest-services)))
3319 (home-page "https://www.list.org/")
3320 (synopsis "Python bindings for the Mailman 3 REST API")
3321 (description
3322 "The mailmanclient library provides official Python bindings for
3323 the GNU Mailman 3 REST API.")
3324 (properties `((python2-variant . ,(delay python2-mailmanclient))))
3325 (license license:lgpl3+)))
3326
3327 ;; This is the last version which supports Python-2.
3328 (define-public python2-mailmanclient
3329 (let ((base (package-with-python2
3330 (strip-python2-variant python-mailmanclient))))
3331 (package
3332 (inherit base)
3333 (version "3.1.1")
3334 (source
3335 (origin
3336 (method url-fetch)
3337 (uri (pypi-uri "mailmanclient" version))
3338 (sha256
3339 (base32
3340 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
3341 (propagated-inputs
3342 `(("python2-six" ,python2-six)
3343 ("python2-httplib2" ,python2-httplib2))))))
3344
3345 (define-public mlmmj
3346 (package
3347 (name "mlmmj")
3348 (version "1.3.0")
3349 (source
3350 (origin
3351 (method url-fetch)
3352 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
3353 version ".tar.bz2"))
3354 (sha256
3355 (base32
3356 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
3357 (build-system gnu-build-system)
3358 (inputs
3359 `(("perl" ,perl))) ; For "contrib/web/"
3360 (native-inputs
3361 `(("pkg-config" ,pkg-config)))
3362 (arguments
3363 `(#:configure-flags
3364 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
3365 ;; It opens the files control/mimedeny and control/mimestrip to get a list
3366 ;; of mimetypes for parts of multipart/mime messages that should be denied
3367 ;; or stripped. The parts then get stripped directly when the mail is
3368 ;; received. mlmmj-receive-strip also appends an extra header
3369 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
3370 ;; mime parts
3371 (list "--enable-receive-strip")
3372 #:phases
3373 (modify-phases %standard-phases
3374 (add-before 'install 'install-contrib
3375 (lambda* (#:key outputs #:allow-other-keys)
3376 (let* ((out (assoc-ref outputs "out"))
3377 (share (string-append out "/share/mlmmj"))
3378 (contrib (string-append share "/contrib/web"))
3379 (texts (string-append share "/listtexts")))
3380 (copy-recursively "contrib/web/" contrib)
3381 (copy-recursively "listtexts" texts)
3382 (rename-file texts (string-append share "/texts"))
3383 #t))))))
3384 (home-page "http://mlmmj.org")
3385 (synopsis "Mailing list managing made joyful")
3386 (description
3387 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
3388 It works with many different Mail Transport Agents (MTAs) and is simple for a
3389 system administrator to install, configure and integrate with other software.
3390 As it uses very few resources, and requires no daemons, it is ideal for
3391 installation on systems where resources are limited. Its features include:
3392 @enumerate
3393 @item Archive, Custom headers / footer,
3394 @item Fully automated bounce handling (similar to ezmlm),
3395 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
3396 @item Subscribers only posting, Regular expression access control,
3397 @item Functionality to retrieve old posts, Web interface, Digests,
3398 @item No-mail subscription, VERP support,
3399 @item Delivery Status Notification (RFC1891) support,
3400 @item Rich and customisable texts for automated operations.
3401 @end enumerate\n")
3402 (license license:expat)))
3403
3404 (define-public python-django-mailman3
3405 (package
3406 (name "python-django-mailman3")
3407 (version "1.3.4")
3408 (source
3409 (origin
3410 (method url-fetch)
3411 (uri (pypi-uri "django-mailman3" version))
3412 (sha256
3413 (base32
3414 "1yrm7wpjy34xai72vn2vkhc9131cdrbqy08rrabf36kynj5vcdvy"))))
3415 (build-system python-build-system)
3416 (arguments
3417 '(#:phases
3418 (modify-phases %standard-phases
3419 (replace 'check
3420 (lambda _
3421 (setenv "DJANGO_SETTINGS_MODULE"
3422 "django_mailman3.tests.settings_test")
3423 (invoke "django-admin" "test"
3424 "--pythonpath=."))))))
3425 (propagated-inputs
3426 `(("python-django" ,python-django)
3427 ("python-django-allauth" ,python-django-allauth)
3428 ("python-django-gravatar2" ,python-django-gravatar2)
3429 ("python-mailmanclient" ,python-mailmanclient)
3430 ("python-pytz" ,python-pytz)))
3431 (native-inputs
3432 `(("python-mock" ,python-mock)))
3433 (home-page "https://gitlab.com/mailman/django-mailman3")
3434 (synopsis "Django library to help interaction with Mailman")
3435 (description
3436 "This package contains libraries and templates for Django-based interfaces
3437 interacting with Mailman.")
3438 (license license:gpl3+)))
3439
3440 (define-public python-mailman-hyperkitty
3441 (package
3442 (name "python-mailman-hyperkitty")
3443 (version "1.1.0")
3444 (source
3445 (origin
3446 (method url-fetch)
3447 (uri (pypi-uri "mailman-hyperkitty" version))
3448 (sha256
3449 (base32
3450 "1lfqa9admhvdv71f528jmz2wl0i5cv77v6l64px2pm4zqr9ckkjx"))
3451 (patches
3452 (list
3453 (origin
3454 ;; see: https://gitlab.com/mailman/mailman-hyperkitty/issues/17
3455 ;; fixes test_archive_message_unserializable
3456 (method url-fetch)
3457 (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")
3458 (sha256
3459 (base32
3460 "0p1fwm46c4bl81lvsg3kjhn2r1lwgkpgxamb3xyqn7h9qdrw10hw")))))))
3461 (build-system python-build-system)
3462 (propagated-inputs
3463 `(("python-requests" ,python-requests)
3464 ("python-zope-interface" ,python-zope-interface)))
3465 (inputs
3466 `(("mailman" ,mailman)))
3467 (native-inputs
3468 `(("python-mock" ,python-mock)
3469 ("python-nose" ,python-nose)
3470 ("python-nose2" ,python-nose2)))
3471 (home-page "https://gitlab.com/mailman/mailman-hyperkitty/")
3472 (synopsis "Mailman archiver plugin for HyperKitty")
3473 (description
3474 "Mailman3 allows emails sent to its mailing lists to be archived by any
3475 software provided that there is a plugin (loadable by Mailman3) designed to
3476 communicate with it properly. This module contains a Mailman3 archiver plugin
3477 which sends emails to HyperKitty, the official Mailman3 web archiver.")
3478 (license license:gpl3+)))
3479
3480 (define-public python-hyperkitty
3481 (package
3482 (name "python-hyperkitty")
3483 (version "1.3.3")
3484 (source
3485 (origin
3486 (method url-fetch)
3487 (uri (pypi-uri "HyperKitty" version))
3488 (sha256
3489 (base32
3490 "0p85r9q6mn5as5b39xp9hkkipnk0156acx540n2ygk3qb3jd4a5n"))))
3491 (build-system python-build-system)
3492 (arguments
3493 '(#:phases
3494 (modify-phases %standard-phases
3495 (replace 'check
3496 (lambda _
3497 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
3498 (invoke "example_project/manage.py" "test"
3499 "--settings=hyperkitty.tests.settings_test"))))))
3500 (propagated-inputs
3501 `(("python-dateutil" ,python-dateutil)
3502 ("python-django" ,python-django-2.2)
3503 ("python-django-compressor" ,python-django-compressor)
3504 ("python-django-extensions" ,python-django-extensions)
3505 ("python-django-gravatar2" ,python-django-gravatar2)
3506 ("python-django-haystack" ,python-django-haystack)
3507 ("python-django-mailman3" ,python-django-mailman3)
3508 ("python-django-q" ,python-django-q)
3509 ("python-djangorestframework" ,python-djangorestframework)
3510 ("python-flufl-lock" ,python-flufl-lock)
3511 ("python-mailmanclient" ,python-mailmanclient)
3512 ("python-networkx" ,python-networkx)
3513 ("python-pytz" ,python-pytz)
3514 ("python-robot-detection" ,python-robot-detection)))
3515 (native-inputs
3516 `(("python-beautifulsoup4" ,python-beautifulsoup4)
3517 ("python-elasticsearch" ,python-elasticsearch)
3518 ("python-isort" ,python-isort)
3519 ("python-mock" ,python-mock)
3520 ("python-whoosh" ,python-whoosh)))
3521 (home-page "https://gitlab.com/mailman/hyperkitty")
3522 (synopsis "Web interface to access GNU Mailman v3 archives")
3523 (description
3524 "The hyperkitty Django app provides a web user interface to access GNU
3525 Mailman3 archives, and manage it. This interface uses django, and requires
3526 some configuration.")
3527 (license license:gpl3))) ; Some files are gpl2+
3528
3529 (define-public postorius
3530 (package
3531 (name "postorius")
3532 (version "1.3.3")
3533 (source
3534 (origin
3535 (method url-fetch)
3536 (uri (pypi-uri "postorius" version))
3537 (sha256
3538 (base32
3539 "08jn23gblbkfl09qlykbpsmp39mmach3sl69h1j5cd5kkx839rwa"))))
3540 (build-system python-build-system)
3541 (arguments
3542 '(#:phases
3543 (modify-phases %standard-phases
3544 (replace 'check
3545 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3546 (add-installed-pythonpath inputs outputs)
3547 (if tests?
3548 (invoke "python" "example_project/manage.py" "test"
3549 "--settings=test_settings" "postorius")
3550 #t))))
3551 #:tests? #f)) ; Tests try to run a mailman instance to test against.
3552 (inputs
3553 `(("python-django" ,python-django)
3554 ("python-django-mailman3" ,python-django-mailman3)
3555 ("python-mailmanclient" ,python-mailmanclient)
3556 ("python-readme-renderer" ,python-readme-renderer)))
3557 (native-inputs
3558 `(("python-beautifulsoup4" ,python-beautifulsoup4)
3559 ("python-isort" ,python-isort)
3560 ("python-mock" ,python-mock)
3561 ("python-vcrpy" ,python-vcrpy)))
3562 (home-page "https://gitlab.com/mailman/postorius")
3563 (synopsis "Web user interface for GNU Mailman")
3564 (description
3565 "Postorius is a Django app which provides a web user interface
3566 to access GNU Mailman.")
3567 (license (list license:gpl3+ license:lgpl3+))))
3568
3569 (define-public blists
3570 (package
3571 (name "blists")
3572 (version "2.0")
3573 (source
3574 (origin
3575 (method url-fetch)
3576 (uri (string-append "http://download.openwall.net/pub/projects/"
3577 "blists/blists-" version ".tar.gz"))
3578 (sha256
3579 (base32
3580 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
3581 (build-system gnu-build-system)
3582 (arguments
3583 `(#:tests? #f ; No tests
3584 #:phases
3585 (modify-phases %standard-phases
3586 (delete 'configure)
3587 (replace 'install
3588 (lambda* (#:key outputs #:allow-other-keys)
3589 (let* ((out (assoc-ref outputs "out"))
3590 (bin (string-append out "/bin")))
3591 (install-file "bindex" bin)
3592 (install-file "bit" bin)
3593 #t))))))
3594 (home-page "http://www.openwall.com/blists/")
3595 (synopsis "Web interface to mailing list archives")
3596 (description
3597 "Blists is a web interface to mailing list archives that works off
3598 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
3599 @code{bindex} generates or updates the index file (incremental updates
3600 are supported). @code{bit} is a CGI/SSI program that generates web pages
3601 on the fly. Both programs are written in C and are very fast.")
3602 (license license:expat)))
3603
3604 (define-public swaks
3605 (package
3606 (name "swaks")
3607 (version "20201014.0")
3608 (source
3609 (origin
3610 (method git-fetch)
3611 (uri (git-reference
3612 (url "https://github.com/jetmore/swaks")
3613 (commit (string-append "v" version))))
3614 (file-name (git-file-name name version))
3615 (sha256
3616 (base32 "131i2b1yxhnbqkfk4kky40pfanqw2c5lcgbnjhfqp5cvpawpk2ai"))))
3617 (build-system perl-build-system)
3618 (inputs
3619 `(("perl-io-socket-inet6" ,perl-io-socket-inet6)
3620 ("perl-net-dns" ,perl-net-dns)
3621 ("perl-net-ssleay" ,perl-net-ssleay)
3622 ("perl-socket6" ,perl-socket6))) ; used by perl-io-socket-inet6
3623 (arguments
3624 `(#:tests? #f ; no tests
3625 #:phases
3626 (modify-phases %standard-phases
3627 (add-after 'unpack 'set-build_version
3628 (lambda _
3629 (substitute* "swaks"
3630 (("\"DEVRELEASE\"") (format #f "\"~a\"" ,version)))
3631 #true))
3632 (delete 'configure)
3633 (replace 'build
3634 (lambda _
3635 (invoke "pod2man" "doc/base.pod" "swaks.1")))
3636 (replace 'install
3637 (lambda* (#:key outputs #:allow-other-keys)
3638 (let ((out (assoc-ref outputs "out")))
3639 (install-file "swaks" (string-append out "/bin"))
3640 (install-file "swaks.1" (string-append out "/share/man/man1")))
3641 #t))
3642 (add-after 'install 'wrap-program
3643 (lambda* (#:key outputs #:allow-other-keys)
3644 (wrap-program (string-append (assoc-ref outputs "out")
3645 "/bin/swaks")
3646 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
3647 #t)))))
3648 (home-page "https://jetmore.org/john/code/swaks/")
3649 (synopsis "Featureful SMTP test tool")
3650 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
3651 test tool. It handles SMTP features and extensions such as TLS,
3652 authentication, and pipelining; multiple versions of the SMTP protocol
3653 including SMTP, ESMTP, and LMTP; and multiple transport methods including
3654 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
3655 Options can be specified in environment variables, configuration files, and
3656 the command line allowing maximum configurability and ease of use for
3657 operators and scripters.")
3658 (license license:gpl2+)))
3659
3660 (define-public alpine
3661 (package
3662 (name "alpine")
3663 (version "2.24")
3664 (source
3665 (origin
3666 (method git-fetch)
3667 ;; There are two versions: the plain continuation of Alpine without extra
3668 ;; patches and the version which adds extra fixes. Every distro uses
3669 ;; the patched version, and so do we to not break expectations.
3670 ;; http://alpine.freeiz.com/alpine/readme/README.patches
3671 (uri (git-reference
3672 (url "http://repo.or.cz/alpine.git")
3673 (commit (string-append "v" version))))
3674 (file-name (git-file-name name version))
3675 (sha256
3676 (base32 "0d5ybnsv29gs8krl66db56avmssq28jlg0qj5i1wka05ncc3740d"))
3677 (modules '((guix build utils)))
3678 (snippet
3679 '(begin
3680 ;; Remove pre-built binaries scattered across the source repository.
3681 (for-each delete-file (find-files "." "\\.(dll|exe)"))
3682 #t))))
3683 (build-system gnu-build-system)
3684 (arguments
3685 `(#:make-flags
3686 (list (string-append "CC=" ,(cc-for-target)))
3687 #:configure-flags (list (string-append "--with-ssl-include-dir="
3688 (assoc-ref %build-inputs "openssl")
3689 "/include/openssl")
3690 (string-append "--with-ssl-dir="
3691 (assoc-ref %build-inputs "openssl"))
3692 (string-append "--with-ssl-certs-dir="
3693 "/etc/ssl/certs/")
3694 (string-append "--with-ssl-lib-dir="
3695 (assoc-ref %build-inputs "openssl")
3696 "/lib")
3697 (string-append "--with-interactive-spellcheck="
3698 (assoc-ref %build-inputs "aspell")
3699 "/bin/aspell")
3700 "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
3701 #:phases
3702 (modify-phases %standard-phases
3703 (add-after 'unpack 'assume-shadow-passwords
3704 ;; Alpine's configure script confuses ‘shadow password support’ with
3705 ;; ‘/etc/shadow exists in the build environment’. It does not.
3706 (lambda _
3707 (substitute* "configure"
3708 (("test -f /etc/shadow") "true"))
3709 #t))
3710 (add-after 'unpack 'make-reproducible
3711 (lambda _
3712 ;; This removes time-dependent code to make alpine reproducible.
3713 (substitute* "pico/blddate.c"
3714 (("%02d-%s-%d") "1970-01-01"))
3715 #t)))))
3716 (inputs
3717 `(("ncurses" ,ncurses)
3718 ("openssl" ,openssl)
3719 ("gnutls" ,gnutls)
3720 ("openldap" ,openldap)
3721 ("cyrus-sasl" ,cyrus-sasl)
3722 ("mit-krb5" ,mit-krb5)
3723 ("aspell" ,aspell)
3724 ("tcl" ,tcl)
3725 ("linux-pam" ,linux-pam)))
3726 (home-page "https://repo.or.cz/alpine.git")
3727 (synopsis "Alternatively Licensed Program for Internet News and Email")
3728 (description
3729 "Alpine is a text-based mail and news client. Alpine includes several
3730 tools and applications:
3731 @enumerate
3732 @item alpine, the Alpine mailer
3733 @item pico, the standalone text editor, GNU nano's predecessor
3734 @item pilot, the standalone file system navigator
3735 @end enumerate\n")
3736 (license license:asl2.0)))
3737
3738 (define-public balsa
3739 (package
3740 (name "balsa")
3741 (version "2.6.2")
3742 (source
3743 (origin
3744 (method url-fetch)
3745 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
3746 "balsa-" version ".tar.bz2"))
3747 (sha256
3748 (base32 "1w0239i01mw4wwwy7xh8gz7zgl5khwvfm5wy35x0swvvax021mai"))))
3749 (build-system gnu-build-system)
3750 (arguments
3751 `(#:configure-flags
3752 '(;; Balsa tries to install additional MIME icons
3753 ;; under gtk+ directory.
3754 "--enable-extra-mimeicons=no"
3755 "--with-gtksourceview"
3756 "--with-canberra"
3757 "--with-spell-checker=gtkspell"
3758 "--with-gpgme"
3759 "--with-sqlite"
3760 "--with-compface"
3761 "--with-ldap")))
3762 (inputs
3763 `(("cyrus-sasl" ,cyrus-sasl)
3764 ("enchant" ,enchant)
3765 ("gdk-pixbuf" ,gdk-pixbuf)
3766 ("gmime" ,gmime)
3767 ("gnutls" ,gnutls)
3768 ("gpgme" ,gpgme)
3769 ("gtk+" ,gtk+)
3770 ("gtksourceview" ,gtksourceview)
3771 ("gtkspell3" ,gtkspell3)
3772 ("libassuan" ,libassuan) ; in gpgme.pc Requires
3773 ("libcanberra" ,libcanberra)
3774 ("libesmtp" ,libesmtp)
3775 ("libical" ,libical)
3776 ("libnotify" ,libnotify)
3777 ("libsecret" ,libsecret)
3778 ("openldap" ,openldap)
3779 ("sqlite" ,sqlite)
3780 ("webkitgtk" ,webkitgtk)))
3781 (native-inputs
3782 `(("compface" ,compface)
3783 ("glib" ,glib "bin")
3784 ("intltool" ,intltool)
3785 ("pkg-config" ,pkg-config)
3786 ("yelp-tools" ,yelp-tools)))
3787 (home-page "https://pawsa.fedorapeople.org/balsa")
3788 (synopsis "E-mail client for GNOME")
3789 (description "Balsa is a highly configurable and robust mail client for
3790 the GNOME desktop. It supports both POP3 and IMAP servers as well as the
3791 mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
3792 the use of a local MTA such as Sendmail.")
3793 (license license:gpl3+)))
3794
3795 (define-public afew
3796 (package
3797 (name "afew")
3798 (version "3.0.1")
3799 (source
3800 (origin
3801 (method url-fetch)
3802 (uri (pypi-uri "afew" version))
3803 (sha256
3804 (base32
3805 "0wpfqbqjlfb9z0hafvdhkm7qw56cr9kfy6n8vb0q42dwlghpz1ff"))))
3806 (build-system python-build-system)
3807 (inputs
3808 `(("notmuch" ,notmuch)
3809 ("python-chardet" ,python-chardet)
3810 ("python-dkimpy" ,python-dkimpy)
3811 ("python-notmuch" ,python-notmuch)))
3812 (native-inputs
3813 `(("python-freezegun" ,python-freezegun)
3814 ("python-setuptools-scm" ,python-setuptools-scm)))
3815 (home-page "https://github.com/afewmail/afew")
3816 (synopsis "Initial tagging script for notmuch mail")
3817 (description "afew is an initial tagging script for notmuch mail. It
3818 provides automatic tagging each time new mail is registered with notmuch. It
3819 can add tags based on email headers or Maildir folders and can handle spam and
3820 killed threads.")
3821 (license license:isc)))
3822
3823 (define-public pan
3824 (package
3825 (name "pan")
3826 (version "0.146")
3827 (source
3828 (origin
3829 (method url-fetch)
3830 (uri (string-append "http://pan.rebelbase.com/download/releases/"
3831 version "/source/" name "-" version ".tar.bz2"))
3832 (sha256
3833 (base32 "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55"))))
3834 (arguments
3835 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
3836 "--enable-libnotify" "--enable-manual"
3837 "--enable-gkr")
3838 #:phases
3839 (modify-phases %standard-phases
3840 (add-before 'configure 'patch-gpg2
3841 (lambda* (#:key inputs #:allow-other-keys)
3842 (substitute* "pan/usenet-utils/gpg.cc"
3843 (("\"gpg2\"") (string-append "\""
3844 (assoc-ref inputs "gnupg")
3845 "/bin/gpg\"")))
3846 #t)))))
3847 (inputs
3848 `(("gmime" ,gmime-2.6)
3849 ("gnupg" ,gnupg)
3850 ("gnutls" ,gnutls)
3851 ("gtk+" ,gtk+)
3852 ("gtkspell3" ,gtkspell3)
3853 ("libnotify" ,libnotify)
3854 ("libsecret" ,libsecret)
3855 ("libxml2" ,libxml2)
3856 ("zlib" ,zlib)))
3857 (native-inputs
3858 `(("gettext-minimal" ,gettext-minimal)
3859 ("itstool" ,itstool)
3860 ("pkg-config" ,pkg-config)))
3861 (build-system gnu-build-system)
3862 (home-page "http://pan.rebelbase.com/")
3863 (synopsis "Pan newsreader")
3864 (description "@code{pan} is a Usenet newsreader that's good at both text
3865 and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
3866 PGP handling, multiple servers, and secure connections.")
3867 ;; License of the docs: fdl-1.1; Others: gpl2.
3868 (license (list license:fdl1.1+ license:gpl2))))
3869
3870 (define-public imapfilter
3871 (package
3872 (name "imapfilter")
3873 (version "2.7.5")
3874 (source
3875 (origin
3876 (method git-fetch)
3877 (uri (git-reference
3878 (url "https://github.com/lefcha/imapfilter")
3879 (commit (string-append "v" version))))
3880 (file-name (git-file-name name version))
3881 (sha256
3882 (base32 "0a7f85r3axwclzw1s79zl2l8222nj2gklvvq33w9qv0dz5n71dcx"))))
3883 (build-system gnu-build-system)
3884 (arguments
3885 `(#:tests? #f
3886 #:make-flags
3887 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3888 (string-append "CC=" ,(cc-for-target)))
3889 #:phases
3890 (modify-phases %standard-phases
3891 (delete 'configure)))) ; no configure script
3892 (inputs
3893 `(("lua" ,lua)
3894 ("pcre2" ,pcre2)
3895 ("openssl" ,openssl)))
3896 (home-page "https://github.com/lefcha/imapfilter")
3897 (synopsis "IMAP mail filtering utility")
3898 (description "IMAPFilter is a mail filtering utility. It connects
3899 to remote mail servers using IMAP, sends searching queries to the server and
3900 processes mailboxes based on the results. It can be used to delete, copy,
3901 move, flag, etc. messages residing in mailboxes at the same or different mail
3902 servers. The 4rev1 and 4 versions of IMAP are supported.")
3903 (license license:expat)))
3904
3905 (define-public urlscan
3906 (package
3907 (name "urlscan")
3908 (version "0.9.6")
3909 (source
3910 (origin
3911 (method url-fetch)
3912 (uri (pypi-uri "urlscan" version))
3913 (sha256
3914 (base32 "09lxi7dhn49fpb3ij4cgrhj3qqqqs9rcxbjb7p9smw5wblrqpzga"))))
3915 (build-system python-build-system)
3916 (propagated-inputs
3917 `(("python-urwid" ,python-urwid)))
3918 (home-page "https://github.com/firecat53/urlscan")
3919 (synopsis "View/select the URLs in an email message or file")
3920 (description
3921 "Urlscan is a small program that is designed to integrate with the
3922 Mutt mail reader to allow you to easily launch a Web browser for URLs
3923 contained in email messages. It parses an email message or file and scans it
3924 for URLs and email addresses. It then displays the URLs and their context
3925 within the message, and allows you to choose one or more URLs to send to your
3926 Web browser. Alternatively, it send a list of all URLs to standard output.
3927 It is a replacement for the @command{urlview} program.")
3928 (license license:gpl2)))
3929
3930 (define-public tnef
3931 (package
3932 (name "tnef")
3933 (version "1.4.18")
3934 (source
3935 (origin
3936 (method git-fetch)
3937 (uri (git-reference
3938 (url "https://github.com/verdammelt/tnef")
3939 (commit version)))
3940 (sha256
3941 (base32 "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"))
3942 (file-name (git-file-name name version))))
3943 (build-system gnu-build-system)
3944 (native-inputs
3945 `(("autoconf" ,autoconf)
3946 ("automake" ,automake)))
3947 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
3948 (home-page "https://github.com/verdammelt/tnef")
3949 (synopsis "Unpack @code{application/ms-tnef} attachments")
3950 (description
3951 "TNEF is a tar-like program that unpacks MIME attachments of type
3952 @code{application/ms-tnef}.")
3953 (license license:gpl2+)))
3954
3955 (define-public mumi
3956 (let ((commit "9f070bd90adc67064cd8aff4e40f303d5957ef4a")
3957 (revision "5"))
3958 (package
3959 (name "mumi")
3960 (version (git-version "0.0.1" revision commit))
3961 (source (origin
3962 (method git-fetch)
3963 (uri (git-reference
3964 (url "https://git.elephly.net/software/mumi.git")
3965 (commit commit)))
3966 (file-name (git-file-name name version))
3967 (sha256
3968 (base32
3969 "1ym1j3nzy8qhd1ydadccbgm0nckkmnq3vnz9qh9x8rasx7zg1ldp"))))
3970 (build-system gnu-build-system)
3971 (arguments
3972 `(#:modules ((guix build gnu-build-system)
3973 ((guix build guile-build-system)
3974 #:select (target-guile-effective-version))
3975 (guix build utils))
3976 #:imported-modules ((guix build guile-build-system)
3977 ,@%gnu-build-system-modules)
3978
3979 #:configure-flags '("--localstatedir=/var")
3980
3981 #:phases
3982 (modify-phases %standard-phases
3983 (add-after 'install 'wrap-executable
3984 (lambda* (#:key outputs #:allow-other-keys)
3985 (let* ((out (assoc-ref outputs "out"))
3986 (bin (string-append out "/bin"))
3987 (version (target-guile-effective-version))
3988 (scm (string-append out "/share/guile/site/" version))
3989 (go (string-append out "/lib/guile/" version
3990 "/site-ccache")))
3991 (wrap-program (string-append bin "/mumi")
3992 `("GUILE_LOAD_PATH" ":" prefix
3993 (,scm ,(getenv "GUILE_LOAD_PATH")))
3994 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
3995 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
3996 #t))))))
3997 (inputs
3998 `(("guile-email" ,guile-email-latest)
3999 ("guile-fibers" ,guile-fibers)
4000 ("guile-gcrypt" ,guile-gcrypt)
4001 ("guile-json" ,guile-json-3)
4002 ("guile-redis" ,guile-redis)
4003 ("guile-syntax-highlight" ,guile-syntax-highlight)
4004 ("guile-webutils" ,guile-webutils)
4005 ("guile-xapian" ,guile-xapian)
4006 ("guile" ,guile-3.0)
4007 ("mailutils" ,mailutils)))
4008 (native-inputs
4009 `(("autoconf" ,autoconf)
4010 ("automake" ,automake)
4011 ("pkg-config" ,pkg-config)))
4012 (home-page "https://git.elephly.net/software/mumi.git")
4013 (synopsis "Debbugs web interface")
4014 (description "Mumi is a Debbugs web interface.")
4015 (license license:agpl3+))))
4016
4017 (define-public ytnef
4018 (package
4019 (name "ytnef")
4020 (version "1.9.3")
4021 (source (origin
4022 (method git-fetch)
4023 (uri (git-reference
4024 (url "https://github.com/Yeraze/ytnef")
4025 (commit (string-append "v" version))))
4026 (file-name (git-file-name name version))
4027 (sha256
4028 (base32
4029 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))
4030 (patches (search-patches "ytnef-CVE-2021-3403.patch"
4031 "ytnef-CVE-2021-3404.patch"))))
4032 (build-system gnu-build-system)
4033 (native-inputs
4034 `(("autoconf" ,autoconf)
4035 ("automake" ,automake)
4036 ("libtool" ,libtool)))
4037 (home-page "https://github.com/Yeraze/ytnef/")
4038 (synopsis "TNEF stream reader for winmail.dat files")
4039 (description "This package provides a TNEF stream reader library and
4040 related tools to process winmail.dat files.")
4041 (license license:gpl2+)))
4042
4043 (define-public l2md
4044 ;; No official release.
4045 (let ((commit "f7286b49bb5fce25c898c143712fe34ad4d7864e")
4046 (revision "1"))
4047 (package
4048 (name "l2md")
4049 (version (git-version "0.1.0" revision commit))
4050 (source
4051 (origin
4052 (method git-fetch)
4053 (uri (git-reference
4054 (url "https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git")
4055 (commit commit)))
4056 (file-name (git-file-name name version))
4057 (sha256
4058 (base32 "0hxz8i70v1xgv30zjclfvmjqszn073c7i8nwmswi2lr6vd7cklvp"))))
4059 (build-system gnu-build-system)
4060 (inputs
4061 `(("libgit2" ,libgit2)))
4062 (arguments
4063 `(#:phases
4064 (modify-phases %standard-phases
4065 (delete 'configure) ;no configure scripts
4066 (delete 'check) ;no tests
4067 (add-before 'install 'mkdir
4068 (lambda* (#:key outputs #:allow-other-keys)
4069 (let ((l2md (string-append (assoc-ref outputs "out") "/bin")))
4070 (mkdir-p l2md)))))
4071 #:make-flags
4072 (list ,(string-append "CC=" (cc-for-target))
4073 (string-append "PREFIX=" %output "/bin"))))
4074 (home-page
4075 "https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git")
4076 (synopsis "Import public-inbox archives via Git")
4077 (description
4078 "The @command{l2md} command line tool imports public-inbox archives via
4079 Git and exports them in maildir format or to an MDA through a pipe.")
4080 (license license:gpl2))))
4081
4082 (define-public public-inbox
4083 (package
4084 (name "public-inbox")
4085 (version "1.5.0")
4086 (source
4087 (origin (method git-fetch)
4088 (uri (git-reference
4089 (url "https://public-inbox.org")
4090 (commit (string-append "v" version))))
4091 (sha256
4092 (base32
4093 "03zj7shdl3vibs7k5lr673bwcf8j1xx8is3mjz34ca4cdh6p5j2k"))
4094 (file-name (git-file-name name version))))
4095 (build-system perl-build-system)
4096 (arguments
4097 '(#:phases
4098 (modify-phases %standard-phases
4099 (add-before 'configure 'qualify-paths
4100 (lambda _
4101 ;; Use absolute paths for 'xapian-compact'.
4102 (let ((xapian-compact (which "xapian-compact")))
4103 (substitute* "script/public-inbox-compact"
4104 (("xapian-compact") xapian-compact)))
4105 #t))
4106 (add-before 'check 'pre-check
4107 (lambda _
4108 (substitute* "t/spawn.t"
4109 (("\\['env'\\]") (string-append "['" (which "env") "']")))
4110 (substitute* "t/ds-leak.t"
4111 (("/bin/sh") (which "sh")))
4112 (invoke "./certs/create-certs.perl")
4113 ;; XXX: This test fails due to zombie process is not reaped by
4114 ;; the builder.
4115 (substitute* "t/httpd-unix.t"
4116 (("^SKIP: \\{") "SKIP: { skip('Guix');"))
4117 #t))
4118 (add-after 'install 'wrap-programs
4119 (lambda* (#:key inputs outputs #:allow-other-keys)
4120 (let ((out (assoc-ref outputs "out")))
4121 (for-each
4122 (lambda (prog)
4123 (wrap-program prog
4124 ;; Let those scripts find their perl modules.
4125 `("PERL5LIB" ":" prefix
4126 (,(string-append out "/lib/perl5/site_perl")
4127 ,(getenv "PERL5LIB")))
4128 ;; 'git' is invoked in various files of the PublicInbox
4129 ;; perl module.
4130 `("PATH" ":" prefix
4131 (,(string-append (assoc-ref inputs "git") "/bin")))))
4132 (find-files (string-append out "/bin"))))
4133 #t)))))
4134 (native-inputs
4135 `(("xapian" ,xapian)
4136 ;; For testing.
4137 ("lsof" ,lsof)
4138 ("openssl" ,openssl)))
4139 (inputs
4140 `(("git" ,git)
4141 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
4142 ("perl-dbi" ,perl-dbi)
4143 ("perl-email-address-xs" ,perl-email-address-xs)
4144 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
4145 ("perl-email-mime" ,perl-email-mime)
4146 ("perl-email-simple" ,perl-email-simple)
4147 ("perl-net-server" ,perl-net-server)
4148 ("perl-filesys-notify-simple" ,perl-filesys-notify-simple)
4149 ("perl-plack-middleware-deflater" ,perl-plack-middleware-deflater)
4150 ("perl-plack-middleware-reverseproxy" ,perl-plack-middleware-reverseproxy)
4151 ("perl-plack" ,perl-plack)
4152 ("perl-search-xapian" ,perl-search-xapian)
4153 ("perl-timedate" ,perl-timedate)
4154 ("perl-uri-escape" ,perl-uri-escape)
4155 ;; For testing.
4156 ("perl-ipc-run" ,perl-ipc-run)
4157 ("perl-xml-feed" ,perl-xml-feed)))
4158 (home-page "https://public-inbox.org/README.html")
4159 (synopsis "Archive mailing lists in git repositories")
4160 (description
4161 "public-inbox implements the sharing of an email inbox via git to
4162 complement or replace traditional mailing lists. Readers may read via NNTP,
4163 Atom feeds or HTML archives.")
4164 (license license:agpl3+)))
4165
4166 (define-public sylpheed
4167 (package
4168 (name "sylpheed")
4169 (version "3.7.0")
4170 (source (origin
4171 (method url-fetch)
4172 (uri (string-append "https://sylpheed.sraoss.jp/sylpheed/v3.7/"
4173 name "-" version ".tar.xz"))
4174 (sha256
4175 (base32
4176 "0j9y5vdzch251s264diw9clrn88dn20bqqkwfmis9l7m8vmwasqd"))))
4177 (build-system gnu-build-system)
4178 (native-inputs
4179 `(("pkg-config" ,pkg-config)))
4180 (inputs
4181 `(("bogofilter" ,bogofilter)
4182 ("compface" ,compface)
4183 ("gnupg" ,gnupg-1)
4184 ("gpgme" ,gpgme)
4185 ("gtk+-2.0" ,gtk+-2)
4186 ("gtkspell" ,gtkspell3)
4187 ("libnsl" ,libnsl)
4188 ("openldap" ,openldap)
4189 ("openssl" ,openssl)))
4190 (home-page "https://sylpheed.sraoss.jp/en/")
4191 (synopsis "Lightweight GTK+ email client")
4192 (description
4193 "Sylpheed is a simple, lightweight but featureful, and easy-to-use e-mail
4194 client. Sylpheed provides intuitive user-interface. Sylpheed is also
4195 designed for keyboard-oriented operation.")
4196 (license license:gpl2+)))
4197
4198 (define-public python-authres
4199 (package
4200 (name "python-authres")
4201 (version "1.2.0")
4202 (source
4203 (origin
4204 (method url-fetch)
4205 (uri (pypi-uri "authres" version))
4206 (sha256
4207 (base32
4208 "1dr5zpqnb54h4f5ax8334l1dcp8j9083d7v4vdi1xqkwmnavklck"))))
4209 (build-system python-build-system)
4210 (arguments
4211 '(#:phases
4212 (modify-phases %standard-phases
4213 (replace 'check
4214 ;; Run doctests as described in the README.
4215 (lambda _
4216 (invoke "python" "-m" "authres" "-v"))))))
4217 (home-page "https://launchpad.net/authentication-results-python")
4218 (synopsis "Authentication-Results email header creator and parser")
4219 (description
4220 "This Python module can be used to generate and parse RFC 5451/7001/7601
4221 @code{Authentication-Results} email headers. It supports extensions such as:
4222 @itemize
4223 @item RFC 5617 DKIM/ADSP
4224 @item RFC 6008 DKIM signature identification (@code{header.b})
4225 @item RFC 6212 @acronym{VBR, Vouch By Reference}
4226 @item RFC 6577 @acronym{SPF, Sender Policy Framework}
4227 @item RFC 7281 @code{Authentication-Results} registration for S/MIME
4228 @item RFC 7293 The @code{Require-Recipient-Valid-Since} header field
4229 @item RFC 7489 @acronym{DMARC, Domain-based Message Authentication Reporting
4230 and Conformance}
4231 @item @acronym{ARC, Authenticated Received Chain}
4232 (draft-ietf-dmarc-arc-protocol-08)
4233 @end itemize\n")
4234 (license license:asl2.0)))
4235
4236 (define-public python-dkimpy
4237 (package
4238 (name "python-dkimpy")
4239 (version "1.0.5")
4240 (source
4241 (origin
4242 (method url-fetch)
4243 (uri (pypi-uri "dkimpy" version))
4244 (sha256
4245 (base32 "088iz5cqjqh4c7141d94pvn13bh25aizqlrifwv6fs5g16zj094s"))))
4246 (build-system python-build-system)
4247 (arguments
4248 '(#:phases
4249 (modify-phases %standard-phases
4250 (add-after 'patch-source-shebangs 'patch-more-source
4251 (lambda* (#:key inputs #:allow-other-keys)
4252 (let ((openssl (assoc-ref inputs "openssl")))
4253 (substitute* "dkim/dknewkey.py"
4254 (("/usr/bin/openssl") (string-append openssl "/bin/openssl"))))
4255 #t))
4256 (replace 'check
4257 (lambda _
4258 (invoke "python" "test.py"))))))
4259 (propagated-inputs
4260 `(("python-dnspython" ,python-dnspython)))
4261 (native-inputs
4262 `(("python-authres" ,python-authres)
4263 ("python-pynacl" ,python-pynacl)))
4264 (inputs
4265 `(("openssl" ,openssl)))
4266 (home-page "https://launchpad.net/dkimpy")
4267 (synopsis "DKIM (DomainKeys Identified Mail)")
4268 (description "Python module that implements @dfn{DKIM} (DomainKeys
4269 Identified Mail) email signing and verification (RFC6376). It also provides
4270 helper scripts for command line signing and verification. It supports DKIM
4271 signing/verifying of ed25519-sha256 signatures (RFC 8463). It also supports
4272 the RFC 8617 Authenticated Received Chain (ARC) protocol.")
4273 (license license:bsd-3)))
4274
4275 (define-public python-authheaders
4276 (package
4277 (name "python-authheaders")
4278 (version "0.13.0")
4279 (source
4280 (origin
4281 (method url-fetch)
4282 (uri (pypi-uri "authheaders" version))
4283 (sha256
4284 (base32
4285 "14k6i72k5f8dyvps8vc0aq0cczc8lvqpgjfjzsy6qqychjvjcmwk"))))
4286 (build-system python-build-system)
4287 (propagated-inputs
4288 `(("python-authres" ,python-authres)
4289 ("python-dkimpy" ,python-dkimpy)
4290 ("python-dnspython" ,python-dnspython)
4291 ("python-publicsuffix2" ,python-publicsuffix2)))
4292 (home-page "https://github.com/ValiMail/authentication-headers")
4293 (synopsis "Library wrapping email authentication header verification and generation")
4294 (description
4295 "This is a Python library for the generation of email authentication
4296 headers. The library can perform DKIM, SPF, and DMARC validation, and the
4297 results are packaged into the Authentication-Results header. The library can
4298 DKIM and ARC sign messages and output the corresponding signature headers.")
4299 ;; The package's metadata claims it were MIT licensed, but the source file
4300 ;; headers disagree. MPL-2 for the public suffix list.
4301 (license (list license:zpl2.1 license:zlib license:mpl2.0))))
4302
4303 (define-public python-aiosmtpd
4304 (package
4305 (name "python-aiosmtpd")
4306 (version "1.2.2")
4307 (source
4308 (origin
4309 (method git-fetch)
4310 (uri (git-reference
4311 (url "https://github.com/aio-libs/aiosmtpd")
4312 (commit version)))
4313 (sha256
4314 (base32 "0083d6nf75xv8nq1il6jabz36v6c452svy4p402csxwwih5pw6sk"))
4315 (file-name (git-file-name name version))))
4316 (build-system python-build-system)
4317 (arguments
4318 '(#:phases
4319 (modify-phases %standard-phases
4320 (add-after 'unpack 'delete-failing-tests
4321 (lambda _
4322 ;; This test uses an expired certificate.
4323 (delete-file "aiosmtpd/tests/test_smtps.py")
4324 #t))
4325 (replace 'check
4326 (lambda _
4327 (invoke "python" "-m" "nose2" "-v"))))))
4328 (native-inputs
4329 `(("python-flufl-testing" ,python-flufl-testing)
4330 ("python-nose2" ,python-nose2)))
4331 (propagated-inputs
4332 `(("python-atpublic" ,python-atpublic)))
4333 (home-page "https://aiosmtpd.readthedocs.io/")
4334 (synopsis "Asyncio based SMTP server")
4335 (description
4336 "This project is a reimplementation of the Python stdlib @code{smtpd.py}
4337 based on asyncio.")
4338 (license (list license:asl2.0
4339 license:lgpl3)))) ; only for setup_helpers.py
4340
4341 (define-public rspamd
4342 (package
4343 (name "rspamd")
4344 (version "2.7")
4345 (source
4346 (origin
4347 (method git-fetch)
4348 (uri (git-reference
4349 (url "https://github.com/rspamd/rspamd")
4350 (commit version)))
4351 (sha256
4352 (base32 "0fw6nbfc3xqapzq5nydakwgpw6cz6vb3qby2aqlr06lzf87d3hic"))
4353 (file-name (git-file-name name version))))
4354 (build-system cmake-build-system)
4355 (arguments
4356 '(#:configure-flags '("-DENABLE_LUAJIT=ON")))
4357 (inputs
4358 `(("openssl" ,openssl)
4359 ("glib" ,glib)
4360 ("ragel" ,ragel)
4361 ("luajit" ,luajit)
4362 ("sqlite" ,sqlite)
4363 ("file" ,file)
4364 ("icu4c" ,icu4c)
4365 ("pcre" ,pcre)
4366 ("zlib" ,zlib)
4367 ("perl" ,perl)
4368 ("libsodium" ,libsodium)))
4369 (native-inputs
4370 `(("pkg-config" ,pkg-config)))
4371 (synopsis "Spam filtering system")
4372 (description "Rspamd is an advanced spam filtering system that
4373 allows evaluation of messages by a number of rules including regular
4374 expressions, statistical analysis and custom services such as URL
4375 black lists. Each message is analysed by Rspamd and given a spam
4376 score.")
4377 (home-page "https://www.rspamd.com/")
4378 (license license:asl2.0)))
4379
4380 (define-public crm114
4381 (package
4382 (name "crm114")
4383 (version "20100106")
4384 (source
4385 (origin
4386 (method url-fetch)
4387 (uri (string-append "http://crm114.sourceforge.net/tarballs/crm114-"
4388 version "-BlameMichelson.src.tar.gz"))
4389 (sha256
4390 (base32
4391 "0awcjc5j2mclkkpbjyijj9mv8xjz3haljvaj0fyc4fm4xir68qpv"))))
4392 (build-system gnu-build-system)
4393 (arguments
4394 `(#:modules ((guix build gnu-build-system)
4395 ((guix build emacs-build-system) #:prefix emacs:)
4396 (guix build utils)
4397 (ice-9 string-fun))
4398 #:imported-modules (,@%gnu-build-system-modules
4399 (guix build emacs-build-system)
4400 (guix build emacs-utils))
4401 #:make-flags (list (string-append "prefix=" %output)
4402 "LDFLAGS=") ; disable static linking
4403 ;; Test suite is not fully automated. It requires a human to read the
4404 ;; results and determine if the tests have passed.
4405 #:tests? #f
4406 #:phases
4407 (modify-phases %standard-phases
4408 (delete 'configure)
4409 (add-before 'build 'fix-build
4410 (lambda _
4411 ;; Inline functions can only be used from the same compilation
4412 ;; unit. This causes the build to fail.
4413 (substitute* "crm_svm_matrix.c"
4414 (("^inline ") ""))))
4415 (add-before 'install 'pre-install
4416 (lambda* (#:key outputs #:allow-other-keys)
4417 (let ((out (assoc-ref outputs "out")))
4418 ;; Install maillib.crm library.
4419 (install-file "maillib.crm" (string-append out "/share/crm"))
4420 ;; Set absolute store paths.
4421 (substitute* "mailreaver.crm"
4422 (("insert maillib.crm")
4423 (string-append "insert " out "/share/crm/maillib.crm"))
4424 (("\\\\/bin\\\\/ls")
4425 (string-replace-substring (which "ls") "/" "\\/"))
4426 ((":\\*:trainer_invoke_command:")
4427 (string-append out "/bin/mailtrainer.crm")))
4428 ;; Install mail related crm scripts.
4429 (for-each (lambda (file)
4430 (install-file file (string-append out "/bin")))
4431 (list "mailfilter.crm" "mailreaver.crm" "mailtrainer.crm"))
4432 ;; Create emacs site-lisp directory so that the install phase
4433 ;; can install crm-mode.
4434 (mkdir-p (string-append out "/share/emacs/site-lisp")))))
4435 ;; Run phases from the emacs build system.
4436 (add-after 'install 'make-autoloads
4437 (assoc-ref emacs:%standard-phases 'make-autoloads))
4438 (add-after 'make-autoloads 'enable-autoloads-compilation
4439 (assoc-ref emacs:%standard-phases 'enable-autoloads-compilation))
4440 (add-after 'enable-autoloads-compilation 'emacs-build
4441 (assoc-ref emacs:%standard-phases 'build))
4442 (add-after 'emacs-build 'validate-compiled-autoloads
4443 (assoc-ref emacs:%standard-phases 'validate-compiled-autoloads)))))
4444 (inputs
4445 `(("tre" ,tre)))
4446 (native-inputs
4447 `(("emacs" ,emacs-minimal)))
4448 (home-page "http://crm114.sourceforge.net/")
4449 (synopsis "Controllable regex mutilator")
4450 (description "CRM114 is a system to examine incoming e-mail, system log
4451 streams, data files or other data streams, and to sort, filter, or alter the
4452 incoming files or data streams according to the user's wildest desires.
4453 Criteria for categorization of data can be via a host of methods, including
4454 regexes, approximate regexes, a Hidden Markov Model, Orthogonal Sparse
4455 Bigrams, WINNOW, Correllation, KNN/Hyperspace, or Bit Entropy (or by other
4456 means--it's all programmable).")
4457 (license license:gpl3)))