1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 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 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
14 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
16 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
17 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
18 ;;; Copyright © 2016, 2017, 2018 ng0 <ng0@n0.is>
19 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20 ;;; Copyright © 2016, 2017, 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
21 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
22 ;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
23 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
24 ;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
25 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
26 ;;; Copyright © 2017, 2018 Rene Saavedra <pacoon@protonmail.com>
27 ;;; Copyright © 2018, 2019 Pierre Langlois <pierre.langlois@gmx.com>
28 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
29 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
30 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
32 ;;; This file is part of GNU Guix.
34 ;;; GNU Guix is free software; you can redistribute it and/or modify it
35 ;;; under the terms of the GNU General Public License as published by
36 ;;; the Free Software Foundation; either version 3 of the License, or (at
37 ;;; your option) any later version.
39 ;;; GNU Guix is distributed in the hope that it will be useful, but
40 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
41 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 ;;; GNU General Public License for more details.
44 ;;; You should have received a copy of the GNU General Public License
45 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47 (define-module (gnu packages mail)
48 #:use-module (gnu packages)
49 #:use-module (gnu packages admin)
50 #:use-module (gnu packages aspell)
51 #:use-module (gnu packages autotools)
52 #:use-module (gnu packages backup)
53 #:use-module (gnu packages base)
54 #:use-module (gnu packages bash)
55 #:use-module (gnu packages bison)
56 #:use-module (gnu packages calendar)
57 #:use-module (gnu packages check)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages crypto)
60 #:use-module (gnu packages curl)
61 #:use-module (gnu packages cyrus-sasl)
62 #:use-module (gnu packages databases)
63 #:use-module (gnu packages dbm)
64 #:use-module (gnu packages dejagnu)
65 #:use-module (gnu packages django)
66 #:use-module (gnu packages dns)
67 #:use-module (gnu packages docbook)
68 #:use-module (gnu packages documentation)
69 #:use-module (gnu packages emacs)
70 #:use-module (gnu packages enchant)
71 #:use-module (gnu packages gdb)
72 #:use-module (gnu packages gettext)
73 #:use-module (gnu packages ghostscript)
74 #:use-module (gnu packages glib)
75 #:use-module (gnu packages gnome)
76 #:use-module (gnu packages gnupg)
77 #:use-module (gnu packages groff)
78 #:use-module (gnu packages gsasl)
79 #:use-module (gnu packages gtk)
80 #:use-module (gnu packages guile)
81 #:use-module (gnu packages guile-xyz)
82 #:use-module (gnu packages flex)
83 #:use-module (gnu packages kerberos)
84 #:use-module (gnu packages libcanberra)
85 #:use-module (gnu packages libevent)
86 #:use-module (gnu packages libidn)
87 #:use-module (gnu packages libunistring)
88 #:use-module (gnu packages linux)
89 #:use-module (gnu packages lua)
90 #:use-module (gnu packages m4)
91 #:use-module (gnu packages man)
92 #:use-module (gnu packages ncurses)
93 #:use-module (gnu packages networking)
94 #:use-module (gnu packages openldap)
95 #:use-module (gnu packages onc-rpc)
96 #:use-module (gnu packages pcre)
97 #:use-module (gnu packages perl)
98 #:use-module (gnu packages perl-check)
99 #:use-module (gnu packages perl-web)
100 #:use-module (gnu packages pkg-config)
101 #:use-module (gnu packages python)
102 #:use-module (gnu packages python-web)
103 #:use-module (gnu packages python-xyz)
104 #:use-module (gnu packages readline)
105 #:use-module (gnu packages ruby)
106 #:use-module (gnu packages search)
107 #:use-module (gnu packages serialization)
108 #:use-module (gnu packages samba)
109 #:use-module (gnu packages screen)
110 #:use-module (gnu packages sphinx)
111 #:use-module (gnu packages sqlite)
112 #:use-module (gnu packages tcl)
113 #:use-module (gnu packages texinfo)
114 #:use-module (gnu packages time)
115 #:use-module (gnu packages tls)
116 #:use-module (gnu packages version-control)
117 #:use-module (gnu packages w3m)
118 #:use-module (gnu packages web)
119 #:use-module (gnu packages webkit)
120 #:use-module (gnu packages xdisorg)
121 #:use-module (gnu packages xorg)
122 #:use-module (gnu packages xml)
123 #:use-module ((guix licenses)
126 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
127 non-copyleft (expat . license:expat) bsd-3
128 public-domain bsd-4 isc (openssl . license:openssl)
129 bsd-2 x11-style agpl3 asl2.0 perl-license))
130 #:use-module (guix packages)
131 #:use-module (guix download)
132 #:use-module (guix git-download)
133 #:use-module (guix utils)
134 #:use-module (guix build-system gnu)
135 #:use-module (guix build-system guile)
136 #:use-module (guix build-system perl)
137 #:use-module (guix build-system python)
138 #:use-module (guix build-system trivial))
140 (define-public mailutils
146 (uri (string-append "mirror://gnu/mailutils/mailutils-"
150 "07phzpwrnkdclx6jvirljk9zcavl8wh02kpx3mfba9msr99kpqj6"))))
151 (build-system gnu-build-system)
154 (modify-phases %standard-phases
155 (add-before 'check 'prepare-test-suite
157 ;; Use the right file name for `cat'.
158 (substitute* "testsuite/lib/mailutils.exp"
162 ;; Tests try to invoke 'maidag' such that it looks up the
163 ;; 'root' user, which does not exist in the build
165 (substitute* "maidag/tests/testsuite"
166 (("root <") "nobody <")
167 (("spool/root") "spool/nobody")
168 (("root@localhost") "nobody@localhost"))
170 ;; The 'pipeact.at' tests generate a shell script; make
171 ;; sure it uses the right shell.
172 (substitute* '("sieve/tests/testsuite"
173 "mh/tests/testsuite")
175 (string-append "#!" (which "sh"))))
177 (substitute* "mh/tests/testsuite"
178 (("moreproc: /bin/cat")
179 (string-append "moreproc: " (which "cat"))))
181 ;; XXX: The comsatd tests rely on being able to open
182 ;; /dev/tty, but that gives ENODEV in the build
183 ;; environment. Thus, ignore test failures here.
184 (substitute* "comsat/tests/Makefile.in"
185 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
186 (string-append "-" all)))
188 ;; 'frm' tests expect write access to $HOME.
189 (setenv "HOME" (getcwd))
191 ;; Avoid the message "I'm going to create the standard MH path
192 ;; for you", which would lead to one test failure (when diffing
193 ;; stdout of 'fmtcheck'.)
194 (call-with-output-file ".mh_profile"
196 (format port "Path: ~a/Mail-for-tests~%"
200 ;; TODO: Add `--with-sql'.
201 #:configure-flags (list "--sysconfdir=/etc"
203 ;; Add "/2.2" to the installation directory.
204 (string-append "--with-guile-site-dir="
205 (assoc-ref %outputs "out")
206 "/share/guile/site/2.2"))
208 #:parallel-tests? #f))
210 `(("perl" ,perl))) ;for 'gylwrap'
212 `(("dejagnu" ,dejagnu)
219 ("readline" ,readline)
220 ("linux-pam" ,linux-pam)
224 ;; Required for SEARCH CHARSET.
225 ("libiconv" ,libiconv)
226 ("libunistring" ,libunistring)))
227 (home-page "https://mailutils.org")
228 (synopsis "Utilities and library for reading and serving mail")
230 "GNU Mailutils is a collection of programs for managing, viewing and
231 processing electronic mail. It contains both utilities and server daemons
232 and all operate in a protocol-agnostic way. The underlying libraries are
233 also available, simplifying the addition of mail capabilities to new
236 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
237 (list gpl3+ lgpl3+))))
239 (define-public nullmailer
247 (string-append "https://untroubled.org/nullmailer/"
248 "nullmailer-" version ".tar.gz")
249 ;; Previous releases are moved to this subdirectory.
250 (string-append "https://untroubled.org/nullmailer/archive/"
251 "nullmailer-" version ".tar.gz")))
253 (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
254 (build-system gnu-build-system)
258 "--localstatedir=/var"
261 (modify-phases %standard-phases
262 (add-before 'check 'patch-test-FHS-file-names
264 (with-directory-excursion "test"
265 (substitute* (list "functions.in"
267 ;; Fix some shebangs later generated on the fly.
268 (("/bin/sh") (which "bash"))))
270 (add-before 'check 'pass-PATH-to-tests
271 ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
272 ;; tests then source ‘functions’, which first demands a working $PATH
273 ;; only to clobber it later. Pass our $PATH to the test environment
274 ;; and don't touch it after that.
276 (with-directory-excursion "test"
277 (substitute* "runtests"
279 (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
280 (substitute* "functions.in"
281 (("export PATH=.*") "")))
283 (add-before 'check 'delete-failing-tests
285 (with-directory-excursion "test/tests"
286 (for-each delete-file
288 ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
290 ;; XXX These require the not-yet-packaged tcpserver.
291 "protocols" "smtp-auth")))
293 (add-before 'install 'skip-install-data-local
294 ;; Don't attempt to install run-time files outside of the store.
296 (substitute* "Makefile"
297 ((" install-data-local") ""))
301 `(("daemontools" ,daemontools))) ; for svc
303 `(("gnutls" ,gnutls)))
304 (home-page "https://untroubled.org/nullmailer/")
305 (synopsis "Simple relay-only mail transfer agent")
307 "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
308 hosts that receive no local mail and only relay mail to a fixed set of smart
309 relays. It's useful for systems such as Web servers that must be able to send
310 email notifications, without having to run a full-blown MTA such as sendmail
313 Nullmailer is designed to be simple to configure, easy to extend, and secure.
314 It requires little ongoing administration. The included @command{sendmail}
315 emulator front-end should allow most (if not all) sendmail-compatible programs
316 to run without any changes.")
317 (license (list lgpl2.1+ ; lib/cli++/ (but some files lack headers)
318 gpl2+)))) ; everything else
320 (define-public fetchmail
326 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
330 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
331 (build-system gnu-build-system)
333 `(("openssl" ,openssl)))
335 `(#:configure-flags (list (string-append "--with-ssl="
336 (assoc-ref %build-inputs "openssl")))))
337 (home-page "http://www.fetchmail.info/")
338 (synopsis "Remote-mail retrieval and forwarding utility")
340 "Fetchmail is a full-featured, robust, well-documented remote-mail
341 retrieval and forwarding utility intended to be used over on-demand
342 TCP/IP links (such as SLIP or PPP connections). It supports every
343 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
344 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
347 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
348 so it can then be read by normal mail user agents such as mutt, elm
349 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
350 aliasing facilities to work just as they would on normal mail.")
351 (license gpl2+))) ; most files are actually public domain or x11
359 (uri (string-append "https://bitbucket.org/mutt/mutt/downloads/"
360 "mutt-" version ".tar.gz"))
363 "0311sip2q90aqaxn7h3cck1zl98b4vifqi8bp5fsizy4dr06bi81"))
364 (patches (search-patches "mutt-store-references.patch"))))
365 (build-system gnu-build-system)
367 `(("cyrus-sasl" ,cyrus-sasl)
374 `(#:configure-flags '("--enable-smtp"
378 "--enable-hcache" ; for header caching
382 ;; so that mutt does not check whether the path
383 ;; exists, which it does not in the chroot
384 "--with-mailpath=/var/mail")))
385 (home-page "http://www.mutt.org/")
386 (synopsis "Mail client")
388 "Mutt is a small but very powerful text-based mail client for Unix
392 (define-public neomutt
399 (uri (string-append "https://github.com/" name "/" name
400 "/archive/" name "-" version ".tar.gz"))
403 "0072in2d6znwqq461shsaxlf40r4zr7w3j9848qvm4xlh1lq52dx"))))
404 (build-system gnu-build-system)
406 `(("cyrus-sasl" ,cyrus-sasl)
411 ("openssl" ,openssl) ;For smime
413 ("kyotocabinet" ,kyotocabinet)
418 ("notmuch" ,notmuch)))
420 `(("automake" ,automake)
421 ("gettext-minimal" ,gettext-minimal)
422 ("pkg-config" ,pkg-config)
423 ("docbook-xsl" ,docbook-xsl)
424 ("docbook-xml" ,docbook-xml-4.2)
432 ;; database, implies header caching
433 "--disable-tokyocabinet"
444 (string-append "--with-sasl="
445 (assoc-ref %build-inputs "cyrus-sasl"))
452 ;; If we do not set this, neomutt wants to check
453 ;; whether the path exists, which it does not
454 ;; in the chroot. The workaround is this.
455 "--with-mailpath=/var/mail"
458 (string-append "--with-ncurses="
459 (assoc-ref %build-inputs "ncurses"))
460 (string-append "--prefix="
461 (assoc-ref %outputs "out"))
464 (modify-phases %standard-phases
465 ;; TODO: autosetup is meant to be included in the source,
466 ;; but we should package autosetup and use our own version of it.
467 (add-before 'configure 'fix-sasl-test
469 ;; Upstream suggestion to fix the failing sasl autosetup test.
470 (substitute* "auto.def"
471 (("cc-with \\[list -cflags -I\\$prefix/include -libs")
472 "cc-with [list -includes stddef.h -cflags -I$prefix/include -libs"))
475 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
476 (let* ((out (assoc-ref outputs "out"))
477 (flags `(,@configure-flags))
478 (bash (which "bash")))
479 (setenv "SHELL" bash)
480 (setenv "CONFIG_SHELL" bash)
482 (string-append (getcwd) "/configure")
484 (home-page "https://www.neomutt.org/")
485 (synopsis "Command-line mail reader based on Mutt")
487 "NeoMutt is a command-line mail reader which is based on mutt.
488 It adds a large amount of new and improved features to mutt.")
497 (uri (string-append "mirror://gnome/sources/gmime/"
498 (version-major+minor version)
499 "/gmime-" version ".tar.xz"))
502 "04bk7rqs5slpvlvqf11i6s37s8b2xn6acls8smyl9asjnpp7a23a"))))
503 (build-system gnu-build-system)
505 `(("pkg-config" ,pkg-config)
506 ("gnupg" ,gnupg))) ; for tests only
507 (inputs `(("glib" ,glib)
512 (modify-phases %standard-phases
514 'unpack 'patch-paths-in-tests
516 ;; The test programs run several programs using 'system' with
517 ;; hard-coded paths. Here we patch them all.
518 ;; We use ISO-8859-1 here because test-iconv.c contains
519 ;; raw byte sequences in several different encodings.
520 (with-fluids ((%default-port-encoding #f))
521 (substitute* (find-files "tests" "\\.c$")
522 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
523 (let* ((base (basename prog-path))
526 (or prog (error "not found: " base)))))))
528 (home-page "http://spruce.sourceforge.net/gmime/")
529 (synopsis "MIME message parser and creator library")
531 "GMime provides a core library and set of utilities which may be used for
532 the creation and parsing of messages using the Multipurpose Internet Mail
534 (license (list lgpl2.1+ gpl2+ gpl3+))))
536 ;; Some packages are not ready for GMime 3 yet.
537 (define-public gmime-2.6
543 (uri (string-append "mirror://gnome/sources/gmime/"
544 (version-major+minor version)
545 "/gmime-" version ".tar.xz"))
548 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
550 (define-public bogofilter
556 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
557 version "/bogofilter-"
561 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
562 (build-system gnu-build-system)
565 (modify-phases %standard-phases
566 (add-before 'check 'pre-check
568 (substitute* "src/tests/t.frame"
570 (string-append "GREP=" (which "grep") "\n")))
572 (native-inputs `(("flex" ,flex)))
573 (inputs `(("bdb" ,bdb)))
574 (home-page "http://bogofilter.sourceforge.net/")
575 (synopsis "Mail classifier based on a Bayesian filter")
577 "Bogofilter is a mail filter that classifies mail as spam or ham
578 (non-spam) by a statistical analysis of the message's header and
579 content (body). The program is able to learn from the user's classifications
580 and corrections. It is based on a Bayesian filter.")
583 (define-public offlineimap
590 (url "https://github.com/OfflineIMAP/offlineimap")
591 (commit (string-append "v" version))))
592 (file-name (git-file-name name version))
595 "0h5q5nk2p2vx86w6rrbs7v70h81dpqqr68x6l3klzl3m0yj9agb1"))))
596 (build-system python-build-system)
598 `(("asciidoc" ,asciidoc)))
599 (inputs `(("python2-pysqlite" ,python2-pysqlite)
600 ("python2-six" ,python2-six)))
602 ;; The setup.py script expects python-2.
604 ;; Tests require a modifiable IMAP account.
607 (modify-phases %standard-phases
608 (add-after 'build 'build-documentation
610 (substitute* "docs/Makefile"
611 ;; Prevent xmllint and xsltproc from downloading a DTD file.
612 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
613 (invoke "make" "-C" "docs" "man")))
614 (add-after 'install 'install-documentation
615 (lambda* (#:key outputs #:allow-other-keys)
616 (let* ((out (assoc-ref outputs "out"))
617 (man (string-append out "/share/man")))
618 (install-file "docs/offlineimap.1" (string-append man "/man1"))
619 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
621 (home-page "https://www.offlineimap.org")
622 (synopsis "Sync emails between two repositories")
624 "OfflineImap synchronizes emails between two repositories, so that you
625 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
626 repository and Maildir/IMAP as LOCAL repository.")
629 (define-public emacs-mew
635 (uri (string-append "https://mew.org/Release/mew-"
639 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
643 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
644 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
645 (build-system gnu-build-system)
647 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
648 (icon-dir "/share/mew"))
649 `(#:modules ((guix build gnu-build-system)
651 (guix build emacs-utils))
652 #:imported-modules (,@%gnu-build-system-modules
653 (guix build emacs-utils))
655 (list (string-append "--with-elispdir=" %output ,elisp-dir)
656 (string-append "--with-etcdir=" %output ,icon-dir))
658 (modify-phases %standard-phases
659 (add-after 'configure 'patch-mew-icon-directory
660 (lambda* (#:key outputs #:allow-other-keys)
661 (emacs-substitute-sexps "mew-key.el"
662 ("(def.* mew-icon-directory"
664 (add-to-list 'image-load-path 'mew-icon-directory)
665 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
667 (add-after 'install 'generate-autoloads
668 (lambda* (#:key outputs #:allow-other-keys)
669 (emacs-generate-autoloads
670 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
673 (home-page "https://mew.org")
674 (synopsis "Emacs e-mail client")
675 (description "Mew (Messaging in the Emacs World) is a user interface
676 for text messages, multimedia messages (MIME), news articles and
677 security functionality including PGP, S/MIME, SSH, and SSL.")
686 (uri (string-append "https://github.com/djcb/mu/releases/"
687 "download/" (version-major+minor version) "/"
688 "mu-" version ".tar.xz"))
691 "0fh5bxvhjqv1p9z783lym8y1k3p4jcc3wg6wf7zl8s6w8krcfd7n"))))
692 (build-system gnu-build-system)
694 `(("pkg-config" ,pkg-config)
695 ("glib" ,glib "bin") ; for gtester
696 ("emacs" ,emacs-minimal)
697 ("tzdata" ,tzdata-for-tests))) ; for mu/test/test-mu-query.c
698 ;; TODO: Add webkit and gtk to build the mug GUI.
705 `(#:modules ((guix build gnu-build-system)
707 (guix build emacs-utils))
708 #:imported-modules (,@%gnu-build-system-modules
709 (guix build emacs-utils))
711 (modify-phases %standard-phases
712 (add-after 'unpack 'patch-configure
713 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
714 ;; so our Emacs package can't find it. Setting "--with-lispdir"
715 ;; configure flag doesn't help because "mu4e" will be added to
716 ;; the lispdir anyway, so we have to modify "configure.ac".
718 (substitute* "configure"
719 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
721 (("guile-2.0") "guile-2.2"))
722 (substitute* '("guile/Makefile.in"
723 "guile/mu/Makefile.in")
724 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
726 (add-after 'patch-configure 'fix-date-tests
727 ;; Loosen test tolerances to prevent failures caused by daylight
728 ;; saving time (DST). See: https://github.com/djcb/mu/issues/1214.
730 (substitute* "lib/parser/test-utils.cc"
731 (("\\* 60 \\* 60, 1 },")
732 "* 60 * 60, 3600 + 1 },"))
734 (add-before 'install 'fix-ffi
735 (lambda* (#:key outputs #:allow-other-keys)
736 (substitute* "guile/mu.scm"
738 (format #f "\"~a/lib/libguile-mu\""
739 (assoc-ref outputs "out"))))
741 (add-before 'check 'check-tz-setup
742 (lambda* (#:key inputs #:allow-other-keys)
743 ;; For mu/test/test-mu-query.c
745 (string-append (assoc-ref inputs "tzdata")
748 (add-after 'install 'install-emacs-autoloads
749 (lambda* (#:key outputs #:allow-other-keys)
750 (emacs-generate-autoloads
752 (string-append (assoc-ref outputs "out")
753 "/share/emacs/site-lisp"))
755 (home-page "http://www.djcbsoftware.nl/code/mu/")
756 (synopsis "Quickly find emails")
758 "Mu is a tool for dealing with e-mail messages stored in the
759 Maildir-format. Mu's purpose in life is to help you to quickly find the
760 messages you need; in addition, it allows you to view messages, extract
761 attachments, create new maildirs, and so on.")
770 ;; package author intends on distributing via github rather
772 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
773 (uri (string-append "https://github.com/pazz/alot/archive/"
775 (file-name (string-append "alot-" version ".tar.gz"))
778 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
779 (build-system python-build-system)
781 `(;; python 3 is currently unsupported, more info:
782 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
785 `(("python2-mock" ,python2-mock)))
787 `(("python2-magic" ,python2-magic)
788 ("python2-configobj" ,python2-configobj)
789 ("python2-twisted" ,python2-twisted)
790 ("python2-urwid" ,python2-urwid)
791 ("python2-urwidtrees" ,python2-urwidtrees)
792 ("python2-pygpgme" ,python2-pygpgme)
793 ("python2-notmuch" ,python2-notmuch)))
794 (home-page "https://github.com/pazz/alot")
795 (synopsis "Command-line MUA using @code{notmuch}")
797 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
798 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
801 (define-public notifymuch
803 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
807 (version (string-append "0.1-" revision "." (string-take commit 7)))
812 (url "https://github.com/kspi/notifymuch.git")
816 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
817 (file-name (string-append name "-" version "-checkout"))))
818 (build-system python-build-system)
820 `(("python-notmuch" ,python-notmuch)
821 ("python-pygobject" ,python-pygobject)
822 ("gobject-introspection" ,gobject-introspection)
823 ("libnotify" ,libnotify)
827 (modify-phases %standard-phases
828 (add-after 'install 'wrap-binary
829 (lambda* (#:key outputs #:allow-other-keys)
830 (let* ((out (assoc-ref outputs "out"))
831 (bin (string-append out "/bin/notifymuch")))
833 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
834 `("GI_TYPELIB_PATH" ":" prefix
835 (,(getenv "GI_TYPELIB_PATH")
836 ,(string-append out "/lib/girepository-1.0")))))
838 (home-page "https://github.com/kspi/notifymuch")
839 (synopsis "Displays notifications for changes in the notmuch email database")
840 (description "notifymuch displays desktop notifications for messages in
841 the notmuch database. The notifications are sent using libnotify to a
842 notification daemon. The query to find messages to send a notification about
843 is configurable, and a notification for the same message will not be send
844 within a configurable period (defaults to 48 hours). To use notifymuch, run
845 @command{notifymuch} after new mail is indexed, this can be automated by
846 invoking @command{notifymuch} from the post-new hook.")
849 (define-public notmuch
855 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
859 "0rg3rwghd3wivf3bmqcqpkkd5c779ld5hi363zjcw5fl6a7gqilq"))))
860 (build-system gnu-build-system)
862 `(#:modules ((guix build gnu-build-system)
863 ((guix build emacs-build-system) #:prefix emacs:)
865 #:imported-modules (,@%gnu-build-system-modules
866 (guix build emacs-build-system)
867 (guix build emacs-utils))
868 #:make-flags (list "V=1") ; verbose test output
869 #:phases (modify-phases %standard-phases
870 (add-after 'unpack 'patch-notmuch-lib.el
872 (substitute* "emacs/notmuch-lib.el"
873 (("/bin/sh") (which "sh")))
876 (lambda* (#:key outputs #:allow-other-keys)
878 (setenv "CONFIG_SHELL" (which "sh"))
880 (let* ((out (assoc-ref outputs "out"))
882 (string-append out "/share/emacs/site-lisp/guix.d/"
883 ,name "-" ,version)))
884 (invoke "./configure"
885 (string-append "--prefix=" out)
886 (string-append "--emacslispdir=" elisp)
887 (string-append "--emacsetcdir=" elisp)))))
888 (add-before 'check 'prepare-test-environment
890 (setenv "TEST_CC" "gcc")
891 ;; Patch various inline shell invocations.
892 (substitute* (find-files "test" "\\.sh$")
893 (("/bin/sh") (which "sh")))
895 (add-after 'install 'make-autoloads
896 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
898 `(("bash-completion" ,bash-completion)
899 ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
900 ("pkg-config" ,pkg-config)
902 ("python-docutils" ,python-docutils)
903 ("sphinx" ,python-sphinx)
905 ;; The following are required for tests only.
917 (home-page "https://notmuchmail.org/")
918 (synopsis "Thread-based email index, search, and tagging")
920 "Notmuch is a command-line based program for indexing, searching, read-
921 ing, and tagging large collections of email messages.")
924 (define-public notmuch-addrlookup-c
926 (name "notmuch-addrlookup-c")
927 (version (string-append "9"))
931 (url "https://github.com/aperezdc/notmuch-addrlookup-c.git")
932 (commit (string-append "v" version))))
933 (file-name (string-append name "-" version "-checkout"))
936 "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
937 (build-system gnu-build-system)
939 '(#:tests? #f ; no tests
940 #:make-flags (list "CC=gcc")
941 #:phases (modify-phases %standard-phases
943 ;; Remove vim code completion config, it's not needed to
944 ;; build (or be patched).
945 (add-before 'patch-source-shebangs 'delete-ycm-file
946 (lambda _ (delete-file ".ycm_extra_conf.py")))
948 (lambda* (#:key outputs #:allow-other-keys)
949 (let ((bin (string-append
950 (assoc-ref outputs "out") "/bin")))
951 (install-file "notmuch-addrlookup" bin)))))))
953 `(("pkg-config" ,pkg-config)))
956 ("notmuch" ,notmuch)))
957 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
958 (synopsis "Address lookup tool for Notmuch")
959 (description "This is an address lookup tool using a Notmuch database,
960 useful for email address completion.")
961 (license license:expat)))
963 (define-public python-notmuch
965 (name "python-notmuch")
966 (version (package-version notmuch))
967 ;; Notmuch python bindings are now unavailable on pypi. The
968 ;; bindings are distributed via the notmuch release tarball.
969 (source (package-source notmuch))
970 (build-system python-build-system)
971 (inputs `(("notmuch" ,notmuch)))
973 `(#:tests? #f ; no "test" target
975 (modify-phases %standard-phases
976 ;; This python package lives in a subdirectory of the notmuch source
977 ;; tree, so chdir into it before building.
978 (add-after 'unpack 'enter-python-dir
979 (lambda _ (chdir "bindings/python") #t))
980 ;; Make sure the correct notmuch shared library gets loaded.
981 (add-before 'build 'set-libnotmuch-file-name
982 (lambda* (#:key inputs #:allow-other-keys)
983 (let ((notmuch (assoc-ref inputs "notmuch")))
984 (substitute* "notmuch/globals.py"
985 (("libnotmuch\\.so\\.")
986 (string-append notmuch "/lib/libnotmuch.so.")))
988 (home-page (package-home-page notmuch))
989 (synopsis "Python bindings of the Notmuch mail indexing library")
991 "This package provides Python bindings to use the Notmuch mail indexing
992 and search library.")
995 (define-public python2-notmuch
996 (package-with-python2 python-notmuch))
998 (define-public getmail
1005 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
1006 "getmail-" version ".tar.gz"))
1008 (base32 "1hcrd9h4g12f5gvl1djsbchcjry02ghq4icdr897s8v48pkrzagk"))))
1009 (build-system python-build-system)
1011 `(#:tests? #f ; no tests
1012 #:python ,python-2))
1013 (home-page "http://pyropus.ca/software/getmail/")
1014 (synopsis "Mail retriever")
1016 "A flexible, extensible mail retrieval system with support for
1017 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1018 arbitrary message filtering, single-user and domain-mailboxes, and many other
1021 ;; License is specified in file '__init__.py'.
1024 (define-public libetpan
1031 (url "https://github.com/dinhviethoa/libetpan.git")
1033 (file-name (git-file-name name version))
1035 (base32 "19g4qskg71jv7sxfxsdkjmrxk9mk5kf9b6fhw06g6wvm3205n95f"))))
1036 (build-system gnu-build-system)
1037 (native-inputs `(("autoconf" ,autoconf-wrapper)
1038 ("automake" ,automake)
1039 ("libtool" ,libtool)
1040 ("pkg-config" ,pkg-config)))
1042 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1043 ;; libraries need to be propagated.
1044 `(("cyrus-sasl" ,cyrus-sasl)
1045 ("openssl" ,openssl)))
1052 (modify-phases %standard-phases
1055 (setenv "NOCONFIGURE" "true")
1056 (invoke "sh" "autogen.sh"))))
1058 '("--disable-static" "--disable-db")))
1059 (home-page "https://www.etpan.org/libetpan.html")
1060 (synopsis "Portable middleware for email access")
1062 "The purpose of this mail library is to provide a portable, efficient
1063 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1064 provides an API for C language. It's the low-level API used by MailCore and
1068 (define-public compface
1074 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1075 "ftp.xemacs.org/aux/"
1076 name "-" version ".tar.gz"))
1079 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1080 (build-system gnu-build-system)
1083 (synopsis "Portrait image compressor")
1084 (description "This package takes your 48x48x1 portrait image and
1086 (home-page "http://www.cs.indiana.edu/pub/faces/")
1087 (license (x11-style "file://README"))))
1089 (define-public claws-mail
1096 "https://www.claws-mail.org/releases/claws-mail-" version
1100 "1wnj6c9cbmhphs2l6wfvndkk2g08rmxw0sl2c8k1k008dxd1ykjh"))))
1101 (build-system gnu-build-system)
1102 (native-inputs `(("pkg-config" ,pkg-config)))
1103 (inputs `(("bogofilter" ,bogofilter)
1105 ("dbus-glib" ,dbus-glib)
1106 ("enchant" ,enchant)
1108 ("ghostscript" ,ghostscript)
1109 ("hicolor-icon-theme" ,hicolor-icon-theme)
1114 ("libarchive" ,libarchive)
1115 ("libcanberra" ,libcanberra)
1116 ("libetpan" ,libetpan)
1117 ("libical" ,libical)
1118 ("libnotify" ,libnotify)
1120 ("libxml2" ,libxml2)
1122 ("python-2" ,python-2)
1123 ("mime-info" ,shared-mime-info)
1124 ("startup-notification" ,startup-notification)))
1127 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant"
1130 ;; Disable updating icon cache since it's done by the profile hook.
1131 ;; Conflict with other packages in the profile would be inevitable
1133 '("gtk_update_icon_cache=true")
1134 #:phases (modify-phases %standard-phases
1135 (add-before 'build 'patch-mime
1136 (lambda* (#:key inputs #:allow-other-keys)
1137 (substitute* "src/procmime.c"
1138 (("/usr/share/mime/globs")
1139 (string-append (assoc-ref inputs "mime-info")
1140 "/share/mime/globs"))))))))
1141 (synopsis "GTK-based Email client")
1143 "Claws-Mail is an email client (and news reader) based on GTK+. The
1144 appearance and interface are designed to be familiar to new users coming from
1145 other popular email clients, as well as experienced users. Almost all commands
1146 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1147 which can add many functionalities to the base client.")
1148 (home-page "https://www.claws-mail.org/")
1149 (license gpl3+))) ; most files are actually public domain or x11
1151 (define-public msmtp
1158 (uri (string-append "https://marlam.de/msmtp/releases/"
1159 "/msmtp-" version ".tar.xz"))
1161 (base32 "0fczpfxlr62wkr7bwhp24clxg962k5khgz14h818qyy4v77dl4qn"))))
1162 (build-system gnu-build-system)
1164 `(("libsecret" ,libsecret)
1169 `(("pkg-config" ,pkg-config)))
1170 (home-page "https://marlam.de/msmtp/")
1172 `(#:configure-flags (list "--with-libgsasl"
1174 "--with-tls=gnutls")
1176 (modify-phases %standard-phases
1177 (add-after 'install 'install-additional-files
1178 (lambda* (#:key outputs #:allow-other-keys)
1179 (let* ((out (assoc-ref outputs "out"))
1180 (bin (string-append out "/bin"))
1181 (doc (string-append out "/share/doc/msmtp"))
1182 (msmtpq "scripts/msmtpq")
1183 (vimfiles (string-append out "/share/vim/vimfiles/plugin")))
1184 (install-file (string-append msmtpq "/msmtpq") bin)
1185 (install-file (string-append msmtpq "/msmtp-queue") bin)
1186 (install-file (string-append msmtpq "/README.msmtpq") doc)
1187 (install-file "scripts/vim/msmtp.vim" vimfiles)
1190 "Simple and easy to use SMTP client with decent sendmail compatibility")
1192 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1193 an SMTP server (for example at a free mail provider) which takes care of further
1204 (uri (list (string-append "https://ftp.exim.org/pub/exim/exim4/exim-"
1206 (string-append "https://ftp.exim.org/pub/exim/exim4/old/exim-"
1207 version ".tar.bz2")))
1209 (base32 "132zmxgzz35xwi89g3crw6hd3y74rxj5zcpamakvrnlcn256amdp"))))
1210 (build-system gnu-build-system)
1212 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
1220 ("libxaw" ,libxaw)))
1222 `(("pcre" ,pcre "bin")
1226 (modify-phases %standard-phases
1228 ;; We'd use #:make-flags but the top-level Makefile calls others
1229 ;; recursively, so just set all variables this way.
1230 (lambda* (#:key outputs inputs #:allow-other-keys)
1231 (substitute* '("Makefile" "OS/Makefile-Default")
1232 (("(RM_COMMAND=).*" all var)
1233 (string-append var "rm\n")))
1234 (copy-file "src/EDITME" "Local/Makefile")
1235 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1236 (let ((out (assoc-ref outputs "out"))
1237 (gzip (assoc-ref inputs "gzip"))
1238 (bzip2 (assoc-ref inputs "bzip2"))
1239 (xz (assoc-ref inputs "xz")))
1240 (substitute* '("Local/Makefile")
1241 (("(BIN_DIRECTORY=).*" all var)
1242 (string-append var out "/bin\n"))
1243 (("(CONFIGURE_FILE=).*" all var)
1244 (string-append var out "/etc/exim.conf\n"))
1245 (("(EXIM_USER=).*" all var)
1246 (string-append var "nobody\n"))
1247 (("(FIXED_NEVER_USERS=).*" all var)
1248 (string-append var "\n")) ; XXX no root in build environment
1249 (("(COMPRESS_COMMAND=).*" all var)
1250 (string-append var gzip "/bin/gzip\n"))
1251 (("(ZCAT_COMMAND=).*" all var)
1252 (string-append var gzip "/bin/zcat\n")))
1253 ;; This file has hardcoded names for tools despite the zcat
1254 ;; configuration above.
1255 (substitute* '("src/exigrep.src")
1256 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1257 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1258 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1259 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1261 (add-before 'build 'fix-sh-paths
1262 (lambda* (#:key inputs #:allow-other-keys)
1263 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1264 (("SHELL=/bin/sh") "SHELL=sh"))
1265 (substitute* '("scripts/Configure-config.h")
1266 (("\\| /bin/sh") "| sh"))
1267 (let ((bash (assoc-ref inputs "bash")))
1268 (substitute* '("scripts/Configure-eximon")
1269 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1271 #:make-flags '("INSTALL_ARG=-no_chown")
1272 ;; No 'check' target.
1274 (home-page "https://www.exim.org/")
1276 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1278 "Exim is a message transfer agent (MTA) developed at the University of
1279 Cambridge for use on Unix systems connected to the Internet. In style it is
1280 similar to Smail 3, but its facilities are more general. There is a great
1281 deal of flexibility in the way mail can be routed, and there are extensive
1282 facilities for checking incoming mail.")
1285 (define-public dovecot
1292 (uri (string-append "https://www.dovecot.org/releases/"
1293 (version-major+minor version) "/"
1294 "dovecot-" version ".tar.gz"))
1296 (base32 "1irnalplb47nlc26dn7zzdi95zhrxxi3miza7p3wdsgapv0qs7gd"))))
1297 (build-system gnu-build-system)
1299 `(("pkg-config" ,pkg-config)))
1301 `(("openssl" ,openssl)
1305 ("linux-pam" ,linux-pam)))
1307 `(#:configure-flags '("--sysconfdir=/etc"
1308 "--localstatedir=/var")
1310 (modify-phases %standard-phases
1311 (add-after 'unpack 'patch-file-names
1313 (substitute* "src/lib-program-client/test-program-client-local.c"
1314 (("(/bin/| )cat") (which "cat"))
1315 (("/bin/echo") (which "echo"))
1316 (("/bin/false") (which "false"))
1317 (("/bin/sh") (which "bash"))
1318 (("head") (which "head"))
1319 (("sleep") (which "sleep")))
1320 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1321 "src/lib-smtp/test-bin/sendmail-success.sh")
1322 (("cat") (which "cat")))
1325 (lambda* (#:key make-flags #:allow-other-keys)
1326 ;; Simple hack to avoid installing a trivial README in /etc.
1327 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1329 (home-page "https://www.dovecot.org")
1330 (synopsis "Secure POP3/IMAP server")
1332 "Dovecot is a mail server whose major goals are security and reliability.
1333 It supports mbox/Maildir and its own dbox/mdbox formats.")
1334 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1335 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1336 ;; Unicode, Inc. License Agreement for Data Files and Software.
1337 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1339 (define-public dovecot-trees
1341 (name "dovecot-trees")
1346 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1347 "archive.tar.gz?ref=v" version))
1348 (file-name (string-append name "-" version ".tar.gz"))
1351 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1353 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
1354 (build-system gnu-build-system)
1356 `(("automake" ,automake)
1357 ("autoconf" ,autoconf)
1358 ("libtool" ,libtool)
1359 ("dovecot" ,dovecot)
1360 ("pkg-config" ,pkg-config)))
1362 `(("libsodium" ,libsodium)))
1364 `(#:tests? #f ;No tests exist.
1365 #:configure-flags (list (string-append "--with-dovecot="
1366 (assoc-ref %build-inputs "dovecot")
1368 (home-page "https://0xacab.org/riseuplabs/trees")
1369 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1371 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1372 Dovecot encryption plugin. This plugin adds individually encrypted mail
1373 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1374 which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1375 the Sodium crypto library (based on NaCL).
1379 @item On IMAP log in, the user's cleartext password is passed to the plugin.
1380 @item The plugin creates an argon2 digest from the password.
1381 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1382 @item Inside the secretbox is stored a Curve25519 private key.
1383 @item The Curve25519 private key is used to decrypt each individual message,
1384 using libsodium sealed boxes.
1385 @item New mail is encrypted as it arrives using the Curve25519 public key.
1389 (define-public dovecot-libsodium-plugin
1390 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1393 (name "dovecot-libsodium-plugin")
1394 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1399 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1401 (file-name (string-append name "-" version "-checkout"))
1404 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1405 (build-system gnu-build-system)
1407 `(("automake" ,automake)
1408 ("autoconf" ,autoconf)
1409 ("libtool" ,libtool)
1410 ("dovecot" ,dovecot)
1411 ("pkg-config" ,pkg-config)))
1413 `(("libsodium" ,libsodium)))
1415 `(#:tests? #f ;No tests exist.
1416 #:configure-flags (list (string-append "--with-dovecot="
1417 (assoc-ref %build-inputs "dovecot")
1419 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1420 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1422 "@code{dovecot-libsodium-plugin} provides libsodium password
1423 hashing schemes plugin for @code{Dovecot}.")
1426 (define-public isync
1433 (uri (string-append "mirror://sourceforge/isync/isync/"
1434 version "/isync-" version ".tar.gz"))
1436 "1sphd30jplii58y2zmw365bckm6pszmapcy905zhjll1sm1ldjv8"))))
1437 (build-system gnu-build-system)
1442 ("cyrus-sasl" ,cyrus-sasl)
1443 ("openssl" ,openssl)
1445 (home-page "http://isync.sourceforge.net/")
1446 (synopsis "Mailbox synchronization program")
1448 "isync/mbsync is a command-line tool for two-way synchronization of
1449 mailboxes. Currently Maildir and IMAP are supported types.")
1452 (define-public perl-email-abstract
1454 (name "perl-email-abstract")
1459 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1460 "Email-Abstract-" version ".tar.gz"))
1463 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1464 (build-system perl-build-system)
1466 `(("perl-email-simple" ,perl-email-simple)
1467 ("perl-module-pluggable" ,perl-module-pluggable)
1468 ("perl-mro-compat" ,perl-mro-compat)))
1469 (home-page "https://metacpan.org/release/Email-Abstract")
1470 (synopsis "Interface to mail representations")
1471 (description "Email::Abstract provides module writers with the ability to
1472 write simple, representation-independent mail handling code.")
1473 (license perl-license)))
1475 (define-public perl-email-address
1477 (name "perl-email-address")
1482 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1483 "Email-Address-" version ".tar.gz"))
1485 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
1486 (build-system perl-build-system)
1487 (home-page "https://metacpan.org/release/Email-Address")
1488 (synopsis "Email address parsing and creation")
1489 (description "Email::Address implements a regex-based RFC 2822 parser that
1490 locates email addresses in strings and returns a list of Email::Address
1491 objects found. Alternatively you may construct objects manually.")
1492 (license perl-license)))
1494 (define-public perl-email-address-xs
1496 (name "perl-email-address-xs")
1501 (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
1502 "Email-Address-XS-" version ".tar.gz"))
1505 "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
1506 (build-system perl-build-system)
1507 (home-page "https://metacpan.org/release/Email-Address-XS")
1508 (synopsis "Parse and format RFC 5322 email addresses and groups")
1510 "Email::Address::XS implements RFC 5322 parser and formatter of email
1511 addresses and groups. Unlike Email::Address, this module does not use regular
1512 expressions for parsing but instead is implemented in XS and uses shared code
1513 from Dovecot IMAP server.")
1514 (license perl-license)))
1516 (define-public perl-email-date-format
1518 (name "perl-email-date-format")
1523 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1524 "Email-Date-Format-" version ".tar.gz"))
1527 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1528 (build-system perl-build-system)
1529 (home-page "https://metacpan.org/release/Email-Date-Format")
1530 (synopsis "Produce RFC 2822 date strings")
1531 (description "Email::Date::Format provides a means for generating an RFC
1532 2822 compliant datetime string.")
1533 (license perl-license)))
1535 (define-public perl-email-messageid
1537 (name "perl-email-messageid")
1542 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1543 "Email-MessageID-" version ".tar.gz"))
1546 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1547 (build-system perl-build-system)
1548 (home-page "https://metacpan.org/release/Email-MessageID")
1549 (synopsis "Generate world unique message-ids")
1550 (description "Email::MessageID generates recommended message-ids to
1551 identify a message uniquely.")
1552 (license perl-license)))
1554 (define-public perl-email-mime
1556 (name "perl-email-mime")
1561 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1562 "Email-MIME-" version ".tar.gz"))
1565 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
1566 (build-system perl-build-system)
1568 `(("perl-email-address" ,perl-email-address)
1569 ("perl-email-messageid" ,perl-email-messageid)
1570 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1571 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1572 ("perl-email-simple" ,perl-email-simple)
1573 ("perl-mime-types" ,perl-mime-types)
1574 ("perl-module-runtime" ,perl-module-runtime)))
1575 (home-page "https://metacpan.org/release/Email-MIME")
1576 (synopsis "MIME message handling")
1577 (description "Email::MIME is an extension of the Email::Simple module, to
1578 handle MIME encoded messages. It takes a message as a string, splits it up
1579 into its constituent parts, and allows you access to various parts of the
1580 message. Headers are decoded from MIME encoding.")
1581 (license perl-license)))
1583 (define-public perl-email-mime-contenttype
1585 (name "perl-email-mime-contenttype")
1590 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1591 "Email-MIME-ContentType-" version ".tar.gz"))
1594 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
1595 (build-system perl-build-system)
1597 `(("perl-capture-tiny" ,perl-capture-tiny)))
1598 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
1599 (synopsis "Parse MIME Content-Type headers")
1600 (description "Email::MIME::ContentType parses a MIME Content-Type
1602 (license perl-license)))
1604 (define-public perl-email-mime-encodings
1606 (name "perl-email-mime-encodings")
1611 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1612 "Email-MIME-Encodings-" version ".tar.gz"))
1615 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1616 (build-system perl-build-system)
1618 `(("perl-capture-tiny" ,perl-capture-tiny)))
1619 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
1620 (synopsis "Unified interface to MIME encoding and decoding")
1621 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1622 (license perl-license)))
1624 (define-public perl-email-sender
1626 (name "perl-email-sender")
1627 (version "1.300031")
1631 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1632 "Email-Sender-" version ".tar.gz"))
1635 "052g0slw3h2lzn93j71fi47nfawww2aph4jhr3c860ji70lkf4n4"))))
1636 (build-system perl-build-system)
1638 `(("perl-capture-tiny" ,perl-capture-tiny)))
1640 `(("perl-email-abstract" ,perl-email-abstract)
1641 ("perl-email-address" ,perl-email-address)
1642 ("perl-email-simple" ,perl-email-simple)
1643 ("perl-list-moreutils" ,perl-list-moreutils)
1644 ("perl-module-runtime" ,perl-module-runtime)
1645 ("perl-moo" ,perl-moo)
1646 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1647 ("perl-sub-exporter" ,perl-sub-exporter)
1648 ("perl-throwable" ,perl-throwable)
1649 ("perl-try-tiny" ,perl-try-tiny)))
1650 (home-page "https://metacpan.org/release/Email-Sender")
1651 (synopsis "Perl library for sending email")
1652 (description "Email::Sender replaces the old and sometimes problematic
1653 Email::Send library.")
1654 (license perl-license)))
1656 (define-public perl-email-simple
1658 (name "perl-email-simple")
1663 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1664 "Email-Simple-" version ".tar.gz"))
1667 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
1668 (build-system perl-build-system)
1670 `(("perl-email-date-format" ,perl-email-date-format)))
1671 (home-page "https://metacpan.org/release/Email-Simple")
1672 (synopsis "Parsing of RFC 2822 messages")
1673 (description "Email::Simple provides simple parsing of RFC 2822 message
1674 format and headers.")
1675 (license perl-license)))
1677 (define-public libesmtp
1684 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1685 "libesmtp/libesmtp-" version ".tar.bz2/"
1686 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1688 ;; XXX This site is offline, so we fetch Fedora's cached copy
1689 ;; of the source tarball.
1690 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1691 version ".tar.bz2")))
1694 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1695 (build-system gnu-build-system)
1697 `(("openssl" ,openssl)))
1698 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1699 (synopsis "Library for sending mail via remote hosts using SMTP")
1700 (description "libESMTP is an SMTP client which manages posting (or
1701 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1702 It may be used as part of a Mail User Agent (MUA) or other program that must
1703 be able to post electronic mail where mail functionality may not be that
1704 program's primary purpose.")
1705 (license (list lgpl2.1+ gpl2+))))
1707 (define-public esmtp
1715 (url "https://github.com/andywingo/esmtp.git")
1716 (commit "01bf9fc")))
1719 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1720 (file-name (string-append name "-" version "-checkout"))))
1722 `(#:phases (modify-phases %standard-phases
1724 (lambda _ (invoke "autoreconf" "-vfi"))))))
1725 (build-system gnu-build-system)
1729 ("autoconf" ,autoconf)
1730 ("automake" ,automake)
1731 ("libtool" ,libtool)))
1733 `(("libesmtp" ,libesmtp)))
1734 (home-page "https://sourceforge.net/projects/esmtp/")
1735 (synopsis "Relay-only mail transfer agent (MTA)")
1736 (description "Esmtp is a simple relay-only mail transfer agent built using
1737 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1738 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1739 page for more on configuration. This package also provides minimal
1740 compatibility shims for the @command{sendmail}, @command{mailq}, and
1741 @command{newaliases} commands.")
1750 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1751 version "/fdm-" version ".tar.gz"))
1753 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
1754 (build-system gnu-build-system)
1757 ("openssl" ,openssl)
1759 (home-page "https://github.com/nicm/fdm")
1760 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1761 (description "fdm is a program designed to fetch mail from POP3
1762 or IMAP servers, or receive local mail from stdin, and
1763 deliver it in various ways.")
1765 ;; Why point to a source file? Well, all the individual files have a
1766 ;; copy of this license in their headers, but there's no seprate file
1767 ;; with that information.
1768 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1771 (define-public procmail
1779 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1784 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1785 ;; The following patch fixes an ambiguous definition of
1786 ;; getline() in formail.c. The patch is provided by Debian as
1788 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1789 "procmail-CVE-2014-3618.patch"
1790 "procmail-CVE-2017-16844.patch"))))
1792 `(#:phases (modify-phases %standard-phases
1795 (substitute* "Makefile"
1799 (assoc-ref %outputs "out"))
1803 #:tests? #f)) ;; There are no tests indicating a successful
1804 ;; build. Some tests of basic locking mechanisms provided by the
1805 ;; file system are performed during 'make install'. However, these
1806 ;; are performed before the actual build process.
1807 (build-system gnu-build-system)
1808 (inputs `(("exim" ,exim)))
1809 (home-page "http://www.procmail.org/")
1810 (synopsis "Versatile mail delivery agent (MDA)")
1811 (description "Procmail is a mail delivery agent (MDA) featuring support
1812 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1813 can be sorted into separate files/directories and arbitrary commands can be
1814 executed on mail arrival. Procmail is considered stable, but is no longer
1816 (license gpl2+))) ;; procmail allows to choose the
1817 ;; nonfree Artistic License 1.0
1818 ;; as alternative to the GPL2+.
1819 ;; This option is not listed here.
1821 (define-public khard
1827 (uri (pypi-uri name version))
1830 "1lyjiskc6ckjjylzr04dnm66p3cnn7vlysw9c27qls3y3ywx14zw"))))
1831 (build-system python-build-system)
1834 (modify-phases %standard-phases
1835 (add-after 'install 'install-doc
1836 (lambda* (#:key outputs #:allow-other-keys)
1837 (let* ((out (assoc-ref outputs "out"))
1838 (doc (string-append out "/share/doc/khard")))
1839 (copy-recursively "misc/khard" doc)
1842 `(("python-atomicwrites" ,python-atomicwrites)
1843 ("python-configobj" ,python-configobj)
1844 ("python-pyyaml" ,python-pyyaml)
1845 ("python-ruamel.yaml" ,python-ruamel.yaml)
1846 ("python-unidecode" ,python-unidecode)
1847 ("python-vobject" ,python-vobject)))
1848 (synopsis "Console address book using CardDAV")
1849 (description "Khard is an address book for the console. It creates, reads,
1850 modifies and removes CardDAV address book entries at your local machine. For
1851 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1852 Khard can also be used from within the email client @command{mutt}.")
1853 (home-page "https://github.com/scheibler/khard")
1856 (define-public perl-mail-spf
1858 (name "perl-mail-spf")
1864 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
1868 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1869 (build-system perl-build-system)
1871 `(("perl-module-build" ,perl-module-build)
1872 ("perl-net-dns-resolver-programmable"
1873 ,perl-net-dns-resolver-programmable)))
1876 (modify-phases %standard-phases
1877 (add-before 'configure 'modify-Build.PL
1878 (lambda* (#:key outputs #:allow-other-keys)
1879 (substitute* "Build.PL"
1880 (("'/usr/sbin'") (string-append "'"
1881 (assoc-ref outputs "out")
1885 `(("perl-error" ,perl-error)
1886 ("perl-net-dns" ,perl-net-dns)
1887 ("perl-netaddr-ip" ,perl-netaddr-ip)
1888 ("perl-uri" ,perl-uri)))
1889 (home-page "https://metacpan.org/release/Mail-SPF")
1890 (synopsis "Perl implementation of Sender Policy Framework")
1891 (description "Mail::SPF is the Sender Policy Framework implemented
1895 (define-public perl-mail-authenticationresults
1897 (name "perl-mail-authenticationresults")
1898 (version "1.20180923")
1902 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
1903 "Mail-AuthenticationResults-" version ".tar.gz"))
1906 "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
1907 (build-system perl-build-system)
1909 `(("perl-test-exception" ,perl-test-exception)))
1910 (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
1911 (synopsis "Object Oriented Authentication-Results Headers")
1912 (description "Mail::AuthenticationResults parses the message header field
1913 that indicates the message authentication status as per RFC7601. This module
1914 is not fully compliant with the RFC but it tries to implement most styles of
1915 Authentication-Results header seen in the wild.")
1916 (license perl-license)))
1918 (define-public perl-mail-dkim
1920 (name "perl-mail-dkim")
1925 "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
1930 "18nsh1ff6fkns4xk3y2ixmzmadgggydj11qkzj6nlnq2hzqxsafz"))))
1931 (build-system perl-build-system)
1933 `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
1934 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
1935 ("perl-mailtools" ,perl-mailtools)
1936 ("perl-net-dns" ,perl-net-dns)))
1938 `(("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
1939 ("perl-test-requiresinternet" ,perl-test-requiresinternet)
1940 ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
1941 (home-page "https://metacpan.org/release/Mail-DKIM")
1942 (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
1943 (description "Mail::DKIM is a Perl module that implements the new Domain
1944 Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
1945 both of which sign and verify emails using digital signatures and DNS records.
1946 Mail-DKIM can be used by any Perl program that wants to provide support for
1947 DKIM and/or DomainKeys.")
1950 (define-public dkimproxy
1957 "mirror://sourceforge/dkimproxy/dkimproxy/"
1958 version "/dkimproxy-" version ".tar.gz"))
1961 "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
1963 (search-patches "dkimproxy-add-ipv6-support.patch"))))
1964 (build-system gnu-build-system)
1967 (modify-phases %standard-phases
1968 (add-after 'install 'make-wrapper
1969 (lambda* (#:key inputs outputs #:allow-other-keys)
1970 (let* ((out (assoc-ref outputs "out"))
1971 (wrap.pl (lambda (scripts keys)
1974 (wrap-program (string-append out script)
1975 `("PERL5LIB" ":" prefix
1978 (assoc-ref inputs input)
1979 "/lib/perl5/site_perl"))
1982 (wrap.pl (list "/bin/dkimproxy.in"
1983 "/bin/dkimproxy.out")
1984 (list "perl-crypt-openssl-rsa"
1985 "perl-io-socket-inet6"
1987 "perl-mail-authenticationresults"
1992 (wrap.pl (list "/bin/dkim_responder.pl")
1993 (list "perl-crypt-openssl-rsa"
2002 ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2003 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2004 ("perl-mailtools" ,perl-mailtools)
2005 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2006 ("perl-mail-dkim" ,perl-mail-dkim)
2007 ("perl-mime-tools" ,perl-mime-tools)
2008 ("perl-net-dns" ,perl-net-dns)
2009 ("perl-net-server" ,perl-net-server)
2010 ("perl-socket6" ,perl-socket6)
2011 ("perl-timedate" ,perl-timedate)))
2012 (home-page "http://dkimproxy.sourceforge.net/")
2013 (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
2015 "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
2016 @code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
2017 proxy for signing outgoing email, and an inbound proxy for verifying signatures
2018 of incoming messages.
2020 It was designed for Postfix, but can be used to add DKIM support to nearly any
2021 existing mail server. With Postfix, the proxies can operate as either
2022 @code{Before-Queue} or @code{After-Queue} content filters.")
2025 (define-public mb2md
2032 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
2036 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
2037 (build-system trivial-build-system)
2039 '(#:modules ((guix build utils))
2042 (use-modules (guix build utils))
2043 (let* ((source (assoc-ref %build-inputs "source"))
2044 (out (assoc-ref %outputs "out"))
2045 (bin (string-append out "/bin"))
2046 (perl (assoc-ref %build-inputs "perl"))
2047 (gzip (assoc-ref %build-inputs "gzip"))
2048 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
2049 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
2051 (with-directory-excursion bin
2052 (copy-file source "mb2md.gz")
2053 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
2054 (substitute* "mb2md"
2055 (("#!/usr/bin/perl")
2056 (string-append "#!/usr/bin/perl -I " perl5lib)))
2057 (patch-shebang "mb2md" (list (string-append perl "/bin")))
2058 (chmod "mb2md" #o555))
2060 (native-inputs `(("gzip" ,gzip)))
2061 (inputs `(("perl" ,perl)
2062 ("perl-timedate" ,perl-timedate)))
2063 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
2064 (synopsis "Mbox to maildir converter")
2066 "Mb2md is a Perl script that takes one or more mbox format files and
2067 converts them to maildir format directories.")
2068 (license public-domain)))
2077 (uri (string-append "https://marlam.de/mpop/releases/"
2078 "mpop-" version ".tar.xz"))
2080 (base32 "1m6743j8g777lijvxqw2wz6pv2g5a9wlh6zq7awk0hvd44xp4sav"))))
2081 (build-system gnu-build-system)
2083 `(("gnutls" ,gnutls)
2084 ("libidn" ,libidn)))
2086 `(("pkg-config" ,pkg-config)))
2087 (home-page "https://marlam.de/mpop/")
2088 (synopsis "POP3 mail client")
2089 (description "mpop is a small and fast POP3 client suitable as a
2090 fetchmail replacement.
2092 mpop supports multiple accounts, header based mail filtering, delivery
2093 to mbox files, maildir folders or a Mail Delivery Agent (MDA),
2094 TLS/SSL, several authentication methods, Internationalized Domain
2095 Names (IDN) and SOCKS proxies.")
2098 (define-public mhonarc
2105 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
2109 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
2110 (build-system perl-build-system)
2111 (home-page "https://www.mhonarc.org/")
2112 (synopsis "Create HTML archives of mail/news messages")
2114 "MHonArc is a Perl mail-to-HTML converter. MHonArc
2115 provides HTML mail archiving with index, mail thread linking,
2116 etc; plus other capabilities including support for MIME and
2117 powerful user customization features.")
2121 (define-public sendmail
2129 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
2133 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
2134 (build-system gnu-build-system)
2137 (modify-phases %standard-phases
2138 (add-before 'build 'replace-/bin/sh
2142 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2143 "contrib/mmuegel" "devtools/bin/configure.sh")
2144 (find-files "." ".*\\.m4")
2145 (find-files "." ".*\\.cf"))
2146 (("/bin/sh") (which "sh")))
2148 (substitute* "devtools/bin/Build"
2149 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
2154 ;; Render harmless any attempts to chown or chgrp
2155 (substitute* "devtools/bin/install.sh"
2156 (("owner=\\$2") "owner=''")
2157 (("group=\\$2") "group=''"))
2159 (with-output-to-file "devtools/Site/site.config.m4"
2162 define(`confCC', `gcc')
2163 define(`confOPTIMIZE', `-g -O2')
2164 define(`confLIBS', `-lresolv')
2165 define(`confINSTALL', `~a/devtools/bin/install.sh')
2166 define(`confDEPEND_TYPE', `CC-M')
2167 define(`confINST_DEP', `')
2172 (invoke "sh" "Build")
2173 (with-directory-excursion "cf/cf"
2174 (copy-file "generic-linux.mc" "sendmail.mc")
2175 (invoke "sh" "Build" "sendmail.cf"))
2177 (add-before 'install 'pre-install
2179 (let ((out (assoc-ref %outputs "out")))
2180 (mkdir-p (string-append out "/usr/bin"))
2181 (mkdir-p (string-append out "/usr/sbin"))
2182 (mkdir-p (string-append out "/etc/mail"))
2183 (setenv "DESTDIR" out)
2184 (with-directory-excursion "cf/cf"
2185 (invoke "sh" "Build" "install-cf"))
2187 ;; There is no make check. There are some post installation tests, but those
2188 ;; require root privileges
2193 (home-page "http://sendmail.org")
2195 "Highly configurable Mail Transfer Agent (MTA)")
2197 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2198 Allman. It is highly configurable and supports many delivery methods and many
2199 transfer protocols.")
2200 (license (non-copyleft "file://LICENSE"
2201 "See LICENSE in the distribution."))))
2203 (define-public opensmtpd
2209 (uri (string-append "https://www.opensmtpd.org/archives/"
2210 name "-" version ".tar.gz"))
2213 "10bsfsnlg9d9i6l2izdnxp05s3ri8fvwzqxvx1jmarc852382619"))
2214 ;; Fixed upstream: <github.com/OpenSMTPD/OpenSMTPD/pull/835>.
2215 (patches (search-patches "opensmtpd-fix-crash.patch"))))
2216 (build-system gnu-build-system)
2219 ("libressl" ,libressl)
2220 ("libevent" ,libevent)
2222 ("linux-pam" ,linux-pam)
2229 (list "--with-table-db" "--with-auth-pam" "--localstatedir=/var"
2230 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
2231 "--with-group-queue=smtpq"
2232 "--with-path-socket=/var/run" ; not default (./configure lies)
2233 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
2235 (modify-phases %standard-phases
2236 ;; Fix some incorrectly hard-coded external tool file names.
2237 (add-after 'unpack 'patch-FHS-file-names
2239 (substitute* "smtpd/smtpctl.c"
2240 (("/bin/cat") (which "cat"))
2241 (("/bin/sh") (which "sh")))
2243 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
2244 ;; the local submission subsystem. To accomodate systems that require
2245 ;; historical interfaces such as sendmail, newaliases or makemap, the
2246 ;; smtpctl utility can operate in compatibility mode if called with the
2248 (add-after 'install 'install-compability-links
2249 (lambda* (#:key outputs #:allow-other-keys)
2250 (let* ((out (assoc-ref outputs "out"))
2251 (sbin (string-append out "/sbin/")))
2252 (for-each (lambda (command)
2253 (symlink "smtpctl" (string-append sbin command)))
2254 '("makemap" "sendmail" "send-mail"
2255 "newaliases" "mailq")))
2257 (synopsis "Lightweight SMTP daemon")
2259 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
2260 some additional standard extensions. It allows ordinary machines to exchange
2261 e-mails with other systems speaking the SMTP protocol.")
2262 (home-page "https://www.opensmtpd.org")
2263 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2264 public-domain isc license:openssl))))
2266 ;; OpenSMTPd 6.4 introduced a new and incompatible configuration file format.
2267 ;; Use a different name, for now, to avoid auto-upgrades and broken mail boxes.
2268 ;; OPENSMTP-CONFIGURATION in (gnu services mail) will also need an overhaul.
2269 (define-public opensmtpd-next
2271 (name "opensmtpd-next")
2276 (uri (string-append "https://www.opensmtpd.org/archives/"
2277 "opensmtpd-" version ".tar.gz"))
2279 (base32 "0pgv080ai7d98l9340jadp9wjiaqj2qvgpqhilcz0kps2mdiawbd"))))
2280 (build-system gnu-build-system)
2284 ("libevent" ,libevent)
2285 ("libressl" ,libressl)
2286 ("linux-pam" ,linux-pam)
2290 ("groff" ,groff))) ; for man pages
2293 (list "--localstatedir=/var"
2294 ;; This is the default only if it exists at build time—it doesn't.
2295 "--with-path-socket=/var/run"
2296 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2297 "--with-user-smtpd=smtpd"
2298 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2302 (modify-phases %standard-phases
2303 ;; Fix some incorrectly hard-coded external tool file names.
2304 (add-after 'unpack 'patch-FHS-file-names
2306 (substitute* "smtpd/smtpctl.c"
2307 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
2308 (("/bin/cat") (which "cat")))
2309 (substitute* "smtpd/mda_unpriv.c"
2310 (("/bin/sh") (which "sh")))
2312 ;; OpenSMTPD provides a single smtpctl utility to control both the
2313 ;; daemon and the local submission subsystem. To accomodate systems
2314 ;; that require historical interfaces such as sendmail, newaliases or
2315 ;; makemap, smtpctl operates in compatibility mode if called with the
2317 (add-after 'install 'install-compability-links
2318 (lambda* (#:key outputs #:allow-other-keys)
2319 (let* ((out (assoc-ref outputs "out"))
2320 (sbin (string-append out "/sbin/")))
2321 (for-each (lambda (command)
2322 (symlink "smtpctl" (string-append sbin command)))
2323 (list "mailq" "makemap" "newaliases"
2324 "send-mail" "sendmail")))
2326 (synopsis "Lightweight SMTP daemon")
2328 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
2329 Transfer Protocol}, with some additional standard extensions. It allows
2330 ordinary machines to exchange e-mails with other systems speaking the SMTP
2331 protocol, or to deliver them to local users.
2333 In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
2334 functionality than those available in other SMTP daemons. The objective is to
2335 provide enough features to satisfy typical usage at the risk of unsuitability
2336 to esoteric or niche requirements.")
2337 (home-page "https://www.opensmtpd.org")
2338 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2339 public-domain isc license:openssl))))
2341 (define-public opensmtpd-extras
2343 (name "opensmtpd-extras")
2347 (uri (string-append "https://www.opensmtpd.org/archives/"
2348 name "-" version ".tar.gz"))
2351 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
2352 (build-system gnu-build-system)
2354 `(("libressl" ,libressl)
2355 ("libevent" ,libevent)
2357 ("python-2" ,python-2)
2358 ("opensmtpd" ,opensmtpd)
2361 ("postgresql" ,postgresql)
2363 ("linux-pam" ,linux-pam)))
2366 ("pkg-config" ,pkg-config)
2368 ("automake" ,automake)
2369 ("autoconf" ,autoconf)))
2371 `(;; We have to configure it like this because the default checks for for example
2372 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2373 #:configure-flags (list
2374 "--with-filter-clamav" "--with-filter-dkim-signer"
2375 "--with-filter-dnsbl" "--with-filter-lua"
2376 "--with-filter-monkey" "--with-filter-pause"
2377 "--with-filter-perl" "--with-filter-python"
2378 "--with-filter-regex" "--with-filter-spamassassin"
2379 "--with-filter-stub" "--with-filter-trace"
2380 "--with-filter-void"
2382 "--with-queue-null" "--with-queue-python"
2383 "--with-queue-ram" "--with-queue-stub"
2385 "--with-scheduler-python" "--with-scheduler-ram"
2386 "--with-scheduler-stub"
2388 "--with-table-ldap" ; "--with-table-mysql"
2389 "--with-table-passwd" "--with-table-postgres"
2390 "--with-table-python" "--with-table-socketmap"
2391 "--with-table-sqlite" "--with-table-stub"
2392 ;;"--with-table-redis" ; TODO: package hiredis
2394 "--with-user=smtpd" "--with-privsep-user=smtpd"
2395 "--localstatedir=/var" "--sysconfdir=/etc"
2396 "--with-lua-type=lua" ; can use lua or luajit
2398 (string-append "--with-python="
2399 (assoc-ref %build-inputs "python-2"))
2400 (string-append "--with-lua="
2401 (assoc-ref %build-inputs "lua")))))
2402 (license (list bsd-2 bsd-3 bsd-4
2403 public-domain isc license:openssl))
2404 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2406 "This package provides extra tables, filters, and various other addons
2407 for OpenSMTPD to extend its functionality.")
2408 (home-page "https://www.opensmtpd.org")))
2410 (define-public python-mailmanclient
2412 (name "python-mailmanclient")
2417 (uri (pypi-uri "mailmanclient" version))
2420 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
2421 (build-system python-build-system)
2423 `(#:tests? #f)) ; Requires mailman running
2425 `(("python-six" ,python-six)
2426 ("python-httplib2" ,python-httplib2)))
2427 (home-page "https://launchpad.net/mailman.client")
2428 (synopsis "Python bindings for the Mailman 3 REST API")
2430 "The mailmanclient library provides official Python bindings for
2431 the GNU Mailman 3 REST API.")
2434 (define-public python2-mailmanclient
2435 (package-with-python2 python-mailmanclient))
2437 (define-public mlmmj
2444 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2445 version ".tar.bz2"))
2448 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
2449 (build-system gnu-build-system)
2451 `(("perl" ,perl))) ; For "contrib/web/"
2453 `(("pkg-config" ,pkg-config)))
2456 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2457 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2458 ;; of mimetypes for parts of multipart/mime messages that should be denied
2459 ;; or stripped. The parts then get stripped directly when the mail is
2460 ;; received. mlmmj-receive-strip also appends an extra header
2461 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2463 (list "--enable-receive-strip")
2465 (modify-phases %standard-phases
2466 (add-before 'install 'install-contrib
2467 (lambda* (#:key outputs #:allow-other-keys)
2468 (let* ((out (assoc-ref outputs "out"))
2469 (share (string-append out "/share/mlmmj"))
2470 (contrib (string-append share "/contrib/web"))
2471 (texts (string-append share "/listtexts")))
2472 (copy-recursively "contrib/web/" contrib)
2473 (copy-recursively "listtexts" texts)
2474 (rename-file texts (string-append share "/texts"))
2476 (home-page "http://mlmmj.org")
2477 (synopsis "Mailing list managing made joyful")
2479 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2480 It works with many different Mail Transport Agents (MTAs) and is simple for a
2481 system administrator to install, configure and integrate with other software.
2482 As it uses very few resources, and requires no daemons, it is ideal for
2483 installation on systems where resources are limited. Its features include:
2485 @item Archive, Custom headers / footer,
2486 @item Fully automated bounce handling (similar to ezmlm),
2487 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
2488 @item Subscribers only posting, Regular expression access control,
2489 @item Functionality to retrieve old posts, Web interface, Digests,
2490 @item No-mail subscription, VERP support,
2491 @item Delivery Status Notification (RFC1891) support,
2492 @item Rich and customisable texts for automated operations.
2494 (license license:expat)))
2496 (define-public python2-django-mailman3
2498 (name "python2-django-mailman3")
2503 (uri (pypi-uri "django-mailman3" version))
2506 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
2507 (build-system python-build-system)
2510 (modify-phases %standard-phases
2513 (invoke "django-admin"
2515 "--settings=django_mailman3.tests.settings_test"
2516 "django_mailman3"))))
2517 #:python ,python-2))
2519 `(("python2-django" ,python2-django)))
2521 `(("python2-requests" ,python2-requests)
2522 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2523 ("python2-openid" ,python2-openid)
2524 ("python2-mailmanclient" ,python2-mailmanclient)
2525 ("python2-django-allauth" ,python2-django-allauth)
2526 ("python2-django-gravatar2" ,python2-django-gravatar2)
2527 ("python2-pytz" ,python2-pytz)))
2528 (home-page "https://gitlab.com/mailman/django-mailman3")
2529 (synopsis "Django library for Mailman UIs")
2531 "Libraries and templates for Django-based interfaces
2532 interacting with Mailman.")
2535 (define-public postorius
2542 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2543 (file-name (string-append name "-" version ".tar.gz"))
2546 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2547 (build-system python-build-system)
2549 `(; One test dependency relies on Persona, which was shut down in
2552 ;; The part of the frontend of Mailman is still python 2.7.
2553 #:python ,python-2))
2555 `(("python2-django" ,python2-django)
2556 ("python2-django-mailman3" ,python2-django-mailman3)
2557 ("python2-mailmanclient" ,python2-mailmanclient)))
2558 (home-page "https://gitlab.com/mailman/postorius")
2559 (synopsis "Web user interface for GNU Mailman")
2561 "Postorius is a Django app which provides a web user interface
2562 to access GNU Mailman.")
2563 (license (list gpl3+ lgpl3+))))
2565 (define-public blists
2572 (uri (string-append "http://download.openwall.net/pub/projects/"
2573 "blists/blists-" version ".tar.gz"))
2576 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
2577 (build-system gnu-build-system)
2579 `(#:tests? #f ; No tests
2581 (modify-phases %standard-phases
2584 (lambda* (#:key outputs #:allow-other-keys)
2585 (let* ((out (assoc-ref outputs "out"))
2586 (bin (string-append out "/bin")))
2587 (install-file "bindex" bin)
2588 (install-file "bit" bin)
2590 (home-page "http://www.openwall.com/blists/")
2591 (synopsis "Web interface to mailing list archives")
2593 "Blists is a web interface to mailing list archives that works off
2594 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2595 @code{bindex} generates or updates the index file (incremental updates
2596 are supported). @code{bit} is a CGI/SSI program that generates web pages
2597 on the fly. Both programs are written in C and are very fast.")
2598 (license license:expat)))
2600 (define-public swaks
2603 (version "20181104.0")
2608 "https://jetmore.org/john/code/swaks/files/swaks-"
2612 "0n1yd27xcyb1ylp5gln3yv5gzi9r377hjy1j32367kgb3247ygq2"))))
2613 (build-system perl-build-system)
2615 `(("perl-net-dns" ,perl-net-dns)
2616 ("perl-net-ssleay" ,perl-net-ssleay)))
2618 `(#:tests? #f ; No tests
2620 (modify-phases %standard-phases
2624 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
2626 (lambda* (#:key outputs #:allow-other-keys)
2627 (let ((out (assoc-ref outputs "out")))
2628 (install-file "swaks" (string-append out "/bin"))
2629 (install-file "swaks.1" (string-append out "/share/man/man1")))
2631 (add-after 'install 'wrap-program
2632 (lambda* (#:key outputs #:allow-other-keys)
2633 (wrap-program (string-append (assoc-ref outputs "out")
2635 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2637 (home-page "https://jetmore.org/john/code/swaks/")
2638 (synopsis "Featureful SMTP test tool")
2639 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2640 test tool. It handles SMTP features and extensions such as TLS,
2641 authentication, and pipelining; multiple versions of the SMTP protocol
2642 including SMTP, ESMTP, and LMTP; and multiple transport methods including
2643 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2644 Options can be specified in environment variables, configuration files, and
2645 the command line allowing maximum configurability and ease of use for
2646 operators and scripters.")
2649 (define-public alpine
2652 ;; Upstream doesn't use git tags, but does ‘tag’ their releases in the
2653 ;; commit message. Hence the lack of GIT-VERSIONing despite using a commit
2654 ;; ID below. Don't forget to update it…
2655 (version "2.21.99999")
2659 ;; There are two versions: the plain continuation of Alpine without extra
2660 ;; patches and the version which adds extra fixes. Every distro uses
2661 ;; the patched version, and so do we to not break expectations.
2662 ;; http://alpine.freeiz.com/alpine/readme/README.patches
2664 (url "http://repo.or.cz/alpine.git")
2665 (commit "abeb2c25935ef8c75f1e5deef0f81276754dc975")))
2666 (file-name (git-file-name name version))
2668 (base32 "0rqgbw08a5lj41dkp82aq480lqkc4bnxagna7wpqffi821n8gkwz"))))
2669 (build-system gnu-build-system)
2671 `(#:make-flags (list "CC=gcc")
2672 #:configure-flags (list (string-append "--with-ssl-include-dir="
2673 (assoc-ref %build-inputs "openssl")
2675 (string-append "--with-ssl-dir="
2676 (assoc-ref %build-inputs "openssl"))
2677 (string-append "--with-ssl-certs-dir="
2679 (string-append "--with-ssl-lib-dir="
2680 (assoc-ref %build-inputs "openssl")
2682 (string-append "--with-interactive-spellcheck="
2683 (assoc-ref %build-inputs "aspell")
2685 "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
2687 (modify-phases %standard-phases
2688 (add-after 'unpack 'make-reproducible
2690 ;; This removes time-dependent code to make alpine reproducible.
2691 (substitute* "pico/blddate.c"
2692 (("%02d-%s-%d") "1970-01-01"))
2695 `(("ncurses" ,ncurses)
2696 ("openssl" ,openssl)
2698 ("openldap" ,openldap)
2699 ("cyrus-sasl" ,cyrus-sasl)
2700 ("mit-krb5" ,mit-krb5)
2703 ("linux-pam" ,linux-pam)))
2704 (home-page "https://repo.or.cz/alpine.git")
2705 (synopsis "Alternatively Licensed Program for Internet News and Email")
2707 "Alpine is a text-based mail and news client. Alpine includes several
2708 tools and applications:
2710 @item alpine, the Alpine mailer
2711 @item pico, the standalone text editor, GNU nano's predecessor
2712 @item pilot, the standalone file system navigator
2716 (define-public balsa
2723 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
2724 name "-" version ".tar.bz2"))
2726 (base32 "0yfqhfpwm1qnwmbpr6dfn2f5w8a8xxq51pn8ypgg0fw973l1c1nx"))))
2727 (build-system gnu-build-system)
2730 '(;; Balsa tries to install additional MIME icons
2731 ;; under gtk+ directory.
2732 "--enable-extra-mimeicons=no"
2733 "--with-gtksourceview"
2735 "--with-spell-checker=gtkspell"
2741 `(("cyrus-sasl" ,cyrus-sasl)
2742 ("enchant" ,enchant)
2743 ("gdk-pixbuf" ,gdk-pixbuf)
2744 ("gmime" ,gmime-2.6)
2748 ("gtksourceview" ,gtksourceview-3)
2749 ("gtkspell3" ,gtkspell3)
2750 ("libcanberra" ,libcanberra)
2751 ("libesmtp" ,libesmtp)
2752 ("libnotify" ,libnotify)
2753 ("openldap" ,openldap)
2755 ("webkitgtk" ,webkitgtk)))
2757 `(("compface" ,compface)
2758 ("glib" ,glib "bin")
2759 ("intltool" ,intltool)
2760 ("pkg-config" ,pkg-config)
2761 ("yelp-tools" ,yelp-tools)))
2762 (home-page "https://pawsa.fedorapeople.org/balsa")
2763 (synopsis "E-mail client for GNOME")
2764 (description "Balsa is a highly configurable and robust mail client for
2765 the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2766 mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
2767 the use of a local MTA such as Sendmail.")
2777 (uri (pypi-uri "afew" version))
2780 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
2781 (build-system python-build-system)
2783 `(("python-chardet" ,python-chardet)
2784 ("python-notmuch" ,python-notmuch)))
2786 `(("python-setuptools-scm" ,python-setuptools-scm)))
2787 (home-page "https://github.com/afewmail/afew")
2788 (synopsis "Initial tagging script for notmuch mail")
2789 (description "afew is an initial tagging script for notmuch mail. It
2790 provides automatic tagging each time new mail is registered with notmuch. It
2791 can add tags based on email headers or Maildir folders and can handle spam and
2802 (uri (string-append "http://pan.rebelbase.com/download/releases/"
2803 version "/source/" name "-" version ".tar.bz2"))
2806 "1b4wamv33hprghcjk903bpvnd233yxyrm18qnh13alc8h1553nk8"))))
2808 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
2809 "--enable-libnotify" "--enable-manual"
2812 (modify-phases %standard-phases
2813 (add-before 'configure 'patch-gpg2
2814 (lambda* (#:key inputs #:allow-other-keys)
2815 (substitute* "pan/usenet-utils/gpg.cc"
2816 (("\"gpg2\"") (string-append "\""
2817 (assoc-ref inputs "gnupg")
2821 `(("gmime" ,gmime-2.6)
2825 ("gtkspell3" ,gtkspell3)
2826 ("libnotify" ,libnotify)
2827 ("libsecret" ,libsecret)
2828 ("libxml2" ,libxml2)
2831 `(("gettext-minimal" ,gettext-minimal)
2832 ("itstool" ,itstool)
2833 ("pkg-config" ,pkg-config)))
2834 (build-system gnu-build-system)
2835 (home-page "http://pan.rebelbase.com/")
2836 (synopsis "Pan newsreader")
2837 (description "@code{pan} is a Usenet newsreader that's good at both text
2838 and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
2839 PGP handling, multiple servers, and secure connections.")
2840 ;; License of the docs: fdl-1.1; Others: gpl2.
2841 (license (list fdl1.1+ gpl2))))
2843 (define-public imapfilter
2851 (url "https://github.com/lefcha/imapfilter.git")
2852 (commit (string-append "v" version))))
2853 (file-name (git-file-name name version))
2855 (base32 "0vzpc54fjf5vb5vx5w0fl20xvx1k9cg6a3hbl86mm8kwsqf3wrab"))))
2856 (build-system gnu-build-system)
2860 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2863 (modify-phases %standard-phases
2865 (add-after 'unpack 'fix-include-path
2866 (lambda* (#:key inputs #:allow-other-keys)
2867 (let ((pcre (assoc-ref inputs "pcre")))
2868 (substitute* "src/Makefile"
2870 (string-append "INCDIRS ="
2871 "-I" pcre "/include")))
2876 ("openssl" ,openssl)))
2877 (home-page "https://github.com/lefcha/imapfilter")
2878 (synopsis "IMAP mail filtering utility")
2879 (description "IMAPFilter is a mail filtering utility. It connects
2880 to remote mail servers using IMAP, sends searching queries to the server and
2881 processes mailboxes based on the results. It can be used to delete, copy,
2882 move, flag, etc. messages residing in mailboxes at the same or different mail
2883 servers. The 4rev1 and 4 versions of IMAP are supported.")
2884 (license license:expat)))
2886 (define-public urlscan
2893 (uri (pypi-uri "urlscan" version))
2896 "1zldck7vnp7z04aacbx3cprf5kzha4gfhjmss4iv2lh5nccxjfzx"))))
2897 (build-system python-build-system)
2899 `(("python-urwid" ,python-urwid)))
2900 (home-page "https://github.com/firecat53/urlscan")
2901 (synopsis "View/select the URLs in an email message or file")
2903 "Urlscan is a small program that is designed to integrate with the
2904 @code{mutt} mailreader to allow you to easily launch a Web browser for URLs
2905 contained in email messages. It parses an email message or file and scans it
2906 for URLs and email addresses. It then displays the URLs and their context
2907 within the message, and allows you to choose one or more URLs to send to your
2908 Web browser. Alternatively, it send a list of all URLs to stdout. It is a
2909 replacement for the @code{urlview} program.")
2920 (url "https://github.com/verdammelt/tnef.git")
2924 "0cq2xh5wd74qn6k2nnw5rayxgqhjl3jbzf4zlc4babcwxrv32ldh"))
2925 (file-name (git-file-name name version))))
2926 (build-system gnu-build-system)
2928 `(("autoconf" ,autoconf)
2929 ("automake" ,automake)))
2930 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
2931 (home-page "https://github.com/verdammelt/tnef")
2932 (synopsis "Unpack @code{application/ms-tnef} attachments")
2934 "TNEF is a tar-like program that unpacks MIME attachments of type
2935 @code{application/ms-tnef}.")
2939 (let ((commit "ea0a28f8d5db5761765eb60043b8593901552e25")
2943 (version (git-version "0.0.0" revision commit))
2947 (url "https://git.elephly.net/software/mumi.git")
2949 (file-name (git-file-name name version))
2952 "0b6dmi41vhssyf983blgi8a2kj3zjccc9cz7b7kvwh781ldqcywh"))))
2953 (build-system gnu-build-system)
2956 (modify-phases %standard-phases
2957 (add-after 'install 'wrap-executable
2958 (lambda* (#:key outputs #:allow-other-keys)
2959 (let* ((out (assoc-ref outputs "out"))
2960 (bin (string-append out "/bin"))
2961 (scm (string-append out "/share/guile/site/2.2"))
2962 (go (string-append out "/lib/guile/2.2/site-ccache")))
2963 (wrap-program (string-append bin "/mumi")
2964 `("GUILE_LOAD_PATH" ":" prefix
2965 (,scm ,(getenv "GUILE_LOAD_PATH")))
2966 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2967 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
2970 `(("guile-debbugs" ,guile-debbugs-next)
2971 ("guile-email" ,guile-email)
2972 ("guile-fibers" ,guile-fibers)
2973 ("guile-json" ,guile-json-1)
2974 ("guile-syntax-highlight" ,guile-syntax-highlight)
2975 ("guile" ,guile-2.2)))
2977 `(("autoconf" ,autoconf)
2978 ("automake" ,automake)
2979 ("pkg-config" ,pkg-config)))
2980 (home-page "https://git.elephly.net/software/mumi.git")
2981 (synopsis "Debbugs web interface")
2982 (description "Mumi is a Debbugs web interface.")
2985 (define-public ytnef
2992 (url "https://github.com/Yeraze/ytnef.git")
2993 (commit (string-append "v" version))))
2994 (file-name (git-file-name name version))
2997 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))))
2998 (build-system gnu-build-system)
3000 `(("autoconf" ,autoconf)
3001 ("automake" ,automake)
3002 ("libtool" ,libtool)))
3003 (home-page "https://github.com/Yeraze/ytnef/")
3004 (synopsis "TNEF stream reader for winmail.dat files")
3005 (description "This package provides a TNEF stream reader library and
3006 related tools to process winmail.dat files.")
3009 (define-public public-inbox
3010 (let ((commit "3cf66514aea9e958999973b9f104473b6d800fbe")
3013 (name "public-inbox")
3014 (version (git-version "1.0.0" revision commit))
3016 (origin (method git-fetch)
3018 (url "https://public-inbox.org")
3022 "1sxycwlm2n6p544gn9f0vf3xs6gz8vdswdhs2ha6fka8mgabvmdh"))
3023 (file-name (git-file-name name version))))
3024 (build-system perl-build-system)
3027 (modify-phases %standard-phases
3028 (add-before 'configure 'qualify-paths
3030 ;; Use absolute paths for 'xapian-compact'.
3031 (let ((xapian-compact (which "xapian-compact")))
3032 (substitute* "script/public-inbox-compact"
3033 (("xapian-compact") xapian-compact)))
3035 (add-before 'check 'pre-check
3037 (substitute* "t/spawn.t"
3038 (("\\['env'\\]") (string-append "['" (which "env") "']")))
3040 (add-after 'install 'wrap-programs
3041 (lambda* (#:key inputs outputs #:allow-other-keys)
3042 (let ((out (assoc-ref outputs "out")))
3046 ;; Let those scripts find their perl modules.
3047 `("PERL5LIB" ":" prefix
3048 (,(string-append out "/lib/perl5/site_perl")
3049 ,(getenv "PERL5LIB")))
3050 ;; 'git' is invoked in various files of the PublicInbox
3053 (,(string-append (assoc-ref inputs "git") "/bin")))))
3054 (find-files (string-append out "/bin"))))
3058 ("xapian" ,xapian)))
3060 `(("perl-danga-socket" ,perl-danga-socket)
3061 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
3062 ("perl-dbi" ,perl-dbi)
3063 ("perl-email-address-xs" ,perl-email-address-xs)
3064 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
3065 ("perl-email-mime" ,perl-email-mime)
3066 ("perl-email-simple" ,perl-email-simple)
3067 ("perl-filesys-notify-simple" ,perl-filesys-notify-simple)
3068 ("perl-plack-middleware-deflater" ,perl-plack-middleware-deflater)
3069 ("perl-plack-middleware-reverseproxy" ,perl-plack-middleware-reverseproxy)
3070 ("perl-plack" ,perl-plack)
3071 ("perl-search-xapian" ,perl-search-xapian)
3072 ("perl-timedate" ,perl-timedate)
3073 ("perl-uri-escape" ,perl-uri-escape)
3075 ("perl-ipc-run" ,perl-ipc-run)
3076 ("perl-xml-feed" ,perl-xml-feed)))
3077 (home-page "https://public-inbox.org/README.html")
3078 (synopsis "Archive mailing lists in git repositories")
3080 "public-inbox implements the sharing of an email inbox via git to
3081 complement or replace traditional mailing lists. Readers may read via NNTP,
3082 Atom feeds or HTML archives.")