1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 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, 2022 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2016 Christine Lemmer-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–2022 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–2022 Tobias Geerinckx-Rice <me@tobias.gr>
26 ;;; Copyright © 2017, 2018, 2020 Rene Saavedra <pacoon@protonmail.com>
27 ;;; Copyright © 2018, 2019, 2020, 2021, 2022 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, 2022 Ricardo Wurmus <rekado@elephly.net>
31 ;;; Copyright © 2019–2022 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, 2021, 2022 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 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
46 ;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
47 ;;; Copyright © 2022 Andrew Tropin <andrew@trop.in>
48 ;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li>
49 ;;; Copyright © 2022 Thiago Jung Bauermann <bauermann@kolabnow.com>
50 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
51 ;;; Copyright © 2022 muradm <mail@muradm.net>
52 ;;; Copyright © 2022 jgart <jgart@dismail.de>
54 ;;; This file is part of GNU Guix.
56 ;;; GNU Guix is free software; you can redistribute it and/or modify it
57 ;;; under the terms of the GNU General Public License as published by
58 ;;; the Free Software Foundation; either version 3 of the License, or (at
59 ;;; your option) any later version.
61 ;;; GNU Guix is distributed in the hope that it will be useful, but
62 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
63 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64 ;;; GNU General Public License for more details.
66 ;;; You should have received a copy of the GNU General Public License
67 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
69 (define-module (gnu packages mail)
70 #:use-module (guix gexp)
71 #:use-module (guix utils)
72 #:use-module (gnu packages)
73 #:use-module (gnu packages admin)
74 #:use-module (gnu packages aspell)
75 #:use-module (gnu packages autotools)
76 #:use-module (gnu packages backup)
77 #:use-module (gnu packages base)
78 #:use-module (gnu packages bash)
79 #:use-module (gnu packages bison)
80 #:use-module (gnu packages boost)
81 #:use-module (gnu packages calendar)
82 #:use-module (gnu packages check)
83 #:use-module (gnu packages compression)
84 #:use-module (gnu packages crypto)
85 #:use-module (gnu packages curl)
86 #:use-module (gnu packages cyrus-sasl)
87 #:use-module (gnu packages databases)
88 #:use-module (gnu packages dbm)
89 #:use-module (gnu packages dejagnu)
90 #:use-module (gnu packages django)
91 #:use-module (gnu packages dns)
92 #:use-module (gnu packages docbook)
93 #:use-module (gnu packages docker)
94 #:use-module (gnu packages documentation)
95 #:use-module (gnu packages emacs)
96 #:use-module (gnu packages enchant)
97 #:use-module (gnu packages file)
98 #:use-module (gnu packages fontutils)
99 #:use-module (gnu packages freedesktop)
100 #:use-module (gnu packages gawk)
101 #:use-module (gnu packages gdb)
102 #:use-module (gnu packages gettext)
103 #:use-module (gnu packages ghostscript)
104 #:use-module (gnu packages glib)
105 #:use-module (gnu packages golang)
106 #:use-module (gnu packages gnome)
107 #:use-module (gnu packages gnupg)
108 #:use-module (gnu packages groff)
109 #:use-module (gnu packages gsasl)
110 #:use-module (gnu packages gtk)
111 #:use-module (gnu packages guile)
112 #:use-module (gnu packages guile-xyz)
113 #:use-module (gnu packages flex)
114 #:use-module (gnu packages haskell-xyz)
115 #:use-module (gnu packages icu4c)
116 #:use-module (gnu packages kerberos)
117 #:use-module (gnu packages language)
118 #:use-module (gnu packages libcanberra)
119 #:use-module (gnu packages libevent)
120 #:use-module (gnu packages libffi)
121 #:use-module (gnu packages libidn)
122 #:use-module (gnu packages libunistring)
123 #:use-module (gnu packages libunwind)
124 #:use-module (gnu packages linux)
125 #:use-module (gnu packages lsof)
126 #:use-module (gnu packages lua)
127 #:use-module (gnu packages m4)
128 #:use-module (gnu packages man)
129 #:use-module (gnu packages mercury)
130 #:use-module (gnu packages ncurses)
131 #:use-module (gnu packages nettle)
132 #:use-module (gnu packages networking)
133 #:use-module (gnu packages ninja)
134 #:use-module (gnu packages openldap)
135 #:use-module (gnu packages onc-rpc)
136 #:use-module (gnu packages pcre)
137 #:use-module (gnu packages pdf)
138 #:use-module (gnu packages perl)
139 #:use-module (gnu packages perl-check)
140 #:use-module (gnu packages perl-web)
141 #:use-module (gnu packages pkg-config)
142 #:use-module (gnu packages protobuf)
143 #:use-module (gnu packages python)
144 #:use-module (gnu packages python-build)
145 #:use-module (gnu packages python-check)
146 #:use-module (gnu packages python-crypto)
147 #:use-module (gnu packages python-web)
148 #:use-module (gnu packages python-xyz)
149 #:use-module (gnu packages ragel)
150 #:use-module (gnu packages regex)
151 #:use-module (gnu packages rdf)
152 #:use-module (gnu packages readline)
153 #:use-module (gnu packages ruby)
154 #:use-module (gnu packages search)
155 #:use-module (gnu packages serialization)
156 #:use-module (gnu packages samba)
157 #:use-module (gnu packages screen)
158 #:use-module (gnu packages sphinx)
159 #:use-module (gnu packages sqlite)
160 #:use-module (gnu packages tcl)
161 #:use-module (gnu packages texinfo)
162 #:use-module (gnu packages time)
163 #:use-module (gnu packages tls)
164 #:use-module (gnu packages version-control)
165 #:use-module (gnu packages w3m)
166 #:use-module (gnu packages web)
167 #:use-module (gnu packages webkit)
168 #:use-module (gnu packages xdisorg)
169 #:use-module (gnu packages xorg)
170 #:use-module (gnu packages xml)
171 #:use-module ((guix licenses) #:prefix license:)
172 #:use-module (guix packages)
173 #:use-module (guix deprecation)
174 #:use-module (guix download)
175 #:use-module (guix git-download)
176 #:use-module (guix svn-download)
177 #:use-module (guix utils)
178 #:use-module (guix build-system cmake)
179 #:use-module (guix build-system glib-or-gtk)
180 #:use-module (guix build-system go)
181 #:use-module (guix build-system gnu)
182 #:use-module (guix build-system go)
183 #:use-module (guix build-system guile)
184 #:use-module (guix build-system emacs)
185 #:use-module (guix build-system meson)
186 #:use-module (guix build-system perl)
187 #:use-module (guix build-system python)
188 #:use-module (guix build-system trivial)
189 #:use-module (srfi srfi-1)
190 #:use-module (ice-9 match))
199 (uri (string-append "https://abook.sourceforge.io/devel/abook-" version ".tar.gz"))
201 (base32 "1yf0ifyjhq2r003pnpn92mn0924bn9yxjifxxj2ldcsgd7w0vagh"))))
202 (build-system gnu-build-system)
205 (modify-phases %standard-phases
206 ;; Fix "undefined reference to `field_id'" errors.
207 (add-after 'unpack 'fix-build-with-recent-gcc
209 (substitute* '("database.c" "database.h")
210 (("^inline int" all) (string-append "extern " all)))))
211 ;; Fix following error during bootstrap: "gettext infrastructure
212 ;; mismatch: using a Makefile.in.in from gettext version 0.18 but the
213 ;; autoconf macros are from gettext version 0.20".
214 (add-before 'bootstrap 'fix-gettext-macro-version
216 (substitute* "po/Makefile.in.in"
221 (invoke "automake" "--add-missing")
222 (invoke "autoconf"))))))
224 `(("autoconf" ,autoconf)
225 ("automake" ,automake)
226 ("gettext" ,gettext-minimal)))
228 (list ncurses readline))
229 (home-page "https://abook.sourceforge.io/")
230 (synopsis "Text-based address book")
232 "Abook is a text-based address book program designed to use with the Mutt
234 (license license:gpl2)))
236 (define-public anubis
239 ;; This 4.2.90 alpha release adds support for Guile 3 and has fixes for
245 (uri (string-append "https://alpha.gnu.org/gnu/anubis/anubis-"
249 "0dvm6acl32dv8bixx9z50gzwfp6kj4kxnn1j3dcwjlp7sasjp41s"))))
250 (build-system gnu-build-system)
252 (list automake autoconf gettext-minimal m4)) ;for the test suite
259 libgcrypt ;gnutls support depends on libgcrypt
261 (outputs '("out" "debug"))
262 (synopsis "SMTP message submission daemon")
263 (description "Anubis is a daemon that sits between the Mail User
264 Agent (MUA) and the Mail Transfer Agent (MTA). When a mail is sent by a user
265 in the MUA, it is first passed to Anubis, which performs additional processing
266 to the message before passing it on for delivery by the MTA. Anubis may, for
267 example, modify the message headers or body, or encrypt or sign the message.")
268 (home-page "https://www.gnu.org/software/anubis/manual/")
269 (license license:gpl3+)))
271 (define-public mailutils
277 (uri (string-append "mirror://gnu/mailutils/mailutils-"
281 "1nrd9wsidxami3wa86l9z8hnnwv6rhbxdkvqg7dcgz2jqf3c5l5p"))
283 (search-patches "mailutils-variable-lookup.patch"))))
284 (build-system gnu-build-system)
287 #~(modify-phases %standard-phases
288 (add-before 'check 'prepare-test-suite
290 ;; Use the right file name for `cat'.
291 (substitute* "testsuite/lib/mailutils.exp"
295 ;; Tests try to invoke 'mda' such that it looks up the
296 ;; 'root' user, which does not exist in the build
298 (substitute* '("mda/mda/tests/testsuite"
299 "mda/lmtpd/tests/testsuite")
300 (("root <") "nobody <")
301 (("spool/root") "spool/nobody")
302 (("root@localhost") "nobody@localhost"))
304 ;; The 'pipeact.at' tests generate a shell script; make
305 ;; sure it uses the right shell.
306 (substitute* '("sieve/tests/testsuite"
308 "libmailutils/tests/lock.at")
310 (string-append "#!" (which "sh"))))
312 (substitute* "mh/tests/testsuite"
313 (("moreproc: /bin/cat")
314 (string-append "moreproc: " (which "cat"))))
316 ;; XXX: The comsatd tests rely on being able to open
317 ;; /dev/tty, but that gives ENODEV in the build
318 ;; environment. Thus, ignore test failures here.
319 (substitute* "comsat/tests/Makefile.in"
320 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
321 (string-append "-" all)))
323 ;; XXX: The ‘moderator: program discard’ test does not
324 ;; specify an explicit From: but does expect an exact
325 ;; match. But why are all other tests unaffected?
326 (substitute* "sieve/tests/testsuite"
330 ;; 'frm' tests expect write access to $HOME.
331 (setenv "HOME" (getcwd))
333 ;; Avoid the message "I'm going to create the standard MH
334 ;; path for you", which would lead to one test failure
335 ;; (when diffing stdout of 'fmtcheck'.)
336 (call-with-output-file ".mh_profile"
338 (format port "Path: ~a/Mail-for-tests~%"
341 (substitute* "imap4d/tests/testclient.c"
343 (string-append "\"" (which "sh") "\""))))))
345 #~(list "--sysconfdir=/etc"
348 ;; Add "/X.Y" to the installation directory.
349 (string-append "--with-guile-site-dir="
350 (assoc-ref %outputs "out")
352 #$(match (assoc "guile"
353 (package-inputs this-package))
356 (package-version guile))))))))
358 ;; Regeneration of the build system is triggered by touching the
359 ;; 'libmailutils/tests/lock.at' file.
360 `(("autoconf" ,autoconf)
361 ("automake" ,automake)
362 ("gettext" ,gettext-minimal)
365 ("perl" ,perl) ;for 'gylwrap'
367 ("dejagnu" ,dejagnu)))
377 ;; Required for SEARCH CHARSET.
379 (home-page "https://mailutils.org")
380 (synopsis "Utilities and library for reading and serving mail")
382 "GNU Mailutils is a collection of programs for managing, viewing and
383 processing electronic mail. It contains both utilities and server daemons
384 and all operate in a protocol-agnostic way. The underlying libraries are
385 also available, simplifying the addition of mail capabilities to new
386 software. GNU Mailutils provides the following commands:
395 @item mailutils-config
405 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
406 (list license:gpl3+ license:lgpl3+))))
408 (define-public go-gitlab.com-shackra-goimapnotify
410 (name "go-gitlab.com-shackra-goimapnotify")
415 (url "https://gitlab.com/shackra/goimapnotify")
417 (file-name (git-file-name name version))
420 "06jhxvhdvdv049qpvp8ahnhvswvbpakpw7aq2lw790f3x89px2ss"))))
421 (build-system go-build-system)
423 `(#:import-path "gitlab.com/shackra/goimapnotify"))
425 (list go-github-com-emersion-go-imap
426 go-github-com-emersion-go-imap-idle
427 go-github-com-emersion-go-sasl go-github-com-sirupsen-logrus
428 go-golang-org-x-text))
429 (synopsis "Execute scripts on IMAP mailbox changes")
431 "Script to execute scripts on IMAP mailbox changes (new/deleted/updated
432 messages) using IDLE. Implemented in Go.")
433 (home-page "https://gitlab.com/shackra/goimapnotify")
434 (license license:gpl3+)))
436 (define-public guile2.2-mailutils
439 (name "guile2.2-mailutils")
441 (modify-inputs (package-inputs mailutils)
442 (replace "guile" guile-2.2)))))
444 (define-public nullmailer
452 (string-append "https://untroubled.org/nullmailer/"
453 "nullmailer-" version ".tar.gz")
454 ;; Previous releases are moved to this subdirectory.
455 (string-append "https://untroubled.org/nullmailer/archive/"
456 "nullmailer-" version ".tar.gz")))
458 (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
459 (build-system gnu-build-system)
463 "--localstatedir=/var"
466 (modify-phases %standard-phases
467 (add-before 'check 'patch-test-FHS-file-names
469 (with-directory-excursion "test"
470 (substitute* (list "functions.in"
472 ;; Fix some shebangs later generated on the fly.
473 (("/bin/sh") (which "bash"))))
475 (add-before 'check 'pass-PATH-to-tests
476 ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
477 ;; tests then source ‘functions’, which first demands a working $PATH
478 ;; only to clobber it later. Pass our $PATH to the test environment
479 ;; and don't touch it after that.
481 (with-directory-excursion "test"
482 (substitute* "runtests"
484 (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
485 (substitute* "functions.in"
486 (("export PATH=.*") "")))
488 (add-before 'check 'delete-failing-tests
490 (with-directory-excursion "test/tests"
491 (for-each delete-file
493 ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
495 ;; XXX These require the not-yet-packaged tcpserver.
496 "protocols" "smtp-auth")))
498 (add-before 'install 'skip-install-data-local
499 ;; Don't attempt to install run-time files outside of the store.
501 (substitute* "Makefile"
502 ((" install-data-local") ""))
506 (list daemontools)) ; for svc
509 (home-page "https://untroubled.org/nullmailer/")
510 (synopsis "Simple relay-only mail transfer agent")
512 "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
513 hosts that receive no local mail and only relay mail to a fixed set of smart
514 relays. It's useful for systems such as Web servers that must be able to send
515 email notifications, without having to run a full-blown MTA such as sendmail
518 Nullmailer is designed to be simple to configure, easy to extend, and secure.
519 It requires little ongoing administration. The included @command{sendmail}
520 emulator front-end should allow most (if not all) sendmail-compatible programs
521 to run without any changes.")
522 (license (list license:lgpl2.1+ ; lib/cli++/ (but some files lack headers)
523 license:gpl2+)))) ; everything else
525 (define-public fetchmail
532 (uri (string-append "mirror://sourceforge/fetchmail/branch_"
533 (version-major+minor version) "/"
534 "fetchmail-" version ".tar.xz"))
536 (base32 "001394gxji89hfh6jcdrmv9ndimdsz7bndd55i516c8lfc9mwyjz"))))
537 (build-system gnu-build-system)
542 (list (string-append "--with-ssl="
543 (assoc-ref %build-inputs "openssl")))))
544 (home-page "https://www.fetchmail.info/")
545 (synopsis "Remote-mail retrieval and forwarding utility")
547 "Fetchmail is a full-featured, robust, well-documented remote-mail
548 retrieval and forwarding utility intended to be used over on-demand
549 TCP/IP links (such as SLIP or PPP connections). It supports every
550 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
551 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
554 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
555 so it can then be read by normal mail user agents such as mutt, elm
556 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
557 aliasing facilities to work just as they would on normal mail.")
558 (license license:gpl2+))) ; most files are actually public domain or x11
567 (string-append "https://bitbucket.org/mutt/mutt/downloads/"
568 "mutt-" version ".tar.gz")
569 (string-append "http://ftp.mutt.org/pub/mutt/mutt-"
573 "1wbdsgx5x7h4alsfmjqac46xvbbakc7djlpngd3rydmvb27qa4zb"))
574 (patches (search-patches "mutt-store-references.patch"))))
575 (build-system gnu-build-system)
586 `(#:configure-flags '("--enable-smtp"
590 "--enable-hcache" ; for header caching
595 "--with-sqlite3" ; required for Autocrypt
596 "--with-idn2" ; recommended for Autocrypt
597 ;; So that mutt does not check whether the path
598 ;; exists, which it does not in the chroot.
599 "--with-mailpath=/var/mail")))
600 (home-page "http://www.mutt.org/")
601 (synopsis "Mail client")
603 "Mutt is a small but very powerful text-based mail client for Unix
605 (license license:gpl2+)))
607 (define-public neomutt
615 (url "https://github.com/neomutt/neomutt")
617 (file-name (git-file-name name version))
619 (base32 "1ad05k98z9r317k2hhxbgdic00iha5r0k0f8224anz60i9kc78w5"))))
620 (build-system gnu-build-system)
636 `(("automake" ,automake)
637 ("gettext-minimal" ,gettext-minimal)
638 ("pkg-config" ,pkg-config)
639 ("docbook-xsl" ,docbook-xsl)
640 ("docbook-xml" ,docbook-xml-4.2)
644 ;; Test file data for the unit tests included in the neomutt source.
645 ("neomutt-test-files"
646 ,(let ((commit "8629adab700a75c54e8e28bf05ad092503a98f75"))
650 (url "https://github.com/neomutt/neomutt-test-files")
652 (file-name (git-file-name "neomutt-test-files" commit))
654 (base32 "1ci04nqkab9mh60zzm66sd6mhsr6lya8wp92njpbvafc86vvwdlr")))))))
656 `(#:test-target "test"
660 ;; Database, implies header caching.
661 "--disable-tokyocabinet"
672 (string-append "--with-sasl="
673 (assoc-ref %build-inputs "cyrus-sasl"))
681 ;; If we do not set this, neomutt wants to check
682 ;; whether the path exists, which it does not
684 "--with-mailpath=/var/mail"
687 (string-append "--with-ncurses="
688 (assoc-ref %build-inputs "ncurses"))
689 (string-append "--prefix="
690 (assoc-ref %outputs "out"))
693 (modify-phases %standard-phases
694 ;; TODO: autosetup is meant to be included in the source,
695 ;; but we should package autosetup and use our own version of it.
697 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
698 (let* ((out (assoc-ref outputs "out"))
699 (flags `(,@configure-flags))
700 (bash (which "bash")))
701 (setenv "SHELL" bash)
702 (setenv "CONFIG_SHELL" bash)
704 (string-append (getcwd) "/configure")
706 (add-before 'check 'prepare-test-files
707 (lambda* (#:key inputs #:allow-other-keys)
708 (copy-recursively (assoc-ref inputs "neomutt-test-files") "tests")
709 (with-directory-excursion "tests"
710 (setenv "NEOMUTT_TEST_DIR" (getcwd)) ; must be absolute
711 (invoke "bash" "setup.sh")))))))
712 (home-page "https://neomutt.org/")
713 (synopsis "Command-line mail reader based on Mutt")
715 "NeoMutt is a command-line mail reader which is based on mutt.
716 It adds a large amount of new and improved features to mutt.")
717 (license license:gpl2+)))
725 (uri (string-append "mirror://gnome/sources/gmime/"
726 (version-major+minor version)
727 "/gmime-" version ".tar.xz"))
730 "0i3xfc84qn1z99i70q68kbnp9rmgqrnprqb418ba52s6g9j9dsia"))))
731 (build-system gnu-build-system)
733 (list pkg-config gnupg ; for tests only
734 gobject-introspection vala))
735 (inputs (list glib gpgme zlib))
738 (list "--enable-introspection=yes" "--enable-vapigen=yes")
740 (modify-phases %standard-phases
742 'unpack 'patch-paths-in-tests
744 ;; The test programs run several programs using 'system' with
745 ;; hard-coded paths. Here we patch them all.
746 ;; We use ISO-8859-1 here because test-iconv.c contains
747 ;; raw byte sequences in several different encodings.
748 (with-fluids ((%default-port-encoding #f))
749 (substitute* (find-files "tests" "\\.c$")
750 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
751 (let* ((base (basename prog-path))
754 (or prog (error "not found: " base)))))))
756 (home-page "http://spruce.sourceforge.net/gmime/")
757 (synopsis "MIME message parser and creator library")
759 "GMime provides a core library and set of utilities which may be used for
760 the creation and parsing of messages using the Multipurpose Internet Mail
762 (license (list license:lgpl2.1+ license:gpl2+ license:gpl3+))))
764 ;; Some packages are not ready for GMime 3 yet.
765 (define-public gmime-2.6
771 (uri (string-append "mirror://gnome/sources/gmime/"
772 (version-major+minor version)
773 "/gmime-" version ".tar.xz"))
776 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
778 (define-public altermime
784 (uri (string-append "http://pldaniels.com/altermime/altermime-"
788 "15zxg6spcmd35r6xbidq2fgcg2nzyv1sbbqds08lzll70mqx4pj7"))))
789 (build-system gnu-build-system)
791 `(#:make-flags (list "CC=gcc"
792 (string-append "PREFIX=" (assoc-ref %outputs "out")))
793 #:tests? #f ; there are none
795 (modify-phases %standard-phases
797 (add-after 'unpack 'fix-bugs
799 (substitute* "MIME_headers.c"
800 (("hinfo->filename, sizeof\\(hinfo->name\\)")
801 "hinfo->filename, sizeof(hinfo->filename)")
802 (("memset\\(hinfo->defects, 0, _MIMEH_DEFECT_ARRAY_SIZE\\);")
803 "memset(hinfo->defects, 0, sizeof(hinfo->defects));"))
804 (substitute* "pldstr.c"
805 (("if \\(\\(st->start\\)&&\\(st->start != '\\\\0'\\)\\)")
806 "if ((st->start)&&(*st->start != '\\0'))"))
808 (("if \\(lineend != '\\\\0'\\)")
809 "if (*lineend != '\\0')"))
811 (add-after 'unpack 'install-to-prefix
813 (substitute* "Makefile"
814 (("/usr/local") "${PREFIX}")
815 (("cp altermime.*") "install -D -t ${PREFIX}/bin altermime\n"))
817 (add-after 'unpack 'disable-Werror
819 (substitute* "Makefile"
822 (home-page "https://pldaniels.com/altermime/")
823 (synopsis "Modify MIME-encoded messages")
825 "alterMIME is a small program which is used to alter your mime-encoded
826 mailpack. What can alterMIME do?
829 @item Insert disclaimers,
830 @item insert arbitrary X-headers,
831 @item modify existing headers,
832 @item remove attachments based on filename or content-type,
833 @item replace attachments based on filename.
836 ;; MIME_headers.c is distributed under BSD-3; the rest of the code is
837 ;; published under the alterMIME license.
838 (license (list (license:non-copyleft "file://LICENSE")
841 (define-public astroid
849 (url "https://github.com/astroidmail/astroid")
850 (commit (string-append "v" version))))
851 (file-name (git-file-name name version))
853 (base32 "17m99llggkg7xg72k8xaf7iipax7sgfhqa2a1qnlylndwa42f57b"))
854 (modules '((guix build utils)))
857 ;; https://github.com/astroidmail/astroid/pull/685
858 (substitute* "tests/test_composed_message.cc"
859 (("\\\\n\\.\\.\\.") "\\n...\\n"))))))
860 (build-system cmake-build-system)
862 `(#:modules ((guix build cmake-build-system)
863 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
866 #:imported-modules ((guix build glib-or-gtk-build-system)
867 ,@%cmake-build-system-modules)
868 #:configure-flags (list "-GNinja")
870 (modify-phases %standard-phases
871 (add-after 'unpack 'skip-markdown-test
872 ;; This test relies on the plugins and the test suite
873 ;; cannot find the Astroid module.
874 ;; gi.require_version ('Astroid', '0.2')
875 ;; ValueError: Namespace Astroid not available
877 (substitute* "tests/CMakeLists.txt"
878 ((".*markdown.*") ""))))
881 (invoke "ninja" "-j" (number->string (parallel-job-count)))))
882 (add-before 'check 'start-xserver
883 (lambda* (#:key inputs #:allow-other-keys)
884 (let ((xorg-server (assoc-ref inputs "xorg-server")))
885 (setenv "HOME" (getcwd))
886 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
887 (setenv "DISPLAY" ":1"))))
889 (lambda* (#:key tests? #:allow-other-keys)
891 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
892 (invoke "ctest" "."))))
895 (invoke "ninja" "install")))
896 (add-after 'install 'wrap-with-GI_TYPELIB_PATH
897 (lambda* (#:key inputs outputs #:allow-other-keys)
898 (let ((out (assoc-ref outputs "out"))
899 (paths (map (match-lambda
900 ((outputs . directory)
901 (let ((girepodir (string-append
903 "/lib/girepository-1.0")))
904 (if (file-exists? girepodir)
908 (wrap-program (string-append out "/bin/astroid")
909 `("GI_TYPELIB_PATH" ":" prefix ,(filter identity paths))))))
910 (add-after 'install 'glib-or-gtk-compile-schemas
911 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
912 (add-after 'install 'glib-or-gtk-wrap
913 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
915 (list glib-networking
916 gsettings-desktop-schemas
922 xorg-server-for-tests))
926 gobject-introspection ; it is referenced
934 webkitgtk-with-libsoup2))
936 (list adwaita-icon-theme)) ; Required for the thread view
937 (home-page "https://astroidmail.github.io/")
938 (synopsis "GTK frontend to the notmuch mail system")
940 "Astroid is a lightweight and fast Mail User Agent that provides a
941 graphical interface to searching, display and composing email, organized in
942 thread and tags. Astroid uses the notmuch backend for searches through tons of
943 email. Astroid searches, displays and compose emails — and relies on other
944 programs for fetching, syncing and sending email.")
945 (license (list license:gpl3+ ; 'this program'
946 license:lgpl2.1+)))) ; code from geary, gmime
948 (define-public ripmime
949 ;; Upstream does not tag or otherwise provide any releases (only a version
950 ;; number in the source)
951 (let ((commit "a556ffe08d620602475c976732e8e1a82f3169e9")
955 (version (git-version "1.4.0.10" revision commit))
959 (url "https://github.com/inflex/ripMIME")
961 (file-name (git-file-name name version))
964 "1z8ar8flvkd9q3ax4x28sj5pyq8ykk5pq249y967lj2406lxparh"))))
965 (build-system gnu-build-system)
968 (modify-phases %standard-phases
969 ;; Source has no configure script
971 ;; Buildcodes make the build non-reproducible; remove them
972 (add-after 'unpack 'strip-buildcodes
974 (substitute* "generate-buildcodes.sh"
975 (("`date \\+%s`") "0")
977 (("`uname -a`") "Guix"))
979 ;; https://github.com/inflex/ripMIME/pull/16 makes 'mkdir-p-bin-man unnecessary
980 (add-before 'install 'mkdir-p-bin-man
982 (mkdir-p (string-append (assoc-ref %outputs "out") "/bin"))
983 (mkdir-p (string-append (assoc-ref %outputs "out") "/man"))
985 ;; Makefile has no tests
987 #:make-flags (list (string-append "LOCATION=" (assoc-ref %outputs "out"))
989 (synopsis "Extract attachments from MIME-encoded email")
991 "ripMIME is a small program to extract the attached files out of a
992 MIME-encoded email package.")
993 (home-page "https://github.com/inflex/ripMIME")
994 (license license:bsd-3))))
996 (define-public mailcap
997 (let* ((version "2.1.53")
998 (tag ;; mailcap tags their releases like this: rMajor-minor-patch
999 (string-append "r" (string-join (string-split version #\.) "-"))))
1007 (url "https://pagure.io/mailcap.git")
1009 (file-name (git-file-name name version))
1011 (base32 "14939pq7h25rh9100z72vzzx810yqg98im9gz2fbhh47iaj1wrbb"))))
1012 (build-system gnu-build-system)
1015 (modify-phases %standard-phases
1017 (add-before 'install 'set-dest-dir
1018 (lambda* (#:key outputs #:allow-other-keys)
1019 (let ((out (assoc-ref outputs "out")))
1020 (setenv "DESTDIR" out)
1021 (substitute* "Makefile"
1022 (("/usr") "")) ; This allows the man page to install.
1025 (list python)) ; for tests
1026 (synopsis "MIME type associations for file types")
1028 "This package provides MIME type associations for file types.")
1029 (home-page "https://pagure.io/mailcap")
1030 (license (list license:expat ; mailcap.5
1031 license:public-domain))))) ; mailcap and mime.types
1033 (define-public bogofilter
1040 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-stable/"
1041 "bogofilter-" version ".tar.xz"))
1043 (base32 "1sl9xrnnlk2sn8gmibhn8li09vnansjbxb9l1182qmgz7cvs2j1j"))))
1044 (build-system gnu-build-system)
1047 (modify-phases %standard-phases
1048 (add-before 'check 'pre-check
1050 (substitute* "src/tests/t.frame"
1052 (string-append "GREP=" (which "grep") "\n")))
1054 (native-inputs (list flex))
1056 (home-page "https://bogofilter.sourceforge.io/")
1057 (synopsis "Mail classifier based on a Bayesian filter")
1059 "Bogofilter is a mail filter that classifies mail as spam or ham
1060 (non-spam) by a statistical analysis of the message's header and
1061 content (body). The program is able to learn from the user's classifications
1062 and corrections. It is based on a Bayesian filter.")
1063 (license license:gpl3+)))
1065 (define-public offlineimap3
1067 (name "offlineimap3")
1072 (url "https://github.com/OfflineIMAP/offlineimap3")
1073 (commit (string-append "v" version))))
1074 (file-name (git-file-name name version))
1077 "0y3giaz9i8vvczlxkbwymfkn3vi9fv599dy4pc2pn2afxsl4mg2w"))))
1078 (build-system python-build-system)
1082 (list python-distro python-imaplib2 python-rfc6555))
1084 `(;; Tests require a modifiable IMAP account.
1087 (modify-phases %standard-phases
1088 (add-after 'build 'build-documentation
1090 (substitute* "docs/Makefile"
1091 ;; Prevent xmllint and xsltproc from downloading a DTD file.
1092 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
1093 (invoke "make" "-C" "docs" "man")))
1094 (add-after 'install 'install-documentation
1095 (lambda* (#:key outputs #:allow-other-keys)
1096 (let* ((out (assoc-ref outputs "out"))
1097 (man (string-append out "/share/man")))
1098 (install-file "docs/offlineimap.1" (string-append man "/man1"))
1099 (install-file "docs/offlineimapui.7" (string-append man "/man7"))))))))
1100 (home-page "https://www.offlineimap.org")
1101 (synopsis "Sync emails between two repositories")
1103 "OfflineImap synchronizes emails between two repositories, so that you
1104 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
1105 repository and Maildir/IMAP as LOCAL repository.")
1106 (license license:gpl2+)))
1108 (define-public offlineimap
1109 (deprecated-package "offlineimap" offlineimap3))
1111 (define-public emacs-mew
1117 (uri (string-append "https://mew.org/Release/mew-"
1121 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
1125 (list ruby-sqlite3 ; optional for the database of messages
1126 ruby)) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
1127 (build-system gnu-build-system)
1129 (let ((elisp-dir "/share/emacs/site-lisp")
1130 (icon-dir "/share/mew"))
1131 `(#:modules ((guix build gnu-build-system)
1133 (guix build emacs-utils))
1134 #:imported-modules (,@%gnu-build-system-modules
1135 (guix build emacs-utils))
1137 (list (string-append "--with-elispdir=" %output ,elisp-dir)
1138 (string-append "--with-etcdir=" %output ,icon-dir))
1140 (modify-phases %standard-phases
1141 (add-after 'configure 'patch-mew-icon-directory
1142 (lambda* (#:key outputs #:allow-other-keys)
1143 (emacs-substitute-sexps "mew-key.el"
1144 ("(def.* mew-icon-directory"
1146 (add-to-list 'image-load-path 'mew-icon-directory)
1147 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
1149 (add-after 'install 'generate-autoloads
1150 (lambda* (#:key outputs #:allow-other-keys)
1151 (emacs-generate-autoloads
1152 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
1155 (home-page "https://mew.org")
1156 (synopsis "Emacs e-mail client")
1157 (description "Mew (Messaging in the Emacs World) is a user interface
1158 for text messages, multimedia messages (MIME), news articles and
1159 security functionality including PGP, S/MIME, SSH, and SSL.")
1160 (license license:bsd-3)))
1169 (url "https://github.com/djcb/mu")
1170 (commit (string-append "v" version))))
1171 (file-name (git-file-name name version))
1174 "1anpv49242qpayziz111rzznkmfgkd2a9y5xda6xhmzhqdhx79h2"))))
1175 (build-system meson-build-system)
1182 (list glib gmime xapian))
1185 #:modules '((guix build meson-build-system)
1186 (guix build emacs-utils)
1188 #:imported-modules `(,@%meson-build-system-modules
1189 (guix build emacs-utils))
1191 #~(modify-phases %standard-phases
1192 (add-after 'unpack 'patch-bin-references
1194 (substitute* '("guile/tests/test-mu-guile.cc"
1195 "mu/tests/test-mu-cmd.cc"
1196 "mu/tests/test-mu-cmd-cfind.cc"
1197 "mu/tests/test-mu-query.cc")
1198 (("/bin/sh") (which "sh")))
1199 (substitute* '("lib/tests/bench-indexer.cc"
1200 "lib/utils/mu-test-utils.cc")
1201 (("/bin/rm") (which "rm")))))
1202 (add-after 'install 'install-emacs-autoloads
1203 (lambda* (#:key outputs #:allow-other-keys)
1204 (emacs-generate-autoloads
1206 (string-append (assoc-ref outputs "out")
1207 "/share/emacs/site-lisp/mu4e")))))))
1208 (home-page "https://www.djcbsoftware.nl/code/mu/")
1209 (synopsis "Quickly find emails")
1211 "Mu is a tool for dealing with e-mail messages stored in the
1212 Maildir format. Mu's purpose in life is to help you to quickly find the
1213 messages you need; in addition, it allows you to view messages, extract
1214 attachments, create new maildirs, and so on.")
1215 (license license:gpl3+)))
1223 ;; package author intends on distributing via github rather
1225 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
1227 (url "https://github.com/pazz/alot")
1229 (file-name (git-file-name name version))
1232 "0awf1phdy1wqm01cy9zmvqlw6c8pvkxm2f9ncjd0cmzxqnmq1dyn"))))
1233 (build-system python-build-system)
1236 (modify-phases %standard-phases
1237 (add-before 'check 'fix-tests
1238 (lambda* (#:key inputs #:allow-other-keys)
1239 (let ((gnupg (assoc-ref inputs "gnupg")))
1240 (substitute* "tests/test_crypto.py"
1241 (("gpg2") (string-append gnupg "/bin/gpg")))
1243 (add-before 'check 'disable-failing-tests
1244 ;; FIXME: Investigate why these tests are failing.
1246 (substitute* "tests/test_helper.py"
1247 (("def test_env_set") "def _test_env_set"))
1248 (substitute* "tests/commands/test_global.py"
1249 (("def test_no_spawn_no_stdin_attached")
1250 "def _test_no_spawn_no_stdin_attached"))
1251 ;; FIXME: Investigate why this test hangs.
1252 (substitute* "tests/db/test_manager.py"
1253 (("def test_save_named_query")
1254 "def _test_save_named_query"))
1257 (list procps python-mock))
1263 python-service-identity
1268 (home-page "https://github.com/pazz/alot")
1269 (synopsis "Command-line MUA using Notmuch")
1271 "Alot is a terminal-based mail user agent based on the Notmuch mail
1272 indexer. It is written in Python using the @code{urwid} toolkit and features
1273 a modular and command prompt driven interface to provide a full mail user
1274 agent (@dfn{MUA}) experience as an alternative to the Emacs mode shipped with
1276 (license license:gpl3+)))
1278 (define-public notifymuch
1280 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
1284 (version (string-append "0.1-" revision "." (string-take commit 7)))
1289 (url "https://github.com/kspi/notifymuch")
1293 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
1294 (file-name (string-append name "-" version "-checkout"))))
1295 (build-system python-build-system)
1297 (list python-notmuch python-pygobject gobject-introspection
1301 (modify-phases %standard-phases
1302 (add-after 'install 'wrap-binary
1303 (lambda* (#:key outputs #:allow-other-keys)
1304 (let* ((out (assoc-ref outputs "out"))
1305 (bin (string-append out "/bin/notifymuch")))
1307 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
1308 `("GI_TYPELIB_PATH" ":" prefix
1309 (,(getenv "GI_TYPELIB_PATH")
1310 ,(string-append out "/lib/girepository-1.0")))))
1312 (home-page "https://github.com/kspi/notifymuch")
1313 (synopsis "Displays notifications for changes in the notmuch email database")
1314 (description "notifymuch displays desktop notifications for messages in
1315 the notmuch database. The notifications are sent using libnotify to a
1316 notification daemon. The query to find messages to send a notification about
1317 is configurable, and a notification for the same message will not be send
1318 within a configurable period (defaults to 48 hours). To use notifymuch, run
1319 @command{notifymuch} after new mail is indexed, this can be automated by
1320 invoking @command{notifymuch} from the post-new hook.")
1321 (license license:gpl3))))
1323 (define-public notmuch
1330 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
1333 (base32 "0h6f6mh9m9vrijm638x5sbsl321b74a25cdasbxhx67x62w320hk"))))
1334 (build-system gnu-build-system)
1338 #~(list "V=1" ; verbose test output
1339 "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
1341 #~(modify-phases %standard-phases
1343 (lambda* (#:key inputs #:allow-other-keys)
1344 (setenv "CC" #$(cc-for-target))
1345 (setenv "CONFIG_SHELL" (search-input-file inputs "/bin/sh"))
1346 (invoke "./configure"
1347 (string-append "--prefix=" #$output)
1348 "--without-emacs")))
1349 (add-before 'check 'prepare-test-environment
1350 (lambda* (#:key inputs #:allow-other-keys)
1351 (setenv "TEST_CC" #$(cc-for-target))
1352 ;; Patch various inline shell invocations.
1353 (let ((sh (search-input-file inputs "/bin/sh")))
1354 (substitute* (find-files "test" "\\.sh$")
1355 (("/bin/sh") sh))))))))
1357 (list bash-completion
1363 ;; The following are required for tests only.
1364 emacs-no-x ; -minimal lacks libxml, needed for some tests
1371 (list glib gmime talloc xapian zlib))
1372 (home-page "https://notmuchmail.org/")
1373 (synopsis "Thread-based email index, search, and tagging")
1375 "Notmuch is a command-line based program for indexing, searching, read-
1376 ing, and tagging large collections of email messages.")
1377 (license license:gpl3+)))
1379 (define-public emacs-notmuch
1382 (name "emacs-notmuch")
1383 (build-system emacs-build-system)
1389 #:exclude #~(cons* "make-deps.el" "rstdoc.el" %default-exclude)
1391 #~(modify-phases %standard-phases
1392 (add-after 'unpack 'chdir
1395 (add-after 'chdir 'patch-paths
1396 (lambda* (#:key inputs #:allow-other-keys)
1397 (let ((notmuch (search-input-file inputs "/bin/notmuch")))
1398 (substitute* "notmuch-lib.el"
1400 (string-append "\"" notmuch "\"")))))))))
1401 (synopsis "Run Notmuch within Emacs")
1403 "This package provides an Emacs-based interface to the Notmuch mail
1406 (define-public notmuch-addrlookup-c
1408 (name "notmuch-addrlookup-c")
1409 (version (string-append "9"))
1413 (url "https://github.com/aperezdc/notmuch-addrlookup-c")
1414 (commit (string-append "v" version))))
1415 (file-name (string-append name "-" version "-checkout"))
1418 "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
1419 (build-system gnu-build-system)
1421 '(#:tests? #f ; no tests
1422 #:make-flags (list "CC=gcc")
1423 #:phases (modify-phases %standard-phases
1425 ;; Remove vim code completion config, it's not needed to
1426 ;; build (or be patched).
1427 (add-before 'patch-source-shebangs 'delete-ycm-file
1428 (lambda _ (delete-file ".ycm_extra_conf.py")))
1430 (lambda* (#:key outputs #:allow-other-keys)
1431 (let ((bin (string-append
1432 (assoc-ref outputs "out") "/bin")))
1433 (install-file "notmuch-addrlookup" bin)))))))
1437 (list glib notmuch))
1438 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
1439 (synopsis "Address lookup tool for Notmuch")
1440 (description "This is an address lookup tool using a Notmuch database,
1441 useful for email address completion.")
1442 (license license:expat)))
1444 (define-public python-notmuch
1446 (name "python-notmuch")
1447 (version (package-version notmuch))
1448 ;; Notmuch python bindings are now unavailable on pypi. The
1449 ;; bindings are distributed via the notmuch release tarball.
1450 (source (package-source notmuch))
1451 (build-system python-build-system)
1452 (inputs (list notmuch))
1454 `(#:tests? #f ; no "test" target
1456 (modify-phases %standard-phases
1457 ;; This python package lives in a subdirectory of the notmuch source
1458 ;; tree, so chdir into it before building.
1459 (add-after 'unpack 'enter-python-dir
1460 (lambda _ (chdir "bindings/python") #t))
1461 ;; Make sure the correct notmuch shared library gets loaded.
1462 (add-before 'build 'set-libnotmuch-file-name
1463 (lambda* (#:key inputs #:allow-other-keys)
1464 (let ((notmuch (assoc-ref inputs "notmuch")))
1465 (substitute* "notmuch/globals.py"
1466 (("libnotmuch\\.so\\.")
1467 (string-append notmuch "/lib/libnotmuch.so.")))))))))
1468 (home-page (package-home-page notmuch))
1469 (synopsis "Python bindings of the Notmuch mail indexing library")
1471 "This package provides Python bindings to use the Notmuch mail indexing
1472 and search library.")
1473 (license license:gpl3+)))
1475 (define-public python-notmuch2
1477 (inherit python-notmuch)
1478 (name "python-notmuch2")
1479 (version (package-version notmuch))
1480 (propagated-inputs (list python-cffi))
1484 #~(modify-phases %standard-phases
1485 ;; This python package lives in a subdirectory of the notmuch source
1486 ;; tree, so chdir into it before building.
1487 (add-after 'unpack 'enter-python-dir
1488 (lambda _ (chdir "bindings/python-cffi")))
1489 ;; python-build-system does not invoke the configure script
1490 ;; so _notmuch_config.py is missing
1491 (add-after 'enter-python-dir 'create-notmuch-config
1492 (lambda* (#:key inputs #:allow-other-keys)
1493 (with-output-to-file "_notmuch_config.py"
1497 "NOTMUCH_INCLUDE_DIR="
1498 "'" (dirname (search-input-file inputs "include/notmuch.h")) "'\n"
1500 "'" (dirname (search-input-file inputs "lib/libnotmuch.so")) "'"))))))
1501 ;; version.txt is not included in notmuch, so we patch in the version number
1502 (add-after 'create-notmuch-config 'patch-setup.py
1504 (substitute* "setup.py"
1505 (("NOTMUCH_VERSION_FILE")
1507 (("version=VERSION,")
1508 (string-append "version='" #$version "',"))))))))
1509 (synopsis "Pythonic bindings for the notmuch mail database using CFFI")
1510 (license license:gpl3+)))
1512 (define-public bower
1516 (home-page "https://github.com/wangp/bower")
1523 (file-name (git-file-name name version))
1525 (base32 "0vcsbxlsvr2wv3c7sfr3yj21kbqy259skpxg00vf5bdkbc8qknq4"))))
1526 (build-system gnu-build-system)
1529 #:make-flags #~(list "bower" "man"
1530 (string-append "CC=" #+(cc-for-target))
1531 (string-append "prefix=" #$output))
1532 #:parallel-tests? #f ;parallelism breaks test suite
1534 #~(modify-phases %standard-phases
1536 (add-after 'unpack 'patch-executables
1537 (lambda* (#:key inputs #:allow-other-keys)
1538 (substitute* "src/detect_mime_type.m"
1540 (format #f "~s" (search-input-file inputs "bin/file"))))
1541 (substitute* "src/compose.m"
1543 (format #f "~s" (search-input-file inputs "bin/base64"))))
1544 (substitute* "src/prog_config.m"
1545 (("shell_quoted\\(\"false\")")
1546 (format #f "shell_quoted(~s)"
1547 (search-input-file inputs "bin/false")))
1548 (("shell_quoted\\(\"notmuch\")")
1549 (format #f "shell_quoted(~s)"
1550 (search-input-file inputs "bin/notmuch")))
1551 (("/usr/bin/sendmail")
1552 (search-input-file inputs "/sbin/sendmail")))))
1554 (lambda* (#:key parallel-tests? tests? #:allow-other-keys)
1556 (invoke "make" "-C" "tests"
1557 "-j" (if parallel-tests?
1558 (number->string (parallel-job-count))
1562 (install-file "bower" (string-append #$output "/bin"))
1563 (install-file "bower.1" (string-append #$output
1564 "/share/man/man1")))))))
1577 (synopsis "Terminal client for the Notmuch email system")
1578 (description "@code{bower} is a curses front-end for the Notmuch email
1579 system, written in the Mercury language.")
1580 (license license:gpl3+)
1581 (properties `((cpe-name . "bower-cpe-refers-to-a-different-bower")))))
1583 (define-public muchsync
1590 (uri (string-append "http://www.muchsync.org/src/"
1591 "muchsync-" version ".tar.gz"))
1593 (base32 "1s799kx16nm5ry1fcqcc0grgxrwnnp4cnzd0hzwbkvc5v2sf6g8b"))))
1594 (build-system gnu-build-system)
1596 (list pandoc pkg-config))
1598 (list openssl notmuch sqlite xapian))
1599 (home-page "http://www.muchsync.org/")
1600 (synopsis "Synchronize notmuch mail across machines")
1602 "Muchsync brings Notmuch to all of your computers by synchronizing your
1603 mail messages and Notmuch tags across machines. The protocol is heavily
1604 pipelined to work efficiently over high-latency networks such as mobile
1605 broadband. Muchsync supports arbitrary pairwise synchronization among
1606 replicas. A version-vector-based algorithm allows it to exchange only the
1607 minimum information necessary to bring replicas up to date regardless of which
1608 pairs have previously synchronized.")
1609 (license license:gpl2+))) ; with OpenSSL libcrypto exception
1611 (define-public getmail6
1618 (url "https://github.com/getmail6/getmail6")
1619 (commit (string-append "v" version))))
1620 (file-name (git-file-name name version))
1623 "1ch5hagkpybmkgg2wbb2mids3nbmjqgdqjhczzz7pvj4hx2m8fdb"))))
1624 (build-system python-build-system)
1625 (arguments (list #:tests? #f)) ;tests require docker
1626 (home-page "https://github.com/getmail6/getmail6")
1627 (synopsis "Mail retriever")
1629 "A flexible, extensible mail retrieval system with support for POP3,
1630 IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs, arbitrary
1631 message filtering, single-user and domain-mailboxes, and many other useful
1632 features. This is a fork derived from getmail 5.14, aimed at Python 3
1634 (license license:gpl2+))) ;see docs/COPYING
1636 (define-public getmail
1637 (deprecated-package "getmail" getmail6))
1639 (define-public libetpan
1646 (url "https://github.com/dinhviethoa/libetpan")
1648 (file-name (git-file-name name version))
1650 (base32 "0g7an003simfdn7ihg9yjv7hl2czsmjsndjrp39i7cad8icixscn"))))
1651 (build-system gnu-build-system)
1652 (native-inputs (list autoconf automake libtool pkg-config))
1654 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1655 ;; libraries need to be propagated.
1656 (list cyrus-sasl openssl))
1658 (list curl expat zlib))
1661 '("--disable-static" "--disable-db")))
1662 (home-page "https://www.etpan.org/libetpan.html")
1663 (synopsis "Portable middleware for email access")
1665 "The purpose of this mail library is to provide a portable, efficient
1666 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1667 provides an API for C language. It's the low-level API used by MailCore and
1669 (license license:bsd-3)))
1671 (define-public compface
1677 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1678 "ftp.xemacs.org/aux/"
1679 "compface-" version ".tar.gz"))
1682 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1683 (build-system gnu-build-system)
1686 (synopsis "Portrait image compressor")
1687 (description "This package takes your 48x48x1 portrait image and
1689 (home-page "https://legacy.cs.indiana.edu/ftp/faces/")
1690 (license (license:x11-style "file://README"))))
1692 (define-public claws-mail
1700 (string-append "https://www.claws-mail.org/releases/claws-mail-"
1703 (base32 "13ksh4iwr23zi86fwmiwxha94xqrr5zxq373i82rwaldvfh9q6hf"))))
1704 (build-system glib-or-gtk-build-system)
1709 "--enable-demo-plugin")
1711 ;; Disable updating icon cache since it's done by the profile hook.
1712 ;; Conflict with other packages in the profile would be inevitable
1715 "gtk_update_icon_cache=true")
1717 (modify-phases %standard-phases
1718 (add-after 'unpack 'patch-source
1719 (lambda* (#:key inputs #:allow-other-keys)
1720 ;; Use absolute paths to referenced programs.
1721 (substitute* "src/common/defs.h"
1722 (("/usr/bin/mh/inc")
1723 (search-input-file inputs "/bin/mu-mh/inc"))
1724 (("/usr/sbin/sendmail")
1725 (search-input-file inputs "/sbin/sendmail")))))
1726 (add-before 'build 'patch-mime
1727 (lambda* (#:key inputs #:allow-other-keys)
1728 (substitute* "src/procmime.c"
1729 (("/usr/share/mime/globs")
1730 (search-input-file inputs "/share/mime/globs"))))))))
1736 gobject-introspection
1754 gsettings-desktop-schemas
1765 (librsvg-for-system)
1779 startup-notification
1784 (synopsis "GTK-based Email client")
1785 (description "Claws-Mail is an email client (and news reader) based on GTK+.
1786 The appearance and interface are designed to be familiar to new users coming
1787 from other popular email clients, as well as experienced users. Almost all
1788 commands are accessible with the keyboard. Plus, Claws-Mail is extensible via
1789 addons which can add many functionalities to the base client.")
1790 (home-page "https://www.claws-mail.org/")
1791 (license license:gpl3+))) ; most files are actually public domain or x11
1793 (define-public msmtp
1800 (uri (string-append "https://marlam.de/msmtp/releases"
1801 "/msmtp-" version ".tar.xz"))
1803 (base32 "1rx3ksvwdfrwahsd2lwf52vnhhq72ygb0kjy6ci2df55hri2010v"))))
1804 (build-system gnu-build-system)
1806 (list libsecret gnutls zlib gsasl))
1809 (home-page "https://marlam.de/msmtp/")
1813 #~(list "--with-libgsasl"
1815 "--with-tls=gnutls")
1817 #~(modify-phases %standard-phases
1818 (add-after 'install 'install-additional-files
1819 (lambda* (#:key outputs #:allow-other-keys)
1820 (let* ((out #$output)
1821 (bin (string-append out "/bin"))
1822 (doc (string-append out "/share/doc/msmtp"))
1823 (msmtpq "scripts/msmtpq")
1824 (vimfiles (string-append out "/share/vim/vimfiles/syntax")))
1825 (install-file (string-append msmtpq "/msmtpq") bin)
1826 (install-file (string-append msmtpq "/msmtp-queue") bin)
1827 (install-file (string-append msmtpq "/README.msmtpq") doc)
1828 (install-file "scripts/vim/msmtp.vim" vimfiles)))))))
1830 '((release-monitoring-url . "https://marlam.de/msmtp/download/")))
1832 "Simple and easy to use SMTP client with decent sendmail compatibility")
1834 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1835 an SMTP server (for example at a free mail provider) which takes care of further
1837 (license license:gpl3+)))
1846 (uri (let ((file-name (string-append "exim-" version ".tar.xz")))
1847 (list (string-append "https://ftp.exim.org/pub/exim/exim4/"
1849 ;; ‘Fix’ releases (exim-x.y.z.f) are kept separately.
1850 (string-append "https://ftp.exim.org/pub/exim/exim4/fixes/"
1852 ;; After a new non-fix release, the old one is moved here.
1853 (string-append "https://ftp.exim.org/pub/exim/exim4/old/"
1856 (base32 "18ziihkpa23lybm7m2l9wp2farxw0bd5ng7xm9ylgcrfgf95d6i9"))))
1857 (build-system gnu-build-system)
1860 #~(modify-phases %standard-phases
1862 ;; We'd use #:make-flags but the top-level Makefile calls
1863 ;; others recursively, so just set all variables this way.
1864 (lambda* (#:key outputs inputs #:allow-other-keys)
1865 (substitute* (list "Makefile" "OS/Makefile-Default")
1866 (("(RM_COMMAND=).*" all var)
1867 (string-append var "rm\n")))
1868 (copy-file "src/EDITME" "Local/Makefile")
1869 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1870 (let ((out (assoc-ref outputs "out")))
1871 (substitute* "Local/Makefile"
1872 (("(BIN_DIRECTORY=).*" all var)
1873 (string-append var out "/bin\n"))
1874 (("(CONFIGURE_FILE=).*" all var)
1875 (string-append var out "/etc/exim.conf\n"))
1876 (("(EXIM_USER=).*" all var)
1877 (string-append var "nobody\n"))
1878 (("(FIXED_NEVER_USERS=).*" all var)
1879 (string-append var "\n")) ; no root in build environment
1880 (("(COMPRESS_COMMAND=).*" all var)
1881 (string-append var (search-input-file inputs "bin/gzip")
1883 (("(ZCAT_COMMAND=).*" all var)
1884 (string-append var (search-input-file inputs "bin/zcat")
1886 (("# (USE_GNUTLS(|_PC)=.*)" all line)
1887 (string-append line "\n"))
1888 (("# (AUTH_CRAM_MD5=yes)" all line) line)
1889 (("# (AUTH_DOVECOT=yes)" all line) line)
1890 (("# (AUTH_EXTERNAL=yes)" all line) line)
1891 (("# (AUTH_PLAINTEXT=yes)" all line) line)
1892 (("# (AUTH_SPA=yes)" all line) line)
1893 (("# (AUTH_TLS=yes)" all line) line))
1894 ;; This file has hard-coded relative file names for tools
1895 ;; despite the zcat configuration above.
1896 (substitute* "src/exigrep.src"
1897 (("'(bzcat|xzcat|zcat|lzma)'" _ command)
1900 inputs (string-append "bin/" command))))))))
1901 (add-before 'build 'fix-sh-file-names
1903 (substitute* (list "scripts/lookups-Makefile"
1904 "scripts/reversion")
1905 (("SHELL=/bin/sh") "SHELL=sh"))
1906 (substitute* "scripts/Configure-config.h"
1907 (("\\| /bin/sh") "| sh"))
1908 (patch-shebang "scripts/Configure-eximon")))
1909 (add-before 'build 'build-reproducibly
1911 ;; The ‘compilation number’ increments on every build in the
1912 ;; same source tree and varies across different (parallel?)
1913 ;; builds. Make it a ‘constant number’ instead.
1914 (substitute* "src/version.c"
1915 (("#include \"cnumber.h\"") "1")))))
1917 #~(list (string-append "CC=" #$(cc-for-target))
1918 "INSTALL_ARG=-no_chown")
1919 ;; No ‘check’ target. The ‘test/’ suite assumes that particular
1920 ;; build options were (not) used and that it can freely ‘sudo’.
1923 (list pcre2 perl pkg-config))
1925 (list bdb-5.3 ; ‘#error Version 6 and later BDB API is not supported’
1934 (home-page "https://www.exim.org/")
1936 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1938 "Exim is a message transfer agent (MTA) developed at the University of
1939 Cambridge for use on Unix systems connected to the Internet. In style it is
1940 similar to Smail 3, but its facilities are more general. There is a great
1941 deal of flexibility in the way mail can be routed, and there are extensive
1942 facilities for checking incoming mail.")
1943 (properties '((lint-hidden-cve . ("CVE-2020-28017"))))
1944 (license license:gpl2+)))
1946 (define-public dovecot
1949 ;; Also update dovecot-pigeonhole when updating to a new minor version.
1950 (version "2.3.19.1")
1954 (uri (string-append "https://www.dovecot.org/releases/"
1955 (version-major+minor version) "/"
1956 "dovecot-" version ".tar.gz"))
1958 (base32 "0lawd8grwxass1frlw9bdd49fpwwxsv2qnxllsg6a2bkgpcbqnnv"))))
1959 (build-system gnu-build-system)
1966 libsodium ; extra password algorithms
1976 `(#:configure-flags '("--sysconfdir=/etc"
1977 "--localstatedir=/var"
1978 "--with-sqlite" ; not auto-detected
1979 "--with-lucene") ; not auto-detected
1980 ;; The -rdynamic linker flag is needed for the backtrace() function to
1981 ;; have symbol names rather than just addresses. Dovecot's tests rely
1982 ;; on this, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=962630.
1983 #:make-flags (list "LDFLAGS=-rdynamic")
1985 (modify-phases %standard-phases
1986 (add-after 'unpack 'patch-file-names
1988 (substitute* "src/lib-program-client/test-program-client-local.c"
1989 (("(/bin/| )cat") (which "cat"))
1990 (("/bin/echo") (which "echo"))
1991 (("/bin/false") (which "false"))
1992 (("/bin/sh") (which "bash"))
1993 (("head") (which "head"))
1994 (("sleep") (which "sleep")))
1995 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1996 "src/lib-smtp/test-bin/sendmail-success.sh")
1997 (("cat") (which "cat")))))
1999 (lambda* (#:key make-flags #:allow-other-keys)
2000 ;; Simple hack to avoid installing a trivial README in /etc.
2001 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
2003 (home-page "https://www.dovecot.org")
2004 (synopsis "Secure POP3/IMAP server")
2006 "Dovecot is a mail server whose major goals are security and reliability.
2007 It supports mbox/Maildir and its own dbox/mdbox formats.")
2008 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
2009 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
2010 ;; Unicode, Inc. License Agreement for Data Files and Software.
2011 (license (list license:lgpl2.1 license:expat
2012 (license:non-copyleft "file://COPYING")))))
2014 (define-public dovecot-pigeonhole
2015 (let ((dovecot-version (version-major+minor (package-version dovecot))))
2017 (name "dovecot-pigeonhole")
2023 "https://pigeonhole.dovecot.org/releases/" dovecot-version "/"
2024 "dovecot-" dovecot-version "-pigeonhole-" version ".tar.gz"))
2026 (base32 "033kkhby9k9yrmgvlfmyzp8fccsw5bhq1dyvxj94sg3grkpj7f8h"))
2027 (modules '((guix build utils)))
2030 ;; RFC licencing is ad-hoc and rarely free. Remove them all.
2031 (delete-file-recursively "doc/rfc")
2032 (substitute* "configure"
2033 (("doc/rfc/Makefile") ""))
2034 (substitute* "doc/Makefile.in"
2036 (build-system gnu-build-system)
2039 (list "--disable-static"
2040 "--with-dovecot-install-dirs=no"
2041 (string-append "--with-dovecot="
2042 (assoc-ref %build-inputs "dovecot")
2044 (string-append "--docdir="
2045 (assoc-ref %outputs "out")
2046 "/share/doc/" ,name "-" ,version)
2047 (string-append "--with-moduledir="
2048 (assoc-ref %outputs "out")
2051 (modify-phases %standard-phases
2052 (add-after 'unpack 'patch-file-names
2053 (lambda* (#:key outputs #:allow-other-keys)
2054 (let* ((out (assoc-ref outputs "out"))
2055 (libexec (string-append out "/libexec/dovecot")))
2056 (substitute* "src/managesieve/managesieve-settings.c"
2057 (("\\.executable = \"managesieve\"")
2058 (string-append ".executable = \"" libexec
2060 (substitute* "src/managesieve-login/managesieve-login-settings.c"
2061 (("\\.executable = \"managesieve-login\"")
2062 (string-append ".executable = \"" libexec
2063 "/managesieve-login\"")))))))))
2068 (home-page "https://pigeonhole.dovecot.org")
2069 (synopsis "Dovecot Sieve mail filtering plug-in and ManageSieve service")
2071 "Pigeonhole adds support for the Sieve language (RFC 5228) and the
2072 ManageSieve protocol (RFC 5804) to the Dovecot e-mail server.
2074 @dfn{Sieve} is a language for filtering incoming mail. Messages can be
2075 forwarded or sorted into separate folders. Unwanted messages can be rejected
2076 or discarded, and, when the user is not available, the Sieve interpreter can
2077 send an automated reply.
2079 Sieve is meant to be simple, extensible, and system-independent. The
2080 intention is to make it impossible to write anything more complex (and
2081 dangerous) than simple mail filters. Unlike most other mail filtering script
2082 languages, Sieve does not allow users to execute arbitrary programmes.
2084 Through the @dfn{ManageSieve} protocol, users can remotely manage their Sieve
2085 scripts without needing file system access. The server accepts only valid
2086 scripts to prevent embarrassing errors later on.")
2087 (license license:lgpl2.1))))
2089 (define-public dovecot-trees
2091 (name "dovecot-trees")
2096 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
2097 "archive.tar.gz?ref=v" version))
2098 (file-name (string-append name "-" version ".tar.gz"))
2101 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
2103 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
2104 (build-system gnu-build-system)
2106 (list automake autoconf libtool dovecot pkg-config))
2110 `(#:tests? #f ;No tests exist.
2111 #:configure-flags (list (string-append "--with-dovecot="
2112 (assoc-ref %build-inputs "dovecot")
2114 (home-page "https://0xacab.org/riseuplabs/trees")
2115 (synopsis "NaCL-based Dovecot email storage encryption plugin")
2117 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
2118 Dovecot encryption plugin. This plugin adds individually encrypted mail
2119 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
2120 which uses OpenSSL and RSA key pairs. TREES works in a similar way, but uses
2121 the Sodium crypto library (based on NaCL).
2125 @item On IMAP log in, the user's cleartext password is passed to the plugin.
2126 @item The plugin creates an argon2 digest from the password.
2127 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
2128 @item Inside the secretbox is stored a Curve25519 private key.
2129 @item The Curve25519 private key is used to decrypt each individual message,
2130 using libsodium sealed boxes.
2131 @item New mail is encrypted as it arrives using the Curve25519 public key.
2133 (license license:agpl3)))
2135 (define-public dovecot-libsodium-plugin
2136 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
2139 (name "dovecot-libsodium-plugin")
2140 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
2145 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
2147 (file-name (string-append name "-" version "-checkout"))
2150 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
2151 (build-system gnu-build-system)
2153 (list automake autoconf libtool dovecot pkg-config))
2157 `(#:tests? #f ;No tests exist.
2158 #:configure-flags (list (string-append "--with-dovecot="
2159 (assoc-ref %build-inputs "dovecot")
2161 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
2162 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
2164 "@code{dovecot-libsodium-plugin} provides a libsodium password
2165 hashing scheme (such as scrypt) plug-in for @code{Dovecot}.")
2166 (license license:gpl3+))))
2168 (define-public isync
2175 (uri (string-append "mirror://sourceforge/isync/isync/"
2176 version "/isync-" version ".tar.gz"))
2178 "1zq0wwvmqsl9y71546dr0aygzn9gjjfiw19hlcq87s929y4p6ckw"))))
2179 (build-system gnu-build-system)
2183 (list bdb cyrus-sasl openssl zlib))
2184 (home-page "https://isync.sourceforge.io/")
2185 (synopsis "Mailbox synchronization program")
2187 "isync/mbsync is a command-line tool for two-way synchronization of
2188 mailboxes. Currently Maildir and IMAP are supported types.")
2189 (license license:gpl2+)))
2191 (define-public perl-email-abstract
2193 (name "perl-email-abstract")
2198 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2199 "Email-Abstract-" version ".tar.gz"))
2201 (base32 "1z01wbflg49nbgzl81x260cp8x6qr7xdpz3dkrg82m1fwa9742q4"))))
2202 (build-system perl-build-system)
2204 (list perl-email-simple perl-module-pluggable perl-mro-compat))
2205 (home-page "https://metacpan.org/release/Email-Abstract")
2206 (synopsis "Interface to mail representations")
2207 (description "Email::Abstract provides module writers with the ability to
2208 write simple, representation-independent mail handling code.")
2209 (license license:perl-license)))
2211 (define-public perl-email-address
2213 (name "perl-email-address")
2218 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2219 "Email-Address-" version ".tar.gz"))
2221 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
2222 (build-system perl-build-system)
2223 (home-page "https://metacpan.org/release/Email-Address")
2224 (synopsis "Email address parsing and creation")
2225 (description "Email::Address implements a regex-based RFC 2822 parser that
2226 locates email addresses in strings and returns a list of Email::Address
2227 objects found. Alternatively you may construct objects manually.")
2228 (license license:perl-license)))
2230 (define-public perl-email-address-xs
2232 (name "perl-email-address-xs")
2237 (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
2238 "Email-Address-XS-" version ".tar.gz"))
2241 "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
2242 (build-system perl-build-system)
2243 (home-page "https://metacpan.org/release/Email-Address-XS")
2244 (synopsis "Parse and format RFC 5322 email addresses and groups")
2246 "Email::Address::XS implements RFC 5322 parser and formatter of email
2247 addresses and groups. Unlike Email::Address, this module does not use regular
2248 expressions for parsing but instead is implemented in XS and uses shared code
2249 from Dovecot IMAP server.")
2250 (license license:perl-license)))
2252 (define-public perl-email-date-format
2254 (name "perl-email-date-format")
2259 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2260 "Email-Date-Format-" version ".tar.gz"))
2263 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
2264 (build-system perl-build-system)
2265 (home-page "https://metacpan.org/release/Email-Date-Format")
2266 (synopsis "Produce RFC 2822 date strings")
2267 (description "Email::Date::Format provides a means for generating an RFC
2268 2822 compliant datetime string.")
2269 (license license:perl-license)))
2271 (define-public perl-email-messageid
2273 (name "perl-email-messageid")
2278 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2279 "Email-MessageID-" version ".tar.gz"))
2282 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
2283 (build-system perl-build-system)
2284 (home-page "https://metacpan.org/release/Email-MessageID")
2285 (synopsis "Generate world unique message-ids")
2286 (description "Email::MessageID generates recommended message-ids to
2287 identify a message uniquely.")
2288 (license license:perl-license)))
2290 (define-public perl-email-mime
2292 (name "perl-email-mime")
2297 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2298 "Email-MIME-" version ".tar.gz"))
2301 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
2302 (build-system perl-build-system)
2304 (list perl-email-address
2305 perl-email-messageid
2306 perl-email-mime-contenttype
2307 perl-email-mime-encodings
2310 perl-module-runtime))
2311 (home-page "https://metacpan.org/release/Email-MIME")
2312 (synopsis "MIME message handling")
2313 (description "Email::MIME is an extension of the Email::Simple module, to
2314 handle MIME encoded messages. It takes a message as a string, splits it up
2315 into its constituent parts, and allows you access to various parts of the
2316 message. Headers are decoded from MIME encoding.")
2317 (license license:perl-license)))
2319 (define-public perl-email-mime-contenttype
2321 (name "perl-email-mime-contenttype")
2326 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2327 "Email-MIME-ContentType-" version ".tar.gz"))
2330 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
2331 (build-system perl-build-system)
2333 (list perl-capture-tiny))
2334 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
2335 (synopsis "Parse MIME Content-Type headers")
2336 (description "Email::MIME::ContentType parses a MIME Content-Type
2338 (license license:perl-license)))
2340 (define-public perl-email-mime-encodings
2342 (name "perl-email-mime-encodings")
2347 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2348 "Email-MIME-Encodings-" version ".tar.gz"))
2351 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
2352 (build-system perl-build-system)
2354 (list perl-capture-tiny))
2355 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
2356 (synopsis "Unified interface to MIME encoding and decoding")
2357 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
2358 (license license:perl-license)))
2360 (define-public perl-email-sender
2362 (name "perl-email-sender")
2363 (version "1.300035")
2367 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2368 "Email-Sender-" version ".tar.gz"))
2370 (base32 "0yfssp3rqdx1dmgvnygarzgkpkhqm28r5sd0gh87ksk8yxndhjql"))))
2371 (build-system perl-build-system)
2373 (list perl-capture-tiny))
2375 (list perl-email-abstract
2381 perl-moox-types-mooselike
2385 (home-page "https://metacpan.org/release/Email-Sender")
2386 (synopsis "Perl library for sending email")
2387 (description "Email::Sender replaces the old and sometimes problematic
2388 Email::Send library.")
2389 (license license:perl-license)))
2391 (define-public perl-email-simple
2393 (name "perl-email-simple")
2398 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
2399 "Email-Simple-" version ".tar.gz"))
2402 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
2403 (build-system perl-build-system)
2405 (list perl-email-date-format))
2406 (home-page "https://metacpan.org/release/Email-Simple")
2407 (synopsis "Parsing of RFC 2822 messages")
2408 (description "Email::Simple provides simple parsing of RFC 2822 message
2409 format and headers.")
2410 (license license:perl-license)))
2412 (define-public libesmtp
2420 (url "https://github.com/libesmtp/libESMTP")
2421 (commit (string-append "v" version))))
2422 (file-name (git-file-name name version))
2424 (base32 "1bhh8hlsl9597x0bnfl563k2c09b61qnkb9mfyqcmzlq63m1zw5y"))))
2425 (build-system meson-build-system)
2428 (home-page "http://www.stafford.uklinux.net/libesmtp/")
2429 (synopsis "Library for sending mail via remote hosts using SMTP")
2431 "libESMTP is an @acronym{SMTP, Simple Mail Transfer Protocol} client that
2432 manages posting (or submission of) electronic mail via a preconfigured
2433 @acronym{MTA, Mail Transport Agent}.
2435 It may be used as part of a @acronym{MUA, Mail User Agent}, or other program
2436 that must be able to post electronic mail where mail functionality may not be
2437 that program's primary purpose.
2439 libESMTP's high-level API shields developers from the complexity of SMTP. It
2440 transparently handles many SMTP extensions including authentication,
2441 @acronym{TLS, Transport-Level Security}, and PIPELINING for performance. Even
2442 without a pipelining server, libESMTP offers much better performance than would
2443 be expected from a simple client.")
2444 (license (list license:lgpl2.1+ license:gpl2+))))
2446 (define-public esmtp
2454 (url "https://github.com/andywingo/esmtp")
2455 (commit "01bf9fc")))
2458 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
2459 (file-name (string-append name "-" version "-checkout"))
2460 (patches (search-patches "esmtp-add-lesmtp.patch"))))
2462 `(#:phases (modify-phases %standard-phases
2464 (lambda _ (invoke "autoreconf" "-vfi"))))))
2465 (build-system gnu-build-system)
2467 (list bison flex autoconf automake libtool))
2470 (home-page "https://sourceforge.net/projects/esmtp/")
2471 (synopsis "Relay-only mail transfer agent (MTA)")
2472 (description "Esmtp is a simple relay-only mail transfer agent built using
2473 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
2474 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
2475 page for more on configuration. This package also provides minimal
2476 compatibility shims for the @command{sendmail}, @command{mailq}, and
2477 @command{newaliases} commands.")
2478 (license license:gpl2+)))
2486 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
2487 version "/fdm-" version ".tar.gz"))
2489 (base32 "1zxd5j5x2gp6m62j83xsjyfglw1p6gn4zk5qx10djdh8xzkg53c5"))))
2490 (build-system gnu-build-system)
2492 (list tdb openssl zlib))
2493 (home-page "https://github.com/nicm/fdm")
2495 "@acronym{MRA, Mail Retrieval Agent} and @acronym{MDA, Mail Delivery Agent}")
2496 (description "fdm fetches and delivers mail in various ways.
2498 Mail may be fetched from IMAP or POP3 servers, from local maildirs, or read
2499 from standard input. It is then filtered based on regular expressions, its
2500 size or age, or the output of a (shell) command. It can be rewritten by an
2501 external process, dropped, left on the server or delivered into maildirs,
2502 mboxes, to a file or pipe, or any combination.
2504 fdm is primarily designed for use by a single user, but can use privilege
2505 separation to safely deliver mail in multi-user setups.")
2507 ;; Why point to a source file? Well, all the individual files have a
2508 ;; copy of this license in their headers, but there's no seprate file
2509 ;; with that information.
2510 (license:non-copyleft
2511 "https://github.com/nicm/fdm/blob/master/command.c"))))
2514 (define-public procmail
2522 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
2527 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
2528 ;; The following patch fixes an ambiguous definition of
2529 ;; getline() in formail.c. The patch is provided by Debian as
2531 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
2532 "procmail-CVE-2014-3618.patch"
2533 "procmail-CVE-2017-16844.patch"))))
2535 `(#:phases (modify-phases %standard-phases
2538 (substitute* "Makefile"
2542 (assoc-ref %outputs "out"))
2546 #:tests? #f)) ;; There are no tests indicating a successful
2547 ;; build. Some tests of basic locking mechanisms provided by the
2548 ;; file system are performed during 'make install'. However, these
2549 ;; are performed before the actual build process.
2550 (build-system gnu-build-system)
2551 (inputs (list exim))
2552 (home-page "http://www.procmail.org/")
2553 (synopsis "Versatile mail delivery agent (MDA)")
2554 (description "Procmail is a mail delivery agent (MDA) featuring support
2555 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
2556 can be sorted into separate files/directories and arbitrary commands can be
2557 executed on mail arrival. Procmail is considered stable, but is no longer
2559 (license license:gpl2+))) ;; procmail allows to choose the
2560 ;; nonfree Artistic License 1.0
2561 ;; as alternative to the GPL2+.
2562 ;; This option is not listed here.
2564 (define-public khard
2570 (uri (pypi-uri name version))
2573 "062nv4xkfsjc11k9m52dh6xjn9z68a4a6x1s8z05wwv4jbp1lkhn"))))
2574 (build-system python-build-system)
2577 (modify-phases %standard-phases
2578 (add-after 'install 'install-completions
2579 (lambda* (#:key outputs #:allow-other-keys)
2580 (let* ((out (assoc-ref outputs "out"))
2581 (zsh (string-append out "/share/zsh/site-functions")))
2582 (copy-recursively "misc/zsh" zsh)
2585 (list python-setuptools-scm))
2587 (list python-atomicwrites python-configobj python-ruamel.yaml
2588 python-unidecode python-vobject))
2589 (synopsis "Console address book using CardDAV")
2590 (description "Khard is an address book for the console. It creates, reads,
2591 modifies and removes CardDAV address book entries at your local machine. For
2592 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
2593 Khard can also be used from within the email client @command{mutt}.")
2594 (home-page "https://github.com/scheibler/khard")
2595 (license license:gpl3+)))
2597 (define-public perl-mail-spf
2599 (name "perl-mail-spf")
2605 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
2609 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
2610 (build-system perl-build-system)
2612 (list perl-module-build perl-net-dns-resolver-programmable))
2615 (modify-phases %standard-phases
2616 (add-before 'configure 'modify-Build.PL
2617 (lambda* (#:key outputs #:allow-other-keys)
2618 (substitute* "Build.PL"
2619 (("'/usr/sbin'") (string-append "'"
2620 (assoc-ref outputs "out")
2624 (list perl-error perl-net-dns perl-netaddr-ip perl-uri))
2625 (home-page "https://metacpan.org/release/Mail-SPF")
2626 (synopsis "Perl implementation of Sender Policy Framework")
2627 (description "Mail::SPF is the Sender Policy Framework implemented
2629 (license license:bsd-3)))
2631 (define-public perl-mail-authenticationresults
2633 (name "perl-mail-authenticationresults")
2634 (version "1.20180923")
2638 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
2639 "Mail-AuthenticationResults-" version ".tar.gz"))
2642 "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
2643 (build-system perl-build-system)
2645 (list perl-test-exception))
2646 (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
2647 (synopsis "Object Oriented Authentication-Results Headers")
2648 (description "Mail::AuthenticationResults parses the message header field
2649 that indicates the message authentication status as per RFC7601. This module
2650 is not fully compliant with the RFC but it tries to implement most styles of
2651 Authentication-Results header seen in the wild.")
2652 (license license:perl-license)))
2654 (define-public perl-mail-dkim
2656 (name "perl-mail-dkim")
2657 (version "1.20220520")
2661 "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
2666 "0iiny8s1a60pksxzlpkk9b6x6z907m4pdxjbsaih1bdz9g4bii4a"))))
2667 (build-system perl-build-system)
2669 (list perl-crypt-openssl-rsa perl-mail-authenticationresults
2670 perl-mailtools perl-net-dns))
2672 (list perl-net-dns-resolver-mock perl-test-requiresinternet
2674 (home-page "https://metacpan.org/release/Mail-DKIM")
2675 (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
2676 (description "Mail::DKIM is a Perl module that implements the new Domain
2677 Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
2678 both of which sign and verify emails using digital signatures and DNS records.
2679 Mail-DKIM can be used by any Perl program that wants to provide support for
2680 DKIM and/or DomainKeys.")
2681 (license license:gpl3+)))
2683 (define-public dkimproxy
2690 "mirror://sourceforge/dkimproxy/dkimproxy/"
2691 version "/dkimproxy-" version ".tar.gz"))
2694 "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
2696 (search-patches "dkimproxy-add-ipv6-support.patch"))))
2697 (build-system gnu-build-system)
2700 (modify-phases %standard-phases
2701 (add-after 'install 'make-wrapper
2702 (lambda* (#:key inputs outputs #:allow-other-keys)
2703 (let* ((out (assoc-ref outputs "out"))
2704 (wrap.pl (lambda (scripts keys)
2707 (wrap-program (string-append out script)
2708 `("PERL5LIB" ":" prefix
2711 (assoc-ref inputs input)
2712 "/lib/perl5/site_perl"))
2715 (wrap.pl (list "/bin/dkimproxy.in"
2716 "/bin/dkimproxy.out")
2717 (list "perl-crypt-openssl-rsa"
2718 "perl-io-socket-inet6"
2720 "perl-mail-authenticationresults"
2725 (wrap.pl (list "/bin/dkim_responder.pl")
2726 (list "perl-crypt-openssl-rsa"
2735 perl-crypt-openssl-rsa
2736 perl-io-socket-inet6
2738 perl-mail-authenticationresults
2745 (home-page "http://dkimproxy.sourceforge.net/")
2746 (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
2748 "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
2749 @code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
2750 proxy for signing outgoing email, and an inbound proxy for verifying signatures
2751 of incoming messages.
2753 It was designed for Postfix, but can be used to add DKIM support to nearly any
2754 existing mail server. With Postfix, the proxies can operate as either
2755 @code{Before-Queue} or @code{After-Queue} content filters.")
2756 (license license:gpl2+)))
2758 (define-public mb2md
2765 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
2769 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
2770 (build-system trivial-build-system)
2772 '(#:modules ((guix build utils))
2775 (use-modules (guix build utils))
2776 (let* ((source (assoc-ref %build-inputs "source"))
2777 (out (assoc-ref %outputs "out"))
2778 (bin (string-append out "/bin"))
2779 (perl (assoc-ref %build-inputs "perl"))
2780 (gzip (assoc-ref %build-inputs "gzip"))
2781 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
2782 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
2784 (with-directory-excursion bin
2785 (copy-file source "mb2md.gz")
2786 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
2787 (substitute* "mb2md"
2788 (("#!/usr/bin/perl")
2789 (string-append "#!/usr/bin/perl -I " perl5lib)))
2790 (patch-shebang "mb2md" (list (string-append perl "/bin")))
2791 (chmod "mb2md" #o555))
2793 (native-inputs (list gzip))
2794 (inputs (list perl perl-timedate))
2795 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
2796 (synopsis "Mbox to maildir converter")
2798 "Mb2md is a Perl script that takes one or more mbox format files and
2799 converts them to maildir format directories.")
2800 (license license:public-domain)))
2802 (define-public mblaze
2810 (url "https://github.com/leahneukirchen/mblaze")
2811 (commit (string-append "v" version))))
2812 (file-name (git-file-name name version))
2814 (base32 "0fa8s9dp5ilwmfcwkx72x2b5i0maa5sl97hv2cdknqmc27gv0b1c"))))
2815 (outputs '("out" "contrib"))
2816 (build-system gnu-build-system)
2817 (inputs (list bash-minimal
2826 (native-inputs (list perl))
2830 #~(list #$(string-append "CC=" (cc-for-target))
2832 (string-append "DESTDIR=" #$output))
2833 #:modules '((ice-9 ftw)
2835 (guix build gnu-build-system))
2837 #~(modify-phases %standard-phases
2839 (add-after 'install 'install-contrib
2840 (lambda* (#:key inputs outputs #:allow-other-keys)
2841 (let* ((out (assoc-ref outputs "out"))
2842 (contrib (assoc-ref outputs "contrib"))
2843 (contrib-bin (string-append contrib "/bin"))
2844 (exe? (lambda (file)
2845 (let ((s (stat file)))
2846 (and (eq? 'regular (stat:type s))
2847 (logtest #o100 (stat:perms s)))))))
2848 (mkdir-p contrib-bin)
2849 (with-directory-excursion "contrib"
2852 (install-file prog contrib-bin)
2853 (wrap-program (string-append contrib-bin "/" prog)
2856 ,(string-append out "/bin")
2857 ,(string-append (assoc-ref inputs "coreutils") "/bin")
2858 ,(string-append (assoc-ref inputs "gawk") "/bin")
2859 ,(string-append (assoc-ref inputs "glibc") "/bin")
2860 ,(string-append (assoc-ref inputs "ncurses") "/bin")
2861 ,(string-append (assoc-ref inputs "openssl") "/bin")
2862 ,(string-append (assoc-ref inputs "sed") "/bin")))))
2863 (scandir "." exe?)))))))))
2864 (home-page "https://github.com/leahneukirchen/mblaze")
2865 (synopsis "Unix utilities to deal with Maildir")
2867 "The mblaze message system is a set of Unix utilities for processing and
2868 interacting with mail messages which are stored in maildir folders.
2870 Its design is roughly inspired by MH, the RAND Message Handling System, but it
2871 is a complete implementation from scratch.
2873 mblaze is a classic command line MUA and has no features for receiving or
2874 transferring messages; you can operate on messages in a local maildir spool,
2875 or fetch your messages using fdm(1), getmail(1), offlineimap(1), or similar
2876 utilities, and send it using dma(8), msmtp(1), sendmail(8), as provided by
2877 OpenSMTPD, Postfix, or similar.
2879 mblaze operates directly on maildir folders and doesn't use its own caches or
2880 databases. There is no setup needed for many uses. All utilities have been
2881 written with performance in mind. Enumeration of all messages in a maildir is
2882 avoided unless necessary, and then optimized to limit syscalls. Parsing
2883 message metadata is optimized to limit I/O requests. Initial operations on a
2884 large maildir may feel slow, but as soon as they are in the file system cache,
2885 everything is blazingly fast. The utilities are written to be memory
2886 efficient (i.e. not wasteful), but whole messages are assumed to fit into RAM
2887 easily (one at a time).")
2888 (license (list license:public-domain
2889 license:expat)))) ; mystrverscmp.c and mymemmem
2898 (uri (string-append "https://marlam.de/mpop/releases/"
2899 "mpop-" version ".tar.xz"))
2901 (base32 "1yc7lsdy9gvlslvljqg34kvcaf4wvrwlvj6h5awkzlp6x9qva3l7"))))
2902 (build-system gnu-build-system)
2907 (home-page "https://marlam.de/mpop/")
2908 (synopsis "POP3 mail client")
2909 (description "mpop is a small and fast POP3 client suitable as a
2910 fetchmail replacement.
2912 mpop supports multiple accounts, header based mail filtering, delivery
2913 to mbox files, maildir folders or an @acronym{MDA, Mail Delivery Agent},
2914 TLS/SSL, several authentication methods, @acronym{IDN, Internationalized Domain
2915 Names} and SOCKS proxies.")
2916 (license license:gpl3+)))
2918 (define-public mhonarc
2925 (uri (string-append "mirror://cpan/authors/id/L/LD/LDIDRY/MHonArc-"
2928 (base32 "0cszh619i8bfjpyxhfgph20v8lic5zpirr990xdbg7759qvwfza5"))))
2929 (build-system perl-build-system)
2930 (home-page "https://www.mhonarc.org/")
2931 (synopsis "Create HTML archives of mail/news messages")
2933 "MHonArc is a Perl mail-to-HTML converter. MHonArc
2934 provides HTML mail archiving with index, mail thread linking,
2935 etc; plus other capabilities including support for MIME and
2936 powerful user customization features.")
2937 (license license:gpl2+)))
2939 (define-public sendmail
2947 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
2951 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
2952 (build-system gnu-build-system)
2955 (modify-phases %standard-phases
2956 (add-after 'unpack 'remove-build-timestamps
2957 ;; Avoid embedding timestamps for reproducible build
2961 "devtools/bin/configure.sh"
2962 "cf/sh/makeinfo.sh")
2963 (("on `date`") ""))))
2964 (add-before 'build 'replace-/bin/sh
2968 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2969 "contrib/mmuegel" "devtools/bin/configure.sh")
2970 (find-files "." ".*\\.m4")
2971 (find-files "." ".*\\.cf"))
2972 (("/bin/sh") (which "sh")))
2974 (substitute* "devtools/bin/Build"
2975 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
2977 (add-before 'build 'replace-/usr
2980 '("devtools/OS/Linux"
2981 "cf/ostype/mklinux.m4"
2982 "cf/ostype/linux.m4")
2983 (("/usr/sbin") "/sbin"))))
2987 ;; Render harmless any attempts to chown or chgrp
2988 (substitute* "devtools/bin/install.sh"
2989 (("owner=\\$2") "owner=''")
2990 (("group=\\$2") "group=''"))
2992 (with-output-to-file "devtools/Site/site.config.m4"
2995 define(`confEBINDIR', `/sbin')
2996 define(`confSBINDIR', `/sbin')
2997 define(`confMBINDIR', `/sbin')
2998 define(`confUBINDIR', `/bin')
2999 define(`confLINKS', `')
3000 define(`confCC', `gcc')
3001 define(`confOPTIMIZE', `-g -O2')
3002 define(`confLIBS', `-lresolv')
3003 define(`confINSTALL', `~a/devtools/bin/install.sh')
3004 define(`confDEPEND_TYPE', `CC-M')
3005 define(`confINST_DEP', `')
3010 (invoke "sh" "Build")
3011 (with-directory-excursion "cf/cf"
3012 (copy-file "generic-linux.mc" "sendmail.mc")
3013 (invoke "sh" "Build" "sendmail.cf"))
3015 (add-before 'install 'pre-install
3017 (let ((out (assoc-ref %outputs "out")))
3018 (mkdir-p (string-append out "/bin"))
3019 (mkdir-p (string-append out "/sbin"))
3020 (mkdir-p (string-append out "/etc/mail"))
3021 (setenv "DESTDIR" out)
3022 (with-directory-excursion "cf/cf"
3023 (invoke "sh" "Build" "install-cf"))
3025 (add-after 'install 'post-install
3027 ;; Make symbolic links manually, because build script uses
3028 ;; absolute paths for them and ignores DESTDIR.
3031 (symlink "../sbin/sendmail" (string-append %output "/bin/" name)))
3032 '("hoststat" "newaliases" "mailq" "purgestat")))))
3033 ;; There is no make check. There are some post installation tests, but those
3034 ;; require root privileges
3038 (home-page "http://sendmail.org")
3040 "Highly configurable Mail Transfer Agent (MTA)")
3042 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
3043 Allman. It is highly configurable and supports many delivery methods and many
3044 transfer protocols.")
3045 (license (license:non-copyleft "file://LICENSE"
3046 "See LICENSE in the distribution."))))
3048 (define-public sieve-connect
3050 (name "sieve-connect")
3055 (uri (string-append "https://people.spodhuis.org/phil.pennock/software/"
3056 "sieve-connect-" version ".tar.bz2"))
3058 (base32 "00vnyzr67yr2ilnprbd388gfnwmrmbdx1jsig9d0n5q902jqn62a"))))
3059 (build-system gnu-build-system)
3062 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
3063 #:tests? #f ; no test suite
3065 (modify-phases %standard-phases
3066 (delete 'configure) ; no configure script
3067 (add-before 'install 'create-output-directories
3068 (lambda* (#:key outputs #:allow-other-keys)
3069 (let ((out (assoc-ref outputs "out")))
3070 (for-each (lambda (subdirectory)
3071 (mkdir-p (string-append out "/" subdirectory)))
3075 (add-after 'install 'wrap-program
3076 (lambda* (#:key inputs outputs #:allow-other-keys)
3077 (let ((out (assoc-ref outputs "out"))
3078 (path (getenv "PERL5LIB")))
3079 (wrap-script (string-append out "/bin/sieve-connect")
3080 #:guile (search-input-file inputs "bin/guile")
3081 `("PERL5LIB" ":" = (,path)))
3084 `(("guile" ,guile-3.0) ; for wrap-script
3086 ("perl-authen-sasl" ,perl-authen-sasl)
3087 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
3088 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
3089 ("perl-net-dns" ,perl-net-dns)
3090 ("perl-socket6" ,perl-socket6)
3091 ("perl-term-readkey" ,perl-term-readkey)
3092 ("perl-term-readline" ,perl-term-readline-gnu)))
3094 "https://people.spodhuis.org/phil.pennock/software/#sieve-connect")
3095 (synopsis "ManageSieve client for managing Sieve e-mail filters")
3097 "Sieve-connect lets you view, upload, edit, delete, and otherwise manage
3098 Sieve scripts on any mail server that speaks the @dfn{ManageSieve} protocol,
3099 as specified in RFC 5804.
3101 @dfn{Sieve} (RFC 5228) is a specialised language for e-mail filtering. Sieve
3102 scripts are stored on the server and run whenever mail arrives. They can
3103 automatically sort new messages into folders, silently reject them, send an
3104 automated response, and more.
3106 @command{sieve-connect} is designed to be both a tool which can be invoked
3107 from scripts as well as a decent interactive client. It supports TLS for
3108 connection privacy, as well as authentication with SASL or GSSAPI client
3109 certificates. It should be a drop-in replacement for @command{sieveshell}
3110 from the Cyrus IMAP project.")
3111 (license license:bsd-3)))
3113 (define-public opensmtpd
3120 (uri (string-append "https://www.opensmtpd.org/archives/"
3121 "opensmtpd-" version ".tar.gz"))
3123 (base32 "05sd7bmq29ibnqbl2z53hiyprfxzf0qydfdaixs68rz55wqhbgsi"))))
3124 (build-system gnu-build-system)
3129 libressl ; recommended, and supports e.g. ECDSA
3133 (list bison groff)) ; for man pages
3136 (list "--localstatedir=/var"
3137 ;; This is the default only if it exists at build time—it doesn't.
3138 "--with-path-socket=/var/run"
3139 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
3140 "--with-user-smtpd=smtpd"
3141 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
3145 (modify-phases %standard-phases
3146 ;; See: https://github.com/OpenSMTPD/OpenSMTPD/issues/1069.
3147 (add-after 'unpack 'fix-smtpctl-encrypt-bug
3149 (substitute* "usr.sbin/smtpd/smtpctl.c"
3150 (("\"encrypt\", \"--\",")
3153 ;; Fix some incorrectly hard-coded external tool file names.
3154 (add-after 'unpack 'patch-FHS-file-names
3156 (substitute* "usr.sbin/smtpd/smtpctl.c"
3157 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
3158 (("/bin/cat") (which "cat")))
3159 (substitute* "usr.sbin/smtpd/mda_unpriv.c"
3160 (("/bin/sh") (which "sh")))
3162 ;; OpenSMTPD provides a single smtpctl utility to control both the
3163 ;; daemon and the local submission subsystem. To accomodate systems
3164 ;; that require historical interfaces such as sendmail, newaliases or
3165 ;; makemap, smtpctl operates in compatibility mode if called with the
3167 (add-after 'install 'install-compability-links
3168 (lambda* (#:key outputs #:allow-other-keys)
3169 (let* ((out (assoc-ref outputs "out"))
3170 (sbin (string-append out "/sbin/")))
3171 (for-each (lambda (command)
3172 (symlink "smtpctl" (string-append sbin command)))
3173 (list "mailq" "makemap" "newaliases"
3174 "send-mail" "sendmail")))
3176 (synopsis "Lightweight SMTP daemon")
3178 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
3179 Transfer Protocol}, with some additional standard extensions. It allows
3180 ordinary machines to exchange e-mails with other systems speaking the SMTP
3181 protocol, or to deliver them to local users.
3183 In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
3184 functionality than those available in other SMTP daemons. The objective is to
3185 provide enough features to satisfy typical usage at the risk of unsuitability
3186 to esoteric or niche requirements.")
3187 (home-page "https://www.opensmtpd.org")
3188 (license (list license:bsd-2 license:bsd-3 license:bsd-4
3189 (license:non-copyleft "file://COPYING")
3190 license:public-domain license:isc license:openssl))))
3192 (define-public opensmtpd-extras
3194 (name "opensmtpd-extras")
3198 (uri (string-append "https://www.opensmtpd.org/archives/"
3199 "opensmtpd-extras-" version ".tar.gz"))
3202 "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq"))))
3203 (build-system gnu-build-system)
3207 `(("libressl" ,libressl)
3208 ("libevent" ,libevent)
3210 ("opensmtpd" ,opensmtpd)
3211 ("postgresql" ,postgresql)
3212 ("python" ,python-2)
3213 ("sqlite" ,sqlite)))
3216 (list "--sysconfdir=/etc"
3217 "--localstatedir=/var"
3220 "--with-queue-python"
3225 "--with-table-mysql"
3226 "--with-table-postgres"
3227 ;; "--with-table-redis" ; TODO: package hiredis
3228 "--with-table-socketmap"
3229 "--with-table-passwd"
3230 "--with-table-python"
3231 "--with-table-sqlite"
3234 "--with-scheduler-ram"
3235 "--with-scheduler-stub"
3236 "--with-scheduler-python"
3238 "--with-user-smtpd=smtpd"
3240 ;; We have to configure it like this because the default checks for
3241 ;; for example Python in /usr/{,local/}bin and fails otherwise.
3242 (string-append "--with-python="
3243 (assoc-ref %build-inputs "python")))))
3244 (home-page "https://www.opensmtpd.org")
3245 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
3247 "This package provides extra tables, filters, and various other addons
3248 for OpenSMTPD to extend its functionality.")
3249 (license (list license:bsd-2 license:bsd-3 ; openbsd-compat
3250 license:isc)))) ; everything else
3252 (define-public libopensmtpd
3253 ;; Private source dependency of opensmtpd-filter-dkimsign (by the same
3254 ;; author), until any project actually uses it in its compiled form.
3256 (name "libopensmtpd")
3261 (uri (list (string-append "https://imperialat.at/releases/"
3262 "libopensmtpd-" version ".tar.gz")
3263 (string-append "https://distfiles.sigtrap.nl/"
3264 "libopensmtpd-" version ".tar.gz")))
3266 (base32 "04x610mvwba7m0n9h0wbnsw58rb4khq44fm4blkgjqvh3bhxbmnd"))))
3267 (build-system gnu-build-system)
3270 (list "-f" "Makefile.gnu"
3271 (string-append "CC=" ,(cc-for-target))
3272 (string-append "LOCALBASE=" (assoc-ref %outputs "out")))
3273 #:tests? #f ; no test suite
3275 (modify-phases %standard-phases
3276 (add-after 'unpack 'inherit-ownership
3278 (substitute* "Makefile.gnu"
3279 (("-o \\$\\{...OWN\\} -g \\$\\{...GRP\\}") ""))))
3280 (delete 'configure)))) ; no configure script
3282 (list mandoc)) ; silently installs empty man page without
3285 (home-page "https://imperialat.at/dev/libopensmtpd/")
3286 (synopsis "OpenSMTPd filter C API")
3288 "The @code{osmtpd} API is an event-based C programming interface for
3289 writing OpenSMTPd filters.")
3290 (license license:expat)))
3292 (define-public opensmtpd-filter-dkimsign
3294 (name "opensmtpd-filter-dkimsign")
3299 (uri (list (string-append "https://imperialat.at/releases/"
3300 "filter-dkimsign-" version ".tar.gz")
3301 (string-append "https://distfiles.sigtrap.nl/"
3302 "filter-dkimsign-" version ".tar.gz")))
3304 (base32 "0jwp47ixibnz8rghn193bk2hxh1j1zfrnidml18j7d7cylxfrd55"))))
3305 (build-system gnu-build-system)
3308 (list "-f" "Makefile.gnu"
3309 (string-append "CC=" ,(cc-for-target))
3310 "HAVE_ED25519=yep-but-is-openssl-only"
3311 (string-append "LOCALBASE=" (assoc-ref %outputs "out")))
3312 #:tests? #f ; no test suite
3314 (modify-phases %standard-phases
3315 (add-after 'unpack 'patch-Makefile.gnu
3317 (substitute* "Makefile.gnu"
3318 (("pkg-config") ,(pkg-config-for-target))
3319 (("-o \\$\\{...OWN\\} -g \\$\\{...GRP\\}") ""))))
3320 (delete 'configure)))) ; no configure script
3322 (list mandoc)) ; silently installs empty man page without
3324 (list libevent libopensmtpd
3325 ;; XXX Our OpenSMTPd package uses libressl, but this package currently
3326 ;; supports HAVE_ED25519 only with openssl. Switch back when possible.
3328 (home-page "http://imperialat.at/dev/filter-dkimsign/")
3329 (synopsis "OpenSMTPd filter for signing mail with DKIM")
3331 "The @command{filter-dkimsign} OpenSMTPd filter signs outgoing e-mail
3332 messages with @acronym{DKIM, DomainKeys Identified Mail} (RFC 4871).")
3333 (license license:expat)))
3335 (define-public opensmtpd-filter-rspamd
3337 (name "opensmtpd-filter-rspamd")
3342 (url "https://github.com/poolpOrg/filter-rspamd")
3343 (commit (string-append "v" version))))
3345 (base32 "1qhrw20q9y44ffgx5k14nvqc9dh47ihywgzza84g0zv9xgif7hd5"))
3346 (file-name (git-file-name name version))))
3347 (build-system go-build-system)
3349 `(#:import-path "github.com/poolpOrg/filter-rspamd"
3351 (modify-phases %standard-phases
3352 (add-before 'build 'set-bootstrap-variables
3353 (lambda* (#:key outputs inputs #:allow-other-keys)
3354 ;; Tell the build system where to install binaries
3355 (let* ((out (assoc-ref outputs "out"))
3356 (libexec (string-append out "/libexec/opensmtpd")))
3357 (setenv "GOBIN" libexec)))))))
3360 (home-page "https://github.com/poolpOrg/filter-rspamd")
3361 (synopsis "OpenSMTPd filter to request an Rspamd analysis")
3363 "The @command{filter-rspamd} OpenSMTPd filter implements the
3364 Rspamd protocol and allows OpenSMTPd to request an Rspamd analysis of
3365 an SMTP transaction before a message is committed to queue.")
3366 (license license:isc)))
3368 (define-public mailman
3375 (uri (pypi-uri "mailman" version))
3377 (base32 "0a5ckbf8hc3y28b7p5psp0d4bxk601jlr5pd3hhh545xd8d9f0dg"))))
3378 (build-system python-build-system)
3393 python-importlib-resources
3398 python-zope-component
3399 python-zope-configuration
3401 python-zope-interface))
3404 (home-page "https://www.list.org")
3405 (synopsis "Mailing list manager")
3407 "GNU Mailman is software for managing email discussion and mailing
3408 lists. Both users and administrators generally perform their actions in a
3409 web interface, although email and command-line interfaces are also provided.
3410 The system features built-in archiving, automatic bounce processing, content
3411 filtering, digest delivery, and more.")
3412 (license license:gpl3+)))
3414 (define-public python-mailmanclient
3416 (name "python-mailmanclient")
3421 (uri (pypi-uri "mailmanclient" version))
3424 "0ppqnv84v7npgjykhqdy5c38vanz4l0qw871kpsl27z4fm365zlj"))))
3425 (build-system python-build-system)
3427 `(#:tests? #f)) ; Requires mailman running
3429 (list python-requests))
3431 ; `(("mailman" ,mailman)
3432 ; ("python-falcon" ,python-falcon)
3433 ; ("python-pytest" ,python-pytest)
3434 ; ("python-pytest-services" ,python-pytest-services)))
3435 (home-page "https://www.list.org/")
3436 (synopsis "Python bindings for the Mailman 3 REST API")
3438 "The mailmanclient library provides official Python bindings for
3439 the GNU Mailman 3 REST API.")
3440 (license license:lgpl3+)))
3443 (define-public mlmmj
3450 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
3451 version ".tar.bz2"))
3454 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
3455 (build-system gnu-build-system)
3457 (list perl)) ; For "contrib/web/"
3462 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
3463 ;; It opens the files control/mimedeny and control/mimestrip to get a list
3464 ;; of mimetypes for parts of multipart/mime messages that should be denied
3465 ;; or stripped. The parts then get stripped directly when the mail is
3466 ;; received. mlmmj-receive-strip also appends an extra header
3467 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
3469 (list "--enable-receive-strip")
3471 (modify-phases %standard-phases
3472 (add-before 'install 'install-contrib
3473 (lambda* (#:key outputs #:allow-other-keys)
3474 (let* ((out (assoc-ref outputs "out"))
3475 (share (string-append out "/share/mlmmj"))
3476 (contrib (string-append share "/contrib/web"))
3477 (texts (string-append share "/listtexts")))
3478 (copy-recursively "contrib/web/" contrib)
3479 (copy-recursively "listtexts" texts)
3480 (rename-file texts (string-append share "/texts"))
3482 (home-page "http://mlmmj.org")
3483 (synopsis "Mailing list managing made joyful")
3485 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
3486 It works with many different Mail Transport Agents (MTAs) and is simple for a
3487 system administrator to install, configure and integrate with other software.
3488 As it uses very few resources, and requires no daemons, it is ideal for
3489 installation on systems where resources are limited. Its features include:
3491 @item Archive, Custom headers / footer,
3492 @item Fully automated bounce handling (similar to ezmlm),
3493 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
3494 @item Subscribers only posting, Regular expression access control,
3495 @item Functionality to retrieve old posts, Web interface, Digests,
3496 @item No-mail subscription, VERP support,
3497 @item Delivery Status Notification (RFC1891) support,
3498 @item Rich and customisable texts for automated operations.
3500 (license license:expat)))
3502 (define-public python-django-mailman3
3504 (name "python-django-mailman3")
3509 (uri (pypi-uri "django-mailman3" version))
3512 "1dzycnwdr1gavs1dgmcv1lz24x0fkp8y864fy52fgbz72d6c5a3f"))))
3513 (build-system python-build-system)
3516 (modify-phases %standard-phases
3519 (setenv "DJANGO_SETTINGS_MODULE"
3520 "django_mailman3.tests.settings_test")
3521 (invoke "django-admin" "test"
3522 "--pythonpath=."))))))
3524 (list python-django python-django-allauth python-django-gravatar2
3525 python-mailmanclient python-pytz))
3528 (home-page "https://gitlab.com/mailman/django-mailman3")
3529 (synopsis "Django library to help interaction with Mailman")
3531 "This package contains libraries and templates for Django-based interfaces
3532 interacting with Mailman.")
3533 (license license:gpl3+)))
3535 (define-public python-mailman-hyperkitty
3537 (name "python-mailman-hyperkitty")
3542 (uri (pypi-uri "mailman-hyperkitty" version))
3545 "1ni6vf1yi14c0l895fk278x4na7ymhpkl1q0vnpzbkzplpa7200i"))))
3546 (build-system python-build-system)
3548 (list python-requests python-zope-interface))
3552 (list python-mock python-nose python-nose2))
3553 (home-page "https://gitlab.com/mailman/mailman-hyperkitty/")
3554 (synopsis "Mailman archiver plugin for HyperKitty")
3556 "Mailman3 allows emails sent to its mailing lists to be archived by any
3557 software provided that there is a plugin (loadable by Mailman3) designed to
3558 communicate with it properly. This module contains a Mailman3 archiver plugin
3559 which sends emails to HyperKitty, the official Mailman3 web archiver.")
3560 (license license:gpl3+)))
3562 (define-public python-hyperkitty
3564 (name "python-hyperkitty")
3569 (uri (pypi-uri "HyperKitty" version))
3572 "11lz1s2p8n43h1cdr9l5dppsigg8qdppckdwdndzn7a8r8mj4sc2"))))
3573 (build-system python-build-system)
3576 (modify-phases %standard-phases
3579 (invoke "example_project/manage.py" "test"
3580 "--settings=hyperkitty.tests.settings_test"
3581 "--pythonpath=."))))))
3583 (list python-dateutil
3585 python-django-compressor
3586 python-django-extensions
3587 python-django-gravatar2
3588 python-django-haystack
3589 python-django-mailman3
3591 python-django-rest-framework
3593 python-mailmanclient
3597 python-robot-detection))
3599 (list python-beautifulsoup4
3600 python-elasticsearch
3605 (home-page "https://gitlab.com/mailman/hyperkitty")
3606 (synopsis "Web interface to access GNU Mailman v3 archives")
3608 "The hyperkitty Django app provides a web user interface to access GNU
3609 Mailman3 archives, and manage it. This interface uses django, and requires
3610 some configuration.")
3611 (license license:gpl3))) ; Some files are gpl2+
3613 (define-public postorius
3620 (uri (pypi-uri "postorius" version))
3623 "0s0sv97nmszl5pl9rnnyzp3sxpmdhpxqrdwv7nc0ww8zs99w831b"))))
3624 (build-system python-build-system)
3627 (modify-phases %standard-phases
3629 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3630 (add-installed-pythonpath inputs outputs)
3632 (invoke "python" "example_project/manage.py" "test"
3633 "--settings=test_settings" "postorius")
3635 #:tests? #f)) ; Tests try to run a mailman instance to test against.
3637 (list python-readme-renderer python-mailmanclient
3638 python-django python-django-mailman3))
3640 (list python-beautifulsoup4 python-isort python-mock python-vcrpy))
3641 (home-page "https://gitlab.com/mailman/postorius")
3642 (synopsis "Web user interface for GNU Mailman")
3644 "Postorius is a Django app which provides a web user interface
3645 to access GNU Mailman.")
3646 (license (list license:gpl3+ license:lgpl3+))))
3648 (define-public blists
3655 (uri (string-append "http://download.openwall.net/pub/projects/"
3656 "blists/blists-" version ".tar.gz"))
3659 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
3660 (build-system gnu-build-system)
3662 `(#:tests? #f ; No tests
3664 (modify-phases %standard-phases
3667 (lambda* (#:key outputs #:allow-other-keys)
3668 (let* ((out (assoc-ref outputs "out"))
3669 (bin (string-append out "/bin")))
3670 (install-file "bindex" bin)
3671 (install-file "bit" bin)
3673 (home-page "http://www.openwall.com/blists/")
3674 (synopsis "Web interface to mailing list archives")
3676 "Blists is a web interface to mailing list archives that works off
3677 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
3678 @code{bindex} generates or updates the index file (incremental updates
3679 are supported). @code{bit} is a CGI/SSI program that generates web pages
3680 on the fly. Both programs are written in C and are very fast.")
3681 (license license:expat)))
3683 (define-public swaks
3686 (version "20201014.0")
3691 (url "https://github.com/jetmore/swaks")
3692 (commit (string-append "v" version))))
3693 (file-name (git-file-name name version))
3695 (base32 "131i2b1yxhnbqkfk4kky40pfanqw2c5lcgbnjhfqp5cvpawpk2ai"))))
3696 (build-system perl-build-system)
3698 (list perl-io-socket-inet6 perl-net-dns perl-net-ssleay perl-socket6)) ; used by perl-io-socket-inet6
3700 `(#:tests? #f ; no tests
3702 (modify-phases %standard-phases
3703 (add-after 'unpack 'set-build_version
3705 (substitute* "swaks"
3706 (("\"DEVRELEASE\"") (format #f "\"~a\"" ,version)))
3711 (invoke "pod2man" "doc/base.pod" "swaks.1")))
3713 (lambda* (#:key outputs #:allow-other-keys)
3714 (let ((out (assoc-ref outputs "out")))
3715 (install-file "swaks" (string-append out "/bin"))
3716 (install-file "swaks.1" (string-append out "/share/man/man1")))
3718 (add-after 'install 'wrap-program
3719 (lambda* (#:key outputs #:allow-other-keys)
3720 (wrap-program (string-append (assoc-ref outputs "out")
3722 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
3724 (home-page "https://jetmore.org/john/code/swaks/")
3725 (synopsis "Featureful SMTP test tool")
3726 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
3727 test tool. It handles SMTP features and extensions such as TLS,
3728 authentication, and pipelining; multiple versions of the SMTP protocol
3729 including SMTP, ESMTP, and LMTP; and multiple transport methods including
3730 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
3731 Options can be specified in environment variables, configuration files, and
3732 the command line allowing maximum configurability and ease of use for
3733 operators and scripters.")
3734 (license license:gpl2+)))
3736 (define-public alpine
3743 ;; There are two versions: the plain continuation of Alpine without extra
3744 ;; patches and the version which adds extra fixes. Every distro uses
3745 ;; the patched version, and so do we to not break expectations.
3746 ;; http://alpine.freeiz.com/alpine/readme/README.patches
3748 (url "http://repo.or.cz/alpine.git")
3749 (commit (string-append "v" version))))
3750 (file-name (git-file-name name version))
3752 (base32 "1padh9kgn9blzjf0016i2f15c615fk17m8vg8kx301jhmc2r973h"))
3753 (modules '((guix build utils)))
3756 ;; Remove pre-built binaries scattered across the source repository.
3757 (for-each delete-file (find-files "." "\\.(dll|exe)"))))))
3758 (build-system gnu-build-system)
3761 (list (string-append "CC=" ,(cc-for-target)))
3762 #:configure-flags (list (string-append "--with-ssl-include-dir="
3763 (assoc-ref %build-inputs "openssl")
3765 (string-append "--with-ssl-dir="
3766 (assoc-ref %build-inputs "openssl"))
3767 (string-append "--with-ssl-certs-dir="
3769 (string-append "--with-ssl-lib-dir="
3770 (assoc-ref %build-inputs "openssl")
3772 (string-append "--with-interactive-spellcheck="
3773 (assoc-ref %build-inputs "aspell")
3775 "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
3777 (modify-phases %standard-phases
3778 (add-after 'unpack 'assume-shadow-passwords
3779 ;; Alpine's configure script confuses ‘shadow password support’ with
3780 ;; ‘/etc/shadow exists in the build environment’. It does not.
3782 (substitute* "configure"
3783 (("test -f /etc/shadow") "true"))))
3784 (add-after 'unpack 'make-reproducible
3786 ;; This removes time-dependent code to make alpine reproducible.
3787 (substitute* "pico/blddate.c"
3788 (("%02d-%s-%d") "1970-01-01")))))))
3799 (home-page "https://repo.or.cz/alpine.git")
3800 (synopsis "Alternatively Licensed Program for Internet News and Email")
3802 "Alpine is a text-based mail and news client. Alpine includes several
3803 tools and applications:
3805 @item alpine, the Alpine mailer
3806 @item pico, the standalone text editor, GNU nano's predecessor
3807 @item pilot, the standalone file system navigator
3809 (license license:asl2.0)))
3811 (define-public balsa
3818 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
3819 "balsa-" version ".tar.xz"))
3821 (base32 "1m0x3rk7cp7slr47rmg4y91rbxgs652v706lyxj600m5r5v4bl6l"))))
3822 (build-system gnu-build-system)
3825 '(;; Balsa tries to install additional MIME icons
3826 ;; under gtk+ directory.
3827 "--enable-extra-mimeicons=no"
3828 "--with-gtksourceview"
3830 "--with-spell-checker=gtkspell"
3845 libassuan ; in gpgme.pc Requires
3856 `(,glib "bin") intltool pkg-config yelp-tools))
3857 (home-page "https://pawsa.fedorapeople.org/balsa")
3858 (synopsis "E-mail client for GNOME")
3859 (description "Balsa is a highly configurable and robust mail client for
3860 the GNOME desktop. It supports both POP3 and IMAP servers as well as the
3861 mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
3862 the use of a local MTA such as Sendmail.")
3863 (license license:gpl3+)))
3872 (uri (pypi-uri "afew" version))
3875 "0wpfqbqjlfb9z0hafvdhkm7qw56cr9kfy6n8vb0q42dwlghpz1ff"))))
3876 (build-system python-build-system)
3878 (list notmuch python-chardet python-dkimpy python-notmuch))
3880 (list python-freezegun python-setuptools-scm))
3881 (home-page "https://github.com/afewmail/afew")
3882 (synopsis "Initial tagging script for notmuch mail")
3883 (description "afew is an initial tagging script for notmuch mail. It
3884 provides automatic tagging each time new mail is registered with notmuch. It
3885 can add tags based on email headers or Maildir folders and can handle spam and
3887 (license license:isc)))
3896 (uri (string-append "http://pan.rebelbase.com/download/releases/"
3897 version "/source/" name "-" version ".tar.bz2"))
3899 (base32 "1sl5rdgalswxya61vhkf28r0fb4b3pq77qgzhhsfagmpvgbx0d2x"))))
3901 (list #:configure-flags
3902 #~(list "--with-gtk3" "--with-gtkspell" "--with-gnutls"
3903 "--enable-libnotify" "--enable-manual"
3906 #~(modify-phases %standard-phases
3907 (add-before 'configure 'patch-gpg2
3908 (lambda* (#:key inputs #:allow-other-keys)
3909 (substitute* "pan/usenet-utils/gpg.cc"
3912 (search-input-file inputs "/bin/gpg")
3925 (list gettext-minimal itstool pkg-config))
3926 (build-system gnu-build-system)
3927 (home-page "http://pan.rebelbase.com/")
3928 (synopsis "Pan newsreader")
3929 (description "@code{pan} is a Usenet newsreader that's good at both text
3930 and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
3931 PGP handling, multiple servers, and secure connections.")
3932 ;; License of the docs: fdl-1.1; Others: gpl2.
3933 (license (list license:fdl1.1+ license:gpl2))))
3935 (define-public imapfilter
3943 (url "https://github.com/lefcha/imapfilter")
3944 (commit (string-append "v" version))))
3945 (file-name (git-file-name name version))
3947 (base32 "0a7f85r3axwclzw1s79zl2l8222nj2gklvvq33w9qv0dz5n71dcx"))))
3948 (build-system gnu-build-system)
3952 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3953 (string-append "CC=" ,(cc-for-target)))
3955 (modify-phases %standard-phases
3956 (delete 'configure)))) ; no configure script
3958 (list lua pcre2 openssl))
3959 (home-page "https://github.com/lefcha/imapfilter")
3960 (synopsis "IMAP mail filtering utility")
3961 (description "IMAPFilter is a mail filtering utility. It connects
3962 to remote mail servers using IMAP, sends searching queries to the server and
3963 processes mailboxes based on the results. It can be used to delete, copy,
3964 move, flag, etc. messages residing in mailboxes at the same or different mail
3965 servers. The 4rev1 and 4 versions of IMAP are supported.")
3966 (license license:expat)))
3968 (define-public urlscan
3975 (uri (pypi-uri "urlscan" version))
3977 (base32 "1ir6dxifkd8hv048p65jyz4wyg6ll002fzvbmajpdnvs6mvkj1md"))))
3978 (build-system python-build-system)
3980 (list python-urwid))
3981 (home-page "https://github.com/firecat53/urlscan")
3982 (synopsis "View/select the URLs in an email message or file")
3984 "Urlscan is a small program that is designed to integrate with the
3985 Mutt mail reader to allow you to easily launch a Web browser for URLs
3986 contained in email messages. It parses an email message or file and scans it
3987 for URLs and email addresses. It then displays the URLs and their context
3988 within the message, and allows you to choose one or more URLs to send to your
3989 Web browser. Alternatively, it send a list of all URLs to standard output.
3990 It is a replacement for the @command{urlview} program.")
3991 (license license:gpl2)))
4001 (url "https://github.com/verdammelt/tnef")
4004 (base32 "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"))
4005 (file-name (git-file-name name version))))
4006 (build-system gnu-build-system)
4008 (list autoconf automake))
4009 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
4010 (home-page "https://github.com/verdammelt/tnef")
4011 (synopsis "Unpack @code{application/ms-tnef} attachments")
4013 "TNEF is a tar-like program that unpacks MIME attachments of type
4014 @code{application/ms-tnef}.")
4015 (license license:gpl2+)))
4018 (let ((commit "02485074c9ae3d3b0039ac4c44fa37f2e2e75eac")
4022 (version (git-version "0.0.2" revision commit))
4026 (url "https://git.elephly.net/software/mumi.git")
4028 (file-name (git-file-name name version))
4031 "1ppqz4bclbw3rqgd2fq4mj8hsrd9cfdddjzaycm5b0ffdsm8nrs3"))))
4032 (build-system gnu-build-system)
4034 `(#:modules ((guix build gnu-build-system)
4035 ((guix build guile-build-system)
4036 #:select (target-guile-effective-version))
4038 #:imported-modules ((guix build guile-build-system)
4039 ,@%gnu-build-system-modules)
4041 #:configure-flags '("--localstatedir=/var")
4044 (modify-phases %standard-phases
4045 (add-after 'install 'wrap-executable
4046 (lambda* (#:key outputs #:allow-other-keys)
4047 (let* ((out (assoc-ref outputs "out"))
4048 (bin (string-append out "/bin"))
4049 (version (target-guile-effective-version))
4050 (scm (string-append out "/share/guile/site/" version))
4051 (go (string-append out "/lib/guile/" version
4053 (wrap-program (string-append bin "/mumi")
4054 `("GUILE_LOAD_PATH" ":" prefix
4055 (,scm ,(getenv "GUILE_LOAD_PATH")))
4056 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
4057 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))))))))
4059 (list guile-email-latest
4065 guile-syntax-highlight
4071 (list autoconf automake pkg-config))
4072 (home-page "https://git.elephly.net/software/mumi.git")
4073 (synopsis "Debbugs web interface")
4074 (description "Mumi is a Debbugs web interface.")
4075 (license license:agpl3+))))
4077 (define-public ytnef
4084 (url "https://github.com/Yeraze/ytnef")
4085 (commit (string-append "v" version))))
4086 (file-name (git-file-name name version))
4089 "0pk7jp8yc91nahcb7659khwdid0ibfi7n0135kwfnasak8gr75rz"))))
4090 (build-system gnu-build-system)
4092 (list #:configure-flags
4093 '(list "--disable-static")))
4095 (list autoconf automake libtool))
4096 (home-page "https://github.com/Yeraze/ytnef/")
4097 (synopsis "TNEF stream reader for winmail.dat files")
4098 (description "This package provides a TNEF stream reader library and
4099 related tools to process winmail.dat files.")
4100 (license license:gpl2+)))
4103 ;; No official release.
4104 (let ((commit "9db252bc1716ebaf0abd3a47a59ea78e4e6253d6")
4108 (version (git-version "0.1.0" revision commit))
4113 (url "https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git")
4115 (file-name (git-file-name name version))
4117 (base32 "1hfbngwdavdhw5ghnadmi0djg2yrr0wrkv15jdd9wcqh9h6mxy8z"))))
4118 (build-system gnu-build-system)
4123 (modify-phases %standard-phases
4124 (delete 'configure) ;no configure scripts
4125 (delete 'check) ;no tests
4126 (add-before 'install 'mkdir
4127 (lambda* (#:key outputs #:allow-other-keys)
4128 (let ((l2md (string-append (assoc-ref outputs "out") "/bin")))
4131 (list ,(string-append "CC=" (cc-for-target))
4132 (string-append "PREFIX=" %output "/bin"))))
4134 "https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git")
4135 (synopsis "Import public-inbox archives via Git")
4137 "The @command{l2md} command line tool imports public-inbox archives via
4138 Git and exports them in maildir format or to an MDA through a pipe.")
4139 (license license:gpl2))))
4141 (define-public public-inbox
4143 (name "public-inbox")
4146 (origin (method git-fetch)
4148 (url "https://public-inbox.org")
4149 (commit (string-append "v" version))))
4152 "0xni1l54v1z3p0zb52807maay0yqabp8jgf5iras5zmhgjyk3swz"))
4153 (file-name (git-file-name name version))
4154 (patches (search-patches "public-inbox-fix-spawn-test.patch"))))
4155 (build-system perl-build-system)
4157 `(#:imported-modules (,@%perl-build-system-modules
4158 (guix build syscalls))
4159 #:modules ((guix build perl-build-system)
4160 (guix build syscalls)
4164 (modify-phases %standard-phases
4165 (add-before 'configure 'qualify-paths
4166 (lambda* (#:key inputs #:allow-other-keys)
4167 ;; Use absolute paths for 'xapian-compact'.
4168 (substitute* "lib/PublicInbox/Xapcmd.pm"
4169 (("'xapian-compact'")
4170 (format #f "'~a'" (search-input-file inputs
4171 "/bin/xapian-compact"))))
4172 (substitute* "lib/PublicInbox/TestCommon.pm"
4173 ;; This is only used for tests, but get it from ‘inputs’ so
4174 ;; that cross builds won't hold a reference to a package built
4175 ;; for another architecture.
4176 (("/bin/cp") (search-input-file inputs "/bin/cp")))))
4177 (add-before 'check 'pre-check
4179 (invoke "./certs/create-certs.perl")))
4181 (lambda* (#:key target
4182 (tests? (not target)) (test-flags '())
4185 (match (primitive-fork)
4187 ;; lei tests build UNIX domain sockets in the temporary
4188 ;; directory, but the path of those sockets can be at most
4189 ;; 108 chars and Guix' default value for the variables
4190 ;; below already use 47 chars. Use the shortest temporary
4191 ;; path possible to avoid hitting the limit.
4192 (setenv "TEMP" "/tmp")
4193 (setenv "TEMPDIR" "/tmp")
4194 (setenv "TMP" "/tmp")
4195 (setenv "TMPDIR" "/tmp")
4197 ;; Use tini so that signals are properly handled and
4198 ;; doubly-forked processes get reaped; otherwise,
4199 ;; lei-daemon is kept as a zombie and the testsuite
4200 ;; fails thinking that it didn't quit as it should.
4201 (set-child-subreaper!)
4202 (apply execlp "tini" "--"
4203 "make" "check" test-flags))
4205 (match (waitpid pid)
4207 (unless (zero? status)
4208 (error "`make check' exited with status" status))))))
4209 (format #t "test suite not run~%"))))
4210 (add-after 'install 'wrap-programs
4211 (lambda* (#:key inputs outputs #:allow-other-keys)
4212 (let ((out (assoc-ref outputs "out")))
4216 ;; Let those scripts find their perl modules.
4217 `("PERL5LIB" ":" prefix
4218 (,(string-append out "/lib/perl5/site_perl")
4219 ,(getenv "PERL5LIB")))
4220 ;; 'git' is invoked in various files of the PublicInbox
4223 (,(dirname (search-input-file inputs "/bin/git"))
4224 ,(dirname (search-input-file inputs "/bin/curl"))))))
4225 (find-files (string-append out "/bin")))))))))
4227 (list ;; For testing.
4235 perl-email-address-xs
4236 perl-email-mime-contenttype
4240 perl-plack-middleware-deflater
4241 perl-plack-middleware-reverseproxy
4248 perl-parse-recdescent
4250 ;; FIXME: Perl modules are unable to find the config file for highlight
4251 ;; https://issues.guix.gnu.org/48033#4
4252 ;; ("highlight" ,highlight)
4257 (home-page "https://public-inbox.org/README.html")
4258 (synopsis "Archive mailing lists in Git repositories")
4260 "public-inbox implements the sharing of an email inbox via Git to
4261 complement or replace traditional mailing lists. Readers may read via NNTP,
4262 IMAP, Atom feeds or HTML archives.")
4263 (license license:agpl3+)))
4265 (define-public sylpheed
4271 (uri (string-append "https://sylpheed.sraoss.jp/sylpheed/v3.7/"
4272 name "-" version ".tar.xz"))
4275 "0j9y5vdzch251s264diw9clrn88dn20bqqkwfmis9l7m8vmwasqd"))))
4276 (build-system gnu-build-system)
4289 (home-page "https://sylpheed.sraoss.jp/en/")
4290 (synopsis "Lightweight GTK+ email client")
4292 "Sylpheed is a simple, lightweight but featureful, and easy-to-use e-mail
4293 client. Sylpheed provides intuitive user-interface. Sylpheed is also
4294 designed for keyboard-oriented operation.")
4295 (license license:gpl2+)))
4297 (define-public python-authres
4299 (name "python-authres")
4304 (uri (pypi-uri "authres" version))
4307 "1dr5zpqnb54h4f5ax8334l1dcp8j9083d7v4vdi1xqkwmnavklck"))))
4308 (build-system python-build-system)
4311 (modify-phases %standard-phases
4313 ;; Run doctests as described in the README.
4315 (invoke "python" "-m" "authres" "-v"))))))
4316 (home-page "https://launchpad.net/authentication-results-python")
4317 (synopsis "Authentication-Results email header creator and parser")
4319 "This Python module can be used to generate and parse RFC 5451/7001/7601
4320 @code{Authentication-Results} email headers. It supports extensions such as:
4322 @item RFC 5617 DKIM/ADSP
4323 @item RFC 6008 DKIM signature identification (@code{header.b})
4324 @item RFC 6212 @acronym{VBR, Vouch By Reference}
4325 @item RFC 6577 @acronym{SPF, Sender Policy Framework}
4326 @item RFC 7281 @code{Authentication-Results} registration for S/MIME
4327 @item RFC 7293 The @code{Require-Recipient-Valid-Since} header field
4328 @item RFC 7489 @acronym{DMARC, Domain-based Message Authentication Reporting
4330 @item @acronym{ARC, Authenticated Received Chain}
4331 (draft-ietf-dmarc-arc-protocol-08)
4333 (license license:asl2.0)))
4335 (define-public python-dkimpy
4337 (name "python-dkimpy")
4342 (uri (pypi-uri "dkimpy" version))
4344 (base32 "088iz5cqjqh4c7141d94pvn13bh25aizqlrifwv6fs5g16zj094s"))))
4345 (build-system python-build-system)
4348 (modify-phases %standard-phases
4349 (add-after 'patch-source-shebangs 'patch-more-source
4350 (lambda* (#:key inputs #:allow-other-keys)
4351 (let ((openssl (assoc-ref inputs "openssl")))
4352 (substitute* "dkim/dknewkey.py"
4353 (("/usr/bin/openssl") (string-append openssl "/bin/openssl"))))
4357 (invoke "python" "test.py"))))))
4359 (list python-dnspython))
4361 (list python-authres python-pynacl))
4364 (home-page "https://launchpad.net/dkimpy")
4365 (synopsis "DKIM (DomainKeys Identified Mail)")
4366 (description "Python module that implements @dfn{DKIM} (DomainKeys
4367 Identified Mail) email signing and verification (RFC6376). It also provides
4368 helper scripts for command line signing and verification. It supports DKIM
4369 signing/verifying of ed25519-sha256 signatures (RFC 8463). It also supports
4370 the RFC 8617 Authenticated Received Chain (ARC) protocol.")
4371 (license license:bsd-3)))
4373 (define-public python-authheaders
4375 (name "python-authheaders")
4380 (uri (pypi-uri "authheaders" version))
4383 "14k6i72k5f8dyvps8vc0aq0cczc8lvqpgjfjzsy6qqychjvjcmwk"))))
4384 (build-system python-build-system)
4386 (list python-authres python-dkimpy python-dnspython
4387 python-publicsuffix2))
4388 (home-page "https://github.com/ValiMail/authentication-headers")
4389 (synopsis "Library wrapping email authentication header verification and generation")
4391 "This is a Python library for the generation of email authentication
4392 headers. The library can perform DKIM, SPF, and DMARC validation, and the
4393 results are packaged into the Authentication-Results header. The library can
4394 DKIM and ARC sign messages and output the corresponding signature headers.")
4395 ;; The package's metadata claims it were MIT licensed, but the source file
4396 ;; headers disagree. MPL-2 for the public suffix list.
4397 (license (list license:zpl2.1 license:zlib license:mpl2.0))))
4399 (define-public python-aiosmtpd
4401 (name "python-aiosmtpd")
4407 (url "https://github.com/aio-libs/aiosmtpd")
4410 (base32 "0083d6nf75xv8nq1il6jabz36v6c452svy4p402csxwwih5pw6sk"))
4411 (file-name (git-file-name name version))))
4412 (build-system python-build-system)
4415 (modify-phases %standard-phases
4416 (add-after 'unpack 'delete-failing-tests
4418 ;; This test uses an expired certificate.
4419 (delete-file "aiosmtpd/tests/test_smtps.py")
4423 (invoke "python" "-m" "nose2" "-v"))))))
4425 (list python-flufl-testing python-nose2))
4427 (list python-atpublic))
4428 (home-page "https://aiosmtpd.readthedocs.io/")
4429 (synopsis "Asyncio based SMTP server")
4431 "This project is a reimplementation of the Python stdlib @code{smtpd.py}
4433 (license (list license:asl2.0
4434 license:lgpl3)))) ; only for setup_helpers.py
4436 (define-public python-imaplib2
4438 (name "python-imaplib2")
4443 (uri (pypi-uri "imaplib2" version))
4446 "0nqyb274hq30agg1c0zkb5ijmcirgg35sp4dp4n292l665dlijwn"))))
4447 (build-system python-build-system)
4448 (home-page "https://github.com/jazzband/imaplib2/")
4449 (synopsis "Threaded Python IMAP4 client")
4450 (description "This package provides a threaded Python IMAP4 client, based
4451 on RFC 3501 and original @code{imaplib} module.")
4452 (license license:expat)))
4454 (define-public rspamd
4462 (url "https://github.com/rspamd/rspamd")
4465 (base32 "122d5m1nfxxz93bhsk8lm4dazvdknzphb0a1188m7bsa4iynbfv2"))
4466 (file-name (git-file-name name version))))
4467 (build-system cmake-build-system)
4469 '(#:configure-flags '("-DENABLE_LUAJIT=ON"
4470 "-DLOCAL_CONFDIR=/etc/rspamd")))
4485 (synopsis "Spam filtering system")
4486 (description "Rspamd is an advanced spam filtering system that
4487 allows evaluation of messages by a number of rules including regular
4488 expressions, statistical analysis and custom services such as URL
4489 black lists. Each message is analysed by Rspamd and given a spam
4491 (home-page "https://www.rspamd.com/")
4492 (license license:asl2.0)))
4494 (define-public undbx
4500 (uri (string-append "mirror://sourceforge/undbx/undbx-"
4504 "0ncs1dzhrn9nlaxpyap2ipf61fc7k9bkkqacp3w6bngfj2c0p6yj"))))
4505 (build-system gnu-build-system)
4506 (home-page "https://undbx.sourceforge.io/")
4507 (synopsis "Extract email messages from Outlook Express .dbx files")
4508 (description "This package provides a tool to extract, recover and
4509 undelete email messages from Outlook Express .dbx files.")
4510 (license license:gpl3+)))
4512 (define-public libpst
4519 (uri (string-append "https://www.five-ten-sg.com/libpst/packages/"
4520 "libpst-" version ".tar.gz"))
4523 "0hhbbb8ddsgjhv9y1xd8s9ixlhdnjmhw12v06jwx4j6vpgp1na9x"))))
4524 (build-system gnu-build-system)
4526 (list boost libgsf python zlib))
4529 (home-page "https://www.five-ten-sg.com/libpst/")
4531 (description "The Libpst utilities include @code{readpst} which can
4532 convert email messages to both mbox and MH mailbox formats, @code{pst2ldif}
4533 which can convert the contacts to @code{.ldif} format for import into LDAP
4534 databases, and other tools to process Outlook email archives.")
4535 (license license:gpl2+)))
4537 (define-public neatmail
4546 (url "https://github.com/aligrudi/neatmail")
4548 (file-name (git-file-name name version))
4550 (base32 "00d453d57d3v6ja2gpmjd8vch804c72g38pc1nr5shmz3hkgd52d"))))
4551 (build-system gnu-build-system)
4553 `(#:tests? #f ;no tests
4554 #:make-flags `((string-append "CC=" ,(cc-for-target)))
4556 (modify-phases %standard-phases
4557 (delete 'configure) ;no configure script
4558 (replace 'install ;no install target in the Makefile
4559 (lambda* (#:key outputs #:allow-other-keys)
4560 (let* ((out (assoc-ref outputs "out"))
4561 (bin (string-append out "/bin")))
4562 (rename-file "mail" "neatmail")
4563 (install-file "neatmail" bin)))))))
4564 (home-page "https://litcave.rudi.ir/")
4565 (synopsis "Text-mode mail client")
4567 "@command{neatmail} is a noninteractive mail client. It generates
4568 a listing of the messages in a mailbox in mbox format and executes a list of
4569 ex-like commands on it.")
4570 (license license:isc)))
4572 (define-public crm114
4575 (version "20100106")
4579 (uri (string-append "http://crm114.sourceforge.net/tarballs/crm114-"
4580 version "-BlameMichelson.src.tar.gz"))
4583 "0awcjc5j2mclkkpbjyijj9mv8xjz3haljvaj0fyc4fm4xir68qpv"))))
4584 (build-system gnu-build-system)
4586 `(#:modules ((guix build gnu-build-system)
4587 ((guix build emacs-build-system) #:prefix emacs:)
4590 #:imported-modules (,@%gnu-build-system-modules
4591 (guix build emacs-build-system)
4592 (guix build emacs-utils))
4593 #:make-flags (list (string-append "prefix=" %output)
4594 "LDFLAGS=") ; disable static linking
4595 ;; Test suite is not fully automated. It requires a human to read the
4596 ;; results and determine if the tests have passed.
4599 (modify-phases %standard-phases
4601 (add-before 'build 'fix-build
4603 ;; Inline functions can only be used from the same compilation
4604 ;; unit. This causes the build to fail.
4605 (substitute* "crm_svm_matrix.c"
4607 ;; Building with gcc 10 fails without the -fcommon flag. Add it
4609 (substitute* "Makefile"
4610 (("CFLAGS \\+= -DVERSION")
4611 "CFLAGS += -fcommon -DVERSION"))))
4612 (add-before 'install 'pre-install
4613 (lambda* (#:key outputs #:allow-other-keys)
4614 (let ((out (assoc-ref outputs "out")))
4615 ;; Install maillib.crm library.
4616 (install-file "maillib.crm" (string-append out "/share/crm"))
4617 ;; Set absolute store paths.
4618 (substitute* "mailreaver.crm"
4619 (("insert maillib.crm")
4620 (string-append "insert " out "/share/crm/maillib.crm"))
4621 (("\\\\/bin\\\\/ls")
4622 (string-replace-substring (which "ls") "/" "\\/"))
4623 ((":\\*:trainer_invoke_command:")
4624 (string-append out "/bin/mailtrainer.crm")))
4625 ;; Install mail related crm scripts.
4626 (for-each (lambda (file)
4627 (install-file file (string-append out "/bin")))
4628 (list "mailfilter.crm" "mailreaver.crm" "mailtrainer.crm")))))
4629 (add-after 'install 'install-emacs-mode
4630 (assoc-ref emacs:%standard-phases 'install))
4631 ;; Run phases from the emacs build system.
4632 (add-after 'install-emacs-mode 'make-autoloads
4633 (assoc-ref emacs:%standard-phases 'make-autoloads))
4634 (add-after 'make-autoloads 'enable-autoloads-compilation
4635 (assoc-ref emacs:%standard-phases 'enable-autoloads-compilation))
4636 (add-after 'enable-autoloads-compilation 'emacs-build
4637 (assoc-ref emacs:%standard-phases 'build))
4638 (add-after 'emacs-build 'validate-compiled-autoloads
4639 (assoc-ref emacs:%standard-phases 'validate-compiled-autoloads)))))
4643 `(("emacs" ,emacs-minimal)))
4644 (home-page "http://crm114.sourceforge.net/")
4645 (synopsis "Controllable regex mutilator")
4646 (description "CRM114 is a system to examine incoming e-mail, system log
4647 streams, data files or other data streams, and to sort, filter, or alter the
4648 incoming files or data streams according to the user's wildest desires.
4649 Criteria for categorization of data can be via a host of methods, including
4650 regexes, approximate regexes, a Hidden Markov Model, Orthogonal Sparse
4651 Bigrams, WINNOW, Correlation, KNN/Hyperspace, or Bit Entropy (or by other
4652 means--it's all programmable).")
4653 (license license:gpl3)))
4655 (define-public rss2email
4662 (url "https://github.com/rss2email/rss2email")
4663 (commit (string-append "v" version))))
4664 (file-name (git-file-name name version))
4667 "0g1yr3v3ibdh2jqil64fbdbplx5m2yzxr893fqfkwcc5c7fbwl4d"))))
4668 (build-system python-build-system)
4671 (modify-phases %standard-phases
4673 (lambda* (#:key tests? #:allow-other-keys)
4675 (with-directory-excursion "test"
4676 ;; Skip networking tests
4677 (substitute* "test.py"
4678 (("( *)class (:?TestSend|TestFetch).*" match indent)
4679 (string-append indent "@unittest.skip(\"Networking stuff skipped\")\n"
4681 (invoke "python" "-m" "unittest"))))))))
4683 (list python-feedparser python-html2text))
4684 (home-page "https://github.com/rss2email/rss2email")
4685 (synopsis "Converts RSS/Atom newsfeeds to email")
4686 (description "The RSS2email program (@command{r2e}) fetches RSS/Atom news
4687 feeds, converts them into emails, and sends them.")
4688 ;; GPL version 2 or 3. NOT 2+.
4689 (license (list license:gpl2
4692 (define-public sendgmail
4693 (let ((commit "e3229155a4037267ce40f1a3a681f53221aa4d8d")
4697 (version (git-version "0.0.0" revision commit))
4702 (url "https://github.com/google/gmail-oauth2-tools")
4704 (file-name (git-file-name name version))
4705 (patches (search-patches
4706 "sendgmail-remove-domain-restriction.patch"
4707 "sendgmail-accept-ignored-gsuite-flag.patch"))
4710 "1cxpkiaajhq1gjsg47r2b5xgck0r63pvkyrkm7af8c8dw7fyn64f"))))
4712 (list go-golang-org-x-oauth2 go-cloud-google-com-go-compute-metadata))
4713 (build-system go-build-system)
4715 '(#:unpack-path "github.com/google/gmail-oauth2-tools"
4716 #:import-path "github.com/google/gmail-oauth2-tools/go/sendgmail"))
4718 "https://github.com/google/gmail-oauth2-tools/tree/master/go/sendgmail")
4720 "Sendmail-compatible tool for using Gmail with @code{git send-email}")
4722 "The @command{sendgmail} command provides a minimal sendmail-compatible
4723 front-end that connects to Gmail using OAuth2. It is specifically designed
4724 for use with @code{git send-email}. The command needs a Gmail API key to
4727 Guix's version of @command{sendgmail} has been patched for compatibility with
4728 all known forks, including support for non-@code{@@gmail.com} email
4730 (license license:asl2.0))))
4732 (define-public smtpmail
4739 (uri (string-append "mirror://savannah/smtpmail/smtpmail-"
4742 (base32 "08ap2l2g2avkq2jx05jy993517vvapmypg7j5cwl8gvpq436gdh5"))))
4743 (build-system gnu-build-system)
4744 (home-page "https://www.nongnu.org/smtpmail/")
4745 (synopsis "SMTP utility")
4747 "smtpmail is a little console-based tool for users who have no local
4748 mailserver on their machine. It enables these users to send their mail over a
4749 remote SMTP server.")
4750 (license license:gpl2+)))