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 Nikita <nikita@n0.is>
19 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Arun Isaac <arunisaac@systemreboot.net>
21 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
22 ;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
23 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
24 ;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
25 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
26 ;;; Copyright © 2017, 2018, 2020 Rene Saavedra <pacoon@protonmail.com>
27 ;;; Copyright © 2018, 2019, 2020 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>
34 ;;; Copyright © 2020 Eric Brown <ecbrown@ericcbrown.com>
35 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
37 ;;; This file is part of GNU Guix.
39 ;;; GNU Guix is free software; you can redistribute it and/or modify it
40 ;;; under the terms of the GNU General Public License as published by
41 ;;; the Free Software Foundation; either version 3 of the License, or (at
42 ;;; your option) any later version.
44 ;;; GNU Guix is distributed in the hope that it will be useful, but
45 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 ;;; GNU General Public License for more details.
49 ;;; You should have received a copy of the GNU General Public License
50 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52 (define-module (gnu packages mail)
53 #:use-module (gnu packages)
54 #:use-module (gnu packages admin)
55 #:use-module (gnu packages aspell)
56 #:use-module (gnu packages autotools)
57 #:use-module (gnu packages backup)
58 #:use-module (gnu packages base)
59 #:use-module (gnu packages bash)
60 #:use-module (gnu packages bison)
61 #:use-module (gnu packages calendar)
62 #:use-module (gnu packages check)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages crypto)
65 #:use-module (gnu packages curl)
66 #:use-module (gnu packages cyrus-sasl)
67 #:use-module (gnu packages databases)
68 #:use-module (gnu packages dbm)
69 #:use-module (gnu packages dejagnu)
70 #:use-module (gnu packages django)
71 #:use-module (gnu packages dns)
72 #:use-module (gnu packages docbook)
73 #:use-module (gnu packages documentation)
74 #:use-module (gnu packages emacs)
75 #:use-module (gnu packages enchant)
76 #:use-module (gnu packages gdb)
77 #:use-module (gnu packages gettext)
78 #:use-module (gnu packages ghostscript)
79 #:use-module (gnu packages glib)
80 #:use-module (gnu packages gnome)
81 #:use-module (gnu packages gnupg)
82 #:use-module (gnu packages groff)
83 #:use-module (gnu packages gsasl)
84 #:use-module (gnu packages gtk)
85 #:use-module (gnu packages guile)
86 #:use-module (gnu packages guile-xyz)
87 #:use-module (gnu packages flex)
88 #:use-module (gnu packages haskell-xyz)
89 #:use-module (gnu packages kerberos)
90 #:use-module (gnu packages libcanberra)
91 #:use-module (gnu packages libevent)
92 #:use-module (gnu packages libidn)
93 #:use-module (gnu packages libunistring)
94 #:use-module (gnu packages libunwind)
95 #:use-module (gnu packages linux)
96 #:use-module (gnu packages lsof)
97 #:use-module (gnu packages lua)
98 #:use-module (gnu packages m4)
99 #:use-module (gnu packages man)
100 #:use-module (gnu packages ncurses)
101 #:use-module (gnu packages networking)
102 #:use-module (gnu packages openldap)
103 #:use-module (gnu packages onc-rpc)
104 #:use-module (gnu packages pcre)
105 #:use-module (gnu packages perl)
106 #:use-module (gnu packages perl-check)
107 #:use-module (gnu packages perl-web)
108 #:use-module (gnu packages pkg-config)
109 #:use-module (gnu packages python)
110 #:use-module (gnu packages python-check)
111 #:use-module (gnu packages python-crypto)
112 #:use-module (gnu packages python-web)
113 #:use-module (gnu packages python-xyz)
114 #:use-module (gnu packages readline)
115 #:use-module (gnu packages ruby)
116 #:use-module (gnu packages search)
117 #:use-module (gnu packages serialization)
118 #:use-module (gnu packages samba)
119 #:use-module (gnu packages screen)
120 #:use-module (gnu packages sphinx)
121 #:use-module (gnu packages sqlite)
122 #:use-module (gnu packages tcl)
123 #:use-module (gnu packages texinfo)
124 #:use-module (gnu packages time)
125 #:use-module (gnu packages tls)
126 #:use-module (gnu packages version-control)
127 #:use-module (gnu packages w3m)
128 #:use-module (gnu packages web)
129 #:use-module (gnu packages webkit)
130 #:use-module (gnu packages xdisorg)
131 #:use-module (gnu packages xorg)
132 #:use-module (gnu packages xml)
133 #:use-module ((guix licenses) #:prefix license:)
134 #:use-module (guix packages)
135 #:use-module (guix download)
136 #:use-module (guix git-download)
137 #:use-module (guix utils)
138 #:use-module (guix build-system gnu)
139 #:use-module (guix build-system guile)
140 #:use-module (guix build-system perl)
141 #:use-module (guix build-system python)
142 #:use-module (guix build-system trivial)
143 #:use-module (srfi srfi-1)
144 #:use-module (ice-9 match))
146 (define-public anubis
149 ;; This 4.2.90 alpha release adds support for Guile 3 and has fixes for
155 (uri (string-append "https://alpha.gnu.org/gnu/anubis/anubis-"
159 "0dvm6acl32dv8bixx9z50gzwfp6kj4kxnn1j3dcwjlp7sasjp41s"))))
160 (build-system gnu-build-system)
162 `(("automake" ,automake)
163 ("autoconf" ,autoconf)
164 ("gettext" ,gettext-minimal)
165 ("m4" ,m4))) ;for the test suite
172 ("libgcrypt" ,libgcrypt) ;gnutls support depends on libgcrypt
173 ("libgpg-error" ,libgpg-error)))
174 (outputs '("out" "debug"))
175 (synopsis "SMTP message submission daemon")
176 (description "Anubis is a daemon that sits between the Mail User
177 Agent (MUA) and the Mail Transfer Agent (MTA). When a mail is sent by a user
178 in the MUA, it is first passed to Anubis, which performs additional processing
179 to the message before passing it on for delivery by the MTA. Anubis may, for
180 example, modify the message headers or body, or encrypt or sign the message.")
181 (home-page "https://www.gnu.org/software/anubis/manual/")
182 (license license:gpl3+)))
184 (define-public mailutils
190 (uri (string-append "mirror://gnu/mailutils/mailutils-"
194 "1g1xf2lal04nsnf1iym9n9n0wxjpqbcr9nysxpm98v4pniinqwsz"))))
195 (build-system gnu-build-system)
198 (modify-phases %standard-phases
199 (add-before 'check 'prepare-test-suite
201 ;; Use the right file name for `cat'.
202 (substitute* "testsuite/lib/mailutils.exp"
206 ;; Tests try to invoke 'mda' such that it looks up the
207 ;; 'root' user, which does not exist in the build
209 (substitute* '("mda/mda/tests/testsuite"
210 "mda/lmtpd/tests/testsuite")
211 (("root <") "nobody <")
212 (("spool/root") "spool/nobody")
213 (("root@localhost") "nobody@localhost"))
215 ;; The 'pipeact.at' tests generate a shell script; make
216 ;; sure it uses the right shell.
217 (substitute* '("sieve/tests/testsuite"
218 "mh/tests/testsuite")
220 (string-append "#!" (which "sh"))))
222 (substitute* "mh/tests/testsuite"
223 (("moreproc: /bin/cat")
224 (string-append "moreproc: " (which "cat"))))
226 ;; XXX: The comsatd tests rely on being able to open
227 ;; /dev/tty, but that gives ENODEV in the build
228 ;; environment. Thus, ignore test failures here.
229 (substitute* "comsat/tests/Makefile.in"
230 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
231 (string-append "-" all)))
233 ;; 'frm' tests expect write access to $HOME.
234 (setenv "HOME" (getcwd))
236 ;; Avoid the message "I'm going to create the standard MH path
237 ;; for you", which would lead to one test failure (when diffing
238 ;; stdout of 'fmtcheck'.)
239 (call-with-output-file ".mh_profile"
241 (format port "Path: ~a/Mail-for-tests~%"
245 ;; TODO: Add `--with-sql'.
247 (list "--sysconfdir=/etc"
249 ;; Add "/X.Y" to the installation directory.
250 (string-append "--with-guile-site-dir="
251 (assoc-ref %outputs "out")
253 ,(match (assoc "guile"
254 (package-inputs this-package))
257 (package-version guile))))))
259 #:parallel-tests? #f))
261 `(("perl" ,perl) ;for 'gylwrap'
263 ("dejagnu" ,dejagnu)))
270 ("readline" ,readline)
271 ("linux-pam" ,linux-pam)
275 ;; Required for SEARCH CHARSET.
276 ("libiconv" ,libiconv)
277 ("libunistring" ,libunistring)))
278 (home-page "https://mailutils.org")
279 (synopsis "Utilities and library for reading and serving mail")
281 "GNU Mailutils is a collection of programs for managing, viewing and
282 processing electronic mail. It contains both utilities and server daemons
283 and all operate in a protocol-agnostic way. The underlying libraries are
284 also available, simplifying the addition of mail capabilities to new
287 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
288 (list license:gpl3+ license:lgpl3+))))
290 (define-public guile2.2-mailutils
293 (name "guile2.2-mailutils")
295 `(("guile" ,guile-2.2)
296 ,@(alist-delete "guile" (package-inputs mailutils))))))
298 (define-public guile3.0-mailutils
299 (deprecated-package "guile3.0-mailutils" mailutils))
301 (define-public nullmailer
309 (string-append "https://untroubled.org/nullmailer/"
310 "nullmailer-" version ".tar.gz")
311 ;; Previous releases are moved to this subdirectory.
312 (string-append "https://untroubled.org/nullmailer/archive/"
313 "nullmailer-" version ".tar.gz")))
315 (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
316 (build-system gnu-build-system)
320 "--localstatedir=/var"
323 (modify-phases %standard-phases
324 (add-before 'check 'patch-test-FHS-file-names
326 (with-directory-excursion "test"
327 (substitute* (list "functions.in"
329 ;; Fix some shebangs later generated on the fly.
330 (("/bin/sh") (which "bash"))))
332 (add-before 'check 'pass-PATH-to-tests
333 ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
334 ;; tests then source ‘functions’, which first demands a working $PATH
335 ;; only to clobber it later. Pass our $PATH to the test environment
336 ;; and don't touch it after that.
338 (with-directory-excursion "test"
339 (substitute* "runtests"
341 (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
342 (substitute* "functions.in"
343 (("export PATH=.*") "")))
345 (add-before 'check 'delete-failing-tests
347 (with-directory-excursion "test/tests"
348 (for-each delete-file
350 ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
352 ;; XXX These require the not-yet-packaged tcpserver.
353 "protocols" "smtp-auth")))
355 (add-before 'install 'skip-install-data-local
356 ;; Don't attempt to install run-time files outside of the store.
358 (substitute* "Makefile"
359 ((" install-data-local") ""))
363 `(("daemontools" ,daemontools))) ; for svc
365 `(("gnutls" ,gnutls)))
366 (home-page "https://untroubled.org/nullmailer/")
367 (synopsis "Simple relay-only mail transfer agent")
369 "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
370 hosts that receive no local mail and only relay mail to a fixed set of smart
371 relays. It's useful for systems such as Web servers that must be able to send
372 email notifications, without having to run a full-blown MTA such as sendmail
375 Nullmailer is designed to be simple to configure, easy to extend, and secure.
376 It requires little ongoing administration. The included @command{sendmail}
377 emulator front-end should allow most (if not all) sendmail-compatible programs
378 to run without any changes.")
379 (license (list license:lgpl2.1+ ; lib/cli++/ (but some files lack headers)
380 license:gpl2+)))) ; everything else
382 (define-public fetchmail
389 (uri (string-append "mirror://sourceforge/fetchmail/branch_"
390 (version-major+minor version) "/"
391 "fetchmail-" version ".tar.xz"))
393 (base32 "1g893dr3982vrqzxybmflnqfmd1q6yipd9krvxn0avhlrrp97k96"))))
394 (build-system gnu-build-system)
396 `(("openssl" ,openssl)))
399 (list (string-append "--with-ssl="
400 (assoc-ref %build-inputs "openssl")))))
401 (home-page "https://www.fetchmail.info/")
402 (synopsis "Remote-mail retrieval and forwarding utility")
404 "Fetchmail is a full-featured, robust, well-documented remote-mail
405 retrieval and forwarding utility intended to be used over on-demand
406 TCP/IP links (such as SLIP or PPP connections). It supports every
407 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
408 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
411 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
412 so it can then be read by normal mail user agents such as mutt, elm
413 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
414 aliasing facilities to work just as they would on normal mail.")
415 (license license:gpl2+))) ; most files are actually public domain or x11
424 (string-append "https://bitbucket.org/mutt/mutt/downloads/"
425 "mutt-" version ".tar.gz")
426 (string-append "http://ftp.mutt.org/pub/mutt/mutt-"
430 "0i0q6vwhnb1grimsrpmz8maw255rh9k0laijzxkry6xqa80jm5s7"))
431 (patches (search-patches "mutt-store-references.patch"))))
432 (build-system gnu-build-system)
434 `(("cyrus-sasl" ,cyrus-sasl)
443 `(#:configure-flags '("--enable-smtp"
447 "--enable-hcache" ; for header caching
452 "--with-sqlite3" ; required for Autocrypt
453 "--with-idn2" ; recommended for Autocrypt
454 ;; So that mutt does not check whether the path
455 ;; exists, which it does not in the chroot.
456 "--with-mailpath=/var/mail")))
457 (home-page "http://www.mutt.org/")
458 (synopsis "Mail client")
460 "Mutt is a small but very powerful text-based mail client for Unix
462 (license license:gpl2+)))
464 (define-public neomutt
472 (url "https://github.com/neomutt/neomutt")
474 (file-name (git-file-name name version))
476 (base32 "1k4k07l6h5krc3fx928qvdq3ssw9fxn95aj7k885xlckd2i1lnb5"))))
477 (build-system gnu-build-system)
479 `(("cyrus-sasl" ,cyrus-sasl)
484 ("openssl" ,openssl) ; for S/MIME
486 ("kyotocabinet" ,kyotocabinet)
491 ("notmuch" ,notmuch)))
493 `(("automake" ,automake)
494 ("gettext-minimal" ,gettext-minimal)
495 ("pkg-config" ,pkg-config)
496 ("docbook-xsl" ,docbook-xsl)
497 ("docbook-xml" ,docbook-xml-4.2)
501 `(#:test-target "test"
505 ;; Database, implies header caching.
506 "--disable-tokyocabinet"
517 (string-append "--with-sasl="
518 (assoc-ref %build-inputs "cyrus-sasl"))
526 ;; If we do not set this, neomutt wants to check
527 ;; whether the path exists, which it does not
529 "--with-mailpath=/var/mail"
532 (string-append "--with-ncurses="
533 (assoc-ref %build-inputs "ncurses"))
534 (string-append "--prefix="
535 (assoc-ref %outputs "out"))
538 (modify-phases %standard-phases
539 ;; TODO: autosetup is meant to be included in the source,
540 ;; but we should package autosetup and use our own version of it.
542 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
543 (let* ((out (assoc-ref outputs "out"))
544 (flags `(,@configure-flags))
545 (bash (which "bash")))
546 (setenv "SHELL" bash)
547 (setenv "CONFIG_SHELL" bash)
549 (string-append (getcwd) "/configure")
551 (home-page "https://neomutt.org/")
552 (synopsis "Command-line mail reader based on Mutt")
554 "NeoMutt is a command-line mail reader which is based on mutt.
555 It adds a large amount of new and improved features to mutt.")
556 (license license:gpl2+)))
564 (uri (string-append "mirror://gnome/sources/gmime/"
565 (version-major+minor version)
566 "/gmime-" version ".tar.xz"))
569 "0i3xfc84qn1z99i70q68kbnp9rmgqrnprqb418ba52s6g9j9dsia"))))
570 (build-system gnu-build-system)
572 `(("pkg-config" ,pkg-config)
573 ("gnupg" ,gnupg))) ; for tests only
574 (inputs `(("glib" ,glib)
579 (modify-phases %standard-phases
581 'unpack 'patch-paths-in-tests
583 ;; The test programs run several programs using 'system' with
584 ;; hard-coded paths. Here we patch them all.
585 ;; We use ISO-8859-1 here because test-iconv.c contains
586 ;; raw byte sequences in several different encodings.
587 (with-fluids ((%default-port-encoding #f))
588 (substitute* (find-files "tests" "\\.c$")
589 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
590 (let* ((base (basename prog-path))
593 (or prog (error "not found: " base)))))))
595 (home-page "http://spruce.sourceforge.net/gmime/")
596 (synopsis "MIME message parser and creator library")
598 "GMime provides a core library and set of utilities which may be used for
599 the creation and parsing of messages using the Multipurpose Internet Mail
601 (license (list license:lgpl2.1+ license:gpl2+ license:gpl3+))))
603 ;; Some packages are not ready for GMime 3 yet.
604 (define-public gmime-2.6
610 (uri (string-append "mirror://gnome/sources/gmime/"
611 (version-major+minor version)
612 "/gmime-" version ".tar.xz"))
615 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
617 (define-public bogofilter
624 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-stable/"
625 "bogofilter-" version ".tar.xz"))
627 (base32 "1sl9xrnnlk2sn8gmibhn8li09vnansjbxb9l1182qmgz7cvs2j1j"))))
628 (build-system gnu-build-system)
631 (modify-phases %standard-phases
632 (add-before 'check 'pre-check
634 (substitute* "src/tests/t.frame"
636 (string-append "GREP=" (which "grep") "\n")))
638 (native-inputs `(("flex" ,flex)))
639 (inputs `(("bdb" ,bdb)))
640 (home-page "https://bogofilter.sourceforge.io/")
641 (synopsis "Mail classifier based on a Bayesian filter")
643 "Bogofilter is a mail filter that classifies mail as spam or ham
644 (non-spam) by a statistical analysis of the message's header and
645 content (body). The program is able to learn from the user's classifications
646 and corrections. It is based on a Bayesian filter.")
647 (license license:gpl3+)))
649 (define-public offlineimap
656 (url "https://github.com/OfflineIMAP/offlineimap")
657 (commit (string-append "v" version))))
658 (file-name (git-file-name name version))
661 "0h5q5nk2p2vx86w6rrbs7v70h81dpqqr68x6l3klzl3m0yj9agb1"))))
662 (build-system python-build-system)
664 `(("asciidoc" ,asciidoc)))
665 (inputs `(("python2-pysqlite" ,python2-pysqlite)
666 ("python2-six" ,python2-six)))
668 ;; The setup.py script expects python-2.
670 ;; Tests require a modifiable IMAP account.
673 (modify-phases %standard-phases
674 (add-after 'build 'build-documentation
676 (substitute* "docs/Makefile"
677 ;; Prevent xmllint and xsltproc from downloading a DTD file.
678 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
679 (invoke "make" "-C" "docs" "man")))
680 (add-after 'install 'install-documentation
681 (lambda* (#:key outputs #:allow-other-keys)
682 (let* ((out (assoc-ref outputs "out"))
683 (man (string-append out "/share/man")))
684 (install-file "docs/offlineimap.1" (string-append man "/man1"))
685 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
687 (home-page "https://www.offlineimap.org")
688 (synopsis "Sync emails between two repositories")
690 "OfflineImap synchronizes emails between two repositories, so that you
691 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
692 repository and Maildir/IMAP as LOCAL repository.")
693 (license license:gpl2+)))
695 (define-public emacs-mew
701 (uri (string-append "https://mew.org/Release/mew-"
705 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
709 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
710 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
711 (build-system gnu-build-system)
713 (let ((elisp-dir "/share/emacs/site-lisp")
714 (icon-dir "/share/mew"))
715 `(#:modules ((guix build gnu-build-system)
717 (guix build emacs-utils))
718 #:imported-modules (,@%gnu-build-system-modules
719 (guix build emacs-utils))
721 (list (string-append "--with-elispdir=" %output ,elisp-dir)
722 (string-append "--with-etcdir=" %output ,icon-dir))
724 (modify-phases %standard-phases
725 (add-after 'configure 'patch-mew-icon-directory
726 (lambda* (#:key outputs #:allow-other-keys)
727 (emacs-substitute-sexps "mew-key.el"
728 ("(def.* mew-icon-directory"
730 (add-to-list 'image-load-path 'mew-icon-directory)
731 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
733 (add-after 'install 'generate-autoloads
734 (lambda* (#:key outputs #:allow-other-keys)
735 (emacs-generate-autoloads
736 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
739 (home-page "https://mew.org")
740 (synopsis "Emacs e-mail client")
741 (description "Mew (Messaging in the Emacs World) is a user interface
742 for text messages, multimedia messages (MIME), news articles and
743 security functionality including PGP, S/MIME, SSH, and SSL.")
744 (license license:bsd-3)))
752 (uri (string-append "https://github.com/djcb/mu/releases/"
753 "download/" version "/"
754 "mu-" version ".tar.xz"))
757 "0vbyrmv3d2bja4vx86za93gq46vxg18j12g0lca3x1dl8d5g2xa6"))))
758 (build-system gnu-build-system)
760 `(("pkg-config" ,pkg-config)
761 ("glib" ,glib "bin") ; for gtester
762 ("emacs" ,emacs-minimal)
763 ("tzdata" ,tzdata-for-tests))) ; for mu/test/test-mu-query.c
770 `(#:modules ((guix build gnu-build-system)
772 (guix build emacs-utils))
773 #:imported-modules (,@%gnu-build-system-modules
774 (guix build emacs-utils))
776 (modify-phases %standard-phases
777 (add-after 'unpack 'patch-configure
778 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
779 ;; so our Emacs package can't find it. Setting "--with-lispdir"
780 ;; configure flag doesn't help because "mu4e" will be added to
781 ;; the lispdir anyway, so we have to modify "configure.ac".
783 (substitute* "configure"
784 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
786 (("guile-2.0") "guile-2.2"))
787 (substitute* '("guile/Makefile.in"
788 "guile/mu/Makefile.in")
789 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
791 (add-after 'unpack 'patch-bin-sh-in-tests
793 (substitute* '("guile/tests/test-mu-guile.c"
795 "mu/test-mu-cmd-cfind.c"
797 "mu/test-mu-threads.c")
798 (("/bin/sh") (which "sh")))
800 (add-before 'install 'fix-ffi
801 (lambda* (#:key outputs #:allow-other-keys)
802 (substitute* "guile/mu.scm"
804 (format #f "\"~a/lib/libguile-mu\""
805 (assoc-ref outputs "out"))))
807 (add-before 'check 'check-tz-setup
808 (lambda* (#:key inputs #:allow-other-keys)
809 ;; For mu/test/test-mu-query.c
811 (string-append (assoc-ref inputs "tzdata")
814 (add-after 'install 'install-emacs-autoloads
815 (lambda* (#:key outputs #:allow-other-keys)
816 (emacs-generate-autoloads
818 (string-append (assoc-ref outputs "out")
819 "/share/emacs/site-lisp"))
821 (home-page "https://www.djcbsoftware.nl/code/mu/")
822 (synopsis "Quickly find emails")
824 "Mu is a tool for dealing with e-mail messages stored in the
825 Maildir-format. Mu's purpose in life is to help you to quickly find the
826 messages you need; in addition, it allows you to view messages, extract
827 attachments, create new maildirs, and so on.")
828 (license license:gpl3+)))
836 ;; package author intends on distributing via github rather
838 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
839 (uri (string-append "https://github.com/pazz/alot/archive/"
841 (file-name (string-append "alot-" version ".tar.gz"))
844 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
845 (build-system python-build-system)
847 `(;; python 3 is currently unsupported, more info:
848 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
851 `(("python2-mock" ,python2-mock)))
853 `(("python2-magic" ,python2-magic)
854 ("python2-configobj" ,python2-configobj)
855 ("python2-twisted" ,python2-twisted)
856 ("python2-urwid" ,python2-urwid)
857 ("python2-urwidtrees" ,python2-urwidtrees)
858 ("python2-pygpgme" ,python2-pygpgme)
859 ("python2-notmuch" ,python2-notmuch)))
860 (home-page "https://github.com/pazz/alot")
861 (synopsis "Command-line MUA using @code{notmuch}")
863 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
864 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
865 (license license:gpl3+)))
867 (define-public notifymuch
869 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
873 (version (string-append "0.1-" revision "." (string-take commit 7)))
878 (url "https://github.com/kspi/notifymuch")
882 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
883 (file-name (string-append name "-" version "-checkout"))))
884 (build-system python-build-system)
886 `(("python-notmuch" ,python-notmuch)
887 ("python-pygobject" ,python-pygobject)
888 ("gobject-introspection" ,gobject-introspection)
889 ("libnotify" ,libnotify)
893 (modify-phases %standard-phases
894 (add-after 'install 'wrap-binary
895 (lambda* (#:key outputs #:allow-other-keys)
896 (let* ((out (assoc-ref outputs "out"))
897 (bin (string-append out "/bin/notifymuch")))
899 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
900 `("GI_TYPELIB_PATH" ":" prefix
901 (,(getenv "GI_TYPELIB_PATH")
902 ,(string-append out "/lib/girepository-1.0")))))
904 (home-page "https://github.com/kspi/notifymuch")
905 (synopsis "Displays notifications for changes in the notmuch email database")
906 (description "notifymuch displays desktop notifications for messages in
907 the notmuch database. The notifications are sent using libnotify to a
908 notification daemon. The query to find messages to send a notification about
909 is configurable, and a notification for the same message will not be send
910 within a configurable period (defaults to 48 hours). To use notifymuch, run
911 @command{notifymuch} after new mail is indexed, this can be automated by
912 invoking @command{notifymuch} from the post-new hook.")
913 (license license:gpl3))))
915 (define-public notmuch
921 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
925 "0dfwa38vgnxk9cvvpza66szjgp8lir6iz6yy0cry9593lywh9xym"))))
926 (build-system gnu-build-system)
928 `(#:modules ((guix build gnu-build-system)
929 ((guix build emacs-build-system) #:prefix emacs:)
931 #:imported-modules (,@%gnu-build-system-modules
932 (guix build emacs-build-system)
933 (guix build emacs-utils))
935 (list "V=1" ; verbose test output
936 "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
937 #:phases (modify-phases %standard-phases
938 (add-after 'unpack 'patch-notmuch-lib.el
940 (substitute* "emacs/notmuch-lib.el"
941 (("/bin/sh") (which "sh")))
944 (lambda* (#:key outputs #:allow-other-keys)
946 (setenv "CONFIG_SHELL" (which "sh"))
948 (let* ((out (assoc-ref outputs "out"))
950 (string-append out "/share/emacs/site-lisp/")))
951 (invoke "./configure"
952 (string-append "--prefix=" out)
953 (string-append "--emacslispdir=" elisp)
954 (string-append "--emacsetcdir=" elisp)))))
955 (add-before 'check 'prepare-test-environment
957 (setenv "TEST_CC" "gcc")
958 ;; Patch various inline shell invocations.
959 (substitute* (find-files "test" "\\.sh$")
960 (("/bin/sh") (which "sh")))
962 (add-after 'install 'make-autoloads
963 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
965 `(("bash-completion" ,bash-completion)
966 ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
967 ("pkg-config" ,pkg-config)
969 ("python-docutils" ,python-docutils)
970 ("sphinx" ,python-sphinx)
972 ;; The following are required for tests only.
984 (home-page "https://notmuchmail.org/")
985 (synopsis "Thread-based email index, search, and tagging")
987 "Notmuch is a command-line based program for indexing, searching, read-
988 ing, and tagging large collections of email messages.")
989 (license license:gpl3+)))
991 (define-public notmuch-addrlookup-c
993 (name "notmuch-addrlookup-c")
994 (version (string-append "9"))
998 (url "https://github.com/aperezdc/notmuch-addrlookup-c")
999 (commit (string-append "v" version))))
1000 (file-name (string-append name "-" version "-checkout"))
1003 "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
1004 (build-system gnu-build-system)
1006 '(#:tests? #f ; no tests
1007 #:make-flags (list "CC=gcc")
1008 #:phases (modify-phases %standard-phases
1010 ;; Remove vim code completion config, it's not needed to
1011 ;; build (or be patched).
1012 (add-before 'patch-source-shebangs 'delete-ycm-file
1013 (lambda _ (delete-file ".ycm_extra_conf.py")))
1015 (lambda* (#:key outputs #:allow-other-keys)
1016 (let ((bin (string-append
1017 (assoc-ref outputs "out") "/bin")))
1018 (install-file "notmuch-addrlookup" bin)))))))
1020 `(("pkg-config" ,pkg-config)))
1023 ("notmuch" ,notmuch)))
1024 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
1025 (synopsis "Address lookup tool for Notmuch")
1026 (description "This is an address lookup tool using a Notmuch database,
1027 useful for email address completion.")
1028 (license license:expat)))
1030 (define-public python-notmuch
1032 (name "python-notmuch")
1033 (version (package-version notmuch))
1034 ;; Notmuch python bindings are now unavailable on pypi. The
1035 ;; bindings are distributed via the notmuch release tarball.
1036 (source (package-source notmuch))
1037 (build-system python-build-system)
1038 (inputs `(("notmuch" ,notmuch)))
1040 `(#:tests? #f ; no "test" target
1042 (modify-phases %standard-phases
1043 ;; This python package lives in a subdirectory of the notmuch source
1044 ;; tree, so chdir into it before building.
1045 (add-after 'unpack 'enter-python-dir
1046 (lambda _ (chdir "bindings/python") #t))
1047 ;; Make sure the correct notmuch shared library gets loaded.
1048 (add-before 'build 'set-libnotmuch-file-name
1049 (lambda* (#:key inputs #:allow-other-keys)
1050 (let ((notmuch (assoc-ref inputs "notmuch")))
1051 (substitute* "notmuch/globals.py"
1052 (("libnotmuch\\.so\\.")
1053 (string-append notmuch "/lib/libnotmuch.so.")))
1055 (home-page (package-home-page notmuch))
1056 (synopsis "Python bindings of the Notmuch mail indexing library")
1058 "This package provides Python bindings to use the Notmuch mail indexing
1059 and search library.")
1060 (license license:gpl3+)))
1062 (define-public python2-notmuch
1063 (package-with-python2 python-notmuch))
1065 (define-public muchsync
1072 (uri (string-append "http://www.muchsync.org/src/"
1073 "muchsync-" version ".tar.gz"))
1075 (base32 "1k2m44pj5i6vfhp9icdqs42chsp208llanc666p3d9nww8ngq2lb"))))
1076 (build-system gnu-build-system)
1078 `(("ghc-pandoc" ,ghc-pandoc)
1079 ("pkg-config" ,pkg-config)))
1081 `(("libcrypto" ,openssl)
1082 ("notmuch" ,notmuch)
1084 ("xapian" ,xapian)))
1085 (home-page "http://www.muchsync.org/")
1086 (synopsis "Synchronize notmuch mail across machines")
1088 "Muchsync brings Notmuch to all of your computers by synchronizing your
1089 mail messages and Notmuch tags across machines. The protocol is heavily
1090 pipelined to work efficiently over high-latency networks such as mobile
1091 broadband. Muchsync supports arbitrary pairwise synchronization among
1092 replicas. A version-vector-based algorithm allows it to exchange only the
1093 minimum information necessary to bring replicas up to date regardless of which
1094 pairs have previously synchronized.")
1095 (license license:gpl2+)))
1097 (define-public getmail
1104 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
1105 "getmail-" version ".tar.gz"))
1107 (base32 "1hcrd9h4g12f5gvl1djsbchcjry02ghq4icdr897s8v48pkrzagk"))))
1108 (build-system python-build-system)
1110 `(#:tests? #f ; no tests
1111 #:python ,python-2))
1112 (home-page "http://pyropus.ca/software/getmail/")
1113 (synopsis "Mail retriever")
1115 "A flexible, extensible mail retrieval system with support for
1116 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1117 arbitrary message filtering, single-user and domain-mailboxes, and many other
1120 ;; License is specified in file '__init__.py'.
1121 (license license:gpl2)))
1123 (define-public libetpan
1130 (url "https://github.com/dinhviethoa/libetpan.git")
1132 (file-name (git-file-name name version))
1134 (base32 "19g4qskg71jv7sxfxsdkjmrxk9mk5kf9b6fhw06g6wvm3205n95f"))))
1135 (build-system gnu-build-system)
1136 (native-inputs `(("autoconf" ,autoconf-wrapper)
1137 ("automake" ,automake)
1138 ("libtool" ,libtool)
1139 ("pkg-config" ,pkg-config)))
1141 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1142 ;; libraries need to be propagated.
1143 `(("cyrus-sasl" ,cyrus-sasl)
1144 ("openssl" ,openssl)))
1151 '("--disable-static" "--disable-db")))
1152 (home-page "https://www.etpan.org/libetpan.html")
1153 (synopsis "Portable middleware for email access")
1155 "The purpose of this mail library is to provide a portable, efficient
1156 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1157 provides an API for C language. It's the low-level API used by MailCore and
1159 (license license:bsd-3)))
1161 (define-public compface
1167 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1168 "ftp.xemacs.org/aux/"
1169 "compface-" version ".tar.gz"))
1172 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1173 (build-system gnu-build-system)
1176 (synopsis "Portrait image compressor")
1177 (description "This package takes your 48x48x1 portrait image and
1179 (home-page "https://legacy.cs.indiana.edu/ftp/faces/")
1180 (license (license:x11-style "file://README"))))
1182 (define-public claws-mail
1189 "https://www.claws-mail.org/releases/claws-mail-" version
1193 "1s05qw0r0gqwvvkxvrrwbjkbi61dvilixiwrpgcq21qc9csc9r0m"))))
1194 (build-system gnu-build-system)
1195 (native-inputs `(("pkg-config" ,pkg-config)))
1196 (inputs `(("bogofilter" ,bogofilter)
1198 ("dbus-glib" ,dbus-glib)
1199 ("enchant" ,enchant)
1201 ("ghostscript" ,ghostscript)
1202 ("hicolor-icon-theme" ,hicolor-icon-theme)
1207 ("libarchive" ,libarchive)
1208 ("libcanberra" ,libcanberra)
1209 ("libetpan" ,libetpan)
1210 ("libical" ,libical)
1211 ("libnotify" ,libnotify)
1213 ("libxml2" ,libxml2)
1215 ("python-2" ,python-2)
1216 ("mime-info" ,shared-mime-info)
1217 ("startup-notification" ,startup-notification)))
1220 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant"
1223 ;; Disable updating icon cache since it's done by the profile hook.
1224 ;; Conflict with other packages in the profile would be inevitable
1226 '("gtk_update_icon_cache=true")
1227 #:phases (modify-phases %standard-phases
1228 (add-before 'build 'patch-mime
1229 (lambda* (#:key inputs #:allow-other-keys)
1230 (substitute* "src/procmime.c"
1231 (("/usr/share/mime/globs")
1232 (string-append (assoc-ref inputs "mime-info")
1233 "/share/mime/globs"))))))))
1234 (synopsis "GTK-based Email client")
1236 "Claws-Mail is an email client (and news reader) based on GTK+. The
1237 appearance and interface are designed to be familiar to new users coming from
1238 other popular email clients, as well as experienced users. Almost all commands
1239 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1240 which can add many functionalities to the base client.")
1241 (home-page "https://www.claws-mail.org/")
1242 (license license:gpl3+))) ; most files are actually public domain or x11
1244 (define-public msmtp
1251 (uri (string-append "https://marlam.de/msmtp/releases/"
1252 "/msmtp-" version ".tar.xz"))
1254 (base32 "0q0fg235qk448l1xjcwyxr7vcpzk6w57jzhjbkb0m7nffyhhypzj"))))
1255 (build-system gnu-build-system)
1257 `(("libsecret" ,libsecret)
1262 `(("pkg-config" ,pkg-config)))
1263 (home-page "https://marlam.de/msmtp/")
1265 `(#:configure-flags (list "--with-libgsasl"
1267 "--with-tls=gnutls")
1269 (modify-phases %standard-phases
1270 (add-after 'install 'install-additional-files
1271 (lambda* (#:key outputs #:allow-other-keys)
1272 (let* ((out (assoc-ref outputs "out"))
1273 (bin (string-append out "/bin"))
1274 (doc (string-append out "/share/doc/msmtp"))
1275 (msmtpq "scripts/msmtpq")
1276 (vimfiles (string-append out "/share/vim/vimfiles/plugin")))
1277 (install-file (string-append msmtpq "/msmtpq") bin)
1278 (install-file (string-append msmtpq "/msmtp-queue") bin)
1279 (install-file (string-append msmtpq "/README.msmtpq") doc)
1280 (install-file "scripts/vim/msmtp.vim" vimfiles)
1281 ;; Don't rely on netcat being in the PATH to test for a
1282 ;; connection, instead try tp ing debian.org.
1283 (substitute* (string-append bin "/msmtpq")
1284 (("EMAIL_CONN_TEST=n") "EMAIL_CONN_TEST=p"))
1287 "Simple and easy to use SMTP client with decent sendmail compatibility")
1289 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1290 an SMTP server (for example at a free mail provider) which takes care of further
1292 (license license:gpl3+)))
1301 (uri (let ((file-name (string-append "exim-" version ".tar.xz")))
1302 (list (string-append "https://ftp.exim.org/pub/exim/exim4/"
1304 ;; ‘Fix’ releases (exim-x.y.z.f) are kept separately.
1305 (string-append "https://ftp.exim.org/pub/exim/exim4/fixes/"
1307 ;; After a new non-fix release, the old one is moved here.
1308 (string-append "https://ftp.exim.org/pub/exim/exim4/old/"
1311 (base32 "1nsb2i5mqxfz1sl1bmbxmpb2qiaf3wffhfiw4j9vfpagy3xfhzpp"))))
1312 (build-system gnu-build-system)
1314 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
1315 ("gnutls" ,gnutls/dane)
1322 ("libxaw" ,libxaw)))
1324 `(("pcre" ,pcre "bin")
1326 ("pkg-config" ,pkg-config)))
1329 (modify-phases %standard-phases
1331 ;; We'd use #:make-flags but the top-level Makefile calls others
1332 ;; recursively, so just set all variables this way.
1333 (lambda* (#:key outputs inputs #:allow-other-keys)
1334 (substitute* '("Makefile" "OS/Makefile-Default")
1335 (("(RM_COMMAND=).*" all var)
1336 (string-append var "rm\n")))
1337 (copy-file "src/EDITME" "Local/Makefile")
1338 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1339 (let ((out (assoc-ref outputs "out"))
1340 (gzip (assoc-ref inputs "gzip"))
1341 (bzip2 (assoc-ref inputs "bzip2"))
1342 (xz (assoc-ref inputs "xz")))
1343 (substitute* '("Local/Makefile")
1344 (("(BIN_DIRECTORY=).*" all var)
1345 (string-append var out "/bin\n"))
1346 (("(CONFIGURE_FILE=).*" all var)
1347 (string-append var out "/etc/exim.conf\n"))
1348 (("(EXIM_USER=).*" all var)
1349 (string-append var "nobody\n"))
1350 (("(FIXED_NEVER_USERS=).*" all var)
1351 (string-append var "\n")) ; XXX no root in build environment
1352 (("(COMPRESS_COMMAND=).*" all var)
1353 (string-append var gzip "/bin/gzip\n"))
1354 (("(ZCAT_COMMAND=).*" all var)
1355 (string-append var gzip "/bin/zcat\n"))
1356 (("# (USE_GNUTLS(|_PC)=.*)" all line)
1357 (string-append line "\n")))
1358 ;; This file has hard-coded relative file names for tools despite
1359 ;; the zcat configuration above.
1360 (substitute* '("src/exigrep.src")
1361 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1362 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1363 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1364 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1366 (add-before 'build 'fix-sh-paths
1367 (lambda* (#:key inputs #:allow-other-keys)
1368 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1369 (("SHELL=/bin/sh") "SHELL=sh"))
1370 (substitute* '("scripts/Configure-config.h")
1371 (("\\| /bin/sh") "| sh"))
1372 (let ((bash (assoc-ref inputs "bash")))
1373 (substitute* '("scripts/Configure-eximon")
1374 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1376 (add-before 'build 'build-reproducibly
1378 ;; The ‘compilation number’ is incremented for every build from the
1379 ;; same source tree. It appears to vary over different (parallel?)
1380 ;; builds. Make it a ‘constant number’ instead.
1381 (substitute* "src/version.c"
1382 (("#include \"cnumber.h\"") "1")))))
1385 "INSTALL_ARG=-no_chown")
1386 ;; No 'check' target. There is a test suite in test/, which assumes that
1387 ;; certain build options were (not) used and that it can freely ‘sudo’.
1389 (home-page "https://www.exim.org/")
1391 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1393 "Exim is a message transfer agent (MTA) developed at the University of
1394 Cambridge for use on Unix systems connected to the Internet. In style it is
1395 similar to Smail 3, but its facilities are more general. There is a great
1396 deal of flexibility in the way mail can be routed, and there are extensive
1397 facilities for checking incoming mail.")
1398 (license license:gpl2+)))
1400 (define-public dovecot
1403 (version "2.3.10.1")
1407 (uri (string-append "https://www.dovecot.org/releases/"
1408 (version-major+minor version) "/"
1409 "dovecot-" version ".tar.gz"))
1411 (base32 "035idr2j81s5mngnhd58rih79dhwwak7q01mqbx3rcmi4cpychk6"))))
1412 (build-system gnu-build-system)
1414 `(("pkg-config" ,pkg-config)))
1417 ("libsodium" ,libsodium) ; extra password algorithms
1418 ;; FIXME: The 'test-backtrace' tests fail on arm when using glibc's
1419 ;; backtrace_symbol() function so fallback to using libunwind.
1421 `(("libunwind" ,libunwind))
1423 ("linux-pam" ,linux-pam)
1425 ("openssl" ,openssl)
1429 `(#:configure-flags '("--sysconfdir=/etc"
1430 "--localstatedir=/var"
1431 "--with-sqlite") ; not auto-detected
1433 (modify-phases %standard-phases
1434 (add-after 'unpack 'patch-file-names
1436 (substitute* "src/lib-program-client/test-program-client-local.c"
1437 (("(/bin/| )cat") (which "cat"))
1438 (("/bin/echo") (which "echo"))
1439 (("/bin/false") (which "false"))
1440 (("/bin/sh") (which "bash"))
1441 (("head") (which "head"))
1442 (("sleep") (which "sleep")))
1443 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1444 "src/lib-smtp/test-bin/sendmail-success.sh")
1445 (("cat") (which "cat")))
1448 (lambda* (#:key make-flags #:allow-other-keys)
1449 ;; Simple hack to avoid installing a trivial README in /etc.
1450 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1452 (home-page "https://www.dovecot.org")
1453 (synopsis "Secure POP3/IMAP server")
1455 "Dovecot is a mail server whose major goals are security and reliability.
1456 It supports mbox/Maildir and its own dbox/mdbox formats.")
1457 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1458 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1459 ;; Unicode, Inc. License Agreement for Data Files and Software.
1460 (license (list license:lgpl2.1 license:expat
1461 (license:non-copyleft "file://COPYING")))))
1463 (define-public dovecot-trees
1465 (name "dovecot-trees")
1470 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1471 "archive.tar.gz?ref=v" version))
1472 (file-name (string-append name "-" version ".tar.gz"))
1475 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1477 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
1478 (build-system gnu-build-system)
1480 `(("automake" ,automake)
1481 ("autoconf" ,autoconf)
1482 ("libtool" ,libtool)
1483 ("dovecot" ,dovecot)
1484 ("pkg-config" ,pkg-config)))
1486 `(("libsodium" ,libsodium)))
1488 `(#:tests? #f ;No tests exist.
1489 #:configure-flags (list (string-append "--with-dovecot="
1490 (assoc-ref %build-inputs "dovecot")
1492 (home-page "https://0xacab.org/riseuplabs/trees")
1493 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1495 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1496 Dovecot encryption plugin. This plugin adds individually encrypted mail
1497 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1498 which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1499 the Sodium crypto library (based on NaCL).
1503 @item On IMAP log in, the user's cleartext password is passed to the plugin.
1504 @item The plugin creates an argon2 digest from the password.
1505 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1506 @item Inside the secretbox is stored a Curve25519 private key.
1507 @item The Curve25519 private key is used to decrypt each individual message,
1508 using libsodium sealed boxes.
1509 @item New mail is encrypted as it arrives using the Curve25519 public key.
1511 (license license:agpl3)))
1513 (define-public dovecot-libsodium-plugin
1514 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1517 (name "dovecot-libsodium-plugin")
1518 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1523 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1525 (file-name (string-append name "-" version "-checkout"))
1528 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1529 (build-system gnu-build-system)
1531 `(("automake" ,automake)
1532 ("autoconf" ,autoconf)
1533 ("libtool" ,libtool)
1534 ("dovecot" ,dovecot)
1535 ("pkg-config" ,pkg-config)))
1537 `(("libsodium" ,libsodium)))
1539 `(#:tests? #f ;No tests exist.
1540 #:configure-flags (list (string-append "--with-dovecot="
1541 (assoc-ref %build-inputs "dovecot")
1543 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1544 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1546 "@code{dovecot-libsodium-plugin} provides a libsodium password
1547 hashing scheme (such as scrypt) plug-in for @code{Dovecot}.")
1548 (license license:gpl3+))))
1550 (define-public isync
1557 (uri (string-append "mirror://sourceforge/isync/isync/"
1558 version "/isync-" version ".tar.gz"))
1560 "1sphd30jplii58y2zmw365bckm6pszmapcy905zhjll1sm1ldjv8"))))
1561 (build-system gnu-build-system)
1566 ("cyrus-sasl" ,cyrus-sasl)
1567 ("openssl" ,openssl-1.0)
1569 (home-page "http://isync.sourceforge.net/")
1570 (synopsis "Mailbox synchronization program")
1572 "isync/mbsync is a command-line tool for two-way synchronization of
1573 mailboxes. Currently Maildir and IMAP are supported types.")
1574 (license license:gpl2+)))
1576 (define-public perl-email-abstract
1578 (name "perl-email-abstract")
1583 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1584 "Email-Abstract-" version ".tar.gz"))
1587 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1588 (build-system perl-build-system)
1590 `(("perl-email-simple" ,perl-email-simple)
1591 ("perl-module-pluggable" ,perl-module-pluggable)
1592 ("perl-mro-compat" ,perl-mro-compat)))
1593 (home-page "https://metacpan.org/release/Email-Abstract")
1594 (synopsis "Interface to mail representations")
1595 (description "Email::Abstract provides module writers with the ability to
1596 write simple, representation-independent mail handling code.")
1597 (license license:perl-license)))
1599 (define-public perl-email-address
1601 (name "perl-email-address")
1606 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1607 "Email-Address-" version ".tar.gz"))
1609 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
1610 (build-system perl-build-system)
1611 (home-page "https://metacpan.org/release/Email-Address")
1612 (synopsis "Email address parsing and creation")
1613 (description "Email::Address implements a regex-based RFC 2822 parser that
1614 locates email addresses in strings and returns a list of Email::Address
1615 objects found. Alternatively you may construct objects manually.")
1616 (license license:perl-license)))
1618 (define-public perl-email-address-xs
1620 (name "perl-email-address-xs")
1625 (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
1626 "Email-Address-XS-" version ".tar.gz"))
1629 "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
1630 (build-system perl-build-system)
1631 (home-page "https://metacpan.org/release/Email-Address-XS")
1632 (synopsis "Parse and format RFC 5322 email addresses and groups")
1634 "Email::Address::XS implements RFC 5322 parser and formatter of email
1635 addresses and groups. Unlike Email::Address, this module does not use regular
1636 expressions for parsing but instead is implemented in XS and uses shared code
1637 from Dovecot IMAP server.")
1638 (license license:perl-license)))
1640 (define-public perl-email-date-format
1642 (name "perl-email-date-format")
1647 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1648 "Email-Date-Format-" version ".tar.gz"))
1651 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1652 (build-system perl-build-system)
1653 (home-page "https://metacpan.org/release/Email-Date-Format")
1654 (synopsis "Produce RFC 2822 date strings")
1655 (description "Email::Date::Format provides a means for generating an RFC
1656 2822 compliant datetime string.")
1657 (license license:perl-license)))
1659 (define-public perl-email-messageid
1661 (name "perl-email-messageid")
1666 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1667 "Email-MessageID-" version ".tar.gz"))
1670 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1671 (build-system perl-build-system)
1672 (home-page "https://metacpan.org/release/Email-MessageID")
1673 (synopsis "Generate world unique message-ids")
1674 (description "Email::MessageID generates recommended message-ids to
1675 identify a message uniquely.")
1676 (license license:perl-license)))
1678 (define-public perl-email-mime
1680 (name "perl-email-mime")
1685 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1686 "Email-MIME-" version ".tar.gz"))
1689 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
1690 (build-system perl-build-system)
1692 `(("perl-email-address" ,perl-email-address)
1693 ("perl-email-messageid" ,perl-email-messageid)
1694 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1695 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1696 ("perl-email-simple" ,perl-email-simple)
1697 ("perl-mime-types" ,perl-mime-types)
1698 ("perl-module-runtime" ,perl-module-runtime)))
1699 (home-page "https://metacpan.org/release/Email-MIME")
1700 (synopsis "MIME message handling")
1701 (description "Email::MIME is an extension of the Email::Simple module, to
1702 handle MIME encoded messages. It takes a message as a string, splits it up
1703 into its constituent parts, and allows you access to various parts of the
1704 message. Headers are decoded from MIME encoding.")
1705 (license license:perl-license)))
1707 (define-public perl-email-mime-contenttype
1709 (name "perl-email-mime-contenttype")
1714 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1715 "Email-MIME-ContentType-" version ".tar.gz"))
1718 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
1719 (build-system perl-build-system)
1721 `(("perl-capture-tiny" ,perl-capture-tiny)))
1722 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
1723 (synopsis "Parse MIME Content-Type headers")
1724 (description "Email::MIME::ContentType parses a MIME Content-Type
1726 (license license:perl-license)))
1728 (define-public perl-email-mime-encodings
1730 (name "perl-email-mime-encodings")
1735 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1736 "Email-MIME-Encodings-" version ".tar.gz"))
1739 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1740 (build-system perl-build-system)
1742 `(("perl-capture-tiny" ,perl-capture-tiny)))
1743 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
1744 (synopsis "Unified interface to MIME encoding and decoding")
1745 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1746 (license license:perl-license)))
1748 (define-public perl-email-sender
1750 (name "perl-email-sender")
1751 (version "1.300034")
1755 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1756 "Email-Sender-" version ".tar.gz"))
1758 (base32 "14aj9kqa9dr2bdhzn2qvjj2mffj8wjb5397z8qw7qg057fk3ib05"))))
1759 (build-system perl-build-system)
1761 `(("perl-capture-tiny" ,perl-capture-tiny)))
1763 `(("perl-email-abstract" ,perl-email-abstract)
1764 ("perl-email-address" ,perl-email-address)
1765 ("perl-email-simple" ,perl-email-simple)
1766 ("perl-list-moreutils" ,perl-list-moreutils)
1767 ("perl-module-runtime" ,perl-module-runtime)
1768 ("perl-moo" ,perl-moo)
1769 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1770 ("perl-sub-exporter" ,perl-sub-exporter)
1771 ("perl-throwable" ,perl-throwable)
1772 ("perl-try-tiny" ,perl-try-tiny)))
1773 (home-page "https://metacpan.org/release/Email-Sender")
1774 (synopsis "Perl library for sending email")
1775 (description "Email::Sender replaces the old and sometimes problematic
1776 Email::Send library.")
1777 (license license:perl-license)))
1779 (define-public perl-email-simple
1781 (name "perl-email-simple")
1786 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1787 "Email-Simple-" version ".tar.gz"))
1790 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
1791 (build-system perl-build-system)
1793 `(("perl-email-date-format" ,perl-email-date-format)))
1794 (home-page "https://metacpan.org/release/Email-Simple")
1795 (synopsis "Parsing of RFC 2822 messages")
1796 (description "Email::Simple provides simple parsing of RFC 2822 message
1797 format and headers.")
1798 (license license:perl-license)))
1800 (define-public libesmtp
1807 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1808 "libesmtp/libesmtp-" version ".tar.bz2/"
1809 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1811 ;; XXX This site is offline, so we fetch Fedora's cached copy
1812 ;; of the source tarball.
1813 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1814 version ".tar.bz2")))
1817 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1818 (build-system gnu-build-system)
1820 `(("openssl" ,openssl)))
1821 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1822 (synopsis "Library for sending mail via remote hosts using SMTP")
1823 (description "libESMTP is an SMTP client which manages posting (or
1824 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1825 It may be used as part of a Mail User Agent (MUA) or other program that must
1826 be able to post electronic mail where mail functionality may not be that
1827 program's primary purpose.")
1828 (license (list license:lgpl2.1+ license:gpl2+))))
1830 (define-public esmtp
1838 (url "https://github.com/andywingo/esmtp")
1839 (commit "01bf9fc")))
1842 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1843 (file-name (string-append name "-" version "-checkout"))))
1845 `(#:phases (modify-phases %standard-phases
1847 (lambda _ (invoke "autoreconf" "-vfi"))))))
1848 (build-system gnu-build-system)
1852 ("autoconf" ,autoconf)
1853 ("automake" ,automake)
1854 ("libtool" ,libtool)))
1856 `(("libesmtp" ,libesmtp)))
1857 (home-page "https://sourceforge.net/projects/esmtp/")
1858 (synopsis "Relay-only mail transfer agent (MTA)")
1859 (description "Esmtp is a simple relay-only mail transfer agent built using
1860 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1861 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1862 page for more on configuration. This package also provides minimal
1863 compatibility shims for the @command{sendmail}, @command{mailq}, and
1864 @command{newaliases} commands.")
1865 (license license:gpl2+)))
1873 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1874 version "/fdm-" version ".tar.gz"))
1876 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
1877 (build-system gnu-build-system)
1880 ("openssl" ,openssl)
1882 (home-page "https://github.com/nicm/fdm")
1883 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1884 (description "fdm is a program designed to fetch mail from POP3
1885 or IMAP servers, or receive local mail from stdin, and
1886 deliver it in various ways.")
1888 ;; Why point to a source file? Well, all the individual files have a
1889 ;; copy of this license in their headers, but there's no seprate file
1890 ;; with that information.
1891 (license:non-copyleft
1892 "https://github.com/nicm/fdm/blob/master/command.c"))))
1895 (define-public procmail
1903 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1908 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1909 ;; The following patch fixes an ambiguous definition of
1910 ;; getline() in formail.c. The patch is provided by Debian as
1912 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1913 "procmail-CVE-2014-3618.patch"
1914 "procmail-CVE-2017-16844.patch"))))
1916 `(#:phases (modify-phases %standard-phases
1919 (substitute* "Makefile"
1923 (assoc-ref %outputs "out"))
1927 #:tests? #f)) ;; There are no tests indicating a successful
1928 ;; build. Some tests of basic locking mechanisms provided by the
1929 ;; file system are performed during 'make install'. However, these
1930 ;; are performed before the actual build process.
1931 (build-system gnu-build-system)
1932 (inputs `(("exim" ,exim)))
1933 (home-page "http://www.procmail.org/")
1934 (synopsis "Versatile mail delivery agent (MDA)")
1935 (description "Procmail is a mail delivery agent (MDA) featuring support
1936 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1937 can be sorted into separate files/directories and arbitrary commands can be
1938 executed on mail arrival. Procmail is considered stable, but is no longer
1940 (license license:gpl2+))) ;; procmail allows to choose the
1941 ;; nonfree Artistic License 1.0
1942 ;; as alternative to the GPL2+.
1943 ;; This option is not listed here.
1945 (define-public khard
1951 (uri (pypi-uri name version))
1954 "0fg4qh5gzki5wg958wlpc8a2icnk74gzg33lqxjm755cfnjng7qd"))))
1955 (build-system python-build-system)
1958 (modify-phases %standard-phases
1959 (add-after 'install 'install-completions
1960 (lambda* (#:key outputs #:allow-other-keys)
1961 (let* ((out (assoc-ref outputs "out"))
1962 (zsh (string-append out "/share/zsh/site-functions")))
1963 (copy-recursively "misc/zsh" zsh)
1966 `(("python-setuptools-scm" ,python-setuptools-scm)))
1968 `(("python-atomicwrites" ,python-atomicwrites)
1969 ("python-configobj" ,python-configobj)
1970 ("python-pyyaml" ,python-pyyaml)
1971 ("python-ruamel.yaml" ,python-ruamel.yaml)
1972 ("python-unidecode" ,python-unidecode)
1973 ("python-vobject" ,python-vobject)))
1974 (synopsis "Console address book using CardDAV")
1975 (description "Khard is an address book for the console. It creates, reads,
1976 modifies and removes CardDAV address book entries at your local machine. For
1977 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1978 Khard can also be used from within the email client @command{mutt}.")
1979 (home-page "https://github.com/scheibler/khard")
1980 (license license:gpl3+)))
1982 (define-public perl-mail-spf
1984 (name "perl-mail-spf")
1990 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
1994 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1995 (build-system perl-build-system)
1997 `(("perl-module-build" ,perl-module-build)
1998 ("perl-net-dns-resolver-programmable"
1999 ,perl-net-dns-resolver-programmable)))
2002 (modify-phases %standard-phases
2003 (add-before 'configure 'modify-Build.PL
2004 (lambda* (#:key outputs #:allow-other-keys)
2005 (substitute* "Build.PL"
2006 (("'/usr/sbin'") (string-append "'"
2007 (assoc-ref outputs "out")
2011 `(("perl-error" ,perl-error)
2012 ("perl-net-dns" ,perl-net-dns)
2013 ("perl-netaddr-ip" ,perl-netaddr-ip)
2014 ("perl-uri" ,perl-uri)))
2015 (home-page "https://metacpan.org/release/Mail-SPF")
2016 (synopsis "Perl implementation of Sender Policy Framework")
2017 (description "Mail::SPF is the Sender Policy Framework implemented
2019 (license license:bsd-3)))
2021 (define-public perl-mail-authenticationresults
2023 (name "perl-mail-authenticationresults")
2024 (version "1.20180923")
2028 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
2029 "Mail-AuthenticationResults-" version ".tar.gz"))
2032 "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
2033 (build-system perl-build-system)
2035 `(("perl-test-exception" ,perl-test-exception)))
2036 (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
2037 (synopsis "Object Oriented Authentication-Results Headers")
2038 (description "Mail::AuthenticationResults parses the message header field
2039 that indicates the message authentication status as per RFC7601. This module
2040 is not fully compliant with the RFC but it tries to implement most styles of
2041 Authentication-Results header seen in the wild.")
2042 (license license:perl-license)))
2044 (define-public perl-mail-dkim
2046 (name "perl-mail-dkim")
2051 "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
2056 "0cgkal65qqcy57b21lgij90ba36wl66byw9i76g5yhwaa8ms8hqa"))))
2057 (build-system perl-build-system)
2059 `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2060 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2061 ("perl-mailtools" ,perl-mailtools)
2062 ("perl-net-dns" ,perl-net-dns)))
2064 `(("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
2065 ("perl-test-requiresinternet" ,perl-test-requiresinternet)
2066 ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
2067 (home-page "https://metacpan.org/release/Mail-DKIM")
2068 (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
2069 (description "Mail::DKIM is a Perl module that implements the new Domain
2070 Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
2071 both of which sign and verify emails using digital signatures and DNS records.
2072 Mail-DKIM can be used by any Perl program that wants to provide support for
2073 DKIM and/or DomainKeys.")
2074 (license license:gpl3+)))
2076 (define-public dkimproxy
2083 "mirror://sourceforge/dkimproxy/dkimproxy/"
2084 version "/dkimproxy-" version ".tar.gz"))
2087 "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
2089 (search-patches "dkimproxy-add-ipv6-support.patch"))))
2090 (build-system gnu-build-system)
2093 (modify-phases %standard-phases
2094 (add-after 'install 'make-wrapper
2095 (lambda* (#:key inputs outputs #:allow-other-keys)
2096 (let* ((out (assoc-ref outputs "out"))
2097 (wrap.pl (lambda (scripts keys)
2100 (wrap-program (string-append out script)
2101 `("PERL5LIB" ":" prefix
2104 (assoc-ref inputs input)
2105 "/lib/perl5/site_perl"))
2108 (wrap.pl (list "/bin/dkimproxy.in"
2109 "/bin/dkimproxy.out")
2110 (list "perl-crypt-openssl-rsa"
2111 "perl-io-socket-inet6"
2113 "perl-mail-authenticationresults"
2118 (wrap.pl (list "/bin/dkim_responder.pl")
2119 (list "perl-crypt-openssl-rsa"
2128 ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2129 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2130 ("perl-mailtools" ,perl-mailtools)
2131 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2132 ("perl-mail-dkim" ,perl-mail-dkim)
2133 ("perl-mime-tools" ,perl-mime-tools)
2134 ("perl-net-dns" ,perl-net-dns)
2135 ("perl-net-server" ,perl-net-server)
2136 ("perl-socket6" ,perl-socket6)
2137 ("perl-timedate" ,perl-timedate)))
2138 (home-page "http://dkimproxy.sourceforge.net/")
2139 (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
2141 "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
2142 @code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
2143 proxy for signing outgoing email, and an inbound proxy for verifying signatures
2144 of incoming messages.
2146 It was designed for Postfix, but can be used to add DKIM support to nearly any
2147 existing mail server. With Postfix, the proxies can operate as either
2148 @code{Before-Queue} or @code{After-Queue} content filters.")
2149 (license license:gpl2+)))
2151 (define-public mb2md
2158 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
2162 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
2163 (build-system trivial-build-system)
2165 '(#:modules ((guix build utils))
2168 (use-modules (guix build utils))
2169 (let* ((source (assoc-ref %build-inputs "source"))
2170 (out (assoc-ref %outputs "out"))
2171 (bin (string-append out "/bin"))
2172 (perl (assoc-ref %build-inputs "perl"))
2173 (gzip (assoc-ref %build-inputs "gzip"))
2174 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
2175 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
2177 (with-directory-excursion bin
2178 (copy-file source "mb2md.gz")
2179 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
2180 (substitute* "mb2md"
2181 (("#!/usr/bin/perl")
2182 (string-append "#!/usr/bin/perl -I " perl5lib)))
2183 (patch-shebang "mb2md" (list (string-append perl "/bin")))
2184 (chmod "mb2md" #o555))
2186 (native-inputs `(("gzip" ,gzip)))
2187 (inputs `(("perl" ,perl)
2188 ("perl-timedate" ,perl-timedate)))
2189 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
2190 (synopsis "Mbox to maildir converter")
2192 "Mb2md is a Perl script that takes one or more mbox format files and
2193 converts them to maildir format directories.")
2194 (license license:public-domain)))
2203 (uri (string-append "https://marlam.de/mpop/releases/"
2204 "mpop-" version ".tar.xz"))
2206 (base32 "1243hazpiwgvz2m3p48cdh0yw1019i6xjxgc7qyhmxcdy0inb6wy"))))
2207 (build-system gnu-build-system)
2209 `(("gnutls" ,gnutls)))
2211 `(("pkg-config" ,pkg-config)))
2212 (home-page "https://marlam.de/mpop/")
2213 (synopsis "POP3 mail client")
2214 (description "mpop is a small and fast POP3 client suitable as a
2215 fetchmail replacement.
2217 mpop supports multiple accounts, header based mail filtering, delivery
2218 to mbox files, maildir folders or an @acronym{MDA, Mail Delivery Agent},
2219 TLS/SSL, several authentication methods, @acronym{IDN, Internationalized Domain
2220 Names} and SOCKS proxies.")
2221 (license license:gpl3+)))
2223 (define-public mhonarc
2230 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
2234 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
2235 (build-system perl-build-system)
2236 (home-page "https://www.mhonarc.org/")
2237 (synopsis "Create HTML archives of mail/news messages")
2239 "MHonArc is a Perl mail-to-HTML converter. MHonArc
2240 provides HTML mail archiving with index, mail thread linking,
2241 etc; plus other capabilities including support for MIME and
2242 powerful user customization features.")
2243 (license license:gpl2+)))
2246 (define-public sendmail
2254 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
2258 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
2259 (build-system gnu-build-system)
2262 (modify-phases %standard-phases
2263 (add-before 'build 'replace-/bin/sh
2267 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2268 "contrib/mmuegel" "devtools/bin/configure.sh")
2269 (find-files "." ".*\\.m4")
2270 (find-files "." ".*\\.cf"))
2271 (("/bin/sh") (which "sh")))
2273 (substitute* "devtools/bin/Build"
2274 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
2279 ;; Render harmless any attempts to chown or chgrp
2280 (substitute* "devtools/bin/install.sh"
2281 (("owner=\\$2") "owner=''")
2282 (("group=\\$2") "group=''"))
2284 (with-output-to-file "devtools/Site/site.config.m4"
2287 define(`confCC', `gcc')
2288 define(`confOPTIMIZE', `-g -O2')
2289 define(`confLIBS', `-lresolv')
2290 define(`confINSTALL', `~a/devtools/bin/install.sh')
2291 define(`confDEPEND_TYPE', `CC-M')
2292 define(`confINST_DEP', `')
2297 (invoke "sh" "Build")
2298 (with-directory-excursion "cf/cf"
2299 (copy-file "generic-linux.mc" "sendmail.mc")
2300 (invoke "sh" "Build" "sendmail.cf"))
2302 (add-before 'install 'pre-install
2304 (let ((out (assoc-ref %outputs "out")))
2305 (mkdir-p (string-append out "/usr/bin"))
2306 (mkdir-p (string-append out "/usr/sbin"))
2307 (mkdir-p (string-append out "/etc/mail"))
2308 (setenv "DESTDIR" out)
2309 (with-directory-excursion "cf/cf"
2310 (invoke "sh" "Build" "install-cf"))
2312 ;; There is no make check. There are some post installation tests, but those
2313 ;; require root privileges
2318 (home-page "http://sendmail.org")
2320 "Highly configurable Mail Transfer Agent (MTA)")
2322 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2323 Allman. It is highly configurable and supports many delivery methods and many
2324 transfer protocols.")
2325 (license (license:non-copyleft "file://LICENSE"
2326 "See LICENSE in the distribution."))))
2328 (define-public opensmtpd
2335 (uri (string-append "https://www.opensmtpd.org/archives/"
2336 "opensmtpd-" version ".tar.gz"))
2338 (base32 "1jh8vxfajm1mvp1v5yh6llrhjzv0n9fgab88mlwllwqynhcfjy3l"))))
2339 (build-system gnu-build-system)
2343 ("libevent" ,libevent)
2344 ("libressl" ,libressl) ; recommended, and supports e.g. ECDSA
2345 ("linux-pam" ,linux-pam)
2349 ("groff" ,groff))) ; for man pages
2352 (list "--localstatedir=/var"
2353 ;; This is the default only if it exists at build time—it doesn't.
2354 "--with-path-socket=/var/run"
2355 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2356 "--with-user-smtpd=smtpd"
2357 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2361 (modify-phases %standard-phases
2362 ;; See: https://github.com/OpenSMTPD/OpenSMTPD/issues/1069.
2363 (add-after 'unpack 'fix-smtpctl-encrypt-bug
2365 (substitute* "smtpd/smtpctl.c"
2366 (("\"encrypt\", \"--\",")
2369 ;; Fix some incorrectly hard-coded external tool file names.
2370 (add-after 'unpack 'patch-FHS-file-names
2372 (substitute* "smtpd/smtpctl.c"
2373 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
2374 (("/bin/cat") (which "cat")))
2375 (substitute* "smtpd/mda_unpriv.c"
2376 (("/bin/sh") (which "sh")))
2378 ;; OpenSMTPD provides a single smtpctl utility to control both the
2379 ;; daemon and the local submission subsystem. To accomodate systems
2380 ;; that require historical interfaces such as sendmail, newaliases or
2381 ;; makemap, smtpctl operates in compatibility mode if called with the
2383 (add-after 'install 'install-compability-links
2384 (lambda* (#:key outputs #:allow-other-keys)
2385 (let* ((out (assoc-ref outputs "out"))
2386 (sbin (string-append out "/sbin/")))
2387 (for-each (lambda (command)
2388 (symlink "smtpctl" (string-append sbin command)))
2389 (list "mailq" "makemap" "newaliases"
2390 "send-mail" "sendmail")))
2392 (synopsis "Lightweight SMTP daemon")
2394 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
2395 Transfer Protocol}, with some additional standard extensions. It allows
2396 ordinary machines to exchange e-mails with other systems speaking the SMTP
2397 protocol, or to deliver them to local users.
2399 In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
2400 functionality than those available in other SMTP daemons. The objective is to
2401 provide enough features to satisfy typical usage at the risk of unsuitability
2402 to esoteric or niche requirements.")
2403 (home-page "https://www.opensmtpd.org")
2404 (license (list license:bsd-2 license:bsd-3 license:bsd-4
2405 (license:non-copyleft "file://COPYING")
2406 license:public-domain license:isc license:openssl))))
2408 (define-public opensmtpd-extras
2410 (name "opensmtpd-extras")
2414 (uri (string-append "https://www.opensmtpd.org/archives/"
2415 "opensmtpd-extras-" version ".tar.gz"))
2418 "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq"))))
2419 (build-system gnu-build-system)
2421 `(("pkg-config" ,pkg-config)))
2423 `(("libressl" ,libressl)
2424 ("libevent" ,libevent)
2426 ("opensmtpd" ,opensmtpd)
2427 ("postgresql" ,postgresql)
2428 ("python" ,python-2)
2429 ("sqlite" ,sqlite)))
2432 (list "--sysconfdir=/etc"
2433 "--localstatedir=/var"
2436 "--with-queue-python"
2441 "--with-table-mysql"
2442 "--with-table-postgres"
2443 ;; "--with-table-redis" ; TODO: package hiredis
2444 "--with-table-socketmap"
2445 "--with-table-passwd"
2446 "--with-table-python"
2447 "--with-table-sqlite"
2450 "--with-scheduler-ram"
2451 "--with-scheduler-stub"
2452 "--with-scheduler-python"
2454 "--with-user-smtpd=smtpd"
2456 ;; We have to configure it like this because the default checks for
2457 ;; for example Python in /usr/{,local/}bin and fails otherwise.
2458 (string-append "--with-python="
2459 (assoc-ref %build-inputs "python")))))
2460 (home-page "https://www.opensmtpd.org")
2461 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2463 "This package provides extra tables, filters, and various other addons
2464 for OpenSMTPD to extend its functionality.")
2465 (license (list license:bsd-2 license:bsd-3 ; openbsd-compat
2466 license:isc)))) ; everything else
2468 (define-public mailman
2475 (uri (pypi-uri "mailman" version))
2478 "0idfiv48jjgc0jq4731094ddhraqq8bxnwmjk6sg5ask0jss9kxq"))))
2479 (build-system python-build-system)
2481 `(("gunicorn" ,gunicorn)
2482 ("python-aiosmtpd" ,python-aiosmtpd)
2483 ("python-alembic" ,python-alembic)
2484 ("python-atpublic" ,python-atpublic)
2485 ("python-authheaders" ,python-authheaders)
2486 ("python-authres" ,python-authres)
2487 ("python-click" ,python-click)
2488 ("python-dateutil" ,python-dateutil)
2489 ("python-dnspython" ,python-dnspython)
2490 ("python-falcon" ,python-falcon)
2491 ("python-flufl-bounce" ,python-flufl-bounce)
2492 ("python-flufl-i18n" ,python-flufl-i18n)
2493 ("python-flufl-lock" ,python-flufl-lock)
2494 ("python-importlib-resources" ,python-importlib-resources)
2495 ("python-lazr-config" ,python-lazr-config)
2496 ("python-passlib" ,python-passlib)
2497 ("python-requests" ,python-requests)
2498 ("python-sqlalchemy" ,python-sqlalchemy)
2499 ("python-zope-component" ,python-zope-component)
2500 ("python-zope-configuration" ,python-zope-configuration)
2501 ("python-zope-event" ,python-zope-event)
2502 ("python-zope-interface" ,python-zope-interface)))
2504 `(("python-nose" ,python-nose)))
2505 (home-page "https://www.list.org")
2506 (synopsis "Mailing list manager")
2508 "GNU Mailman is software for managing email discussion and mailing
2509 lists. Both users and administrators generally perform their actions in a
2510 web interface, although email and command-line interfaces are also provided.
2511 The system features built-in archiving, automatic bounce processing, content
2512 filtering, digest delivery, and more.")
2513 (license license:gpl3+)))
2515 (define-public python-mailmanclient
2517 (name "python-mailmanclient")
2522 (uri (pypi-uri "mailmanclient" version))
2525 "0pjgzpvhdb6ql8asb20xr8d01m646zpghmcp9fmscks0n1k4di4g"))))
2526 (build-system python-build-system)
2528 `(#:tests? #f)) ; Requires mailman running
2530 `(("python-requests" ,python-requests)))
2532 ; `(("mailman" ,mailman)
2533 ; ("python-falcon" ,python-falcon)
2534 ; ("python-pytest" ,python-pytest)
2535 ; ("python-pytest-services" ,python-pytest-services)))
2536 (home-page "https://www.list.org/")
2537 (synopsis "Python bindings for the Mailman 3 REST API")
2539 "The mailmanclient library provides official Python bindings for
2540 the GNU Mailman 3 REST API.")
2541 (properties `((python2-variant . ,(delay python2-mailmanclient))))
2542 (license license:lgpl3+)))
2544 ;; This is the last version which supports Python-2.
2545 (define-public python2-mailmanclient
2546 (let ((base (package-with-python2
2547 (strip-python2-variant python-mailmanclient))))
2554 (uri (pypi-uri "mailmanclient" version))
2557 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
2559 `(("python2-six" ,python2-six)
2560 ("python2-httplib2" ,python2-httplib2))))))
2562 (define-public mlmmj
2569 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2570 version ".tar.bz2"))
2573 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
2574 (build-system gnu-build-system)
2576 `(("perl" ,perl))) ; For "contrib/web/"
2578 `(("pkg-config" ,pkg-config)))
2581 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2582 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2583 ;; of mimetypes for parts of multipart/mime messages that should be denied
2584 ;; or stripped. The parts then get stripped directly when the mail is
2585 ;; received. mlmmj-receive-strip also appends an extra header
2586 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2588 (list "--enable-receive-strip")
2590 (modify-phases %standard-phases
2591 (add-before 'install 'install-contrib
2592 (lambda* (#:key outputs #:allow-other-keys)
2593 (let* ((out (assoc-ref outputs "out"))
2594 (share (string-append out "/share/mlmmj"))
2595 (contrib (string-append share "/contrib/web"))
2596 (texts (string-append share "/listtexts")))
2597 (copy-recursively "contrib/web/" contrib)
2598 (copy-recursively "listtexts" texts)
2599 (rename-file texts (string-append share "/texts"))
2601 (home-page "http://mlmmj.org")
2602 (synopsis "Mailing list managing made joyful")
2604 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2605 It works with many different Mail Transport Agents (MTAs) and is simple for a
2606 system administrator to install, configure and integrate with other software.
2607 As it uses very few resources, and requires no daemons, it is ideal for
2608 installation on systems where resources are limited. Its features include:
2610 @item Archive, Custom headers / footer,
2611 @item Fully automated bounce handling (similar to ezmlm),
2612 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
2613 @item Subscribers only posting, Regular expression access control,
2614 @item Functionality to retrieve old posts, Web interface, Digests,
2615 @item No-mail subscription, VERP support,
2616 @item Delivery Status Notification (RFC1891) support,
2617 @item Rich and customisable texts for automated operations.
2619 (license license:expat)))
2621 (define-public python-django-mailman3
2623 (name "python-django-mailman3")
2628 (uri (pypi-uri "django-mailman3" version))
2631 "1yrm7wpjy34xai72vn2vkhc9131cdrbqy08rrabf36kynj5vcdvy"))))
2632 (build-system python-build-system)
2635 (modify-phases %standard-phases
2638 (setenv "DJANGO_SETTINGS_MODULE"
2639 "django_mailman3.tests.settings_test")
2640 (invoke "django-admin" "test"
2641 "--pythonpath=."))))))
2643 `(("python-django" ,python-django)
2644 ("python-django-allauth" ,python-django-allauth)
2645 ("python-django-gravatar2" ,python-django-gravatar2)
2646 ("python-mailmanclient" ,python-mailmanclient)
2647 ("python-pytz" ,python-pytz)))
2649 `(("python-mock" ,python-mock)))
2650 (home-page "https://gitlab.com/mailman/django-mailman3")
2651 (synopsis "Django library to help interaction with Mailman")
2653 "This package contains libraries and templates for Django-based interfaces
2654 interacting with Mailman.")
2655 (properties `((python2-variant . ,(delay python2-django-mailman))))
2656 (license license:gpl3+)))
2658 ;; This is the last version to support Python-2.
2659 (define-public python2-django-mailman3
2661 (name "python2-django-mailman3")
2666 (uri (pypi-uri "django-mailman3" version))
2669 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
2670 (build-system python-build-system)
2673 (modify-phases %standard-phases
2676 (invoke "django-admin"
2678 "--settings=django_mailman3.tests.settings_test"
2679 "django_mailman3"))))
2680 #:python ,python-2))
2682 `(("python2-django" ,python2-django)))
2684 `(("python2-requests" ,python2-requests)
2685 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2686 ("python2-openid" ,python2-openid)
2687 ("python2-mailmanclient" ,python2-mailmanclient)
2688 ("python2-django-allauth" ,python2-django-allauth)
2689 ("python2-django-gravatar2" ,python2-django-gravatar2)
2690 ("python2-pytz" ,python2-pytz)))
2691 (home-page "https://gitlab.com/mailman/django-mailman3")
2692 (synopsis "Django library for Mailman UIs")
2694 "Libraries and templates for Django-based interfaces
2695 interacting with Mailman.")
2696 (license license:gpl3+)))
2698 (define-public python-mailman-hyperkitty
2700 (name "python-mailman-hyperkitty")
2705 (uri (pypi-uri "mailman-hyperkitty" version))
2708 "1lfqa9admhvdv71f528jmz2wl0i5cv77v6l64px2pm4zqr9ckkjx"))
2712 ;; see: https://gitlab.com/mailman/mailman-hyperkitty/issues/17
2713 ;; fixes test_archive_message_unserializable
2715 (uri "https://salsa.debian.org/mailman-team/mailman-hyperkitty/raw/debian/1.1.0-9/debian/patches/0002-Skip-the-test_archive_message_unserializable.patch")
2718 "0p1fwm46c4bl81lvsg3kjhn2r1lwgkpgxamb3xyqn7h9qdrw10hw")))))))
2719 (build-system python-build-system)
2721 `(("python-requests" ,python-requests)
2722 ("python-zope-interface" ,python-zope-interface)))
2724 `(("mailman" ,mailman)))
2726 `(("python-mock" ,python-mock)
2727 ("python-nose" ,python-nose)
2728 ("python-nose2" ,python-nose2)))
2729 (home-page "https://gitlab.com/mailman/mailman-hyperkitty/")
2730 (synopsis "Mailman archiver plugin for HyperKitty")
2732 "Mailman3 allows emails sent to its mailing lists to be archived by any
2733 software provided that there is a plugin (loadable by Mailman3) designed to
2734 communicate with it properly. This module contains a Mailman3 archiver plugin
2735 which sends emails to HyperKitty, the official Mailman3 web archiver.")
2736 (license license:gpl3+)))
2738 (define-public postorius
2745 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2746 (file-name (string-append name "-" version ".tar.gz"))
2749 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2750 (build-system python-build-system)
2752 `(; One test dependency relies on Persona, which was shut down in
2755 ;; The part of the frontend of Mailman is still python 2.7.
2756 #:python ,python-2))
2758 `(("python2-django" ,python2-django)
2759 ("python2-django-mailman3" ,python2-django-mailman3)
2760 ("python2-mailmanclient" ,python2-mailmanclient)))
2761 (home-page "https://gitlab.com/mailman/postorius")
2762 (synopsis "Web user interface for GNU Mailman")
2764 "Postorius is a Django app which provides a web user interface
2765 to access GNU Mailman.")
2766 (license (list license:gpl3+ license:lgpl3+))))
2768 (define-public blists
2775 (uri (string-append "http://download.openwall.net/pub/projects/"
2776 "blists/blists-" version ".tar.gz"))
2779 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
2780 (build-system gnu-build-system)
2782 `(#:tests? #f ; No tests
2784 (modify-phases %standard-phases
2787 (lambda* (#:key outputs #:allow-other-keys)
2788 (let* ((out (assoc-ref outputs "out"))
2789 (bin (string-append out "/bin")))
2790 (install-file "bindex" bin)
2791 (install-file "bit" bin)
2793 (home-page "http://www.openwall.com/blists/")
2794 (synopsis "Web interface to mailing list archives")
2796 "Blists is a web interface to mailing list archives that works off
2797 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2798 @code{bindex} generates or updates the index file (incremental updates
2799 are supported). @code{bit} is a CGI/SSI program that generates web pages
2800 on the fly. Both programs are written in C and are very fast.")
2801 (license license:expat)))
2803 (define-public swaks
2806 (version "20190914.0")
2811 "https://jetmore.org/john/code/swaks/files/swaks-"
2815 "12awq5z4sdd54cxprj834zajxhkpy4jwhzf1fhigcx1zbhdaacsp"))))
2816 (build-system perl-build-system)
2818 `(("perl-net-dns" ,perl-net-dns)
2819 ("perl-net-ssleay" ,perl-net-ssleay)))
2821 `(#:tests? #f ; No tests
2823 (modify-phases %standard-phases
2827 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
2829 (lambda* (#:key outputs #:allow-other-keys)
2830 (let ((out (assoc-ref outputs "out")))
2831 (install-file "swaks" (string-append out "/bin"))
2832 (install-file "swaks.1" (string-append out "/share/man/man1")))
2834 (add-after 'install 'wrap-program
2835 (lambda* (#:key outputs #:allow-other-keys)
2836 (wrap-program (string-append (assoc-ref outputs "out")
2838 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2840 (home-page "https://jetmore.org/john/code/swaks/")
2841 (synopsis "Featureful SMTP test tool")
2842 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2843 test tool. It handles SMTP features and extensions such as TLS,
2844 authentication, and pipelining; multiple versions of the SMTP protocol
2845 including SMTP, ESMTP, and LMTP; and multiple transport methods including
2846 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2847 Options can be specified in environment variables, configuration files, and
2848 the command line allowing maximum configurability and ease of use for
2849 operators and scripters.")
2850 (license license:gpl2+)))
2852 (define-public alpine
2855 ;; Upstream doesn't use git tags, but does ‘tag’ their releases in the
2856 ;; commit message. Hence the lack of GIT-VERSIONing despite using a commit
2857 ;; ID below. Don't forget to update it…
2862 ;; There are two versions: the plain continuation of Alpine without extra
2863 ;; patches and the version which adds extra fixes. Every distro uses
2864 ;; the patched version, and so do we to not break expectations.
2865 ;; http://alpine.freeiz.com/alpine/readme/README.patches
2867 (url "http://repo.or.cz/alpine.git")
2868 (commit "b50297779a4becb9ceca9c6b5b375d526fe3df78")))
2869 (file-name (git-file-name name version))
2871 (base32 "06js44fvdl7l33hfd4lsxpcd1cz3c0h796cswyzz0lkrzx89yl48"))
2872 (modules '((guix build utils)))
2875 ;; Remove pre-built binaries scattered across the source repository.
2876 (for-each delete-file (find-files "." "\\.(dll|exe)"))
2878 (build-system gnu-build-system)
2881 (list (string-append "CC=" ,(cc-for-target)))
2882 #:configure-flags (list (string-append "--with-ssl-include-dir="
2883 (assoc-ref %build-inputs "openssl")
2885 (string-append "--with-ssl-dir="
2886 (assoc-ref %build-inputs "openssl"))
2887 (string-append "--with-ssl-certs-dir="
2889 (string-append "--with-ssl-lib-dir="
2890 (assoc-ref %build-inputs "openssl")
2892 (string-append "--with-interactive-spellcheck="
2893 (assoc-ref %build-inputs "aspell")
2895 "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
2897 (modify-phases %standard-phases
2898 (add-after 'unpack 'assume-shadow-passwords
2899 ;; Alpine's configure script confuses ‘shadow password support’ with
2900 ;; ‘/etc/shadow exists in the build environment’. It does not.
2902 (substitute* "configure"
2903 (("test -f /etc/shadow") "true"))
2905 (add-after 'unpack 'make-reproducible
2907 ;; This removes time-dependent code to make alpine reproducible.
2908 (substitute* "pico/blddate.c"
2909 (("%02d-%s-%d") "1970-01-01"))
2912 `(("ncurses" ,ncurses)
2913 ("openssl" ,openssl)
2915 ("openldap" ,openldap)
2916 ("cyrus-sasl" ,cyrus-sasl)
2917 ("mit-krb5" ,mit-krb5)
2920 ("linux-pam" ,linux-pam)))
2921 (home-page "https://repo.or.cz/alpine.git")
2922 (synopsis "Alternatively Licensed Program for Internet News and Email")
2924 "Alpine is a text-based mail and news client. Alpine includes several
2925 tools and applications:
2927 @item alpine, the Alpine mailer
2928 @item pico, the standalone text editor, GNU nano's predecessor
2929 @item pilot, the standalone file system navigator
2931 (license license:asl2.0)))
2933 (define-public balsa
2940 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
2941 "balsa-" version ".tar.bz2"))
2943 (base32 "1xkxx801p7sbfkn0bh3cz85wra4xf1z1zhjqqc80z1z1nln7fhb4"))))
2944 (build-system gnu-build-system)
2947 '(;; Balsa tries to install additional MIME icons
2948 ;; under gtk+ directory.
2949 "--enable-extra-mimeicons=no"
2950 "--with-gtksourceview"
2952 "--with-spell-checker=gtkspell"
2958 `(("cyrus-sasl" ,cyrus-sasl)
2959 ("enchant" ,enchant)
2960 ("gdk-pixbuf" ,gdk-pixbuf)
2965 ("gtksourceview" ,gtksourceview-3)
2966 ("gtkspell3" ,gtkspell3)
2967 ("libcanberra" ,libcanberra)
2968 ("libesmtp" ,libesmtp)
2969 ("libical" ,libical)
2970 ("libnotify" ,libnotify)
2971 ("libsecret" ,libsecret)
2972 ("openldap" ,openldap)
2974 ("webkitgtk" ,webkitgtk)))
2976 `(("compface" ,compface)
2977 ("glib" ,glib "bin")
2978 ("intltool" ,intltool)
2979 ("pkg-config" ,pkg-config)
2980 ("yelp-tools" ,yelp-tools)))
2981 (home-page "https://pawsa.fedorapeople.org/balsa")
2982 (synopsis "E-mail client for GNOME")
2983 (description "Balsa is a highly configurable and robust mail client for
2984 the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2985 mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
2986 the use of a local MTA such as Sendmail.")
2987 (license license:gpl3+)))
2996 (uri (pypi-uri "afew" version))
2999 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
3000 (build-system python-build-system)
3002 `(("python-chardet" ,python-chardet)
3003 ("python-notmuch" ,python-notmuch)))
3005 `(("python-setuptools-scm" ,python-setuptools-scm)))
3006 (home-page "https://github.com/afewmail/afew")
3007 (synopsis "Initial tagging script for notmuch mail")
3008 (description "afew is an initial tagging script for notmuch mail. It
3009 provides automatic tagging each time new mail is registered with notmuch. It
3010 can add tags based on email headers or Maildir folders and can handle spam and
3012 (license license:isc)))
3021 (uri (string-append "http://pan.rebelbase.com/download/releases/"
3022 version "/source/" name "-" version ".tar.bz2"))
3024 (base32 "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55"))))
3026 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
3027 "--enable-libnotify" "--enable-manual"
3030 (modify-phases %standard-phases
3031 (add-before 'configure 'patch-gpg2
3032 (lambda* (#:key inputs #:allow-other-keys)
3033 (substitute* "pan/usenet-utils/gpg.cc"
3034 (("\"gpg2\"") (string-append "\""
3035 (assoc-ref inputs "gnupg")
3039 `(("gmime" ,gmime-2.6)
3043 ("gtkspell3" ,gtkspell3)
3044 ("libnotify" ,libnotify)
3045 ("libsecret" ,libsecret)
3046 ("libxml2" ,libxml2)
3049 `(("gettext-minimal" ,gettext-minimal)
3050 ("itstool" ,itstool)
3051 ("pkg-config" ,pkg-config)))
3052 (build-system gnu-build-system)
3053 (home-page "http://pan.rebelbase.com/")
3054 (synopsis "Pan newsreader")
3055 (description "@code{pan} is a Usenet newsreader that's good at both text
3056 and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
3057 PGP handling, multiple servers, and secure connections.")
3058 ;; License of the docs: fdl-1.1; Others: gpl2.
3059 (license (list license:fdl1.1+ license:gpl2))))
3061 (define-public imapfilter
3069 (url "https://github.com/lefcha/imapfilter")
3070 (commit (string-append "v" version))))
3071 (file-name (git-file-name name version))
3073 (base32 "0f65sg6hhv6778fxwsz4hvarbm97dsb8jj0mg7a9qs273r35pqck"))))
3074 (build-system gnu-build-system)
3078 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3081 (modify-phases %standard-phases
3082 (delete 'configure)))) ; no configure script
3086 ("openssl" ,openssl)))
3087 (home-page "https://github.com/lefcha/imapfilter")
3088 (synopsis "IMAP mail filtering utility")
3089 (description "IMAPFilter is a mail filtering utility. It connects
3090 to remote mail servers using IMAP, sends searching queries to the server and
3091 processes mailboxes based on the results. It can be used to delete, copy,
3092 move, flag, etc. messages residing in mailboxes at the same or different mail
3093 servers. The 4rev1 and 4 versions of IMAP are supported.")
3094 (license license:expat)))
3096 (define-public urlscan
3103 (uri (pypi-uri "urlscan" version))
3105 (base32 "07vcwirap0p4dkqrqblfn1q017slgd8m6qyijvbi3gxnr09pbyx2"))))
3106 (build-system python-build-system)
3108 `(("python-urwid" ,python-urwid)))
3109 (home-page "https://github.com/firecat53/urlscan")
3110 (synopsis "View/select the URLs in an email message or file")
3112 "Urlscan is a small program that is designed to integrate with the
3113 Mutt mail reader to allow you to easily launch a Web browser for URLs
3114 contained in email messages. It parses an email message or file and scans it
3115 for URLs and email addresses. It then displays the URLs and their context
3116 within the message, and allows you to choose one or more URLs to send to your
3117 Web browser. Alternatively, it send a list of all URLs to standard output.
3118 It is a replacement for the @command{urlview} program.")
3119 (license license:gpl2)))
3129 (url "https://github.com/verdammelt/tnef")
3132 (base32 "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"))
3133 (file-name (git-file-name name version))))
3134 (build-system gnu-build-system)
3136 `(("autoconf" ,autoconf)
3137 ("automake" ,automake)))
3138 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
3139 (home-page "https://github.com/verdammelt/tnef")
3140 (synopsis "Unpack @code{application/ms-tnef} attachments")
3142 "TNEF is a tar-like program that unpacks MIME attachments of type
3143 @code{application/ms-tnef}.")
3144 (license license:gpl2+)))
3147 (let ((commit "5a578328199bab51a147fbadbce12c8d06959ed6")
3151 (version (git-version "0.0.1" revision commit))
3155 (url "https://git.elephly.net/software/mumi.git")
3157 (file-name (git-file-name name version))
3160 "0hngv82gd19l4q7nnbf97r120z1yagsmkp0x3lc8haza5q4mc12c"))))
3161 (build-system gnu-build-system)
3163 `(#:modules ((guix build gnu-build-system)
3164 ((guix build guile-build-system)
3165 #:select (target-guile-effective-version))
3167 #:imported-modules ((guix build guile-build-system)
3168 ,@%gnu-build-system-modules)
3170 #:configure-flags '("--localstatedir=/var")
3173 (modify-phases %standard-phases
3174 (add-after 'install 'wrap-executable
3175 (lambda* (#:key outputs #:allow-other-keys)
3176 (let* ((out (assoc-ref outputs "out"))
3177 (bin (string-append out "/bin"))
3178 (version (target-guile-effective-version))
3179 (scm (string-append out "/share/guile/site/" version))
3180 (go (string-append out "/lib/guile/" version
3182 (wrap-program (string-append bin "/mumi")
3183 `("GUILE_LOAD_PATH" ":" prefix
3184 (,scm ,(getenv "GUILE_LOAD_PATH")))
3185 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
3186 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
3189 `(("guile-email" ,guile-email)
3190 ("guile-fibers" ,guile-fibers)
3191 ("guile-gcrypt" ,guile-gcrypt)
3192 ("guile-json" ,guile-json-3)
3193 ("guile-redis" ,guile-redis)
3194 ("guile-syntax-highlight" ,guile-syntax-highlight)
3195 ("guile-webutils" ,guile-webutils)
3196 ("guile-xapian" ,guile-xapian)
3197 ("guile" ,guile-3.0)
3198 ("mailutils" ,mailutils)))
3200 `(("autoconf" ,autoconf)
3201 ("automake" ,automake)
3202 ("pkg-config" ,pkg-config)))
3203 (home-page "https://git.elephly.net/software/mumi.git")
3204 (synopsis "Debbugs web interface")
3205 (description "Mumi is a Debbugs web interface.")
3206 (license license:agpl3+))))
3208 (define-public ytnef
3215 (url "https://github.com/Yeraze/ytnef")
3216 (commit (string-append "v" version))))
3217 (file-name (git-file-name name version))
3220 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))))
3221 (build-system gnu-build-system)
3223 `(("autoconf" ,autoconf)
3224 ("automake" ,automake)
3225 ("libtool" ,libtool)))
3226 (home-page "https://github.com/Yeraze/ytnef/")
3227 (synopsis "TNEF stream reader for winmail.dat files")
3228 (description "This package provides a TNEF stream reader library and
3229 related tools to process winmail.dat files.")
3230 (license license:gpl2+)))
3232 (define-public public-inbox
3233 (let ((commit "05a06f3262a2ddbf46adb85169e13ce9127e4524")
3236 (name "public-inbox")
3237 (version (git-version "1.2.0" revision commit))
3239 (origin (method git-fetch)
3241 (url "https://public-inbox.org")
3245 "06cclxg46gsls3x19l9s8s9x8gkjghm6gd4jb1v9ng6fds6xi2fg"))
3246 (file-name (git-file-name name version))))
3247 (build-system perl-build-system)
3250 (modify-phases %standard-phases
3251 (add-before 'configure 'qualify-paths
3253 ;; Use absolute paths for 'xapian-compact'.
3254 (let ((xapian-compact (which "xapian-compact")))
3255 (substitute* "script/public-inbox-compact"
3256 (("xapian-compact") xapian-compact)))
3258 (add-before 'check 'pre-check
3260 (substitute* "t/spawn.t"
3261 (("\\['env'\\]") (string-append "['" (which "env") "']")))
3262 (substitute* "t/ds-leak.t"
3263 (("/bin/sh") (which "sh")))
3264 (invoke "./certs/create-certs.perl")
3265 ;; XXX: This test fails due to zombie process is not reaped by
3267 (substitute* "t/httpd-unix.t"
3268 (("^SKIP: \\{") "SKIP: { skip('Guix');"))
3270 (add-after 'install 'wrap-programs
3271 (lambda* (#:key inputs outputs #:allow-other-keys)
3272 (let ((out (assoc-ref outputs "out")))
3276 ;; Let those scripts find their perl modules.
3277 `("PERL5LIB" ":" prefix
3278 (,(string-append out "/lib/perl5/site_perl")
3279 ,(getenv "PERL5LIB")))
3280 ;; 'git' is invoked in various files of the PublicInbox
3283 (,(string-append (assoc-ref inputs "git") "/bin")))))
3284 (find-files (string-append out "/bin"))))
3291 ("openssl" ,openssl)))
3293 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
3294 ("perl-dbi" ,perl-dbi)
3295 ("perl-email-address-xs" ,perl-email-address-xs)
3296 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
3297 ("perl-email-mime" ,perl-email-mime)
3298 ("perl-email-simple" ,perl-email-simple)
3299 ("perl-net-server" ,perl-net-server)
3300 ("perl-filesys-notify-simple" ,perl-filesys-notify-simple)
3301 ("perl-plack-middleware-deflater" ,perl-plack-middleware-deflater)
3302 ("perl-plack-middleware-reverseproxy" ,perl-plack-middleware-reverseproxy)
3303 ("perl-plack" ,perl-plack)
3304 ("perl-search-xapian" ,perl-search-xapian)
3305 ("perl-timedate" ,perl-timedate)
3306 ("perl-uri-escape" ,perl-uri-escape)
3308 ("perl-ipc-run" ,perl-ipc-run)
3309 ("perl-xml-feed" ,perl-xml-feed)))
3310 (home-page "https://public-inbox.org/README.html")
3311 (synopsis "Archive mailing lists in git repositories")
3313 "public-inbox implements the sharing of an email inbox via git to
3314 complement or replace traditional mailing lists. Readers may read via NNTP,
3315 Atom feeds or HTML archives.")
3316 (license license:agpl3+))))
3318 (define-public sylpheed
3324 (uri (string-append "https://sylpheed.sraoss.jp/sylpheed/v3.7/"
3325 name "-" version ".tar.xz"))
3328 "0j9y5vdzch251s264diw9clrn88dn20bqqkwfmis9l7m8vmwasqd"))))
3329 (build-system gnu-build-system)
3331 `(("pkg-config" ,pkg-config)))
3333 `(("bogofilter" ,bogofilter)
3334 ("compface" ,compface)
3337 ("gtk+-2.0" ,gtk+-2)
3338 ("gtkspell" ,gtkspell3)
3340 ("openldap" ,openldap)
3341 ("openssl" ,openssl)))
3342 (home-page "https://sylpheed.sraoss.jp/en/")
3343 (synopsis "Lightweight GTK+ email client")
3345 "Sylpheed is a simple, lightweight but featureful, and easy-to-use e-mail
3346 client. Sylpheed provides intuitive user-interface. Sylpheed is also
3347 designed for keyboard-oriented operation.")
3348 (license license:gpl2+)))
3350 (define-public python-authres
3352 (name "python-authres")
3357 (uri (pypi-uri "authres" version))
3360 "1dr5zpqnb54h4f5ax8334l1dcp8j9083d7v4vdi1xqkwmnavklck"))))
3361 (build-system python-build-system)
3364 (modify-phases %standard-phases
3366 ;; Run doctests as described in the README.
3368 (invoke "python" "-m" "authres" "-v"))))))
3369 (home-page "https://launchpad.net/authentication-results-python")
3370 (synopsis "Email Authentication Results Header Module")
3372 "This module can be used to generate and parse RFC 5451/7001/7601
3373 Authentication-Results headers. It also supports Authentication Results
3376 @item RFC 5617 DKIM/ADSP
3377 @item RFC 6008 DKIM signature identification (header.b)
3378 @item RFC 6212 Vouch By Reference (VBR)
3379 @item RFC 6577 Sender Policy Framework (SPF)
3380 @item RFC 7281 Authentication-Results Registration for S/MIME
3381 @item RFC 7293 The Require-Recipient-Valid-Since Header Field
3382 @item RFC 7489 Domain-based Message Authentication, Reporting, and Conformance (DMARC)
3383 @item Authenticated Recieved Chain (ARC) (draft-ietf-dmarc-arc-protocol-08)
3385 Note: RFC 7601 obsoletes RFC 5451, 6577, 7001, and 7410. Authres supports the
3386 current standard. No backward compatibility issues have been noted.")
3387 (license license:asl2.0)))
3389 (define-public python-dkimpy
3391 (name "python-dkimpy")
3396 (uri (pypi-uri "dkimpy" version))
3399 "14idcs0wiyc0iyi5bz3xqimxf3x6dizcjfn92s2ka5zxp95xdyvd"))))
3400 (build-system python-build-system)
3403 (modify-phases %standard-phases
3404 (add-after 'patch-source-shebangs 'patch-more-source
3405 (lambda* (#:key inputs #:allow-other-keys)
3406 (let ((openssl (assoc-ref inputs "openssl")))
3407 (substitute* "dkim/dknewkey.py"
3408 (("/usr/bin/openssl") (string-append openssl "/bin/openssl"))))
3412 (invoke "python" "test.py"))))))
3414 `(("python-dnspython" ,python-dnspython)))
3416 `(("python-authres" ,python-authres)
3417 ("python-pynacl" ,python-pynacl)))
3419 `(("openssl" ,openssl)))
3420 (home-page "https://launchpad.net/dkimpy")
3421 (synopsis "DKIM (DomainKeys Identified Mail)")
3422 (description "Python module that implements @dfn{DKIM} (DomainKeys
3423 Identified Mail) email signing and verification (RFC6376). It also provides
3424 helper scripts for command line signing and verification. It supports DKIM
3425 signing/verifying of ed25519-sha256 signatures (RFC 8463). It also supports
3426 the RFC 8617 Authenticated Received Chain (ARC) protocol.")
3427 (license license:bsd-3)))
3429 (define-public python-authheaders
3431 (name "python-authheaders")
3436 (uri (pypi-uri "authheaders" version))
3439 "14k6i72k5f8dyvps8vc0aq0cczc8lvqpgjfjzsy6qqychjvjcmwk"))))
3440 (build-system python-build-system)
3442 `(("python-authres" ,python-authres)
3443 ("python-dkimpy" ,python-dkimpy)
3444 ("python-dnspython" ,python-dnspython)
3445 ("python-publicsuffix2" ,python-publicsuffix2)))
3446 (home-page "https://github.com/ValiMail/authentication-headers")
3447 (synopsis "Library wrapping email authentication header verification and generation")
3449 "This is a Python library for the generation of email authentication
3450 headers. The library can perform DKIM, SPF, and DMARC validation, and the
3451 results are packaged into the Authentication-Results header. The library can
3452 DKIM and ARC sign messages and output the corresponding signature headers.")
3453 ;; The package's metadata claims it were MIT licensed, but the source file
3454 ;; headers disagree. MPL-2 for the public suffix list.
3455 (license (list license:zpl2.1 license:zlib license:mpl2.0))))
3457 (define-public python-aiosmtpd
3459 (name "python-aiosmtpd")
3464 (uri (pypi-uri "aiosmtpd" version))
3467 "1xdfk741pjmz1cm8dsi4n5vq4517i175rm94696m3f7kcgk7xsmp"))))
3468 (build-system python-build-system)
3471 (modify-phases %standard-phases
3472 (add-after 'unpack 'delete-failing-test
3474 (delete-file "aiosmtpd/tests/test_smtps.py")
3478 (invoke "python" "-m" "nose2" "-v"))))))
3480 `(("python-flufl-testing" ,python-flufl-testing)
3481 ("python-nose2" ,python-nose2)))
3483 `(("python-atpublic" ,python-atpublic)))
3484 (home-page "https://aiosmtpd.readthedocs.io/")
3485 (synopsis "Asyncio based SMTP server")
3487 "This project is a reimplementation of the Python stdlib @code{smtpd.py}
3489 (license (list license:asl2.0
3490 license:lgpl3)))) ; only for setup_helpers.py