1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015, 2017 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 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
14 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
16 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
17 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
18 ;;; Copyright © 2016, 2017, 2018 ng0 <ng0@n0.is>
19 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20 ;;; Copyright © 2016, 2017, 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
21 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
22 ;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
23 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
24 ;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
25 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
26 ;;; Copyright © 2017, 2018 Rene Saavedra <pacoon@protonmail.com>
27 ;;; Copyright © 2018, 2019 Pierre Langlois <pierre.langlois@gmx.com>
28 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
29 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
30 ;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
31 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
32 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
33 ;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
35 ;;; This file is part of GNU Guix.
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
50 (define-module (gnu packages mail)
51 #:use-module (gnu packages)
52 #:use-module (gnu packages admin)
53 #:use-module (gnu packages aspell)
54 #:use-module (gnu packages autotools)
55 #:use-module (gnu packages backup)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages bison)
59 #:use-module (gnu packages calendar)
60 #:use-module (gnu packages check)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages crypto)
63 #:use-module (gnu packages curl)
64 #:use-module (gnu packages cyrus-sasl)
65 #:use-module (gnu packages databases)
66 #:use-module (gnu packages dbm)
67 #:use-module (gnu packages dejagnu)
68 #:use-module (gnu packages django)
69 #:use-module (gnu packages dns)
70 #:use-module (gnu packages docbook)
71 #:use-module (gnu packages documentation)
72 #:use-module (gnu packages emacs)
73 #:use-module (gnu packages enchant)
74 #:use-module (gnu packages gdb)
75 #:use-module (gnu packages gettext)
76 #:use-module (gnu packages ghostscript)
77 #:use-module (gnu packages glib)
78 #:use-module (gnu packages gnome)
79 #:use-module (gnu packages gnupg)
80 #:use-module (gnu packages groff)
81 #:use-module (gnu packages gsasl)
82 #:use-module (gnu packages gtk)
83 #:use-module (gnu packages guile)
84 #:use-module (gnu packages guile-xyz)
85 #:use-module (gnu packages flex)
86 #:use-module (gnu packages haskell-xyz)
87 #:use-module (gnu packages kerberos)
88 #:use-module (gnu packages libcanberra)
89 #:use-module (gnu packages libevent)
90 #:use-module (gnu packages libidn)
91 #:use-module (gnu packages libunistring)
92 #:use-module (gnu packages linux)
93 #:use-module (gnu packages lsof)
94 #:use-module (gnu packages lua)
95 #:use-module (gnu packages m4)
96 #:use-module (gnu packages man)
97 #:use-module (gnu packages ncurses)
98 #:use-module (gnu packages networking)
99 #:use-module (gnu packages openldap)
100 #:use-module (gnu packages onc-rpc)
101 #:use-module (gnu packages pcre)
102 #:use-module (gnu packages perl)
103 #:use-module (gnu packages perl-check)
104 #:use-module (gnu packages perl-web)
105 #:use-module (gnu packages pkg-config)
106 #:use-module (gnu packages python)
107 #:use-module (gnu packages python-web)
108 #:use-module (gnu packages python-xyz)
109 #:use-module (gnu packages readline)
110 #:use-module (gnu packages ruby)
111 #:use-module (gnu packages search)
112 #:use-module (gnu packages serialization)
113 #:use-module (gnu packages samba)
114 #:use-module (gnu packages screen)
115 #:use-module (gnu packages sphinx)
116 #:use-module (gnu packages sqlite)
117 #:use-module (gnu packages tcl)
118 #:use-module (gnu packages texinfo)
119 #:use-module (gnu packages time)
120 #:use-module (gnu packages tls)
121 #:use-module (gnu packages version-control)
122 #:use-module (gnu packages w3m)
123 #:use-module (gnu packages web)
124 #:use-module (gnu packages webkit)
125 #:use-module (gnu packages xdisorg)
126 #:use-module (gnu packages xorg)
127 #:use-module (gnu packages xml)
128 #:use-module ((guix licenses)
131 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
132 non-copyleft (expat . license:expat) bsd-3
133 public-domain bsd-4 isc (openssl . license:openssl)
134 bsd-2 x11-style agpl3 asl2.0 perl-license))
135 #:use-module (guix packages)
136 #:use-module (guix download)
137 #:use-module (guix git-download)
138 #:use-module (guix utils)
139 #:use-module (guix build-system gnu)
140 #:use-module (guix build-system guile)
141 #:use-module (guix build-system perl)
142 #:use-module (guix build-system python)
143 #:use-module (guix build-system trivial)
144 #:use-module (srfi srfi-1)
145 #:use-module (ice-9 match))
147 (define-public mailutils
153 (uri (string-append "mirror://gnu/mailutils/mailutils-"
157 "1g1xf2lal04nsnf1iym9n9n0wxjpqbcr9nysxpm98v4pniinqwsz"))))
158 (build-system gnu-build-system)
161 (modify-phases %standard-phases
162 (add-before 'check 'prepare-test-suite
164 ;; Use the right file name for `cat'.
165 (substitute* "testsuite/lib/mailutils.exp"
169 ;; Tests try to invoke 'mda' such that it looks up the
170 ;; 'root' user, which does not exist in the build
172 (substitute* '("mda/mda/tests/testsuite"
173 "mda/lmtpd/tests/testsuite")
174 (("root <") "nobody <")
175 (("spool/root") "spool/nobody")
176 (("root@localhost") "nobody@localhost"))
178 ;; The 'pipeact.at' tests generate a shell script; make
179 ;; sure it uses the right shell.
180 (substitute* '("sieve/tests/testsuite"
181 "mh/tests/testsuite")
183 (string-append "#!" (which "sh"))))
185 (substitute* "mh/tests/testsuite"
186 (("moreproc: /bin/cat")
187 (string-append "moreproc: " (which "cat"))))
189 ;; XXX: The comsatd tests rely on being able to open
190 ;; /dev/tty, but that gives ENODEV in the build
191 ;; environment. Thus, ignore test failures here.
192 (substitute* "comsat/tests/Makefile.in"
193 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
194 (string-append "-" all)))
196 ;; 'frm' tests expect write access to $HOME.
197 (setenv "HOME" (getcwd))
199 ;; Avoid the message "I'm going to create the standard MH path
200 ;; for you", which would lead to one test failure (when diffing
201 ;; stdout of 'fmtcheck'.)
202 (call-with-output-file ".mh_profile"
204 (format port "Path: ~a/Mail-for-tests~%"
208 ;; TODO: Add `--with-sql'.
210 (list "--sysconfdir=/etc"
212 ;; Add "/X.Y" to the installation directory.
213 (string-append "--with-guile-site-dir="
214 (assoc-ref %outputs "out")
216 ,(match (assoc "guile"
217 (package-inputs this-package))
220 (package-version guile))))))
222 #:parallel-tests? #f))
224 `(("perl" ,perl) ;for 'gylwrap'
226 ("dejagnu" ,dejagnu)))
233 ("readline" ,readline)
234 ("linux-pam" ,linux-pam)
238 ;; Required for SEARCH CHARSET.
239 ("libiconv" ,libiconv)
240 ("libunistring" ,libunistring)))
241 (home-page "https://mailutils.org")
242 (synopsis "Utilities and library for reading and serving mail")
244 "GNU Mailutils is a collection of programs for managing, viewing and
245 processing electronic mail. It contains both utilities and server daemons
246 and all operate in a protocol-agnostic way. The underlying libraries are
247 also available, simplifying the addition of mail capabilities to new
250 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
251 (list gpl3+ lgpl3+))))
253 (define-public guile3.0-mailutils
256 (name "guile3.0-mailutils")
258 `(("guile" ,guile-3.0)
259 ,@(alist-delete "guile" (package-inputs mailutils))))))
261 (define-public nullmailer
269 (string-append "https://untroubled.org/nullmailer/"
270 "nullmailer-" version ".tar.gz")
271 ;; Previous releases are moved to this subdirectory.
272 (string-append "https://untroubled.org/nullmailer/archive/"
273 "nullmailer-" version ".tar.gz")))
275 (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
276 (build-system gnu-build-system)
280 "--localstatedir=/var"
283 (modify-phases %standard-phases
284 (add-before 'check 'patch-test-FHS-file-names
286 (with-directory-excursion "test"
287 (substitute* (list "functions.in"
289 ;; Fix some shebangs later generated on the fly.
290 (("/bin/sh") (which "bash"))))
292 (add-before 'check 'pass-PATH-to-tests
293 ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
294 ;; tests then source ‘functions’, which first demands a working $PATH
295 ;; only to clobber it later. Pass our $PATH to the test environment
296 ;; and don't touch it after that.
298 (with-directory-excursion "test"
299 (substitute* "runtests"
301 (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
302 (substitute* "functions.in"
303 (("export PATH=.*") "")))
305 (add-before 'check 'delete-failing-tests
307 (with-directory-excursion "test/tests"
308 (for-each delete-file
310 ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
312 ;; XXX These require the not-yet-packaged tcpserver.
313 "protocols" "smtp-auth")))
315 (add-before 'install 'skip-install-data-local
316 ;; Don't attempt to install run-time files outside of the store.
318 (substitute* "Makefile"
319 ((" install-data-local") ""))
323 `(("daemontools" ,daemontools))) ; for svc
325 `(("gnutls" ,gnutls)))
326 (home-page "https://untroubled.org/nullmailer/")
327 (synopsis "Simple relay-only mail transfer agent")
329 "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
330 hosts that receive no local mail and only relay mail to a fixed set of smart
331 relays. It's useful for systems such as Web servers that must be able to send
332 email notifications, without having to run a full-blown MTA such as sendmail
335 Nullmailer is designed to be simple to configure, easy to extend, and secure.
336 It requires little ongoing administration. The included @command{sendmail}
337 emulator front-end should allow most (if not all) sendmail-compatible programs
338 to run without any changes.")
339 (license (list lgpl2.1+ ; lib/cli++/ (but some files lack headers)
340 gpl2+)))) ; everything else
342 (define-public fetchmail
349 (uri (string-append "mirror://sourceforge/fetchmail/branch_"
350 (version-major+minor version) "/"
351 "fetchmail-" version ".tar.xz"))
353 (base32 "1859wvfc9fq72mwp4njdiy0x89hnddlfr3nix71qqglcs0fz2crz"))))
354 (build-system gnu-build-system)
356 `(("openssl" ,openssl)))
359 (list (string-append "--with-ssl="
360 (assoc-ref %build-inputs "openssl")))
362 (modify-phases %standard-phases
363 (add-before 'check 'create-test-environment
365 ;; Fix ‘Cannot find absolute path for user's home directory’.
366 (setenv "HOME" "/tmp")
368 (home-page "https://www.fetchmail.info/")
369 (synopsis "Remote-mail retrieval and forwarding utility")
371 "Fetchmail is a full-featured, robust, well-documented remote-mail
372 retrieval and forwarding utility intended to be used over on-demand
373 TCP/IP links (such as SLIP or PPP connections). It supports every
374 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
375 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
378 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
379 so it can then be read by normal mail user agents such as mutt, elm
380 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
381 aliasing facilities to work just as they would on normal mail.")
382 (license gpl2+))) ; most files are actually public domain or x11
391 (string-append "https://bitbucket.org/mutt/mutt/downloads/"
392 "mutt-" version ".tar.gz")
393 (string-append "http://ftp.mutt.org/pub/mutt/mutt-"
397 "016dzx2c0kr9xgnw4nfzpkn4nvpk56rdlcqhrwa820fq8083yzdm"))
398 (patches (search-patches "mutt-store-references.patch"))))
399 (build-system gnu-build-system)
401 `(("cyrus-sasl" ,cyrus-sasl)
410 `(#:configure-flags '("--enable-smtp"
414 "--enable-hcache" ; for header caching
419 "--with-sqlite3" ; required for Autocrypt
420 "--with-idn2" ; recommended for Autocrypt
421 ;; so that mutt does not check whether the path
422 ;; exists, which it does not in the chroot
423 "--with-mailpath=/var/mail")))
424 (home-page "http://www.mutt.org/")
425 (synopsis "Mail client")
427 "Mutt is a small but very powerful text-based mail client for Unix
431 (define-public neomutt
439 (url "https://github.com/neomutt/neomutt.git")
441 (file-name (git-file-name name version))
443 (base32 "1k4k07l6h5krc3fx928qvdq3ssw9fxn95aj7k885xlckd2i1lnb5"))))
444 (build-system gnu-build-system)
446 `(("cyrus-sasl" ,cyrus-sasl)
451 ("openssl" ,openssl) ; for S/MIME
453 ("kyotocabinet" ,kyotocabinet)
458 ("notmuch" ,notmuch)))
460 `(("automake" ,automake)
461 ("gettext-minimal" ,gettext-minimal)
462 ("pkg-config" ,pkg-config)
463 ("docbook-xsl" ,docbook-xsl)
464 ("docbook-xml" ,docbook-xml-4.2)
468 `(#:test-target "test"
472 ;; Database, implies header caching.
473 "--disable-tokyocabinet"
484 (string-append "--with-sasl="
485 (assoc-ref %build-inputs "cyrus-sasl"))
493 ;; If we do not set this, neomutt wants to check
494 ;; whether the path exists, which it does not
496 "--with-mailpath=/var/mail"
499 (string-append "--with-ncurses="
500 (assoc-ref %build-inputs "ncurses"))
501 (string-append "--prefix="
502 (assoc-ref %outputs "out"))
505 (modify-phases %standard-phases
506 ;; TODO: autosetup is meant to be included in the source,
507 ;; but we should package autosetup and use our own version of it.
509 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
510 (let* ((out (assoc-ref outputs "out"))
511 (flags `(,@configure-flags))
512 (bash (which "bash")))
513 (setenv "SHELL" bash)
514 (setenv "CONFIG_SHELL" bash)
516 (string-append (getcwd) "/configure")
518 (home-page "https://neomutt.org/")
519 (synopsis "Command-line mail reader based on Mutt")
521 "NeoMutt is a command-line mail reader which is based on mutt.
522 It adds a large amount of new and improved features to mutt.")
531 (uri (string-append "mirror://gnome/sources/gmime/"
532 (version-major+minor version)
533 "/gmime-" version ".tar.xz"))
536 "0i3xfc84qn1z99i70q68kbnp9rmgqrnprqb418ba52s6g9j9dsia"))))
537 (build-system gnu-build-system)
539 `(("pkg-config" ,pkg-config)
540 ("gnupg" ,gnupg))) ; for tests only
541 (inputs `(("glib" ,glib)
546 (modify-phases %standard-phases
548 'unpack 'patch-paths-in-tests
550 ;; The test programs run several programs using 'system' with
551 ;; hard-coded paths. Here we patch them all.
552 ;; We use ISO-8859-1 here because test-iconv.c contains
553 ;; raw byte sequences in several different encodings.
554 (with-fluids ((%default-port-encoding #f))
555 (substitute* (find-files "tests" "\\.c$")
556 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
557 (let* ((base (basename prog-path))
560 (or prog (error "not found: " base)))))))
562 (home-page "http://spruce.sourceforge.net/gmime/")
563 (synopsis "MIME message parser and creator library")
565 "GMime provides a core library and set of utilities which may be used for
566 the creation and parsing of messages using the Multipurpose Internet Mail
568 (license (list lgpl2.1+ gpl2+ gpl3+))))
570 ;; Some packages are not ready for GMime 3 yet.
571 (define-public gmime-2.6
577 (uri (string-append "mirror://gnome/sources/gmime/"
578 (version-major+minor version)
579 "/gmime-" version ".tar.xz"))
582 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
584 (define-public bogofilter
591 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-stable/"
592 "bogofilter-" version ".tar.xz"))
594 (base32 "1sl9xrnnlk2sn8gmibhn8li09vnansjbxb9l1182qmgz7cvs2j1j"))))
595 (build-system gnu-build-system)
598 (modify-phases %standard-phases
599 (add-before 'check 'pre-check
601 (substitute* "src/tests/t.frame"
603 (string-append "GREP=" (which "grep") "\n")))
605 (native-inputs `(("flex" ,flex)))
606 (inputs `(("bdb" ,bdb)))
607 (home-page "https://bogofilter.sourceforge.io/")
608 (synopsis "Mail classifier based on a Bayesian filter")
610 "Bogofilter is a mail filter that classifies mail as spam or ham
611 (non-spam) by a statistical analysis of the message's header and
612 content (body). The program is able to learn from the user's classifications
613 and corrections. It is based on a Bayesian filter.")
616 (define-public offlineimap
623 (url "https://github.com/OfflineIMAP/offlineimap")
624 (commit (string-append "v" version))))
625 (file-name (git-file-name name version))
628 "0h5q5nk2p2vx86w6rrbs7v70h81dpqqr68x6l3klzl3m0yj9agb1"))))
629 (build-system python-build-system)
631 `(("asciidoc" ,asciidoc)))
632 (inputs `(("python2-pysqlite" ,python2-pysqlite)
633 ("python2-six" ,python2-six)))
635 ;; The setup.py script expects python-2.
637 ;; Tests require a modifiable IMAP account.
640 (modify-phases %standard-phases
641 (add-after 'build 'build-documentation
643 (substitute* "docs/Makefile"
644 ;; Prevent xmllint and xsltproc from downloading a DTD file.
645 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
646 (invoke "make" "-C" "docs" "man")))
647 (add-after 'install 'install-documentation
648 (lambda* (#:key outputs #:allow-other-keys)
649 (let* ((out (assoc-ref outputs "out"))
650 (man (string-append out "/share/man")))
651 (install-file "docs/offlineimap.1" (string-append man "/man1"))
652 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
654 (home-page "https://www.offlineimap.org")
655 (synopsis "Sync emails between two repositories")
657 "OfflineImap synchronizes emails between two repositories, so that you
658 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
659 repository and Maildir/IMAP as LOCAL repository.")
662 (define-public emacs-mew
668 (uri (string-append "https://mew.org/Release/mew-"
672 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
676 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
677 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
678 (build-system gnu-build-system)
680 (let ((elisp-dir "/share/emacs/site-lisp")
681 (icon-dir "/share/mew"))
682 `(#:modules ((guix build gnu-build-system)
684 (guix build emacs-utils))
685 #:imported-modules (,@%gnu-build-system-modules
686 (guix build emacs-utils))
688 (list (string-append "--with-elispdir=" %output ,elisp-dir)
689 (string-append "--with-etcdir=" %output ,icon-dir))
691 (modify-phases %standard-phases
692 (add-after 'configure 'patch-mew-icon-directory
693 (lambda* (#:key outputs #:allow-other-keys)
694 (emacs-substitute-sexps "mew-key.el"
695 ("(def.* mew-icon-directory"
697 (add-to-list 'image-load-path 'mew-icon-directory)
698 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
700 (add-after 'install 'generate-autoloads
701 (lambda* (#:key outputs #:allow-other-keys)
702 (emacs-generate-autoloads
703 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
706 (home-page "https://mew.org")
707 (synopsis "Emacs e-mail client")
708 (description "Mew (Messaging in the Emacs World) is a user interface
709 for text messages, multimedia messages (MIME), news articles and
710 security functionality including PGP, S/MIME, SSH, and SSL.")
719 (uri (string-append "https://github.com/djcb/mu/releases/"
720 "download/" (version-major+minor version) "/"
721 "mu-" version ".tar.xz"))
724 "0fh5bxvhjqv1p9z783lym8y1k3p4jcc3wg6wf7zl8s6w8krcfd7n"))))
725 (build-system gnu-build-system)
727 `(("pkg-config" ,pkg-config)
728 ("glib" ,glib "bin") ; for gtester
729 ("emacs" ,emacs-minimal)
730 ("tzdata" ,tzdata-for-tests))) ; for mu/test/test-mu-query.c
731 ;; TODO: Add webkit and gtk to build the mug GUI.
738 `(#:modules ((guix build gnu-build-system)
740 (guix build emacs-utils))
741 #:imported-modules (,@%gnu-build-system-modules
742 (guix build emacs-utils))
744 (modify-phases %standard-phases
745 (add-after 'unpack 'patch-configure
746 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
747 ;; so our Emacs package can't find it. Setting "--with-lispdir"
748 ;; configure flag doesn't help because "mu4e" will be added to
749 ;; the lispdir anyway, so we have to modify "configure.ac".
751 (substitute* "configure"
752 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
754 (("guile-2.0") "guile-2.2"))
755 (substitute* '("guile/Makefile.in"
756 "guile/mu/Makefile.in")
757 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
759 (add-after 'patch-configure 'fix-date-tests
760 ;; Loosen test tolerances to prevent failures caused by daylight
761 ;; saving time (DST). See: https://github.com/djcb/mu/issues/1214.
763 (substitute* "lib/parser/test-utils.cc"
764 (("\\* 60 \\* 60, 1 },")
765 "* 60 * 60, 3600 + 1 },"))
767 (add-before 'install 'fix-ffi
768 (lambda* (#:key outputs #:allow-other-keys)
769 (substitute* "guile/mu.scm"
771 (format #f "\"~a/lib/libguile-mu\""
772 (assoc-ref outputs "out"))))
774 (add-before 'check 'check-tz-setup
775 (lambda* (#:key inputs #:allow-other-keys)
776 ;; For mu/test/test-mu-query.c
778 (string-append (assoc-ref inputs "tzdata")
781 (add-after 'install 'install-emacs-autoloads
782 (lambda* (#:key outputs #:allow-other-keys)
783 (emacs-generate-autoloads
785 (string-append (assoc-ref outputs "out")
786 "/share/emacs/site-lisp"))
788 (home-page "https://www.djcbsoftware.nl/code/mu/")
789 (synopsis "Quickly find emails")
791 "Mu is a tool for dealing with e-mail messages stored in the
792 Maildir-format. Mu's purpose in life is to help you to quickly find the
793 messages you need; in addition, it allows you to view messages, extract
794 attachments, create new maildirs, and so on.")
798 ;; This is a fork of mu for use in Mumi that stores message bug IDs in its
799 ;; database. It also renames the library to "mumimu" to avoid confusion.
800 (let ((commit "6b42431052c7cc9a2e147938e1b67f14a93e4ee5")
805 (version (git-version (package-version mu) revision commit))
809 (url "https://git.elephly.net/software/mumimu.git")
811 (file-name (git-file-name name version))
814 "044scxmjrckidqx935yza3aqnjyzrmhyvgx2gs2jyf68hl2qzb89"))))
816 (substitute-keyword-arguments (package-arguments mu)
817 ((#:tests? anything '())
820 `(modify-phases ,phases
821 (replace 'patch-configure
822 (lambda _ (delete-file "autogen.sh") #t))
824 (lambda* (#:key outputs #:allow-other-keys)
825 (substitute* "guile/mumimu.scm"
827 (format #f "\"~a/lib/libguile-mumimu\""
828 (assoc-ref outputs "out"))))
830 (delete 'install-emacs-autoloads)))
831 ((#:configure-flags flags)
836 `(("pkg-config" ,pkg-config)
837 ("autoconf" ,autoconf)
838 ("automake" ,automake)
841 ("tzdata" ,tzdata-for-tests)
842 ("texinfo" ,texinfo))))))
850 ;; package author intends on distributing via github rather
852 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
853 (uri (string-append "https://github.com/pazz/alot/archive/"
855 (file-name (string-append "alot-" version ".tar.gz"))
858 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
859 (build-system python-build-system)
861 `(;; python 3 is currently unsupported, more info:
862 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
865 `(("python2-mock" ,python2-mock)))
867 `(("python2-magic" ,python2-magic)
868 ("python2-configobj" ,python2-configobj)
869 ("python2-twisted" ,python2-twisted)
870 ("python2-urwid" ,python2-urwid)
871 ("python2-urwidtrees" ,python2-urwidtrees)
872 ("python2-pygpgme" ,python2-pygpgme)
873 ("python2-notmuch" ,python2-notmuch)))
874 (home-page "https://github.com/pazz/alot")
875 (synopsis "Command-line MUA using @code{notmuch}")
877 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
878 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
881 (define-public notifymuch
883 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
887 (version (string-append "0.1-" revision "." (string-take commit 7)))
892 (url "https://github.com/kspi/notifymuch.git")
896 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
897 (file-name (string-append name "-" version "-checkout"))))
898 (build-system python-build-system)
900 `(("python-notmuch" ,python-notmuch)
901 ("python-pygobject" ,python-pygobject)
902 ("gobject-introspection" ,gobject-introspection)
903 ("libnotify" ,libnotify)
907 (modify-phases %standard-phases
908 (add-after 'install 'wrap-binary
909 (lambda* (#:key outputs #:allow-other-keys)
910 (let* ((out (assoc-ref outputs "out"))
911 (bin (string-append out "/bin/notifymuch")))
913 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
914 `("GI_TYPELIB_PATH" ":" prefix
915 (,(getenv "GI_TYPELIB_PATH")
916 ,(string-append out "/lib/girepository-1.0")))))
918 (home-page "https://github.com/kspi/notifymuch")
919 (synopsis "Displays notifications for changes in the notmuch email database")
920 (description "notifymuch displays desktop notifications for messages in
921 the notmuch database. The notifications are sent using libnotify to a
922 notification daemon. The query to find messages to send a notification about
923 is configurable, and a notification for the same message will not be send
924 within a configurable period (defaults to 48 hours). To use notifymuch, run
925 @command{notifymuch} after new mail is indexed, this can be automated by
926 invoking @command{notifymuch} from the post-new hook.")
929 (define-public notmuch
935 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
939 "0dfwa38vgnxk9cvvpza66szjgp8lir6iz6yy0cry9593lywh9xym"))))
940 (build-system gnu-build-system)
942 `(#:modules ((guix build gnu-build-system)
943 ((guix build emacs-build-system) #:prefix emacs:)
945 #:imported-modules (,@%gnu-build-system-modules
946 (guix build emacs-build-system)
947 (guix build emacs-utils))
949 (list "V=1" ; verbose test output
950 "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
951 #:phases (modify-phases %standard-phases
952 (add-after 'unpack 'patch-notmuch-lib.el
954 (substitute* "emacs/notmuch-lib.el"
955 (("/bin/sh") (which "sh")))
958 (lambda* (#:key outputs #:allow-other-keys)
960 (setenv "CONFIG_SHELL" (which "sh"))
962 (let* ((out (assoc-ref outputs "out"))
964 (string-append out "/share/emacs/site-lisp/")))
965 (invoke "./configure"
966 (string-append "--prefix=" out)
967 (string-append "--emacslispdir=" elisp)
968 (string-append "--emacsetcdir=" elisp)))))
969 (add-before 'check 'prepare-test-environment
971 (setenv "TEST_CC" "gcc")
972 ;; Patch various inline shell invocations.
973 (substitute* (find-files "test" "\\.sh$")
974 (("/bin/sh") (which "sh")))
976 (add-after 'install 'make-autoloads
977 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
979 `(("bash-completion" ,bash-completion)
980 ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
981 ("pkg-config" ,pkg-config)
983 ("python-docutils" ,python-docutils)
984 ("sphinx" ,python-sphinx)
986 ;; The following are required for tests only.
998 (home-page "https://notmuchmail.org/")
999 (synopsis "Thread-based email index, search, and tagging")
1001 "Notmuch is a command-line based program for indexing, searching, read-
1002 ing, and tagging large collections of email messages.")
1005 (define-public notmuch-addrlookup-c
1007 (name "notmuch-addrlookup-c")
1008 (version (string-append "9"))
1012 (url "https://github.com/aperezdc/notmuch-addrlookup-c.git")
1013 (commit (string-append "v" version))))
1014 (file-name (string-append name "-" version "-checkout"))
1017 "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
1018 (build-system gnu-build-system)
1020 '(#:tests? #f ; no tests
1021 #:make-flags (list "CC=gcc")
1022 #:phases (modify-phases %standard-phases
1024 ;; Remove vim code completion config, it's not needed to
1025 ;; build (or be patched).
1026 (add-before 'patch-source-shebangs 'delete-ycm-file
1027 (lambda _ (delete-file ".ycm_extra_conf.py")))
1029 (lambda* (#:key outputs #:allow-other-keys)
1030 (let ((bin (string-append
1031 (assoc-ref outputs "out") "/bin")))
1032 (install-file "notmuch-addrlookup" bin)))))))
1034 `(("pkg-config" ,pkg-config)))
1037 ("notmuch" ,notmuch)))
1038 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
1039 (synopsis "Address lookup tool for Notmuch")
1040 (description "This is an address lookup tool using a Notmuch database,
1041 useful for email address completion.")
1042 (license license:expat)))
1044 (define-public python-notmuch
1046 (name "python-notmuch")
1047 (version (package-version notmuch))
1048 ;; Notmuch python bindings are now unavailable on pypi. The
1049 ;; bindings are distributed via the notmuch release tarball.
1050 (source (package-source notmuch))
1051 (build-system python-build-system)
1052 (inputs `(("notmuch" ,notmuch)))
1054 `(#:tests? #f ; no "test" target
1056 (modify-phases %standard-phases
1057 ;; This python package lives in a subdirectory of the notmuch source
1058 ;; tree, so chdir into it before building.
1059 (add-after 'unpack 'enter-python-dir
1060 (lambda _ (chdir "bindings/python") #t))
1061 ;; Make sure the correct notmuch shared library gets loaded.
1062 (add-before 'build 'set-libnotmuch-file-name
1063 (lambda* (#:key inputs #:allow-other-keys)
1064 (let ((notmuch (assoc-ref inputs "notmuch")))
1065 (substitute* "notmuch/globals.py"
1066 (("libnotmuch\\.so\\.")
1067 (string-append notmuch "/lib/libnotmuch.so.")))
1069 (home-page (package-home-page notmuch))
1070 (synopsis "Python bindings of the Notmuch mail indexing library")
1072 "This package provides Python bindings to use the Notmuch mail indexing
1073 and search library.")
1076 (define-public python2-notmuch
1077 (package-with-python2 python-notmuch))
1079 (define-public muchsync
1086 (uri (string-append "http://www.muchsync.org/src/"
1087 "muchsync-" version ".tar.gz"))
1089 (base32 "1k2m44pj5i6vfhp9icdqs42chsp208llanc666p3d9nww8ngq2lb"))))
1090 (build-system gnu-build-system)
1092 `(("ghc-pandoc" ,ghc-pandoc)
1093 ("pkg-config" ,pkg-config)))
1095 `(("libcrypto" ,openssl)
1096 ("notmuch" ,notmuch)
1098 ("xapian" ,xapian)))
1099 (home-page "http://www.muchsync.org/")
1100 (synopsis "Synchronize notmuch mail across machines")
1102 "Muchsync brings Notmuch to all of your computers by synchronizing your
1103 mail messages and Notmuch tags across machines. The protocol is heavily
1104 pipelined to work efficiently over high-latency networks such as mobile
1105 broadband. Muchsync supports arbitrary pairwise synchronization among
1106 replicas. A version-vector-based algorithm allows it to exchange only the
1107 minimum information necessary to bring replicas up to date regardless of which
1108 pairs have previously synchronized.")
1111 (define-public getmail
1118 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
1119 "getmail-" version ".tar.gz"))
1121 (base32 "1hcrd9h4g12f5gvl1djsbchcjry02ghq4icdr897s8v48pkrzagk"))))
1122 (build-system python-build-system)
1124 `(#:tests? #f ; no tests
1125 #:python ,python-2))
1126 (home-page "http://pyropus.ca/software/getmail/")
1127 (synopsis "Mail retriever")
1129 "A flexible, extensible mail retrieval system with support for
1130 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1131 arbitrary message filtering, single-user and domain-mailboxes, and many other
1134 ;; License is specified in file '__init__.py'.
1137 (define-public libetpan
1144 (url "https://github.com/dinhviethoa/libetpan.git")
1146 (file-name (git-file-name name version))
1148 (base32 "19g4qskg71jv7sxfxsdkjmrxk9mk5kf9b6fhw06g6wvm3205n95f"))))
1149 (build-system gnu-build-system)
1150 (native-inputs `(("autoconf" ,autoconf-wrapper)
1151 ("automake" ,automake)
1152 ("libtool" ,libtool)
1153 ("pkg-config" ,pkg-config)))
1155 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1156 ;; libraries need to be propagated.
1157 `(("cyrus-sasl" ,cyrus-sasl)
1158 ("openssl" ,openssl)))
1165 (modify-phases %standard-phases
1168 (setenv "NOCONFIGURE" "true")
1169 (invoke "sh" "autogen.sh"))))
1171 '("--disable-static" "--disable-db")))
1172 (home-page "https://www.etpan.org/libetpan.html")
1173 (synopsis "Portable middleware for email access")
1175 "The purpose of this mail library is to provide a portable, efficient
1176 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1177 provides an API for C language. It's the low-level API used by MailCore and
1181 (define-public compface
1187 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1188 "ftp.xemacs.org/aux/"
1189 "compface-" version ".tar.gz"))
1192 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1193 (build-system gnu-build-system)
1196 (synopsis "Portrait image compressor")
1197 (description "This package takes your 48x48x1 portrait image and
1199 (home-page "https://legacy.cs.indiana.edu/ftp/faces/")
1200 (license (x11-style "file://README"))))
1202 (define-public claws-mail
1209 "https://www.claws-mail.org/releases/claws-mail-" version
1213 "1gjrmdmhc7zzilrlss9yl86ybv9sra8v0qi7mkwv7d9azidx5kns"))))
1214 (build-system gnu-build-system)
1215 (native-inputs `(("pkg-config" ,pkg-config)))
1216 (inputs `(("bogofilter" ,bogofilter)
1218 ("dbus-glib" ,dbus-glib)
1219 ("enchant" ,enchant)
1221 ("ghostscript" ,ghostscript)
1222 ("hicolor-icon-theme" ,hicolor-icon-theme)
1227 ("libarchive" ,libarchive)
1228 ("libcanberra" ,libcanberra)
1229 ("libetpan" ,libetpan)
1230 ("libical" ,libical)
1231 ("libnotify" ,libnotify)
1233 ("libxml2" ,libxml2)
1235 ("python-2" ,python-2)
1236 ("mime-info" ,shared-mime-info)
1237 ("startup-notification" ,startup-notification)))
1240 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant"
1243 ;; Disable updating icon cache since it's done by the profile hook.
1244 ;; Conflict with other packages in the profile would be inevitable
1246 '("gtk_update_icon_cache=true")
1247 #:phases (modify-phases %standard-phases
1248 (add-before 'build 'patch-mime
1249 (lambda* (#:key inputs #:allow-other-keys)
1250 (substitute* "src/procmime.c"
1251 (("/usr/share/mime/globs")
1252 (string-append (assoc-ref inputs "mime-info")
1253 "/share/mime/globs"))))))))
1254 (synopsis "GTK-based Email client")
1256 "Claws-Mail is an email client (and news reader) based on GTK+. The
1257 appearance and interface are designed to be familiar to new users coming from
1258 other popular email clients, as well as experienced users. Almost all commands
1259 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1260 which can add many functionalities to the base client.")
1261 (home-page "https://www.claws-mail.org/")
1262 (license gpl3+))) ; most files are actually public domain or x11
1264 (define-public msmtp
1271 (uri (string-append "https://marlam.de/msmtp/releases/"
1272 "/msmtp-" version ".tar.xz"))
1274 (base32 "1waiiksa57byb7gvx1zmh6srvl6r8rvwqklk0slb3iaf4kfbqlws"))))
1275 (build-system gnu-build-system)
1277 `(("libsecret" ,libsecret)
1282 `(("pkg-config" ,pkg-config)))
1283 (home-page "https://marlam.de/msmtp/")
1285 `(#:configure-flags (list "--with-libgsasl"
1287 "--with-tls=gnutls")
1289 (modify-phases %standard-phases
1290 (add-after 'install 'install-additional-files
1291 (lambda* (#:key outputs #:allow-other-keys)
1292 (let* ((out (assoc-ref outputs "out"))
1293 (bin (string-append out "/bin"))
1294 (doc (string-append out "/share/doc/msmtp"))
1295 (msmtpq "scripts/msmtpq")
1296 (vimfiles (string-append out "/share/vim/vimfiles/plugin")))
1297 (install-file (string-append msmtpq "/msmtpq") bin)
1298 (install-file (string-append msmtpq "/msmtp-queue") bin)
1299 (install-file (string-append msmtpq "/README.msmtpq") doc)
1300 (install-file "scripts/vim/msmtp.vim" vimfiles)
1301 ;; Don't rely on netcat being in the PATH to test for a
1302 ;; connection, instead try tp ing debian.org.
1303 (substitute* (string-append bin "/msmtpq")
1304 (("EMAIL_CONN_TEST=n") "EMAIL_CONN_TEST=p"))
1307 "Simple and easy to use SMTP client with decent sendmail compatibility")
1309 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1310 an SMTP server (for example at a free mail provider) which takes care of further
1317 (version "4.93.0.4")
1321 (uri (let ((file-name (string-append "exim-" version ".tar.xz")))
1322 (list (string-append "https://ftp.exim.org/pub/exim/exim4/"
1324 ;; ‘Fix’ releases (exim-x.y.z.f) are kept separately.
1325 (string-append "https://ftp.exim.org/pub/exim/exim4/fixes/"
1327 ;; After a new non-fix release, the old one is moved here.
1328 (string-append "https://ftp.exim.org/pub/exim/exim4/old/"
1331 (base32 "01g4sfycv13glnmfrapwhjbdw6z1z7w5bwjldxjmglwfw5p3czak"))))
1332 (build-system gnu-build-system)
1334 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
1335 ("gnutls" ,gnutls/dane)
1342 ("libxaw" ,libxaw)))
1344 `(("pcre" ,pcre "bin")
1346 ("pkg-config" ,pkg-config)))
1349 (modify-phases %standard-phases
1351 ;; We'd use #:make-flags but the top-level Makefile calls others
1352 ;; recursively, so just set all variables this way.
1353 (lambda* (#:key outputs inputs #:allow-other-keys)
1354 (substitute* '("Makefile" "OS/Makefile-Default")
1355 (("(RM_COMMAND=).*" all var)
1356 (string-append var "rm\n")))
1357 (copy-file "src/EDITME" "Local/Makefile")
1358 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1359 (let ((out (assoc-ref outputs "out"))
1360 (gzip (assoc-ref inputs "gzip"))
1361 (bzip2 (assoc-ref inputs "bzip2"))
1362 (xz (assoc-ref inputs "xz")))
1363 (substitute* '("Local/Makefile")
1364 (("(BIN_DIRECTORY=).*" all var)
1365 (string-append var out "/bin\n"))
1366 (("(CONFIGURE_FILE=).*" all var)
1367 (string-append var out "/etc/exim.conf\n"))
1368 (("(EXIM_USER=).*" all var)
1369 (string-append var "nobody\n"))
1370 (("(FIXED_NEVER_USERS=).*" all var)
1371 (string-append var "\n")) ; XXX no root in build environment
1372 (("(COMPRESS_COMMAND=).*" all var)
1373 (string-append var gzip "/bin/gzip\n"))
1374 (("(ZCAT_COMMAND=).*" all var)
1375 (string-append var gzip "/bin/zcat\n"))
1376 (("# (USE_GNUTLS(|_PC)=.*)" all line)
1377 (string-append line "\n")))
1378 ;; This file has hard-coded relative file names for tools despite
1379 ;; the zcat configuration above.
1380 (substitute* '("src/exigrep.src")
1381 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1382 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1383 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1384 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1386 (add-before 'build 'fix-sh-paths
1387 (lambda* (#:key inputs #:allow-other-keys)
1388 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1389 (("SHELL=/bin/sh") "SHELL=sh"))
1390 (substitute* '("scripts/Configure-config.h")
1391 (("\\| /bin/sh") "| sh"))
1392 (let ((bash (assoc-ref inputs "bash")))
1393 (substitute* '("scripts/Configure-eximon")
1394 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1396 (add-before 'build 'build-reproducibly
1398 ;; The ‘compilation number’ is incremented for every build from the
1399 ;; same source tree. It appears to vary over different (parallel?)
1400 ;; builds. Make it a ‘constant number’ instead.
1401 (substitute* "src/version.c"
1402 (("#include \"cnumber.h\"") "1")))))
1405 "INSTALL_ARG=-no_chown")
1406 ;; No 'check' target. There is a test suite in test/, which assumes that
1407 ;; certain build options were (not) used and that it can freely ‘sudo’.
1409 (home-page "https://www.exim.org/")
1411 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1413 "Exim is a message transfer agent (MTA) developed at the University of
1414 Cambridge for use on Unix systems connected to the Internet. In style it is
1415 similar to Smail 3, but its facilities are more general. There is a great
1416 deal of flexibility in the way mail can be routed, and there are extensive
1417 facilities for checking incoming mail.")
1420 (define-public dovecot
1427 (uri (string-append "https://www.dovecot.org/releases/"
1428 (version-major+minor version) "/"
1429 "dovecot-" version ".tar.gz"))
1431 (base32 "1ibiz3k2flablkcqbkvfzsjnq5b5kxximhcrplflsjl57mr88ca7"))))
1432 (build-system gnu-build-system)
1434 `(("pkg-config" ,pkg-config)))
1437 ("libsodium" ,libsodium) ; extra password algorithms
1438 ("linux-pam" ,linux-pam)
1440 ("openssl" ,openssl)
1444 `(#:configure-flags '("--sysconfdir=/etc"
1445 "--localstatedir=/var"
1446 "--with-sqlite") ; not auto-detected
1448 (modify-phases %standard-phases
1449 (add-after 'unpack 'patch-file-names
1451 (substitute* "src/lib-program-client/test-program-client-local.c"
1452 (("(/bin/| )cat") (which "cat"))
1453 (("/bin/echo") (which "echo"))
1454 (("/bin/false") (which "false"))
1455 (("/bin/sh") (which "bash"))
1456 (("head") (which "head"))
1457 (("sleep") (which "sleep")))
1458 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1459 "src/lib-smtp/test-bin/sendmail-success.sh")
1460 (("cat") (which "cat")))
1463 (lambda* (#:key make-flags #:allow-other-keys)
1464 ;; Simple hack to avoid installing a trivial README in /etc.
1465 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1467 (home-page "https://www.dovecot.org")
1468 (synopsis "Secure POP3/IMAP server")
1470 "Dovecot is a mail server whose major goals are security and reliability.
1471 It supports mbox/Maildir and its own dbox/mdbox formats.")
1472 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1473 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1474 ;; Unicode, Inc. License Agreement for Data Files and Software.
1475 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1477 (define-public dovecot-trees
1479 (name "dovecot-trees")
1484 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1485 "archive.tar.gz?ref=v" version))
1486 (file-name (string-append name "-" version ".tar.gz"))
1489 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1491 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
1492 (build-system gnu-build-system)
1494 `(("automake" ,automake)
1495 ("autoconf" ,autoconf)
1496 ("libtool" ,libtool)
1497 ("dovecot" ,dovecot)
1498 ("pkg-config" ,pkg-config)))
1500 `(("libsodium" ,libsodium)))
1502 `(#:tests? #f ;No tests exist.
1503 #:configure-flags (list (string-append "--with-dovecot="
1504 (assoc-ref %build-inputs "dovecot")
1506 (home-page "https://0xacab.org/riseuplabs/trees")
1507 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1509 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1510 Dovecot encryption plugin. This plugin adds individually encrypted mail
1511 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1512 which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1513 the Sodium crypto library (based on NaCL).
1517 @item On IMAP log in, the user's cleartext password is passed to the plugin.
1518 @item The plugin creates an argon2 digest from the password.
1519 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1520 @item Inside the secretbox is stored a Curve25519 private key.
1521 @item The Curve25519 private key is used to decrypt each individual message,
1522 using libsodium sealed boxes.
1523 @item New mail is encrypted as it arrives using the Curve25519 public key.
1527 (define-public dovecot-libsodium-plugin
1528 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1531 (name "dovecot-libsodium-plugin")
1532 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1537 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1539 (file-name (string-append name "-" version "-checkout"))
1542 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1543 (build-system gnu-build-system)
1545 `(("automake" ,automake)
1546 ("autoconf" ,autoconf)
1547 ("libtool" ,libtool)
1548 ("dovecot" ,dovecot)
1549 ("pkg-config" ,pkg-config)))
1551 `(("libsodium" ,libsodium)))
1553 `(#:tests? #f ;No tests exist.
1554 #:configure-flags (list (string-append "--with-dovecot="
1555 (assoc-ref %build-inputs "dovecot")
1557 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1558 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1560 "@code{dovecot-libsodium-plugin} provides a libsodium password
1561 hashing scheme (such as scrypt) plug-in for @code{Dovecot}.")
1564 (define-public isync
1571 (uri (string-append "mirror://sourceforge/isync/isync/"
1572 version "/isync-" version ".tar.gz"))
1574 "1sphd30jplii58y2zmw365bckm6pszmapcy905zhjll1sm1ldjv8"))))
1575 (build-system gnu-build-system)
1580 ("cyrus-sasl" ,cyrus-sasl)
1581 ("openssl" ,openssl-1.0)
1583 (home-page "http://isync.sourceforge.net/")
1584 (synopsis "Mailbox synchronization program")
1586 "isync/mbsync is a command-line tool for two-way synchronization of
1587 mailboxes. Currently Maildir and IMAP are supported types.")
1590 (define-public perl-email-abstract
1592 (name "perl-email-abstract")
1597 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1598 "Email-Abstract-" version ".tar.gz"))
1601 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1602 (build-system perl-build-system)
1604 `(("perl-email-simple" ,perl-email-simple)
1605 ("perl-module-pluggable" ,perl-module-pluggable)
1606 ("perl-mro-compat" ,perl-mro-compat)))
1607 (home-page "https://metacpan.org/release/Email-Abstract")
1608 (synopsis "Interface to mail representations")
1609 (description "Email::Abstract provides module writers with the ability to
1610 write simple, representation-independent mail handling code.")
1611 (license perl-license)))
1613 (define-public perl-email-address
1615 (name "perl-email-address")
1620 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1621 "Email-Address-" version ".tar.gz"))
1623 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
1624 (build-system perl-build-system)
1625 (home-page "https://metacpan.org/release/Email-Address")
1626 (synopsis "Email address parsing and creation")
1627 (description "Email::Address implements a regex-based RFC 2822 parser that
1628 locates email addresses in strings and returns a list of Email::Address
1629 objects found. Alternatively you may construct objects manually.")
1630 (license perl-license)))
1632 (define-public perl-email-address-xs
1634 (name "perl-email-address-xs")
1639 (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
1640 "Email-Address-XS-" version ".tar.gz"))
1643 "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
1644 (build-system perl-build-system)
1645 (home-page "https://metacpan.org/release/Email-Address-XS")
1646 (synopsis "Parse and format RFC 5322 email addresses and groups")
1648 "Email::Address::XS implements RFC 5322 parser and formatter of email
1649 addresses and groups. Unlike Email::Address, this module does not use regular
1650 expressions for parsing but instead is implemented in XS and uses shared code
1651 from Dovecot IMAP server.")
1652 (license perl-license)))
1654 (define-public perl-email-date-format
1656 (name "perl-email-date-format")
1661 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1662 "Email-Date-Format-" version ".tar.gz"))
1665 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1666 (build-system perl-build-system)
1667 (home-page "https://metacpan.org/release/Email-Date-Format")
1668 (synopsis "Produce RFC 2822 date strings")
1669 (description "Email::Date::Format provides a means for generating an RFC
1670 2822 compliant datetime string.")
1671 (license perl-license)))
1673 (define-public perl-email-messageid
1675 (name "perl-email-messageid")
1680 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1681 "Email-MessageID-" version ".tar.gz"))
1684 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1685 (build-system perl-build-system)
1686 (home-page "https://metacpan.org/release/Email-MessageID")
1687 (synopsis "Generate world unique message-ids")
1688 (description "Email::MessageID generates recommended message-ids to
1689 identify a message uniquely.")
1690 (license perl-license)))
1692 (define-public perl-email-mime
1694 (name "perl-email-mime")
1699 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1700 "Email-MIME-" version ".tar.gz"))
1703 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
1704 (build-system perl-build-system)
1706 `(("perl-email-address" ,perl-email-address)
1707 ("perl-email-messageid" ,perl-email-messageid)
1708 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1709 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1710 ("perl-email-simple" ,perl-email-simple)
1711 ("perl-mime-types" ,perl-mime-types)
1712 ("perl-module-runtime" ,perl-module-runtime)))
1713 (home-page "https://metacpan.org/release/Email-MIME")
1714 (synopsis "MIME message handling")
1715 (description "Email::MIME is an extension of the Email::Simple module, to
1716 handle MIME encoded messages. It takes a message as a string, splits it up
1717 into its constituent parts, and allows you access to various parts of the
1718 message. Headers are decoded from MIME encoding.")
1719 (license perl-license)))
1721 (define-public perl-email-mime-contenttype
1723 (name "perl-email-mime-contenttype")
1728 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1729 "Email-MIME-ContentType-" version ".tar.gz"))
1732 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
1733 (build-system perl-build-system)
1735 `(("perl-capture-tiny" ,perl-capture-tiny)))
1736 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
1737 (synopsis "Parse MIME Content-Type headers")
1738 (description "Email::MIME::ContentType parses a MIME Content-Type
1740 (license perl-license)))
1742 (define-public perl-email-mime-encodings
1744 (name "perl-email-mime-encodings")
1749 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1750 "Email-MIME-Encodings-" version ".tar.gz"))
1753 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1754 (build-system perl-build-system)
1756 `(("perl-capture-tiny" ,perl-capture-tiny)))
1757 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
1758 (synopsis "Unified interface to MIME encoding and decoding")
1759 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1760 (license perl-license)))
1762 (define-public perl-email-sender
1764 (name "perl-email-sender")
1765 (version "1.300034")
1769 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1770 "Email-Sender-" version ".tar.gz"))
1772 (base32 "14aj9kqa9dr2bdhzn2qvjj2mffj8wjb5397z8qw7qg057fk3ib05"))))
1773 (build-system perl-build-system)
1775 `(("perl-capture-tiny" ,perl-capture-tiny)))
1777 `(("perl-email-abstract" ,perl-email-abstract)
1778 ("perl-email-address" ,perl-email-address)
1779 ("perl-email-simple" ,perl-email-simple)
1780 ("perl-list-moreutils" ,perl-list-moreutils)
1781 ("perl-module-runtime" ,perl-module-runtime)
1782 ("perl-moo" ,perl-moo)
1783 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1784 ("perl-sub-exporter" ,perl-sub-exporter)
1785 ("perl-throwable" ,perl-throwable)
1786 ("perl-try-tiny" ,perl-try-tiny)))
1787 (home-page "https://metacpan.org/release/Email-Sender")
1788 (synopsis "Perl library for sending email")
1789 (description "Email::Sender replaces the old and sometimes problematic
1790 Email::Send library.")
1791 (license perl-license)))
1793 (define-public perl-email-simple
1795 (name "perl-email-simple")
1800 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1801 "Email-Simple-" version ".tar.gz"))
1804 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
1805 (build-system perl-build-system)
1807 `(("perl-email-date-format" ,perl-email-date-format)))
1808 (home-page "https://metacpan.org/release/Email-Simple")
1809 (synopsis "Parsing of RFC 2822 messages")
1810 (description "Email::Simple provides simple parsing of RFC 2822 message
1811 format and headers.")
1812 (license perl-license)))
1814 (define-public libesmtp
1821 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1822 "libesmtp/libesmtp-" version ".tar.bz2/"
1823 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1825 ;; XXX This site is offline, so we fetch Fedora's cached copy
1826 ;; of the source tarball.
1827 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1828 version ".tar.bz2")))
1831 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1832 (build-system gnu-build-system)
1834 `(("openssl" ,openssl)))
1835 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1836 (synopsis "Library for sending mail via remote hosts using SMTP")
1837 (description "libESMTP is an SMTP client which manages posting (or
1838 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1839 It may be used as part of a Mail User Agent (MUA) or other program that must
1840 be able to post electronic mail where mail functionality may not be that
1841 program's primary purpose.")
1842 (license (list lgpl2.1+ gpl2+))))
1844 (define-public esmtp
1852 (url "https://github.com/andywingo/esmtp.git")
1853 (commit "01bf9fc")))
1856 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1857 (file-name (string-append name "-" version "-checkout"))))
1859 `(#:phases (modify-phases %standard-phases
1861 (lambda _ (invoke "autoreconf" "-vfi"))))))
1862 (build-system gnu-build-system)
1866 ("autoconf" ,autoconf)
1867 ("automake" ,automake)
1868 ("libtool" ,libtool)))
1870 `(("libesmtp" ,libesmtp)))
1871 (home-page "https://sourceforge.net/projects/esmtp/")
1872 (synopsis "Relay-only mail transfer agent (MTA)")
1873 (description "Esmtp is a simple relay-only mail transfer agent built using
1874 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1875 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1876 page for more on configuration. This package also provides minimal
1877 compatibility shims for the @command{sendmail}, @command{mailq}, and
1878 @command{newaliases} commands.")
1887 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1888 version "/fdm-" version ".tar.gz"))
1890 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
1891 (build-system gnu-build-system)
1894 ("openssl" ,openssl)
1896 (home-page "https://github.com/nicm/fdm")
1897 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1898 (description "fdm is a program designed to fetch mail from POP3
1899 or IMAP servers, or receive local mail from stdin, and
1900 deliver it in various ways.")
1902 ;; Why point to a source file? Well, all the individual files have a
1903 ;; copy of this license in their headers, but there's no seprate file
1904 ;; with that information.
1905 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1908 (define-public procmail
1916 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1921 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1922 ;; The following patch fixes an ambiguous definition of
1923 ;; getline() in formail.c. The patch is provided by Debian as
1925 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1926 "procmail-CVE-2014-3618.patch"
1927 "procmail-CVE-2017-16844.patch"))))
1929 `(#:phases (modify-phases %standard-phases
1932 (substitute* "Makefile"
1936 (assoc-ref %outputs "out"))
1940 #:tests? #f)) ;; There are no tests indicating a successful
1941 ;; build. Some tests of basic locking mechanisms provided by the
1942 ;; file system are performed during 'make install'. However, these
1943 ;; are performed before the actual build process.
1944 (build-system gnu-build-system)
1945 (inputs `(("exim" ,exim)))
1946 (home-page "http://www.procmail.org/")
1947 (synopsis "Versatile mail delivery agent (MDA)")
1948 (description "Procmail is a mail delivery agent (MDA) featuring support
1949 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1950 can be sorted into separate files/directories and arbitrary commands can be
1951 executed on mail arrival. Procmail is considered stable, but is no longer
1953 (license gpl2+))) ;; procmail allows to choose the
1954 ;; nonfree Artistic License 1.0
1955 ;; as alternative to the GPL2+.
1956 ;; This option is not listed here.
1958 (define-public khard
1964 (uri (pypi-uri name version))
1967 "18ba2xgfq8sw0bg6xmlfjpizid1hkzgswcfcc54gl21y2dwfda2w"))))
1968 (build-system python-build-system)
1971 (modify-phases %standard-phases
1972 (add-after 'install 'install-doc
1973 (lambda* (#:key outputs #:allow-other-keys)
1974 (let* ((out (assoc-ref outputs "out"))
1975 (doc (string-append out "/share/doc/khard")))
1976 (copy-recursively "misc/khard" doc)
1979 `(("python-setuptools-scm" ,python-setuptools-scm)))
1981 `(("python-atomicwrites" ,python-atomicwrites)
1982 ("python-configobj" ,python-configobj)
1983 ("python-pyyaml" ,python-pyyaml)
1984 ("python-ruamel.yaml" ,python-ruamel.yaml)
1985 ("python-unidecode" ,python-unidecode)
1986 ("python-vobject" ,python-vobject)))
1987 (synopsis "Console address book using CardDAV")
1988 (description "Khard is an address book for the console. It creates, reads,
1989 modifies and removes CardDAV address book entries at your local machine. For
1990 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1991 Khard can also be used from within the email client @command{mutt}.")
1992 (home-page "https://github.com/scheibler/khard")
1995 (define-public perl-mail-spf
1997 (name "perl-mail-spf")
2003 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
2007 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
2008 (build-system perl-build-system)
2010 `(("perl-module-build" ,perl-module-build)
2011 ("perl-net-dns-resolver-programmable"
2012 ,perl-net-dns-resolver-programmable)))
2015 (modify-phases %standard-phases
2016 (add-before 'configure 'modify-Build.PL
2017 (lambda* (#:key outputs #:allow-other-keys)
2018 (substitute* "Build.PL"
2019 (("'/usr/sbin'") (string-append "'"
2020 (assoc-ref outputs "out")
2024 `(("perl-error" ,perl-error)
2025 ("perl-net-dns" ,perl-net-dns)
2026 ("perl-netaddr-ip" ,perl-netaddr-ip)
2027 ("perl-uri" ,perl-uri)))
2028 (home-page "https://metacpan.org/release/Mail-SPF")
2029 (synopsis "Perl implementation of Sender Policy Framework")
2030 (description "Mail::SPF is the Sender Policy Framework implemented
2034 (define-public perl-mail-authenticationresults
2036 (name "perl-mail-authenticationresults")
2037 (version "1.20180923")
2041 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
2042 "Mail-AuthenticationResults-" version ".tar.gz"))
2045 "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
2046 (build-system perl-build-system)
2048 `(("perl-test-exception" ,perl-test-exception)))
2049 (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
2050 (synopsis "Object Oriented Authentication-Results Headers")
2051 (description "Mail::AuthenticationResults parses the message header field
2052 that indicates the message authentication status as per RFC7601. This module
2053 is not fully compliant with the RFC but it tries to implement most styles of
2054 Authentication-Results header seen in the wild.")
2055 (license perl-license)))
2057 (define-public perl-mail-dkim
2059 (name "perl-mail-dkim")
2064 "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
2069 "0cgkal65qqcy57b21lgij90ba36wl66byw9i76g5yhwaa8ms8hqa"))))
2070 (build-system perl-build-system)
2072 `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2073 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2074 ("perl-mailtools" ,perl-mailtools)
2075 ("perl-net-dns" ,perl-net-dns)))
2077 `(("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
2078 ("perl-test-requiresinternet" ,perl-test-requiresinternet)
2079 ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
2080 (home-page "https://metacpan.org/release/Mail-DKIM")
2081 (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
2082 (description "Mail::DKIM is a Perl module that implements the new Domain
2083 Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
2084 both of which sign and verify emails using digital signatures and DNS records.
2085 Mail-DKIM can be used by any Perl program that wants to provide support for
2086 DKIM and/or DomainKeys.")
2089 (define-public dkimproxy
2096 "mirror://sourceforge/dkimproxy/dkimproxy/"
2097 version "/dkimproxy-" version ".tar.gz"))
2100 "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
2102 (search-patches "dkimproxy-add-ipv6-support.patch"))))
2103 (build-system gnu-build-system)
2106 (modify-phases %standard-phases
2107 (add-after 'install 'make-wrapper
2108 (lambda* (#:key inputs outputs #:allow-other-keys)
2109 (let* ((out (assoc-ref outputs "out"))
2110 (wrap.pl (lambda (scripts keys)
2113 (wrap-program (string-append out script)
2114 `("PERL5LIB" ":" prefix
2117 (assoc-ref inputs input)
2118 "/lib/perl5/site_perl"))
2121 (wrap.pl (list "/bin/dkimproxy.in"
2122 "/bin/dkimproxy.out")
2123 (list "perl-crypt-openssl-rsa"
2124 "perl-io-socket-inet6"
2126 "perl-mail-authenticationresults"
2131 (wrap.pl (list "/bin/dkim_responder.pl")
2132 (list "perl-crypt-openssl-rsa"
2141 ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2142 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2143 ("perl-mailtools" ,perl-mailtools)
2144 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2145 ("perl-mail-dkim" ,perl-mail-dkim)
2146 ("perl-mime-tools" ,perl-mime-tools)
2147 ("perl-net-dns" ,perl-net-dns)
2148 ("perl-net-server" ,perl-net-server)
2149 ("perl-socket6" ,perl-socket6)
2150 ("perl-timedate" ,perl-timedate)))
2151 (home-page "http://dkimproxy.sourceforge.net/")
2152 (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
2154 "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
2155 @code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
2156 proxy for signing outgoing email, and an inbound proxy for verifying signatures
2157 of incoming messages.
2159 It was designed for Postfix, but can be used to add DKIM support to nearly any
2160 existing mail server. With Postfix, the proxies can operate as either
2161 @code{Before-Queue} or @code{After-Queue} content filters.")
2164 (define-public mb2md
2171 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
2175 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
2176 (build-system trivial-build-system)
2178 '(#:modules ((guix build utils))
2181 (use-modules (guix build utils))
2182 (let* ((source (assoc-ref %build-inputs "source"))
2183 (out (assoc-ref %outputs "out"))
2184 (bin (string-append out "/bin"))
2185 (perl (assoc-ref %build-inputs "perl"))
2186 (gzip (assoc-ref %build-inputs "gzip"))
2187 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
2188 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
2190 (with-directory-excursion bin
2191 (copy-file source "mb2md.gz")
2192 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
2193 (substitute* "mb2md"
2194 (("#!/usr/bin/perl")
2195 (string-append "#!/usr/bin/perl -I " perl5lib)))
2196 (patch-shebang "mb2md" (list (string-append perl "/bin")))
2197 (chmod "mb2md" #o555))
2199 (native-inputs `(("gzip" ,gzip)))
2200 (inputs `(("perl" ,perl)
2201 ("perl-timedate" ,perl-timedate)))
2202 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
2203 (synopsis "Mbox to maildir converter")
2205 "Mb2md is a Perl script that takes one or more mbox format files and
2206 converts them to maildir format directories.")
2207 (license public-domain)))
2216 (uri (string-append "https://marlam.de/mpop/releases/"
2217 "mpop-" version ".tar.xz"))
2219 (base32 "0c6n5afn9pr4p7gxkv462lysrw52w9fhvavzm99c78dcp9dj5xnk"))))
2220 (build-system gnu-build-system)
2222 `(("gnutls" ,gnutls)))
2224 `(("pkg-config" ,pkg-config)))
2225 (home-page "https://marlam.de/mpop/")
2226 (synopsis "POP3 mail client")
2227 (description "mpop is a small and fast POP3 client suitable as a
2228 fetchmail replacement.
2230 mpop supports multiple accounts, header based mail filtering, delivery
2231 to mbox files, maildir folders or an @acronym{MDA, Mail Delivery Agent},
2232 TLS/SSL, several authentication methods, @acronym{IDN, Internationalized Domain
2233 Names} and SOCKS proxies.")
2236 (define-public mhonarc
2243 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
2247 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
2248 (build-system perl-build-system)
2249 (home-page "https://www.mhonarc.org/")
2250 (synopsis "Create HTML archives of mail/news messages")
2252 "MHonArc is a Perl mail-to-HTML converter. MHonArc
2253 provides HTML mail archiving with index, mail thread linking,
2254 etc; plus other capabilities including support for MIME and
2255 powerful user customization features.")
2259 (define-public sendmail
2267 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
2271 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
2272 (build-system gnu-build-system)
2275 (modify-phases %standard-phases
2276 (add-before 'build 'replace-/bin/sh
2280 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2281 "contrib/mmuegel" "devtools/bin/configure.sh")
2282 (find-files "." ".*\\.m4")
2283 (find-files "." ".*\\.cf"))
2284 (("/bin/sh") (which "sh")))
2286 (substitute* "devtools/bin/Build"
2287 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
2292 ;; Render harmless any attempts to chown or chgrp
2293 (substitute* "devtools/bin/install.sh"
2294 (("owner=\\$2") "owner=''")
2295 (("group=\\$2") "group=''"))
2297 (with-output-to-file "devtools/Site/site.config.m4"
2300 define(`confCC', `gcc')
2301 define(`confOPTIMIZE', `-g -O2')
2302 define(`confLIBS', `-lresolv')
2303 define(`confINSTALL', `~a/devtools/bin/install.sh')
2304 define(`confDEPEND_TYPE', `CC-M')
2305 define(`confINST_DEP', `')
2310 (invoke "sh" "Build")
2311 (with-directory-excursion "cf/cf"
2312 (copy-file "generic-linux.mc" "sendmail.mc")
2313 (invoke "sh" "Build" "sendmail.cf"))
2315 (add-before 'install 'pre-install
2317 (let ((out (assoc-ref %outputs "out")))
2318 (mkdir-p (string-append out "/usr/bin"))
2319 (mkdir-p (string-append out "/usr/sbin"))
2320 (mkdir-p (string-append out "/etc/mail"))
2321 (setenv "DESTDIR" out)
2322 (with-directory-excursion "cf/cf"
2323 (invoke "sh" "Build" "install-cf"))
2325 ;; There is no make check. There are some post installation tests, but those
2326 ;; require root privileges
2331 (home-page "http://sendmail.org")
2333 "Highly configurable Mail Transfer Agent (MTA)")
2335 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2336 Allman. It is highly configurable and supports many delivery methods and many
2337 transfer protocols.")
2338 (license (non-copyleft "file://LICENSE"
2339 "See LICENSE in the distribution."))))
2341 (define-public opensmtpd
2348 (uri (string-append "https://www.opensmtpd.org/archives/"
2349 "opensmtpd-" version ".tar.gz"))
2351 (base32 "1kyph9ycq0j21dl9n1sq5fns9p4gckdi0fmnf8awrcwrdcm9dyg2"))))
2352 (build-system gnu-build-system)
2356 ("libevent" ,libevent)
2357 ("libressl" ,libressl) ; recommended, and supports e.g. ECDSA
2358 ("linux-pam" ,linux-pam)
2362 ("groff" ,groff))) ; for man pages
2365 (list "--localstatedir=/var"
2366 ;; This is the default only if it exists at build time—it doesn't.
2367 "--with-path-socket=/var/run"
2368 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2369 "--with-user-smtpd=smtpd"
2370 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2374 (modify-phases %standard-phases
2375 ;; Fix some incorrectly hard-coded external tool file names.
2376 (add-after 'unpack 'patch-FHS-file-names
2378 (substitute* "smtpd/smtpctl.c"
2379 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
2380 (("/bin/cat") (which "cat")))
2381 (substitute* "smtpd/mda_unpriv.c"
2382 (("/bin/sh") (which "sh")))
2384 ;; OpenSMTPD provides a single smtpctl utility to control both the
2385 ;; daemon and the local submission subsystem. To accomodate systems
2386 ;; that require historical interfaces such as sendmail, newaliases or
2387 ;; makemap, smtpctl operates in compatibility mode if called with the
2389 (add-after 'install 'install-compability-links
2390 (lambda* (#:key outputs #:allow-other-keys)
2391 (let* ((out (assoc-ref outputs "out"))
2392 (sbin (string-append out "/sbin/")))
2393 (for-each (lambda (command)
2394 (symlink "smtpctl" (string-append sbin command)))
2395 (list "mailq" "makemap" "newaliases"
2396 "send-mail" "sendmail")))
2398 (synopsis "Lightweight SMTP daemon")
2400 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
2401 Transfer Protocol}, with some additional standard extensions. It allows
2402 ordinary machines to exchange e-mails with other systems speaking the SMTP
2403 protocol, or to deliver them to local users.
2405 In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
2406 functionality than those available in other SMTP daemons. The objective is to
2407 provide enough features to satisfy typical usage at the risk of unsuitability
2408 to esoteric or niche requirements.")
2409 (home-page "https://www.opensmtpd.org")
2410 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2411 public-domain isc license:openssl))))
2413 (define-public opensmtpd-extras
2415 (name "opensmtpd-extras")
2419 (uri (string-append "https://www.opensmtpd.org/archives/"
2420 name "-" version ".tar.gz"))
2423 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
2424 (build-system gnu-build-system)
2426 `(("libressl" ,libressl)
2427 ("libevent" ,libevent)
2429 ("python-2" ,python-2)
2430 ("opensmtpd" ,opensmtpd)
2433 ("postgresql" ,postgresql)
2435 ("linux-pam" ,linux-pam)))
2438 ("pkg-config" ,pkg-config)
2440 ("automake" ,automake)
2441 ("autoconf" ,autoconf)))
2443 `(;; We have to configure it like this because the default checks for for example
2444 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2445 #:configure-flags (list
2446 "--with-filter-clamav" "--with-filter-dkim-signer"
2447 "--with-filter-dnsbl" "--with-filter-lua"
2448 "--with-filter-monkey" "--with-filter-pause"
2449 "--with-filter-perl" "--with-filter-python"
2450 "--with-filter-regex" "--with-filter-spamassassin"
2451 "--with-filter-stub" "--with-filter-trace"
2452 "--with-filter-void"
2454 "--with-queue-null" "--with-queue-python"
2455 "--with-queue-ram" "--with-queue-stub"
2457 "--with-scheduler-python" "--with-scheduler-ram"
2458 "--with-scheduler-stub"
2460 "--with-table-ldap" ; "--with-table-mysql"
2461 "--with-table-passwd" "--with-table-postgres"
2462 "--with-table-python" "--with-table-socketmap"
2463 "--with-table-sqlite" "--with-table-stub"
2464 ;;"--with-table-redis" ; TODO: package hiredis
2466 "--with-user=smtpd" "--with-privsep-user=smtpd"
2467 "--localstatedir=/var" "--sysconfdir=/etc"
2468 "--with-lua-type=lua" ; can use lua or luajit
2470 (string-append "--with-python="
2471 (assoc-ref %build-inputs "python-2"))
2472 (string-append "--with-lua="
2473 (assoc-ref %build-inputs "lua")))))
2474 (license (list bsd-2 bsd-3 bsd-4
2475 public-domain isc license:openssl))
2476 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2478 "This package provides extra tables, filters, and various other addons
2479 for OpenSMTPD to extend its functionality.")
2480 (home-page "https://www.opensmtpd.org")))
2482 (define-public python-mailmanclient
2484 (name "python-mailmanclient")
2489 (uri (pypi-uri "mailmanclient" version))
2492 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
2493 (build-system python-build-system)
2495 `(#:tests? #f)) ; Requires mailman running
2497 `(("python-six" ,python-six)
2498 ("python-httplib2" ,python-httplib2)))
2499 (home-page "https://launchpad.net/mailman.client")
2500 (synopsis "Python bindings for the Mailman 3 REST API")
2502 "The mailmanclient library provides official Python bindings for
2503 the GNU Mailman 3 REST API.")
2506 (define-public python2-mailmanclient
2507 (package-with-python2 python-mailmanclient))
2509 (define-public mlmmj
2516 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2517 version ".tar.bz2"))
2520 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
2521 (build-system gnu-build-system)
2523 `(("perl" ,perl))) ; For "contrib/web/"
2525 `(("pkg-config" ,pkg-config)))
2528 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2529 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2530 ;; of mimetypes for parts of multipart/mime messages that should be denied
2531 ;; or stripped. The parts then get stripped directly when the mail is
2532 ;; received. mlmmj-receive-strip also appends an extra header
2533 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2535 (list "--enable-receive-strip")
2537 (modify-phases %standard-phases
2538 (add-before 'install 'install-contrib
2539 (lambda* (#:key outputs #:allow-other-keys)
2540 (let* ((out (assoc-ref outputs "out"))
2541 (share (string-append out "/share/mlmmj"))
2542 (contrib (string-append share "/contrib/web"))
2543 (texts (string-append share "/listtexts")))
2544 (copy-recursively "contrib/web/" contrib)
2545 (copy-recursively "listtexts" texts)
2546 (rename-file texts (string-append share "/texts"))
2548 (home-page "http://mlmmj.org")
2549 (synopsis "Mailing list managing made joyful")
2551 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2552 It works with many different Mail Transport Agents (MTAs) and is simple for a
2553 system administrator to install, configure and integrate with other software.
2554 As it uses very few resources, and requires no daemons, it is ideal for
2555 installation on systems where resources are limited. Its features include:
2557 @item Archive, Custom headers / footer,
2558 @item Fully automated bounce handling (similar to ezmlm),
2559 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
2560 @item Subscribers only posting, Regular expression access control,
2561 @item Functionality to retrieve old posts, Web interface, Digests,
2562 @item No-mail subscription, VERP support,
2563 @item Delivery Status Notification (RFC1891) support,
2564 @item Rich and customisable texts for automated operations.
2566 (license license:expat)))
2568 (define-public python2-django-mailman3
2570 (name "python2-django-mailman3")
2575 (uri (pypi-uri "django-mailman3" version))
2578 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
2579 (build-system python-build-system)
2582 (modify-phases %standard-phases
2585 (invoke "django-admin"
2587 "--settings=django_mailman3.tests.settings_test"
2588 "django_mailman3"))))
2589 #:python ,python-2))
2591 `(("python2-django" ,python2-django)))
2593 `(("python2-requests" ,python2-requests)
2594 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2595 ("python2-openid" ,python2-openid)
2596 ("python2-mailmanclient" ,python2-mailmanclient)
2597 ("python2-django-allauth" ,python2-django-allauth)
2598 ("python2-django-gravatar2" ,python2-django-gravatar2)
2599 ("python2-pytz" ,python2-pytz)))
2600 (home-page "https://gitlab.com/mailman/django-mailman3")
2601 (synopsis "Django library for Mailman UIs")
2603 "Libraries and templates for Django-based interfaces
2604 interacting with Mailman.")
2607 (define-public postorius
2614 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2615 (file-name (string-append name "-" version ".tar.gz"))
2618 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2619 (build-system python-build-system)
2621 `(; One test dependency relies on Persona, which was shut down in
2624 ;; The part of the frontend of Mailman is still python 2.7.
2625 #:python ,python-2))
2627 `(("python2-django" ,python2-django)
2628 ("python2-django-mailman3" ,python2-django-mailman3)
2629 ("python2-mailmanclient" ,python2-mailmanclient)))
2630 (home-page "https://gitlab.com/mailman/postorius")
2631 (synopsis "Web user interface for GNU Mailman")
2633 "Postorius is a Django app which provides a web user interface
2634 to access GNU Mailman.")
2635 (license (list gpl3+ lgpl3+))))
2637 (define-public blists
2644 (uri (string-append "http://download.openwall.net/pub/projects/"
2645 "blists/blists-" version ".tar.gz"))
2648 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
2649 (build-system gnu-build-system)
2651 `(#:tests? #f ; No tests
2653 (modify-phases %standard-phases
2656 (lambda* (#:key outputs #:allow-other-keys)
2657 (let* ((out (assoc-ref outputs "out"))
2658 (bin (string-append out "/bin")))
2659 (install-file "bindex" bin)
2660 (install-file "bit" bin)
2662 (home-page "http://www.openwall.com/blists/")
2663 (synopsis "Web interface to mailing list archives")
2665 "Blists is a web interface to mailing list archives that works off
2666 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2667 @code{bindex} generates or updates the index file (incremental updates
2668 are supported). @code{bit} is a CGI/SSI program that generates web pages
2669 on the fly. Both programs are written in C and are very fast.")
2670 (license license:expat)))
2672 (define-public swaks
2675 (version "20181104.0")
2680 "https://jetmore.org/john/code/swaks/files/swaks-"
2684 "0n1yd27xcyb1ylp5gln3yv5gzi9r377hjy1j32367kgb3247ygq2"))))
2685 (build-system perl-build-system)
2687 `(("perl-net-dns" ,perl-net-dns)
2688 ("perl-net-ssleay" ,perl-net-ssleay)))
2690 `(#:tests? #f ; No tests
2692 (modify-phases %standard-phases
2696 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
2698 (lambda* (#:key outputs #:allow-other-keys)
2699 (let ((out (assoc-ref outputs "out")))
2700 (install-file "swaks" (string-append out "/bin"))
2701 (install-file "swaks.1" (string-append out "/share/man/man1")))
2703 (add-after 'install 'wrap-program
2704 (lambda* (#:key outputs #:allow-other-keys)
2705 (wrap-program (string-append (assoc-ref outputs "out")
2707 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2709 (home-page "https://jetmore.org/john/code/swaks/")
2710 (synopsis "Featureful SMTP test tool")
2711 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2712 test tool. It handles SMTP features and extensions such as TLS,
2713 authentication, and pipelining; multiple versions of the SMTP protocol
2714 including SMTP, ESMTP, and LMTP; and multiple transport methods including
2715 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2716 Options can be specified in environment variables, configuration files, and
2717 the command line allowing maximum configurability and ease of use for
2718 operators and scripters.")
2721 (define-public alpine
2724 ;; Upstream doesn't use git tags, but does ‘tag’ their releases in the
2725 ;; commit message. Hence the lack of GIT-VERSIONing despite using a commit
2726 ;; ID below. Don't forget to update it…
2727 (version "2.21.99999")
2731 ;; There are two versions: the plain continuation of Alpine without extra
2732 ;; patches and the version which adds extra fixes. Every distro uses
2733 ;; the patched version, and so do we to not break expectations.
2734 ;; http://alpine.freeiz.com/alpine/readme/README.patches
2736 (url "http://repo.or.cz/alpine.git")
2737 (commit "abeb2c25935ef8c75f1e5deef0f81276754dc975")))
2738 (file-name (git-file-name name version))
2740 (base32 "0rqgbw08a5lj41dkp82aq480lqkc4bnxagna7wpqffi821n8gkwz"))
2741 (modules '((guix build utils)))
2744 ;; Remove pre-built binaries scattered across the source repository.
2745 (for-each delete-file (find-files "." "\\.(dll|exe)"))
2747 (build-system gnu-build-system)
2749 `(#:make-flags (list "CC=gcc")
2750 #:configure-flags (list (string-append "--with-ssl-include-dir="
2751 (assoc-ref %build-inputs "openssl")
2753 (string-append "--with-ssl-dir="
2754 (assoc-ref %build-inputs "openssl"))
2755 (string-append "--with-ssl-certs-dir="
2757 (string-append "--with-ssl-lib-dir="
2758 (assoc-ref %build-inputs "openssl")
2760 (string-append "--with-interactive-spellcheck="
2761 (assoc-ref %build-inputs "aspell")
2763 "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
2765 (modify-phases %standard-phases
2766 (add-after 'unpack 'make-reproducible
2768 ;; This removes time-dependent code to make alpine reproducible.
2769 (substitute* "pico/blddate.c"
2770 (("%02d-%s-%d") "1970-01-01"))
2773 `(("ncurses" ,ncurses)
2774 ("openssl" ,openssl)
2776 ("openldap" ,openldap)
2777 ("cyrus-sasl" ,cyrus-sasl)
2778 ("mit-krb5" ,mit-krb5)
2781 ("linux-pam" ,linux-pam)))
2782 (home-page "https://repo.or.cz/alpine.git")
2783 (synopsis "Alternatively Licensed Program for Internet News and Email")
2785 "Alpine is a text-based mail and news client. Alpine includes several
2786 tools and applications:
2788 @item alpine, the Alpine mailer
2789 @item pico, the standalone text editor, GNU nano's predecessor
2790 @item pilot, the standalone file system navigator
2794 (define-public balsa
2801 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
2802 name "-" version ".tar.bz2"))
2804 (base32 "0yfqhfpwm1qnwmbpr6dfn2f5w8a8xxq51pn8ypgg0fw973l1c1nx"))))
2805 (build-system gnu-build-system)
2808 '(;; Balsa tries to install additional MIME icons
2809 ;; under gtk+ directory.
2810 "--enable-extra-mimeicons=no"
2811 "--with-gtksourceview"
2813 "--with-spell-checker=gtkspell"
2819 `(("cyrus-sasl" ,cyrus-sasl)
2820 ("enchant" ,enchant)
2821 ("gdk-pixbuf" ,gdk-pixbuf)
2822 ("gmime" ,gmime-2.6)
2826 ("gtksourceview" ,gtksourceview-3)
2827 ("gtkspell3" ,gtkspell3)
2828 ("libcanberra" ,libcanberra)
2829 ("libesmtp" ,libesmtp)
2830 ("libnotify" ,libnotify)
2831 ("openldap" ,openldap)
2833 ("webkitgtk" ,webkitgtk)))
2835 `(("compface" ,compface)
2836 ("glib" ,glib "bin")
2837 ("intltool" ,intltool)
2838 ("pkg-config" ,pkg-config)
2839 ("yelp-tools" ,yelp-tools)))
2840 (home-page "https://pawsa.fedorapeople.org/balsa")
2841 (synopsis "E-mail client for GNOME")
2842 (description "Balsa is a highly configurable and robust mail client for
2843 the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2844 mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
2845 the use of a local MTA such as Sendmail.")
2855 (uri (pypi-uri "afew" version))
2858 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
2859 (build-system python-build-system)
2861 `(("python-chardet" ,python-chardet)
2862 ("python-notmuch" ,python-notmuch)))
2864 `(("python-setuptools-scm" ,python-setuptools-scm)))
2865 (home-page "https://github.com/afewmail/afew")
2866 (synopsis "Initial tagging script for notmuch mail")
2867 (description "afew is an initial tagging script for notmuch mail. It
2868 provides automatic tagging each time new mail is registered with notmuch. It
2869 can add tags based on email headers or Maildir folders and can handle spam and
2880 (uri (string-append "http://pan.rebelbase.com/download/releases/"
2881 version "/source/" name "-" version ".tar.bz2"))
2883 (base32 "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55"))))
2885 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
2886 "--enable-libnotify" "--enable-manual"
2889 (modify-phases %standard-phases
2890 (add-before 'configure 'patch-gpg2
2891 (lambda* (#:key inputs #:allow-other-keys)
2892 (substitute* "pan/usenet-utils/gpg.cc"
2893 (("\"gpg2\"") (string-append "\""
2894 (assoc-ref inputs "gnupg")
2898 `(("gmime" ,gmime-2.6)
2902 ("gtkspell3" ,gtkspell3)
2903 ("libnotify" ,libnotify)
2904 ("libsecret" ,libsecret)
2905 ("libxml2" ,libxml2)
2908 `(("gettext-minimal" ,gettext-minimal)
2909 ("itstool" ,itstool)
2910 ("pkg-config" ,pkg-config)))
2911 (build-system gnu-build-system)
2912 (home-page "http://pan.rebelbase.com/")
2913 (synopsis "Pan newsreader")
2914 (description "@code{pan} is a Usenet newsreader that's good at both text
2915 and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
2916 PGP handling, multiple servers, and secure connections.")
2917 ;; License of the docs: fdl-1.1; Others: gpl2.
2918 (license (list fdl1.1+ gpl2))))
2920 (define-public imapfilter
2928 (url "https://github.com/lefcha/imapfilter.git")
2929 (commit (string-append "v" version))))
2930 (file-name (git-file-name name version))
2932 (base32 "0f65sg6hhv6778fxwsz4hvarbm97dsb8jj0mg7a9qs273r35pqck"))))
2933 (build-system gnu-build-system)
2937 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2940 (modify-phases %standard-phases
2941 (delete 'configure)))) ; no configure script
2945 ("openssl" ,openssl)))
2946 (home-page "https://github.com/lefcha/imapfilter")
2947 (synopsis "IMAP mail filtering utility")
2948 (description "IMAPFilter is a mail filtering utility. It connects
2949 to remote mail servers using IMAP, sends searching queries to the server and
2950 processes mailboxes based on the results. It can be used to delete, copy,
2951 move, flag, etc. messages residing in mailboxes at the same or different mail
2952 servers. The 4rev1 and 4 versions of IMAP are supported.")
2953 (license license:expat)))
2955 (define-public urlscan
2962 (uri (pypi-uri "urlscan" version))
2964 (base32 "1q0vxv9haap01vz1cbkzss62cgwb9365lv5vnkg2gbpx4g5y7a9l"))))
2965 (build-system python-build-system)
2967 `(("python-urwid" ,python-urwid)))
2968 (home-page "https://github.com/firecat53/urlscan")
2969 (synopsis "View/select the URLs in an email message or file")
2971 "Urlscan is a small program that is designed to integrate with the
2972 @code{mutt} mailreader to allow you to easily launch a Web browser for URLs
2973 contained in email messages. It parses an email message or file and scans it
2974 for URLs and email addresses. It then displays the URLs and their context
2975 within the message, and allows you to choose one or more URLs to send to your
2976 Web browser. Alternatively, it send a list of all URLs to stdout. It is a
2977 replacement for the @code{urlview} program.")
2988 (url "https://github.com/verdammelt/tnef.git")
2991 (base32 "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"))
2992 (file-name (git-file-name name version))))
2993 (build-system gnu-build-system)
2995 `(("autoconf" ,autoconf)
2996 ("automake" ,automake)))
2997 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
2998 (home-page "https://github.com/verdammelt/tnef")
2999 (synopsis "Unpack @code{application/ms-tnef} attachments")
3001 "TNEF is a tar-like program that unpacks MIME attachments of type
3002 @code{application/ms-tnef}.")
3006 (let ((commit "0e9af8d11246eb08152a9bcbc3d04703963b756c")
3010 (version (git-version "0.0.0" revision commit))
3014 (url "https://git.elephly.net/software/mumi.git")
3016 (file-name (git-file-name name version))
3019 "0q5x33gc8gi8w7cjphdmhdyfa62b89mcbmj068yd5jxqx8sn4hlw"))))
3020 (build-system gnu-build-system)
3022 `(#:modules ((guix build gnu-build-system)
3023 ((guix build guile-build-system)
3024 #:select (target-guile-effective-version))
3026 #:imported-modules ((guix build guile-build-system)
3027 ,@%gnu-build-system-modules)
3029 #:configure-flags '("--localstatedir=/var")
3032 (modify-phases %standard-phases
3033 (add-after 'install 'wrap-executable
3034 (lambda* (#:key outputs #:allow-other-keys)
3035 (let* ((out (assoc-ref outputs "out"))
3036 (bin (string-append out "/bin"))
3037 (version (target-guile-effective-version))
3038 (scm (string-append out "/share/guile/site/" version))
3039 (go (string-append out "/lib/guile/" version
3041 (wrap-program (string-append bin "/mumi")
3042 `("GUILE_LOAD_PATH" ":" prefix
3043 (,scm ,(getenv "GUILE_LOAD_PATH")))
3044 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
3045 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
3048 `(("guile-debbugs" ,guile-debbugs)
3049 ("guile-email" ,guile-email)
3050 ("guile-json" ,guile-json-3)
3051 ("guile-sqlite3" ,guile-sqlite3)
3052 ("guile-syntax-highlight" ,guile-syntax-highlight)
3053 ("gnutls" ,gnutls) ;needed to talk to https://debbugs.gnu.org
3054 ("guile" ,guile-2.2)
3055 ("mumimu" ,mumimu))) ;'mumimu' executable recorded in (mumi config)
3057 `(("autoconf" ,autoconf)
3058 ("automake" ,automake)
3059 ("pkg-config" ,pkg-config)))
3060 (home-page "https://git.elephly.net/software/mumi.git")
3061 (synopsis "Debbugs web interface")
3062 (description "Mumi is a Debbugs web interface.")
3065 (define-public ytnef
3072 (url "https://github.com/Yeraze/ytnef.git")
3073 (commit (string-append "v" version))))
3074 (file-name (git-file-name name version))
3077 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))))
3078 (build-system gnu-build-system)
3080 `(("autoconf" ,autoconf)
3081 ("automake" ,automake)
3082 ("libtool" ,libtool)))
3083 (home-page "https://github.com/Yeraze/ytnef/")
3084 (synopsis "TNEF stream reader for winmail.dat files")
3085 (description "This package provides a TNEF stream reader library and
3086 related tools to process winmail.dat files.")
3089 (define-public public-inbox
3090 (let ((commit "05a06f3262a2ddbf46adb85169e13ce9127e4524")
3093 (name "public-inbox")
3094 (version (git-version "1.2.0" revision commit))
3096 (origin (method git-fetch)
3098 (url "https://public-inbox.org")
3102 "06cclxg46gsls3x19l9s8s9x8gkjghm6gd4jb1v9ng6fds6xi2fg"))
3103 (file-name (git-file-name name version))))
3104 (build-system perl-build-system)
3107 (modify-phases %standard-phases
3108 (add-before 'configure 'qualify-paths
3110 ;; Use absolute paths for 'xapian-compact'.
3111 (let ((xapian-compact (which "xapian-compact")))
3112 (substitute* "script/public-inbox-compact"
3113 (("xapian-compact") xapian-compact)))
3115 (add-before 'check 'pre-check
3117 (substitute* "t/spawn.t"
3118 (("\\['env'\\]") (string-append "['" (which "env") "']")))
3119 (substitute* "t/ds-leak.t"
3120 (("/bin/sh") (which "sh")))
3121 (invoke "./certs/create-certs.perl")
3122 ;; XXX: This test fails due to zombie process is not reaped by
3124 (substitute* "t/httpd-unix.t"
3125 (("^SKIP: \\{") "SKIP: { skip('Guix');"))
3127 (add-after 'install 'wrap-programs
3128 (lambda* (#:key inputs outputs #:allow-other-keys)
3129 (let ((out (assoc-ref outputs "out")))
3133 ;; Let those scripts find their perl modules.
3134 `("PERL5LIB" ":" prefix
3135 (,(string-append out "/lib/perl5/site_perl")
3136 ,(getenv "PERL5LIB")))
3137 ;; 'git' is invoked in various files of the PublicInbox
3140 (,(string-append (assoc-ref inputs "git") "/bin")))))
3141 (find-files (string-append out "/bin"))))
3148 ("openssl" ,openssl)))
3150 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
3151 ("perl-dbi" ,perl-dbi)
3152 ("perl-email-address-xs" ,perl-email-address-xs)
3153 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
3154 ("perl-email-mime" ,perl-email-mime)
3155 ("perl-email-simple" ,perl-email-simple)
3156 ("perl-net-server" ,perl-net-server)
3157 ("perl-filesys-notify-simple" ,perl-filesys-notify-simple)
3158 ("perl-plack-middleware-deflater" ,perl-plack-middleware-deflater)
3159 ("perl-plack-middleware-reverseproxy" ,perl-plack-middleware-reverseproxy)
3160 ("perl-plack" ,perl-plack)
3161 ("perl-search-xapian" ,perl-search-xapian)
3162 ("perl-timedate" ,perl-timedate)
3163 ("perl-uri-escape" ,perl-uri-escape)
3165 ("perl-ipc-run" ,perl-ipc-run)
3166 ("perl-xml-feed" ,perl-xml-feed)))
3167 (home-page "https://public-inbox.org/README.html")
3168 (synopsis "Archive mailing lists in git repositories")
3170 "public-inbox implements the sharing of an email inbox via git to
3171 complement or replace traditional mailing lists. Readers may read via NNTP,
3172 Atom feeds or HTML archives.")