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 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
14 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
16 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
17 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
18 ;;; Copyright © 2016, 2017, 2018 ng0 <ng0@n0.is>
19 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20 ;;; Copyright © 2016, 2017, 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
21 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
22 ;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
23 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
24 ;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
25 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
26 ;;; Copyright © 2017, 2018 Rene Saavedra <pacoon@protonmail.com>
27 ;;; Copyright © 2018, 2019 Pierre Langlois <pierre.langlois@gmx.com>
28 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
29 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
30 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
31 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
33 ;;; This file is part of GNU Guix.
35 ;;; GNU Guix is free software; you can redistribute it and/or modify it
36 ;;; under the terms of the GNU General Public License as published by
37 ;;; the Free Software Foundation; either version 3 of the License, or (at
38 ;;; your option) any later version.
40 ;;; GNU Guix is distributed in the hope that it will be useful, but
41 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 ;;; GNU General Public License for more details.
45 ;;; You should have received a copy of the GNU General Public License
46 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
48 (define-module (gnu packages mail)
49 #:use-module (gnu packages)
50 #:use-module (gnu packages admin)
51 #:use-module (gnu packages aspell)
52 #:use-module (gnu packages autotools)
53 #:use-module (gnu packages backup)
54 #:use-module (gnu packages base)
55 #:use-module (gnu packages bash)
56 #:use-module (gnu packages bison)
57 #:use-module (gnu packages calendar)
58 #:use-module (gnu packages check)
59 #:use-module (gnu packages compression)
60 #:use-module (gnu packages crypto)
61 #:use-module (gnu packages curl)
62 #:use-module (gnu packages cyrus-sasl)
63 #:use-module (gnu packages databases)
64 #:use-module (gnu packages dbm)
65 #:use-module (gnu packages dejagnu)
66 #:use-module (gnu packages django)
67 #:use-module (gnu packages dns)
68 #:use-module (gnu packages docbook)
69 #:use-module (gnu packages documentation)
70 #:use-module (gnu packages emacs)
71 #:use-module (gnu packages enchant)
72 #:use-module (gnu packages gdb)
73 #:use-module (gnu packages gettext)
74 #:use-module (gnu packages ghostscript)
75 #:use-module (gnu packages glib)
76 #:use-module (gnu packages gnome)
77 #:use-module (gnu packages gnupg)
78 #:use-module (gnu packages groff)
79 #:use-module (gnu packages gsasl)
80 #:use-module (gnu packages gtk)
81 #:use-module (gnu packages guile)
82 #:use-module (gnu packages guile-xyz)
83 #:use-module (gnu packages flex)
84 #:use-module (gnu packages kerberos)
85 #:use-module (gnu packages libcanberra)
86 #:use-module (gnu packages libevent)
87 #:use-module (gnu packages libidn)
88 #:use-module (gnu packages libunistring)
89 #:use-module (gnu packages linux)
90 #:use-module (gnu packages lsof)
91 #:use-module (gnu packages lua)
92 #:use-module (gnu packages m4)
93 #:use-module (gnu packages man)
94 #:use-module (gnu packages ncurses)
95 #:use-module (gnu packages networking)
96 #:use-module (gnu packages openldap)
97 #:use-module (gnu packages onc-rpc)
98 #:use-module (gnu packages pcre)
99 #:use-module (gnu packages perl)
100 #:use-module (gnu packages perl-check)
101 #:use-module (gnu packages perl-web)
102 #:use-module (gnu packages pkg-config)
103 #:use-module (gnu packages python)
104 #:use-module (gnu packages python-web)
105 #:use-module (gnu packages python-xyz)
106 #:use-module (gnu packages readline)
107 #:use-module (gnu packages ruby)
108 #:use-module (gnu packages search)
109 #:use-module (gnu packages serialization)
110 #:use-module (gnu packages samba)
111 #:use-module (gnu packages screen)
112 #:use-module (gnu packages sphinx)
113 #:use-module (gnu packages sqlite)
114 #:use-module (gnu packages tcl)
115 #:use-module (gnu packages texinfo)
116 #:use-module (gnu packages time)
117 #:use-module (gnu packages tls)
118 #:use-module (gnu packages version-control)
119 #:use-module (gnu packages w3m)
120 #:use-module (gnu packages web)
121 #:use-module (gnu packages webkit)
122 #:use-module (gnu packages xdisorg)
123 #:use-module (gnu packages xorg)
124 #:use-module (gnu packages xml)
125 #:use-module ((guix licenses)
128 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
129 non-copyleft (expat . license:expat) bsd-3
130 public-domain bsd-4 isc (openssl . license:openssl)
131 bsd-2 x11-style agpl3 asl2.0 perl-license))
132 #:use-module (guix packages)
133 #:use-module (guix download)
134 #:use-module (guix git-download)
135 #:use-module (guix utils)
136 #:use-module (guix build-system gnu)
137 #:use-module (guix build-system guile)
138 #:use-module (guix build-system perl)
139 #:use-module (guix build-system python)
140 #:use-module (guix build-system trivial)
141 #:use-module (srfi srfi-1)
142 #:use-module (ice-9 match))
144 (define-public mailutils
150 (uri (string-append "mirror://gnu/mailutils/mailutils-"
154 "1wkn9ch664477r4d8jk9153w5msljsbj99907k7zgzpmywbs6ba7"))))
155 (build-system gnu-build-system)
158 (modify-phases %standard-phases
159 (add-before 'check 'prepare-test-suite
161 ;; Use the right file name for `cat'.
162 (substitute* "testsuite/lib/mailutils.exp"
166 ;; Tests try to invoke 'mda' such that it looks up the
167 ;; 'root' user, which does not exist in the build
169 (substitute* "mda/tests/testsuite"
170 (("root <") "nobody <")
171 (("spool/root") "spool/nobody")
172 (("root@localhost") "nobody@localhost"))
174 ;; The 'pipeact.at' tests generate a shell script; make
175 ;; sure it uses the right shell.
176 (substitute* '("sieve/tests/testsuite"
177 "mh/tests/testsuite")
179 (string-append "#!" (which "sh"))))
181 (substitute* "mh/tests/testsuite"
182 (("moreproc: /bin/cat")
183 (string-append "moreproc: " (which "cat"))))
185 ;; XXX: The comsatd tests rely on being able to open
186 ;; /dev/tty, but that gives ENODEV in the build
187 ;; environment. Thus, ignore test failures here.
188 (substitute* "comsat/tests/Makefile.in"
189 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
190 (string-append "-" all)))
192 ;; 'frm' tests expect write access to $HOME.
193 (setenv "HOME" (getcwd))
195 ;; Avoid the message "I'm going to create the standard MH path
196 ;; for you", which would lead to one test failure (when diffing
197 ;; stdout of 'fmtcheck'.)
198 (call-with-output-file ".mh_profile"
200 (format port "Path: ~a/Mail-for-tests~%"
204 ;; TODO: Add `--with-sql'.
206 (list "--sysconfdir=/etc"
208 ;; Add "/X.Y" to the installation directory.
209 (string-append "--with-guile-site-dir="
210 (assoc-ref %outputs "out")
212 ,(match (assoc "guile"
213 (package-inputs this-package))
216 (package-version guile))))))
218 #:parallel-tests? #f))
220 `(("perl" ,perl))) ;for 'gylwrap'
222 `(("dejagnu" ,dejagnu)
229 ("readline" ,readline)
230 ("linux-pam" ,linux-pam)
234 ;; Required for SEARCH CHARSET.
235 ("libiconv" ,libiconv)
236 ("libunistring" ,libunistring)))
237 (home-page "https://mailutils.org")
238 (synopsis "Utilities and library for reading and serving mail")
240 "GNU Mailutils is a collection of programs for managing, viewing and
241 processing electronic mail. It contains both utilities and server daemons
242 and all operate in a protocol-agnostic way. The underlying libraries are
243 also available, simplifying the addition of mail capabilities to new
246 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
247 (list gpl3+ lgpl3+))))
249 (define-public guile3.0-mailutils
252 (name "guile3.0-mailutils")
254 `(("guile" ,guile-3.0)
255 ,@(alist-delete "guile" (package-inputs mailutils))))))
257 (define-public nullmailer
265 (string-append "https://untroubled.org/nullmailer/"
266 "nullmailer-" version ".tar.gz")
267 ;; Previous releases are moved to this subdirectory.
268 (string-append "https://untroubled.org/nullmailer/archive/"
269 "nullmailer-" version ".tar.gz")))
271 (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
272 (build-system gnu-build-system)
276 "--localstatedir=/var"
279 (modify-phases %standard-phases
280 (add-before 'check 'patch-test-FHS-file-names
282 (with-directory-excursion "test"
283 (substitute* (list "functions.in"
285 ;; Fix some shebangs later generated on the fly.
286 (("/bin/sh") (which "bash"))))
288 (add-before 'check 'pass-PATH-to-tests
289 ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
290 ;; tests then source ‘functions’, which first demands a working $PATH
291 ;; only to clobber it later. Pass our $PATH to the test environment
292 ;; and don't touch it after that.
294 (with-directory-excursion "test"
295 (substitute* "runtests"
297 (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
298 (substitute* "functions.in"
299 (("export PATH=.*") "")))
301 (add-before 'check 'delete-failing-tests
303 (with-directory-excursion "test/tests"
304 (for-each delete-file
306 ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
308 ;; XXX These require the not-yet-packaged tcpserver.
309 "protocols" "smtp-auth")))
311 (add-before 'install 'skip-install-data-local
312 ;; Don't attempt to install run-time files outside of the store.
314 (substitute* "Makefile"
315 ((" install-data-local") ""))
319 `(("daemontools" ,daemontools))) ; for svc
321 `(("gnutls" ,gnutls)))
322 (home-page "https://untroubled.org/nullmailer/")
323 (synopsis "Simple relay-only mail transfer agent")
325 "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
326 hosts that receive no local mail and only relay mail to a fixed set of smart
327 relays. It's useful for systems such as Web servers that must be able to send
328 email notifications, without having to run a full-blown MTA such as sendmail
331 Nullmailer is designed to be simple to configure, easy to extend, and secure.
332 It requires little ongoing administration. The included @command{sendmail}
333 emulator front-end should allow most (if not all) sendmail-compatible programs
334 to run without any changes.")
335 (license (list lgpl2.1+ ; lib/cli++/ (but some files lack headers)
336 gpl2+)))) ; everything else
338 (define-public fetchmail
345 (uri (string-append "mirror://sourceforge/fetchmail/branch_"
346 (version-major+minor version) "/"
347 "fetchmail-" version ".tar.xz"))
349 (base32 "1859wvfc9fq72mwp4njdiy0x89hnddlfr3nix71qqglcs0fz2crz"))))
350 (build-system gnu-build-system)
352 `(("openssl" ,openssl)))
355 (list (string-append "--with-ssl="
356 (assoc-ref %build-inputs "openssl")))
358 (modify-phases %standard-phases
359 (add-before 'check 'create-test-environment
361 ;; Fix ‘Cannot find absolute path for user's home directory’.
362 (setenv "HOME" "/tmp")
364 (home-page "https://www.fetchmail.info/")
365 (synopsis "Remote-mail retrieval and forwarding utility")
367 "Fetchmail is a full-featured, robust, well-documented remote-mail
368 retrieval and forwarding utility intended to be used over on-demand
369 TCP/IP links (such as SLIP or PPP connections). It supports every
370 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
371 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
374 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
375 so it can then be read by normal mail user agents such as mutt, elm
376 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
377 aliasing facilities to work just as they would on normal mail.")
378 (license gpl2+))) ; most files are actually public domain or x11
387 (string-append "ftp://ftp.mutt.org/pub/mutt/mutt-"
389 (string-append "https://bitbucket.org/mutt/mutt/downloads/"
390 "mutt-" version ".tar.gz")))
393 "0x4yfvk8415p80h9an242n6q3b43mw6mnnczh95zd3j0zwdr6wrg"))
394 (patches (search-patches "mutt-store-references.patch"))))
395 (build-system gnu-build-system)
397 `(("cyrus-sasl" ,cyrus-sasl)
406 `(#:configure-flags '("--enable-smtp"
410 "--enable-hcache" ; for header caching
415 "--with-sqlite3" ; required for Autocrypt
416 "--with-idn2" ; recommended for Autocrypt
417 ;; so that mutt does not check whether the path
418 ;; exists, which it does not in the chroot
419 "--with-mailpath=/var/mail")))
420 (home-page "http://www.mutt.org/")
421 (synopsis "Mail client")
423 "Mutt is a small but very powerful text-based mail client for Unix
427 (define-public neomutt
435 (url "https://github.com/neomutt/neomutt.git")
437 (file-name (git-file-name name version))
439 (base32 "147yjpqnsbfy01fhsflxlixk0985r91a6bjmqq3cwmf7gka3sihm"))))
440 (build-system gnu-build-system)
442 `(("cyrus-sasl" ,cyrus-sasl)
447 ("openssl" ,openssl) ; for S/MIME
449 ("kyotocabinet" ,kyotocabinet)
454 ("notmuch" ,notmuch)))
456 `(("automake" ,automake)
457 ("gettext-minimal" ,gettext-minimal)
458 ("pkg-config" ,pkg-config)
459 ("docbook-xsl" ,docbook-xsl)
460 ("docbook-xml" ,docbook-xml-4.2)
464 `(#:test-target "test"
468 ;; Database, implies header caching.
469 "--disable-tokyocabinet"
480 (string-append "--with-sasl="
481 (assoc-ref %build-inputs "cyrus-sasl"))
489 ;; If we do not set this, neomutt wants to check
490 ;; whether the path exists, which it does not
492 "--with-mailpath=/var/mail"
495 (string-append "--with-ncurses="
496 (assoc-ref %build-inputs "ncurses"))
497 (string-append "--prefix="
498 (assoc-ref %outputs "out"))
501 (modify-phases %standard-phases
502 ;; TODO: autosetup is meant to be included in the source,
503 ;; but we should package autosetup and use our own version of it.
505 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
506 (let* ((out (assoc-ref outputs "out"))
507 (flags `(,@configure-flags))
508 (bash (which "bash")))
509 (setenv "SHELL" bash)
510 (setenv "CONFIG_SHELL" bash)
512 (string-append (getcwd) "/configure")
514 (home-page "https://neomutt.org/")
515 (synopsis "Command-line mail reader based on Mutt")
517 "NeoMutt is a command-line mail reader which is based on mutt.
518 It adds a large amount of new and improved features to mutt.")
527 (uri (string-append "mirror://gnome/sources/gmime/"
528 (version-major+minor version)
529 "/gmime-" version ".tar.xz"))
532 "0ndsg1z1kq4w4caascydvialpyn4rfbjdn7xclzbzhw53x85cxgv"))))
533 (build-system gnu-build-system)
535 `(("pkg-config" ,pkg-config)
536 ("gnupg" ,gnupg))) ; for tests only
537 (inputs `(("glib" ,glib)
542 (modify-phases %standard-phases
544 'unpack 'patch-paths-in-tests
546 ;; The test programs run several programs using 'system' with
547 ;; hard-coded paths. Here we patch them all.
548 ;; We use ISO-8859-1 here because test-iconv.c contains
549 ;; raw byte sequences in several different encodings.
550 (with-fluids ((%default-port-encoding #f))
551 (substitute* (find-files "tests" "\\.c$")
552 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
553 (let* ((base (basename prog-path))
556 (or prog (error "not found: " base)))))))
558 (home-page "http://spruce.sourceforge.net/gmime/")
559 (synopsis "MIME message parser and creator library")
561 "GMime provides a core library and set of utilities which may be used for
562 the creation and parsing of messages using the Multipurpose Internet Mail
564 (license (list lgpl2.1+ gpl2+ gpl3+))))
566 ;; Some packages are not ready for GMime 3 yet.
567 (define-public gmime-2.6
573 (uri (string-append "mirror://gnome/sources/gmime/"
574 (version-major+minor version)
575 "/gmime-" version ".tar.xz"))
578 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
580 (define-public bogofilter
587 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-stable/"
588 "bogofilter-" version ".tar.xz"))
590 (base32 "1sl9xrnnlk2sn8gmibhn8li09vnansjbxb9l1182qmgz7cvs2j1j"))))
591 (build-system gnu-build-system)
594 (modify-phases %standard-phases
595 (add-before 'check 'pre-check
597 (substitute* "src/tests/t.frame"
599 (string-append "GREP=" (which "grep") "\n")))
601 (native-inputs `(("flex" ,flex)))
602 (inputs `(("bdb" ,bdb)))
603 (home-page "https://bogofilter.sourceforge.io/")
604 (synopsis "Mail classifier based on a Bayesian filter")
606 "Bogofilter is a mail filter that classifies mail as spam or ham
607 (non-spam) by a statistical analysis of the message's header and
608 content (body). The program is able to learn from the user's classifications
609 and corrections. It is based on a Bayesian filter.")
612 (define-public offlineimap
619 (url "https://github.com/OfflineIMAP/offlineimap")
620 (commit (string-append "v" version))))
621 (file-name (git-file-name name version))
624 "0h5q5nk2p2vx86w6rrbs7v70h81dpqqr68x6l3klzl3m0yj9agb1"))))
625 (build-system python-build-system)
627 `(("asciidoc" ,asciidoc)))
628 (inputs `(("python2-pysqlite" ,python2-pysqlite)
629 ("python2-six" ,python2-six)))
631 ;; The setup.py script expects python-2.
633 ;; Tests require a modifiable IMAP account.
636 (modify-phases %standard-phases
637 (add-after 'build 'build-documentation
639 (substitute* "docs/Makefile"
640 ;; Prevent xmllint and xsltproc from downloading a DTD file.
641 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
642 (invoke "make" "-C" "docs" "man")))
643 (add-after 'install 'install-documentation
644 (lambda* (#:key outputs #:allow-other-keys)
645 (let* ((out (assoc-ref outputs "out"))
646 (man (string-append out "/share/man")))
647 (install-file "docs/offlineimap.1" (string-append man "/man1"))
648 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
650 (home-page "https://www.offlineimap.org")
651 (synopsis "Sync emails between two repositories")
653 "OfflineImap synchronizes emails between two repositories, so that you
654 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
655 repository and Maildir/IMAP as LOCAL repository.")
658 (define-public emacs-mew
664 (uri (string-append "https://mew.org/Release/mew-"
668 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
672 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
673 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
674 (build-system gnu-build-system)
676 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
677 (icon-dir "/share/mew"))
678 `(#:modules ((guix build gnu-build-system)
680 (guix build emacs-utils))
681 #:imported-modules (,@%gnu-build-system-modules
682 (guix build emacs-utils))
684 (list (string-append "--with-elispdir=" %output ,elisp-dir)
685 (string-append "--with-etcdir=" %output ,icon-dir))
687 (modify-phases %standard-phases
688 (add-after 'configure 'patch-mew-icon-directory
689 (lambda* (#:key outputs #:allow-other-keys)
690 (emacs-substitute-sexps "mew-key.el"
691 ("(def.* mew-icon-directory"
693 (add-to-list 'image-load-path 'mew-icon-directory)
694 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
696 (add-after 'install 'generate-autoloads
697 (lambda* (#:key outputs #:allow-other-keys)
698 (emacs-generate-autoloads
699 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
702 (home-page "https://mew.org")
703 (synopsis "Emacs e-mail client")
704 (description "Mew (Messaging in the Emacs World) is a user interface
705 for text messages, multimedia messages (MIME), news articles and
706 security functionality including PGP, S/MIME, SSH, and SSL.")
715 (uri (string-append "https://github.com/djcb/mu/releases/"
716 "download/" (version-major+minor version) "/"
717 "mu-" version ".tar.xz"))
720 "0fh5bxvhjqv1p9z783lym8y1k3p4jcc3wg6wf7zl8s6w8krcfd7n"))))
721 (build-system gnu-build-system)
723 `(("pkg-config" ,pkg-config)
724 ("glib" ,glib "bin") ; for gtester
725 ("emacs" ,emacs-minimal)
726 ("tzdata" ,tzdata-for-tests))) ; for mu/test/test-mu-query.c
727 ;; TODO: Add webkit and gtk to build the mug GUI.
734 `(#:modules ((guix build gnu-build-system)
736 (guix build emacs-utils))
737 #:imported-modules (,@%gnu-build-system-modules
738 (guix build emacs-utils))
740 (modify-phases %standard-phases
741 (add-after 'unpack 'patch-configure
742 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
743 ;; so our Emacs package can't find it. Setting "--with-lispdir"
744 ;; configure flag doesn't help because "mu4e" will be added to
745 ;; the lispdir anyway, so we have to modify "configure.ac".
747 (substitute* "configure"
748 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
750 (("guile-2.0") "guile-2.2"))
751 (substitute* '("guile/Makefile.in"
752 "guile/mu/Makefile.in")
753 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
755 (add-after 'patch-configure 'fix-date-tests
756 ;; Loosen test tolerances to prevent failures caused by daylight
757 ;; saving time (DST). See: https://github.com/djcb/mu/issues/1214.
759 (substitute* "lib/parser/test-utils.cc"
760 (("\\* 60 \\* 60, 1 },")
761 "* 60 * 60, 3600 + 1 },"))
763 (add-before 'install 'fix-ffi
764 (lambda* (#:key outputs #:allow-other-keys)
765 (substitute* "guile/mu.scm"
767 (format #f "\"~a/lib/libguile-mu\""
768 (assoc-ref outputs "out"))))
770 (add-before 'check 'check-tz-setup
771 (lambda* (#:key inputs #:allow-other-keys)
772 ;; For mu/test/test-mu-query.c
774 (string-append (assoc-ref inputs "tzdata")
777 (add-after 'install 'install-emacs-autoloads
778 (lambda* (#:key outputs #:allow-other-keys)
779 (emacs-generate-autoloads
781 (string-append (assoc-ref outputs "out")
782 "/share/emacs/site-lisp"))
784 (home-page "http://www.djcbsoftware.nl/code/mu/")
785 (synopsis "Quickly find emails")
787 "Mu is a tool for dealing with e-mail messages stored in the
788 Maildir-format. Mu's purpose in life is to help you to quickly find the
789 messages you need; in addition, it allows you to view messages, extract
790 attachments, create new maildirs, and so on.")
794 ;; This is a fork of mu for use in Mumi that stores message bug IDs in its
795 ;; database. It also renames the library to "mumimu" to avoid confusion.
796 (let ((commit "ad30b5e9c85f0465aeeeac461d8c32d95775d450")
801 ;; TODO The version here used to be (package-version guile-email), but
802 ;; that code caused problems
803 (version (git-version "0.2.2" revision commit))
807 (url "https://git.elephly.net/software/mumimu.git")
809 (file-name (git-file-name name version))
812 "1y8r8csvkyxncgpi469dir4n4sga4z9xdzc18qh5s8bk29qj689n"))))
814 (substitute-keyword-arguments (package-arguments mu)
815 ((#:tests? anything '())
818 `(modify-phases ,phases
819 (replace 'patch-configure
821 (delete-file "autogen.sh")
822 (substitute* "configure.ac"
824 (("guile-2.0") "guile-2.2"))
825 (substitute* '("guile/Makefile.am"
826 "guile/mu/Makefile.am")
827 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
830 (lambda* (#:key outputs #:allow-other-keys)
831 (substitute* "guile/mumimu.scm"
833 (format #f "\"~a/lib/libguile-mumimu\""
834 (assoc-ref outputs "out"))))
836 (delete 'install-emacs-autoloads)))
837 ((#:configure-flags flags)
842 `(("pkg-config" ,pkg-config)
843 ("autoconf" ,autoconf)
844 ("automake" ,automake)
847 ("tzdata" ,tzdata-for-tests)
848 ("texinfo" ,texinfo))))))
856 ;; package author intends on distributing via github rather
858 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
859 (uri (string-append "https://github.com/pazz/alot/archive/"
861 (file-name (string-append "alot-" version ".tar.gz"))
864 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
865 (build-system python-build-system)
867 `(;; python 3 is currently unsupported, more info:
868 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
871 `(("python2-mock" ,python2-mock)))
873 `(("python2-magic" ,python2-magic)
874 ("python2-configobj" ,python2-configobj)
875 ("python2-twisted" ,python2-twisted)
876 ("python2-urwid" ,python2-urwid)
877 ("python2-urwidtrees" ,python2-urwidtrees)
878 ("python2-pygpgme" ,python2-pygpgme)
879 ("python2-notmuch" ,python2-notmuch)))
880 (home-page "https://github.com/pazz/alot")
881 (synopsis "Command-line MUA using @code{notmuch}")
883 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
884 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
887 (define-public notifymuch
889 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
893 (version (string-append "0.1-" revision "." (string-take commit 7)))
898 (url "https://github.com/kspi/notifymuch.git")
902 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
903 (file-name (string-append name "-" version "-checkout"))))
904 (build-system python-build-system)
906 `(("python-notmuch" ,python-notmuch)
907 ("python-pygobject" ,python-pygobject)
908 ("gobject-introspection" ,gobject-introspection)
909 ("libnotify" ,libnotify)
913 (modify-phases %standard-phases
914 (add-after 'install 'wrap-binary
915 (lambda* (#:key outputs #:allow-other-keys)
916 (let* ((out (assoc-ref outputs "out"))
917 (bin (string-append out "/bin/notifymuch")))
919 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
920 `("GI_TYPELIB_PATH" ":" prefix
921 (,(getenv "GI_TYPELIB_PATH")
922 ,(string-append out "/lib/girepository-1.0")))))
924 (home-page "https://github.com/kspi/notifymuch")
925 (synopsis "Displays notifications for changes in the notmuch email database")
926 (description "notifymuch displays desktop notifications for messages in
927 the notmuch database. The notifications are sent using libnotify to a
928 notification daemon. The query to find messages to send a notification about
929 is configurable, and a notification for the same message will not be send
930 within a configurable period (defaults to 48 hours). To use notifymuch, run
931 @command{notifymuch} after new mail is indexed, this can be automated by
932 invoking @command{notifymuch} from the post-new hook.")
935 (define-public notmuch
941 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
945 "0dfwa38vgnxk9cvvpza66szjgp8lir6iz6yy0cry9593lywh9xym"))))
946 (build-system gnu-build-system)
948 `(#:modules ((guix build gnu-build-system)
949 ((guix build emacs-build-system) #:prefix emacs:)
951 #:imported-modules (,@%gnu-build-system-modules
952 (guix build emacs-build-system)
953 (guix build emacs-utils))
954 #:make-flags (list "V=1") ; verbose test output
955 #:phases (modify-phases %standard-phases
956 (add-after 'unpack 'patch-notmuch-lib.el
958 (substitute* "emacs/notmuch-lib.el"
959 (("/bin/sh") (which "sh")))
962 (lambda* (#:key outputs #:allow-other-keys)
964 (setenv "CONFIG_SHELL" (which "sh"))
966 (let* ((out (assoc-ref outputs "out"))
968 (string-append out "/share/emacs/site-lisp/")))
969 (invoke "./configure"
970 (string-append "--prefix=" out)
971 (string-append "--emacslispdir=" elisp)
972 (string-append "--emacsetcdir=" elisp)))))
973 (add-before 'check 'prepare-test-environment
975 (setenv "TEST_CC" "gcc")
976 ;; Patch various inline shell invocations.
977 (substitute* (find-files "test" "\\.sh$")
978 (("/bin/sh") (which "sh")))
980 (add-after 'install 'make-autoloads
981 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
983 `(("bash-completion" ,bash-completion)
984 ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
985 ("pkg-config" ,pkg-config)
987 ("python-docutils" ,python-docutils)
988 ("sphinx" ,python-sphinx)
990 ;; The following are required for tests only.
1002 (home-page "https://notmuchmail.org/")
1003 (synopsis "Thread-based email index, search, and tagging")
1005 "Notmuch is a command-line based program for indexing, searching, read-
1006 ing, and tagging large collections of email messages.")
1009 (define-public notmuch-addrlookup-c
1011 (name "notmuch-addrlookup-c")
1012 (version (string-append "9"))
1016 (url "https://github.com/aperezdc/notmuch-addrlookup-c.git")
1017 (commit (string-append "v" version))))
1018 (file-name (string-append name "-" version "-checkout"))
1021 "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
1022 (build-system gnu-build-system)
1024 '(#:tests? #f ; no tests
1025 #:make-flags (list "CC=gcc")
1026 #:phases (modify-phases %standard-phases
1028 ;; Remove vim code completion config, it's not needed to
1029 ;; build (or be patched).
1030 (add-before 'patch-source-shebangs 'delete-ycm-file
1031 (lambda _ (delete-file ".ycm_extra_conf.py")))
1033 (lambda* (#:key outputs #:allow-other-keys)
1034 (let ((bin (string-append
1035 (assoc-ref outputs "out") "/bin")))
1036 (install-file "notmuch-addrlookup" bin)))))))
1038 `(("pkg-config" ,pkg-config)))
1041 ("notmuch" ,notmuch)))
1042 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
1043 (synopsis "Address lookup tool for Notmuch")
1044 (description "This is an address lookup tool using a Notmuch database,
1045 useful for email address completion.")
1046 (license license:expat)))
1048 (define-public python-notmuch
1050 (name "python-notmuch")
1051 (version (package-version notmuch))
1052 ;; Notmuch python bindings are now unavailable on pypi. The
1053 ;; bindings are distributed via the notmuch release tarball.
1054 (source (package-source notmuch))
1055 (build-system python-build-system)
1056 (inputs `(("notmuch" ,notmuch)))
1058 `(#:tests? #f ; no "test" target
1060 (modify-phases %standard-phases
1061 ;; This python package lives in a subdirectory of the notmuch source
1062 ;; tree, so chdir into it before building.
1063 (add-after 'unpack 'enter-python-dir
1064 (lambda _ (chdir "bindings/python") #t))
1065 ;; Make sure the correct notmuch shared library gets loaded.
1066 (add-before 'build 'set-libnotmuch-file-name
1067 (lambda* (#:key inputs #:allow-other-keys)
1068 (let ((notmuch (assoc-ref inputs "notmuch")))
1069 (substitute* "notmuch/globals.py"
1070 (("libnotmuch\\.so\\.")
1071 (string-append notmuch "/lib/libnotmuch.so.")))
1073 (home-page (package-home-page notmuch))
1074 (synopsis "Python bindings of the Notmuch mail indexing library")
1076 "This package provides Python bindings to use the Notmuch mail indexing
1077 and search library.")
1080 (define-public python2-notmuch
1081 (package-with-python2 python-notmuch))
1083 (define-public getmail
1090 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
1091 "getmail-" version ".tar.gz"))
1093 (base32 "1hcrd9h4g12f5gvl1djsbchcjry02ghq4icdr897s8v48pkrzagk"))))
1094 (build-system python-build-system)
1096 `(#:tests? #f ; no tests
1097 #:python ,python-2))
1098 (home-page "http://pyropus.ca/software/getmail/")
1099 (synopsis "Mail retriever")
1101 "A flexible, extensible mail retrieval system with support for
1102 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1103 arbitrary message filtering, single-user and domain-mailboxes, and many other
1106 ;; License is specified in file '__init__.py'.
1109 (define-public libetpan
1116 (url "https://github.com/dinhviethoa/libetpan.git")
1118 (file-name (git-file-name name version))
1120 (base32 "19g4qskg71jv7sxfxsdkjmrxk9mk5kf9b6fhw06g6wvm3205n95f"))))
1121 (build-system gnu-build-system)
1122 (native-inputs `(("autoconf" ,autoconf-wrapper)
1123 ("automake" ,automake)
1124 ("libtool" ,libtool)
1125 ("pkg-config" ,pkg-config)))
1127 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1128 ;; libraries need to be propagated.
1129 `(("cyrus-sasl" ,cyrus-sasl)
1130 ("openssl" ,openssl)))
1137 (modify-phases %standard-phases
1140 (setenv "NOCONFIGURE" "true")
1141 (invoke "sh" "autogen.sh"))))
1143 '("--disable-static" "--disable-db")))
1144 (home-page "https://www.etpan.org/libetpan.html")
1145 (synopsis "Portable middleware for email access")
1147 "The purpose of this mail library is to provide a portable, efficient
1148 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1149 provides an API for C language. It's the low-level API used by MailCore and
1153 (define-public compface
1159 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1160 "ftp.xemacs.org/aux/"
1161 name "-" version ".tar.gz"))
1164 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1165 (build-system gnu-build-system)
1168 (synopsis "Portrait image compressor")
1169 (description "This package takes your 48x48x1 portrait image and
1171 (home-page "http://www.cs.indiana.edu/pub/faces/")
1172 (license (x11-style "file://README"))))
1174 (define-public claws-mail
1181 "https://www.claws-mail.org/releases/claws-mail-" version
1185 "00mfhaac16sv67rwiq98hr4nl5zmd1h2afswwwksdcsi3q9x23jr"))))
1186 (build-system gnu-build-system)
1187 (native-inputs `(("pkg-config" ,pkg-config)))
1188 (inputs `(("bogofilter" ,bogofilter)
1190 ("dbus-glib" ,dbus-glib)
1191 ("enchant" ,enchant)
1193 ("ghostscript" ,ghostscript)
1194 ("hicolor-icon-theme" ,hicolor-icon-theme)
1199 ("libarchive" ,libarchive)
1200 ("libcanberra" ,libcanberra)
1201 ("libetpan" ,libetpan)
1202 ("libical" ,libical)
1203 ("libnotify" ,libnotify)
1205 ("libxml2" ,libxml2)
1207 ("python-2" ,python-2)
1208 ("mime-info" ,shared-mime-info)
1209 ("startup-notification" ,startup-notification)))
1212 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant"
1215 ;; Disable updating icon cache since it's done by the profile hook.
1216 ;; Conflict with other packages in the profile would be inevitable
1218 '("gtk_update_icon_cache=true")
1219 #:phases (modify-phases %standard-phases
1220 (add-before 'build 'patch-mime
1221 (lambda* (#:key inputs #:allow-other-keys)
1222 (substitute* "src/procmime.c"
1223 (("/usr/share/mime/globs")
1224 (string-append (assoc-ref inputs "mime-info")
1225 "/share/mime/globs"))))))))
1226 (synopsis "GTK-based Email client")
1228 "Claws-Mail is an email client (and news reader) based on GTK+. The
1229 appearance and interface are designed to be familiar to new users coming from
1230 other popular email clients, as well as experienced users. Almost all commands
1231 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1232 which can add many functionalities to the base client.")
1233 (home-page "https://www.claws-mail.org/")
1234 (license gpl3+))) ; most files are actually public domain or x11
1236 (define-public msmtp
1243 (uri (string-append "https://marlam.de/msmtp/releases/"
1244 "/msmtp-" version ".tar.xz"))
1246 (base32 "1waiiksa57byb7gvx1zmh6srvl6r8rvwqklk0slb3iaf4kfbqlws"))))
1247 (build-system gnu-build-system)
1249 `(("libsecret" ,libsecret)
1254 `(("pkg-config" ,pkg-config)))
1255 (home-page "https://marlam.de/msmtp/")
1257 `(#:configure-flags (list "--with-libgsasl"
1259 "--with-tls=gnutls")
1261 (modify-phases %standard-phases
1262 (add-after 'install 'install-additional-files
1263 (lambda* (#:key outputs #:allow-other-keys)
1264 (let* ((out (assoc-ref outputs "out"))
1265 (bin (string-append out "/bin"))
1266 (doc (string-append out "/share/doc/msmtp"))
1267 (msmtpq "scripts/msmtpq")
1268 (vimfiles (string-append out "/share/vim/vimfiles/plugin")))
1269 (install-file (string-append msmtpq "/msmtpq") bin)
1270 (install-file (string-append msmtpq "/msmtp-queue") bin)
1271 (install-file (string-append msmtpq "/README.msmtpq") doc)
1272 (install-file "scripts/vim/msmtp.vim" vimfiles)
1275 "Simple and easy to use SMTP client with decent sendmail compatibility")
1277 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1278 an SMTP server (for example at a free mail provider) which takes care of further
1285 (version "4.93.0.4")
1289 (uri (let ((file-name (string-append "exim-" version ".tar.xz")))
1290 (list (string-append "https://ftp.exim.org/pub/exim/exim4/"
1292 ;; ‘Fix’ releases (exim-x.y.z.f) are kept separately.
1293 (string-append "https://ftp.exim.org/pub/exim/exim4/fixes/"
1295 ;; After a new non-fix release, the old one is moved here.
1296 (string-append "https://ftp.exim.org/pub/exim/exim4/old/"
1299 (base32 "01g4sfycv13glnmfrapwhjbdw6z1z7w5bwjldxjmglwfw5p3czak"))))
1300 (build-system gnu-build-system)
1302 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
1303 ("gnutls" ,gnutls/dane)
1310 ("libxaw" ,libxaw)))
1312 `(("pcre" ,pcre "bin")
1314 ("pkg-config" ,pkg-config)))
1317 (modify-phases %standard-phases
1319 ;; We'd use #:make-flags but the top-level Makefile calls others
1320 ;; recursively, so just set all variables this way.
1321 (lambda* (#:key outputs inputs #:allow-other-keys)
1322 (substitute* '("Makefile" "OS/Makefile-Default")
1323 (("(RM_COMMAND=).*" all var)
1324 (string-append var "rm\n")))
1325 (copy-file "src/EDITME" "Local/Makefile")
1326 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1327 (let ((out (assoc-ref outputs "out"))
1328 (gzip (assoc-ref inputs "gzip"))
1329 (bzip2 (assoc-ref inputs "bzip2"))
1330 (xz (assoc-ref inputs "xz")))
1331 (substitute* '("Local/Makefile")
1332 (("(BIN_DIRECTORY=).*" all var)
1333 (string-append var out "/bin\n"))
1334 (("(CONFIGURE_FILE=).*" all var)
1335 (string-append var out "/etc/exim.conf\n"))
1336 (("(EXIM_USER=).*" all var)
1337 (string-append var "nobody\n"))
1338 (("(FIXED_NEVER_USERS=).*" all var)
1339 (string-append var "\n")) ; XXX no root in build environment
1340 (("(COMPRESS_COMMAND=).*" all var)
1341 (string-append var gzip "/bin/gzip\n"))
1342 (("(ZCAT_COMMAND=).*" all var)
1343 (string-append var gzip "/bin/zcat\n"))
1344 (("# (USE_GNUTLS(|_PC)=.*)" all line)
1345 (string-append line "\n")))
1346 ;; This file has hard-coded relative file names for tools despite
1347 ;; the zcat configuration above.
1348 (substitute* '("src/exigrep.src")
1349 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1350 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1351 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1352 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1354 (add-before 'build 'fix-sh-paths
1355 (lambda* (#:key inputs #:allow-other-keys)
1356 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1357 (("SHELL=/bin/sh") "SHELL=sh"))
1358 (substitute* '("scripts/Configure-config.h")
1359 (("\\| /bin/sh") "| sh"))
1360 (let ((bash (assoc-ref inputs "bash")))
1361 (substitute* '("scripts/Configure-eximon")
1362 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1364 (add-before 'build 'build-reproducibly
1366 ;; The ‘compilation number’ is incremented for every build from the
1367 ;; same source tree. It appears to vary over different (parallel?)
1368 ;; builds. Make it a ‘constant number’ instead.
1369 (substitute* "src/version.c"
1370 (("#include \"cnumber.h\"") "1")))))
1373 "INSTALL_ARG=-no_chown")
1374 ;; No 'check' target. There is a test suite in test/, which assumes that
1375 ;; certain build options were (not) used and that it can freely ‘sudo’.
1377 (home-page "https://www.exim.org/")
1379 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1381 "Exim is a message transfer agent (MTA) developed at the University of
1382 Cambridge for use on Unix systems connected to the Internet. In style it is
1383 similar to Smail 3, but its facilities are more general. There is a great
1384 deal of flexibility in the way mail can be routed, and there are extensive
1385 facilities for checking incoming mail.")
1388 (define-public dovecot
1395 (uri (string-append "https://www.dovecot.org/releases/"
1396 (version-major+minor version) "/"
1397 "dovecot-" version ".tar.gz"))
1399 (base32 "1yc6hi4hqg4hcc4495sf4m5f1lnargphi6dawj43if21vncgp127"))))
1400 (build-system gnu-build-system)
1402 `(("pkg-config" ,pkg-config)))
1404 `(("openssl" ,openssl)
1408 ("linux-pam" ,linux-pam)))
1410 `(#:configure-flags '("--sysconfdir=/etc"
1411 "--localstatedir=/var")
1413 (modify-phases %standard-phases
1414 (add-after 'unpack 'patch-file-names
1416 (substitute* "src/lib-program-client/test-program-client-local.c"
1417 (("(/bin/| )cat") (which "cat"))
1418 (("/bin/echo") (which "echo"))
1419 (("/bin/false") (which "false"))
1420 (("/bin/sh") (which "bash"))
1421 (("head") (which "head"))
1422 (("sleep") (which "sleep")))
1423 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1424 "src/lib-smtp/test-bin/sendmail-success.sh")
1425 (("cat") (which "cat")))
1428 (lambda* (#:key make-flags #:allow-other-keys)
1429 ;; Simple hack to avoid installing a trivial README in /etc.
1430 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1432 (home-page "https://www.dovecot.org")
1433 (synopsis "Secure POP3/IMAP server")
1435 "Dovecot is a mail server whose major goals are security and reliability.
1436 It supports mbox/Maildir and its own dbox/mdbox formats.")
1437 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1438 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1439 ;; Unicode, Inc. License Agreement for Data Files and Software.
1440 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1442 (define-public dovecot-trees
1444 (name "dovecot-trees")
1449 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1450 "archive.tar.gz?ref=v" version))
1451 (file-name (string-append name "-" version ".tar.gz"))
1454 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1456 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
1457 (build-system gnu-build-system)
1459 `(("automake" ,automake)
1460 ("autoconf" ,autoconf)
1461 ("libtool" ,libtool)
1462 ("dovecot" ,dovecot)
1463 ("pkg-config" ,pkg-config)))
1465 `(("libsodium" ,libsodium)))
1467 `(#:tests? #f ;No tests exist.
1468 #:configure-flags (list (string-append "--with-dovecot="
1469 (assoc-ref %build-inputs "dovecot")
1471 (home-page "https://0xacab.org/riseuplabs/trees")
1472 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1474 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1475 Dovecot encryption plugin. This plugin adds individually encrypted mail
1476 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1477 which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1478 the Sodium crypto library (based on NaCL).
1482 @item On IMAP log in, the user's cleartext password is passed to the plugin.
1483 @item The plugin creates an argon2 digest from the password.
1484 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1485 @item Inside the secretbox is stored a Curve25519 private key.
1486 @item The Curve25519 private key is used to decrypt each individual message,
1487 using libsodium sealed boxes.
1488 @item New mail is encrypted as it arrives using the Curve25519 public key.
1492 (define-public dovecot-libsodium-plugin
1493 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1496 (name "dovecot-libsodium-plugin")
1497 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1502 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1504 (file-name (string-append name "-" version "-checkout"))
1507 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1508 (build-system gnu-build-system)
1510 `(("automake" ,automake)
1511 ("autoconf" ,autoconf)
1512 ("libtool" ,libtool)
1513 ("dovecot" ,dovecot)
1514 ("pkg-config" ,pkg-config)))
1516 `(("libsodium" ,libsodium)))
1518 `(#:tests? #f ;No tests exist.
1519 #:configure-flags (list (string-append "--with-dovecot="
1520 (assoc-ref %build-inputs "dovecot")
1522 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1523 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1525 "@code{dovecot-libsodium-plugin} provides libsodium password
1526 hashing schemes plugin for @code{Dovecot}.")
1529 (define-public isync
1536 (uri (string-append "mirror://sourceforge/isync/isync/"
1537 version "/isync-" version ".tar.gz"))
1539 "1sphd30jplii58y2zmw365bckm6pszmapcy905zhjll1sm1ldjv8"))))
1540 (build-system gnu-build-system)
1545 ("cyrus-sasl" ,cyrus-sasl)
1546 ("openssl" ,openssl-1.0)
1548 (home-page "http://isync.sourceforge.net/")
1549 (synopsis "Mailbox synchronization program")
1551 "isync/mbsync is a command-line tool for two-way synchronization of
1552 mailboxes. Currently Maildir and IMAP are supported types.")
1555 (define-public perl-email-abstract
1557 (name "perl-email-abstract")
1562 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1563 "Email-Abstract-" version ".tar.gz"))
1566 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1567 (build-system perl-build-system)
1569 `(("perl-email-simple" ,perl-email-simple)
1570 ("perl-module-pluggable" ,perl-module-pluggable)
1571 ("perl-mro-compat" ,perl-mro-compat)))
1572 (home-page "https://metacpan.org/release/Email-Abstract")
1573 (synopsis "Interface to mail representations")
1574 (description "Email::Abstract provides module writers with the ability to
1575 write simple, representation-independent mail handling code.")
1576 (license perl-license)))
1578 (define-public perl-email-address
1580 (name "perl-email-address")
1585 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1586 "Email-Address-" version ".tar.gz"))
1588 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
1589 (build-system perl-build-system)
1590 (home-page "https://metacpan.org/release/Email-Address")
1591 (synopsis "Email address parsing and creation")
1592 (description "Email::Address implements a regex-based RFC 2822 parser that
1593 locates email addresses in strings and returns a list of Email::Address
1594 objects found. Alternatively you may construct objects manually.")
1595 (license perl-license)))
1597 (define-public perl-email-address-xs
1599 (name "perl-email-address-xs")
1604 (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
1605 "Email-Address-XS-" version ".tar.gz"))
1608 "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
1609 (build-system perl-build-system)
1610 (home-page "https://metacpan.org/release/Email-Address-XS")
1611 (synopsis "Parse and format RFC 5322 email addresses and groups")
1613 "Email::Address::XS implements RFC 5322 parser and formatter of email
1614 addresses and groups. Unlike Email::Address, this module does not use regular
1615 expressions for parsing but instead is implemented in XS and uses shared code
1616 from Dovecot IMAP server.")
1617 (license perl-license)))
1619 (define-public perl-email-date-format
1621 (name "perl-email-date-format")
1626 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1627 "Email-Date-Format-" version ".tar.gz"))
1630 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1631 (build-system perl-build-system)
1632 (home-page "https://metacpan.org/release/Email-Date-Format")
1633 (synopsis "Produce RFC 2822 date strings")
1634 (description "Email::Date::Format provides a means for generating an RFC
1635 2822 compliant datetime string.")
1636 (license perl-license)))
1638 (define-public perl-email-messageid
1640 (name "perl-email-messageid")
1645 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1646 "Email-MessageID-" version ".tar.gz"))
1649 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1650 (build-system perl-build-system)
1651 (home-page "https://metacpan.org/release/Email-MessageID")
1652 (synopsis "Generate world unique message-ids")
1653 (description "Email::MessageID generates recommended message-ids to
1654 identify a message uniquely.")
1655 (license perl-license)))
1657 (define-public perl-email-mime
1659 (name "perl-email-mime")
1664 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1665 "Email-MIME-" version ".tar.gz"))
1668 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
1669 (build-system perl-build-system)
1671 `(("perl-email-address" ,perl-email-address)
1672 ("perl-email-messageid" ,perl-email-messageid)
1673 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1674 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1675 ("perl-email-simple" ,perl-email-simple)
1676 ("perl-mime-types" ,perl-mime-types)
1677 ("perl-module-runtime" ,perl-module-runtime)))
1678 (home-page "https://metacpan.org/release/Email-MIME")
1679 (synopsis "MIME message handling")
1680 (description "Email::MIME is an extension of the Email::Simple module, to
1681 handle MIME encoded messages. It takes a message as a string, splits it up
1682 into its constituent parts, and allows you access to various parts of the
1683 message. Headers are decoded from MIME encoding.")
1684 (license perl-license)))
1686 (define-public perl-email-mime-contenttype
1688 (name "perl-email-mime-contenttype")
1693 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1694 "Email-MIME-ContentType-" version ".tar.gz"))
1697 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
1698 (build-system perl-build-system)
1700 `(("perl-capture-tiny" ,perl-capture-tiny)))
1701 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
1702 (synopsis "Parse MIME Content-Type headers")
1703 (description "Email::MIME::ContentType parses a MIME Content-Type
1705 (license perl-license)))
1707 (define-public perl-email-mime-encodings
1709 (name "perl-email-mime-encodings")
1714 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1715 "Email-MIME-Encodings-" version ".tar.gz"))
1718 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1719 (build-system perl-build-system)
1721 `(("perl-capture-tiny" ,perl-capture-tiny)))
1722 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
1723 (synopsis "Unified interface to MIME encoding and decoding")
1724 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1725 (license perl-license)))
1727 (define-public perl-email-sender
1729 (name "perl-email-sender")
1730 (version "1.300034")
1734 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1735 "Email-Sender-" version ".tar.gz"))
1737 (base32 "14aj9kqa9dr2bdhzn2qvjj2mffj8wjb5397z8qw7qg057fk3ib05"))))
1738 (build-system perl-build-system)
1740 `(("perl-capture-tiny" ,perl-capture-tiny)))
1742 `(("perl-email-abstract" ,perl-email-abstract)
1743 ("perl-email-address" ,perl-email-address)
1744 ("perl-email-simple" ,perl-email-simple)
1745 ("perl-list-moreutils" ,perl-list-moreutils)
1746 ("perl-module-runtime" ,perl-module-runtime)
1747 ("perl-moo" ,perl-moo)
1748 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1749 ("perl-sub-exporter" ,perl-sub-exporter)
1750 ("perl-throwable" ,perl-throwable)
1751 ("perl-try-tiny" ,perl-try-tiny)))
1752 (home-page "https://metacpan.org/release/Email-Sender")
1753 (synopsis "Perl library for sending email")
1754 (description "Email::Sender replaces the old and sometimes problematic
1755 Email::Send library.")
1756 (license perl-license)))
1758 (define-public perl-email-simple
1760 (name "perl-email-simple")
1765 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1766 "Email-Simple-" version ".tar.gz"))
1769 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
1770 (build-system perl-build-system)
1772 `(("perl-email-date-format" ,perl-email-date-format)))
1773 (home-page "https://metacpan.org/release/Email-Simple")
1774 (synopsis "Parsing of RFC 2822 messages")
1775 (description "Email::Simple provides simple parsing of RFC 2822 message
1776 format and headers.")
1777 (license perl-license)))
1779 (define-public libesmtp
1786 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1787 "libesmtp/libesmtp-" version ".tar.bz2/"
1788 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1790 ;; XXX This site is offline, so we fetch Fedora's cached copy
1791 ;; of the source tarball.
1792 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1793 version ".tar.bz2")))
1796 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1797 (build-system gnu-build-system)
1799 `(("openssl" ,openssl)))
1800 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1801 (synopsis "Library for sending mail via remote hosts using SMTP")
1802 (description "libESMTP is an SMTP client which manages posting (or
1803 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1804 It may be used as part of a Mail User Agent (MUA) or other program that must
1805 be able to post electronic mail where mail functionality may not be that
1806 program's primary purpose.")
1807 (license (list lgpl2.1+ gpl2+))))
1809 (define-public esmtp
1817 (url "https://github.com/andywingo/esmtp.git")
1818 (commit "01bf9fc")))
1821 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1822 (file-name (string-append name "-" version "-checkout"))))
1824 `(#:phases (modify-phases %standard-phases
1826 (lambda _ (invoke "autoreconf" "-vfi"))))))
1827 (build-system gnu-build-system)
1831 ("autoconf" ,autoconf)
1832 ("automake" ,automake)
1833 ("libtool" ,libtool)))
1835 `(("libesmtp" ,libesmtp)))
1836 (home-page "https://sourceforge.net/projects/esmtp/")
1837 (synopsis "Relay-only mail transfer agent (MTA)")
1838 (description "Esmtp is a simple relay-only mail transfer agent built using
1839 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1840 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1841 page for more on configuration. This package also provides minimal
1842 compatibility shims for the @command{sendmail}, @command{mailq}, and
1843 @command{newaliases} commands.")
1852 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1853 version "/fdm-" version ".tar.gz"))
1855 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
1856 (build-system gnu-build-system)
1859 ("openssl" ,openssl)
1861 (home-page "https://github.com/nicm/fdm")
1862 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1863 (description "fdm is a program designed to fetch mail from POP3
1864 or IMAP servers, or receive local mail from stdin, and
1865 deliver it in various ways.")
1867 ;; Why point to a source file? Well, all the individual files have a
1868 ;; copy of this license in their headers, but there's no seprate file
1869 ;; with that information.
1870 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1873 (define-public procmail
1881 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1886 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1887 ;; The following patch fixes an ambiguous definition of
1888 ;; getline() in formail.c. The patch is provided by Debian as
1890 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1891 "procmail-CVE-2014-3618.patch"
1892 "procmail-CVE-2017-16844.patch"))))
1894 `(#:phases (modify-phases %standard-phases
1897 (substitute* "Makefile"
1901 (assoc-ref %outputs "out"))
1905 #:tests? #f)) ;; There are no tests indicating a successful
1906 ;; build. Some tests of basic locking mechanisms provided by the
1907 ;; file system are performed during 'make install'. However, these
1908 ;; are performed before the actual build process.
1909 (build-system gnu-build-system)
1910 (inputs `(("exim" ,exim)))
1911 (home-page "http://www.procmail.org/")
1912 (synopsis "Versatile mail delivery agent (MDA)")
1913 (description "Procmail is a mail delivery agent (MDA) featuring support
1914 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1915 can be sorted into separate files/directories and arbitrary commands can be
1916 executed on mail arrival. Procmail is considered stable, but is no longer
1918 (license gpl2+))) ;; procmail allows to choose the
1919 ;; nonfree Artistic License 1.0
1920 ;; as alternative to the GPL2+.
1921 ;; This option is not listed here.
1923 (define-public khard
1929 (uri (pypi-uri name version))
1932 "18ba2xgfq8sw0bg6xmlfjpizid1hkzgswcfcc54gl21y2dwfda2w"))))
1933 (build-system python-build-system)
1936 (modify-phases %standard-phases
1937 (add-after 'install 'install-doc
1938 (lambda* (#:key outputs #:allow-other-keys)
1939 (let* ((out (assoc-ref outputs "out"))
1940 (doc (string-append out "/share/doc/khard")))
1941 (copy-recursively "misc/khard" doc)
1944 `(("python-setuptools-scm" ,python-setuptools-scm)))
1946 `(("python-atomicwrites" ,python-atomicwrites)
1947 ("python-configobj" ,python-configobj)
1948 ("python-pyyaml" ,python-pyyaml)
1949 ("python-ruamel.yaml" ,python-ruamel.yaml)
1950 ("python-unidecode" ,python-unidecode)
1951 ("python-vobject" ,python-vobject)))
1952 (synopsis "Console address book using CardDAV")
1953 (description "Khard is an address book for the console. It creates, reads,
1954 modifies and removes CardDAV address book entries at your local machine. For
1955 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1956 Khard can also be used from within the email client @command{mutt}.")
1957 (home-page "https://github.com/scheibler/khard")
1960 (define-public perl-mail-spf
1962 (name "perl-mail-spf")
1968 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
1972 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1973 (build-system perl-build-system)
1975 `(("perl-module-build" ,perl-module-build)
1976 ("perl-net-dns-resolver-programmable"
1977 ,perl-net-dns-resolver-programmable)))
1980 (modify-phases %standard-phases
1981 (add-before 'configure 'modify-Build.PL
1982 (lambda* (#:key outputs #:allow-other-keys)
1983 (substitute* "Build.PL"
1984 (("'/usr/sbin'") (string-append "'"
1985 (assoc-ref outputs "out")
1989 `(("perl-error" ,perl-error)
1990 ("perl-net-dns" ,perl-net-dns)
1991 ("perl-netaddr-ip" ,perl-netaddr-ip)
1992 ("perl-uri" ,perl-uri)))
1993 (home-page "https://metacpan.org/release/Mail-SPF")
1994 (synopsis "Perl implementation of Sender Policy Framework")
1995 (description "Mail::SPF is the Sender Policy Framework implemented
1999 (define-public perl-mail-authenticationresults
2001 (name "perl-mail-authenticationresults")
2002 (version "1.20180923")
2006 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
2007 "Mail-AuthenticationResults-" version ".tar.gz"))
2010 "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
2011 (build-system perl-build-system)
2013 `(("perl-test-exception" ,perl-test-exception)))
2014 (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
2015 (synopsis "Object Oriented Authentication-Results Headers")
2016 (description "Mail::AuthenticationResults parses the message header field
2017 that indicates the message authentication status as per RFC7601. This module
2018 is not fully compliant with the RFC but it tries to implement most styles of
2019 Authentication-Results header seen in the wild.")
2020 (license perl-license)))
2022 (define-public perl-mail-dkim
2024 (name "perl-mail-dkim")
2029 "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
2034 "0cgkal65qqcy57b21lgij90ba36wl66byw9i76g5yhwaa8ms8hqa"))))
2035 (build-system perl-build-system)
2037 `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2038 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2039 ("perl-mailtools" ,perl-mailtools)
2040 ("perl-net-dns" ,perl-net-dns)))
2042 `(("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
2043 ("perl-test-requiresinternet" ,perl-test-requiresinternet)
2044 ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
2045 (home-page "https://metacpan.org/release/Mail-DKIM")
2046 (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
2047 (description "Mail::DKIM is a Perl module that implements the new Domain
2048 Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
2049 both of which sign and verify emails using digital signatures and DNS records.
2050 Mail-DKIM can be used by any Perl program that wants to provide support for
2051 DKIM and/or DomainKeys.")
2054 (define-public dkimproxy
2061 "mirror://sourceforge/dkimproxy/dkimproxy/"
2062 version "/dkimproxy-" version ".tar.gz"))
2065 "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
2067 (search-patches "dkimproxy-add-ipv6-support.patch"))))
2068 (build-system gnu-build-system)
2071 (modify-phases %standard-phases
2072 (add-after 'install 'make-wrapper
2073 (lambda* (#:key inputs outputs #:allow-other-keys)
2074 (let* ((out (assoc-ref outputs "out"))
2075 (wrap.pl (lambda (scripts keys)
2078 (wrap-program (string-append out script)
2079 `("PERL5LIB" ":" prefix
2082 (assoc-ref inputs input)
2083 "/lib/perl5/site_perl"))
2086 (wrap.pl (list "/bin/dkimproxy.in"
2087 "/bin/dkimproxy.out")
2088 (list "perl-crypt-openssl-rsa"
2089 "perl-io-socket-inet6"
2091 "perl-mail-authenticationresults"
2096 (wrap.pl (list "/bin/dkim_responder.pl")
2097 (list "perl-crypt-openssl-rsa"
2106 ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2107 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2108 ("perl-mailtools" ,perl-mailtools)
2109 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2110 ("perl-mail-dkim" ,perl-mail-dkim)
2111 ("perl-mime-tools" ,perl-mime-tools)
2112 ("perl-net-dns" ,perl-net-dns)
2113 ("perl-net-server" ,perl-net-server)
2114 ("perl-socket6" ,perl-socket6)
2115 ("perl-timedate" ,perl-timedate)))
2116 (home-page "http://dkimproxy.sourceforge.net/")
2117 (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
2119 "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
2120 @code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
2121 proxy for signing outgoing email, and an inbound proxy for verifying signatures
2122 of incoming messages.
2124 It was designed for Postfix, but can be used to add DKIM support to nearly any
2125 existing mail server. With Postfix, the proxies can operate as either
2126 @code{Before-Queue} or @code{After-Queue} content filters.")
2129 (define-public mb2md
2136 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
2140 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
2141 (build-system trivial-build-system)
2143 '(#:modules ((guix build utils))
2146 (use-modules (guix build utils))
2147 (let* ((source (assoc-ref %build-inputs "source"))
2148 (out (assoc-ref %outputs "out"))
2149 (bin (string-append out "/bin"))
2150 (perl (assoc-ref %build-inputs "perl"))
2151 (gzip (assoc-ref %build-inputs "gzip"))
2152 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
2153 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
2155 (with-directory-excursion bin
2156 (copy-file source "mb2md.gz")
2157 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
2158 (substitute* "mb2md"
2159 (("#!/usr/bin/perl")
2160 (string-append "#!/usr/bin/perl -I " perl5lib)))
2161 (patch-shebang "mb2md" (list (string-append perl "/bin")))
2162 (chmod "mb2md" #o555))
2164 (native-inputs `(("gzip" ,gzip)))
2165 (inputs `(("perl" ,perl)
2166 ("perl-timedate" ,perl-timedate)))
2167 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
2168 (synopsis "Mbox to maildir converter")
2170 "Mb2md is a Perl script that takes one or more mbox format files and
2171 converts them to maildir format directories.")
2172 (license public-domain)))
2181 (uri (string-append "https://marlam.de/mpop/releases/"
2182 "mpop-" version ".tar.xz"))
2184 (base32 "0c6n5afn9pr4p7gxkv462lysrw52w9fhvavzm99c78dcp9dj5xnk"))))
2185 (build-system gnu-build-system)
2187 `(("gnutls" ,gnutls)))
2189 `(("pkg-config" ,pkg-config)))
2190 (home-page "https://marlam.de/mpop/")
2191 (synopsis "POP3 mail client")
2192 (description "mpop is a small and fast POP3 client suitable as a
2193 fetchmail replacement.
2195 mpop supports multiple accounts, header based mail filtering, delivery
2196 to mbox files, maildir folders or an @acronym{MDA, Mail Delivery Agent},
2197 TLS/SSL, several authentication methods, @acronym{IDN, Internationalized Domain
2198 Names} and SOCKS proxies.")
2201 (define-public mhonarc
2208 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
2212 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
2213 (build-system perl-build-system)
2214 (home-page "https://www.mhonarc.org/")
2215 (synopsis "Create HTML archives of mail/news messages")
2217 "MHonArc is a Perl mail-to-HTML converter. MHonArc
2218 provides HTML mail archiving with index, mail thread linking,
2219 etc; plus other capabilities including support for MIME and
2220 powerful user customization features.")
2224 (define-public sendmail
2232 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
2236 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
2237 (build-system gnu-build-system)
2240 (modify-phases %standard-phases
2241 (add-before 'build 'replace-/bin/sh
2245 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2246 "contrib/mmuegel" "devtools/bin/configure.sh")
2247 (find-files "." ".*\\.m4")
2248 (find-files "." ".*\\.cf"))
2249 (("/bin/sh") (which "sh")))
2251 (substitute* "devtools/bin/Build"
2252 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
2257 ;; Render harmless any attempts to chown or chgrp
2258 (substitute* "devtools/bin/install.sh"
2259 (("owner=\\$2") "owner=''")
2260 (("group=\\$2") "group=''"))
2262 (with-output-to-file "devtools/Site/site.config.m4"
2265 define(`confCC', `gcc')
2266 define(`confOPTIMIZE', `-g -O2')
2267 define(`confLIBS', `-lresolv')
2268 define(`confINSTALL', `~a/devtools/bin/install.sh')
2269 define(`confDEPEND_TYPE', `CC-M')
2270 define(`confINST_DEP', `')
2275 (invoke "sh" "Build")
2276 (with-directory-excursion "cf/cf"
2277 (copy-file "generic-linux.mc" "sendmail.mc")
2278 (invoke "sh" "Build" "sendmail.cf"))
2280 (add-before 'install 'pre-install
2282 (let ((out (assoc-ref %outputs "out")))
2283 (mkdir-p (string-append out "/usr/bin"))
2284 (mkdir-p (string-append out "/usr/sbin"))
2285 (mkdir-p (string-append out "/etc/mail"))
2286 (setenv "DESTDIR" out)
2287 (with-directory-excursion "cf/cf"
2288 (invoke "sh" "Build" "install-cf"))
2290 ;; There is no make check. There are some post installation tests, but those
2291 ;; require root privileges
2296 (home-page "http://sendmail.org")
2298 "Highly configurable Mail Transfer Agent (MTA)")
2300 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2301 Allman. It is highly configurable and supports many delivery methods and many
2302 transfer protocols.")
2303 (license (non-copyleft "file://LICENSE"
2304 "See LICENSE in the distribution."))))
2306 (define-public opensmtpd
2313 (uri (string-append "https://www.opensmtpd.org/archives/"
2314 "opensmtpd-" version ".tar.gz"))
2316 (base32 "16nz2n4s3djlasd6m6dqfwggf6igyfxzq5igny5i0qb8lnn13f33"))))
2317 (build-system gnu-build-system)
2321 ("libevent" ,libevent)
2322 ;; XXX Upstream recommends LibreSSL, which doesn't support TLS 1.3 yet,
2323 ;; and requires a development release (3.0.2). Use OpenSSL instead.
2324 ("openssl" ,openssl)
2325 ("linux-pam" ,linux-pam)
2329 ("groff" ,groff))) ; for man pages
2332 (list "--localstatedir=/var"
2333 ;; This is the default only if it exists at build time—it doesn't.
2334 "--with-path-socket=/var/run"
2335 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2336 "--with-user-smtpd=smtpd"
2337 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2341 (modify-phases %standard-phases
2342 ;; Fix some incorrectly hard-coded external tool file names.
2343 (add-after 'unpack 'patch-FHS-file-names
2345 (substitute* "smtpd/smtpctl.c"
2346 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
2347 (("/bin/cat") (which "cat")))
2348 (substitute* "smtpd/mda_unpriv.c"
2349 (("/bin/sh") (which "sh")))
2351 ;; OpenSMTPD provides a single smtpctl utility to control both the
2352 ;; daemon and the local submission subsystem. To accomodate systems
2353 ;; that require historical interfaces such as sendmail, newaliases or
2354 ;; makemap, smtpctl operates in compatibility mode if called with the
2356 (add-after 'install 'install-compability-links
2357 (lambda* (#:key outputs #:allow-other-keys)
2358 (let* ((out (assoc-ref outputs "out"))
2359 (sbin (string-append out "/sbin/")))
2360 (for-each (lambda (command)
2361 (symlink "smtpctl" (string-append sbin command)))
2362 (list "mailq" "makemap" "newaliases"
2363 "send-mail" "sendmail")))
2365 (synopsis "Lightweight SMTP daemon")
2367 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
2368 Transfer Protocol}, with some additional standard extensions. It allows
2369 ordinary machines to exchange e-mails with other systems speaking the SMTP
2370 protocol, or to deliver them to local users.
2372 In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
2373 functionality than those available in other SMTP daemons. The objective is to
2374 provide enough features to satisfy typical usage at the risk of unsuitability
2375 to esoteric or niche requirements.")
2376 (home-page "https://www.opensmtpd.org")
2377 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2378 public-domain isc license:openssl))))
2380 (define-public opensmtpd-extras
2382 (name "opensmtpd-extras")
2386 (uri (string-append "https://www.opensmtpd.org/archives/"
2387 name "-" version ".tar.gz"))
2390 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
2391 (build-system gnu-build-system)
2393 `(("libressl" ,libressl)
2394 ("libevent" ,libevent)
2396 ("python-2" ,python-2)
2397 ("opensmtpd" ,opensmtpd)
2400 ("postgresql" ,postgresql)
2402 ("linux-pam" ,linux-pam)))
2405 ("pkg-config" ,pkg-config)
2407 ("automake" ,automake)
2408 ("autoconf" ,autoconf)))
2410 `(;; We have to configure it like this because the default checks for for example
2411 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2412 #:configure-flags (list
2413 "--with-filter-clamav" "--with-filter-dkim-signer"
2414 "--with-filter-dnsbl" "--with-filter-lua"
2415 "--with-filter-monkey" "--with-filter-pause"
2416 "--with-filter-perl" "--with-filter-python"
2417 "--with-filter-regex" "--with-filter-spamassassin"
2418 "--with-filter-stub" "--with-filter-trace"
2419 "--with-filter-void"
2421 "--with-queue-null" "--with-queue-python"
2422 "--with-queue-ram" "--with-queue-stub"
2424 "--with-scheduler-python" "--with-scheduler-ram"
2425 "--with-scheduler-stub"
2427 "--with-table-ldap" ; "--with-table-mysql"
2428 "--with-table-passwd" "--with-table-postgres"
2429 "--with-table-python" "--with-table-socketmap"
2430 "--with-table-sqlite" "--with-table-stub"
2431 ;;"--with-table-redis" ; TODO: package hiredis
2433 "--with-user=smtpd" "--with-privsep-user=smtpd"
2434 "--localstatedir=/var" "--sysconfdir=/etc"
2435 "--with-lua-type=lua" ; can use lua or luajit
2437 (string-append "--with-python="
2438 (assoc-ref %build-inputs "python-2"))
2439 (string-append "--with-lua="
2440 (assoc-ref %build-inputs "lua")))))
2441 (license (list bsd-2 bsd-3 bsd-4
2442 public-domain isc license:openssl))
2443 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2445 "This package provides extra tables, filters, and various other addons
2446 for OpenSMTPD to extend its functionality.")
2447 (home-page "https://www.opensmtpd.org")))
2449 (define-public python-mailmanclient
2451 (name "python-mailmanclient")
2456 (uri (pypi-uri "mailmanclient" version))
2459 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
2460 (build-system python-build-system)
2462 `(#:tests? #f)) ; Requires mailman running
2464 `(("python-six" ,python-six)
2465 ("python-httplib2" ,python-httplib2)))
2466 (home-page "https://launchpad.net/mailman.client")
2467 (synopsis "Python bindings for the Mailman 3 REST API")
2469 "The mailmanclient library provides official Python bindings for
2470 the GNU Mailman 3 REST API.")
2473 (define-public python2-mailmanclient
2474 (package-with-python2 python-mailmanclient))
2476 (define-public mlmmj
2483 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2484 version ".tar.bz2"))
2487 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
2488 (build-system gnu-build-system)
2490 `(("perl" ,perl))) ; For "contrib/web/"
2492 `(("pkg-config" ,pkg-config)))
2495 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2496 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2497 ;; of mimetypes for parts of multipart/mime messages that should be denied
2498 ;; or stripped. The parts then get stripped directly when the mail is
2499 ;; received. mlmmj-receive-strip also appends an extra header
2500 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2502 (list "--enable-receive-strip")
2504 (modify-phases %standard-phases
2505 (add-before 'install 'install-contrib
2506 (lambda* (#:key outputs #:allow-other-keys)
2507 (let* ((out (assoc-ref outputs "out"))
2508 (share (string-append out "/share/mlmmj"))
2509 (contrib (string-append share "/contrib/web"))
2510 (texts (string-append share "/listtexts")))
2511 (copy-recursively "contrib/web/" contrib)
2512 (copy-recursively "listtexts" texts)
2513 (rename-file texts (string-append share "/texts"))
2515 (home-page "http://mlmmj.org")
2516 (synopsis "Mailing list managing made joyful")
2518 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2519 It works with many different Mail Transport Agents (MTAs) and is simple for a
2520 system administrator to install, configure and integrate with other software.
2521 As it uses very few resources, and requires no daemons, it is ideal for
2522 installation on systems where resources are limited. Its features include:
2524 @item Archive, Custom headers / footer,
2525 @item Fully automated bounce handling (similar to ezmlm),
2526 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
2527 @item Subscribers only posting, Regular expression access control,
2528 @item Functionality to retrieve old posts, Web interface, Digests,
2529 @item No-mail subscription, VERP support,
2530 @item Delivery Status Notification (RFC1891) support,
2531 @item Rich and customisable texts for automated operations.
2533 (license license:expat)))
2535 (define-public python2-django-mailman3
2537 (name "python2-django-mailman3")
2542 (uri (pypi-uri "django-mailman3" version))
2545 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
2546 (build-system python-build-system)
2549 (modify-phases %standard-phases
2552 (invoke "django-admin"
2554 "--settings=django_mailman3.tests.settings_test"
2555 "django_mailman3"))))
2556 #:python ,python-2))
2558 `(("python2-django" ,python2-django)))
2560 `(("python2-requests" ,python2-requests)
2561 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2562 ("python2-openid" ,python2-openid)
2563 ("python2-mailmanclient" ,python2-mailmanclient)
2564 ("python2-django-allauth" ,python2-django-allauth)
2565 ("python2-django-gravatar2" ,python2-django-gravatar2)
2566 ("python2-pytz" ,python2-pytz)))
2567 (home-page "https://gitlab.com/mailman/django-mailman3")
2568 (synopsis "Django library for Mailman UIs")
2570 "Libraries and templates for Django-based interfaces
2571 interacting with Mailman.")
2574 (define-public postorius
2581 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2582 (file-name (string-append name "-" version ".tar.gz"))
2585 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2586 (build-system python-build-system)
2588 `(; One test dependency relies on Persona, which was shut down in
2591 ;; The part of the frontend of Mailman is still python 2.7.
2592 #:python ,python-2))
2594 `(("python2-django" ,python2-django)
2595 ("python2-django-mailman3" ,python2-django-mailman3)
2596 ("python2-mailmanclient" ,python2-mailmanclient)))
2597 (home-page "https://gitlab.com/mailman/postorius")
2598 (synopsis "Web user interface for GNU Mailman")
2600 "Postorius is a Django app which provides a web user interface
2601 to access GNU Mailman.")
2602 (license (list gpl3+ lgpl3+))))
2604 (define-public blists
2611 (uri (string-append "http://download.openwall.net/pub/projects/"
2612 "blists/blists-" version ".tar.gz"))
2615 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
2616 (build-system gnu-build-system)
2618 `(#:tests? #f ; No tests
2620 (modify-phases %standard-phases
2623 (lambda* (#:key outputs #:allow-other-keys)
2624 (let* ((out (assoc-ref outputs "out"))
2625 (bin (string-append out "/bin")))
2626 (install-file "bindex" bin)
2627 (install-file "bit" bin)
2629 (home-page "http://www.openwall.com/blists/")
2630 (synopsis "Web interface to mailing list archives")
2632 "Blists is a web interface to mailing list archives that works off
2633 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2634 @code{bindex} generates or updates the index file (incremental updates
2635 are supported). @code{bit} is a CGI/SSI program that generates web pages
2636 on the fly. Both programs are written in C and are very fast.")
2637 (license license:expat)))
2639 (define-public swaks
2642 (version "20181104.0")
2647 "https://jetmore.org/john/code/swaks/files/swaks-"
2651 "0n1yd27xcyb1ylp5gln3yv5gzi9r377hjy1j32367kgb3247ygq2"))))
2652 (build-system perl-build-system)
2654 `(("perl-net-dns" ,perl-net-dns)
2655 ("perl-net-ssleay" ,perl-net-ssleay)))
2657 `(#:tests? #f ; No tests
2659 (modify-phases %standard-phases
2663 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
2665 (lambda* (#:key outputs #:allow-other-keys)
2666 (let ((out (assoc-ref outputs "out")))
2667 (install-file "swaks" (string-append out "/bin"))
2668 (install-file "swaks.1" (string-append out "/share/man/man1")))
2670 (add-after 'install 'wrap-program
2671 (lambda* (#:key outputs #:allow-other-keys)
2672 (wrap-program (string-append (assoc-ref outputs "out")
2674 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2676 (home-page "https://jetmore.org/john/code/swaks/")
2677 (synopsis "Featureful SMTP test tool")
2678 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2679 test tool. It handles SMTP features and extensions such as TLS,
2680 authentication, and pipelining; multiple versions of the SMTP protocol
2681 including SMTP, ESMTP, and LMTP; and multiple transport methods including
2682 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2683 Options can be specified in environment variables, configuration files, and
2684 the command line allowing maximum configurability and ease of use for
2685 operators and scripters.")
2688 (define-public alpine
2691 ;; Upstream doesn't use git tags, but does ‘tag’ their releases in the
2692 ;; commit message. Hence the lack of GIT-VERSIONing despite using a commit
2693 ;; ID below. Don't forget to update it…
2694 (version "2.21.99999")
2698 ;; There are two versions: the plain continuation of Alpine without extra
2699 ;; patches and the version which adds extra fixes. Every distro uses
2700 ;; the patched version, and so do we to not break expectations.
2701 ;; http://alpine.freeiz.com/alpine/readme/README.patches
2703 (url "http://repo.or.cz/alpine.git")
2704 (commit "abeb2c25935ef8c75f1e5deef0f81276754dc975")))
2705 (file-name (git-file-name name version))
2707 (base32 "0rqgbw08a5lj41dkp82aq480lqkc4bnxagna7wpqffi821n8gkwz"))
2708 (modules '((guix build utils)))
2711 ;; Remove pre-built binaries scattered across the source repository.
2712 (for-each delete-file (find-files "." "\\.(dll|exe)"))
2714 (build-system gnu-build-system)
2716 `(#:make-flags (list "CC=gcc")
2717 #:configure-flags (list (string-append "--with-ssl-include-dir="
2718 (assoc-ref %build-inputs "openssl")
2720 (string-append "--with-ssl-dir="
2721 (assoc-ref %build-inputs "openssl"))
2722 (string-append "--with-ssl-certs-dir="
2724 (string-append "--with-ssl-lib-dir="
2725 (assoc-ref %build-inputs "openssl")
2727 (string-append "--with-interactive-spellcheck="
2728 (assoc-ref %build-inputs "aspell")
2730 "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
2732 (modify-phases %standard-phases
2733 (add-after 'unpack 'make-reproducible
2735 ;; This removes time-dependent code to make alpine reproducible.
2736 (substitute* "pico/blddate.c"
2737 (("%02d-%s-%d") "1970-01-01"))
2740 `(("ncurses" ,ncurses)
2741 ("openssl" ,openssl)
2743 ("openldap" ,openldap)
2744 ("cyrus-sasl" ,cyrus-sasl)
2745 ("mit-krb5" ,mit-krb5)
2748 ("linux-pam" ,linux-pam)))
2749 (home-page "https://repo.or.cz/alpine.git")
2750 (synopsis "Alternatively Licensed Program for Internet News and Email")
2752 "Alpine is a text-based mail and news client. Alpine includes several
2753 tools and applications:
2755 @item alpine, the Alpine mailer
2756 @item pico, the standalone text editor, GNU nano's predecessor
2757 @item pilot, the standalone file system navigator
2761 (define-public balsa
2768 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
2769 name "-" version ".tar.bz2"))
2771 (base32 "0yfqhfpwm1qnwmbpr6dfn2f5w8a8xxq51pn8ypgg0fw973l1c1nx"))))
2772 (build-system gnu-build-system)
2775 '(;; Balsa tries to install additional MIME icons
2776 ;; under gtk+ directory.
2777 "--enable-extra-mimeicons=no"
2778 "--with-gtksourceview"
2780 "--with-spell-checker=gtkspell"
2786 `(("cyrus-sasl" ,cyrus-sasl)
2787 ("enchant" ,enchant)
2788 ("gdk-pixbuf" ,gdk-pixbuf)
2789 ("gmime" ,gmime-2.6)
2793 ("gtksourceview" ,gtksourceview-3)
2794 ("gtkspell3" ,gtkspell3)
2795 ("libcanberra" ,libcanberra)
2796 ("libesmtp" ,libesmtp)
2797 ("libnotify" ,libnotify)
2798 ("openldap" ,openldap)
2800 ("webkitgtk" ,webkitgtk)))
2802 `(("compface" ,compface)
2803 ("glib" ,glib "bin")
2804 ("intltool" ,intltool)
2805 ("pkg-config" ,pkg-config)
2806 ("yelp-tools" ,yelp-tools)))
2807 (home-page "https://pawsa.fedorapeople.org/balsa")
2808 (synopsis "E-mail client for GNOME")
2809 (description "Balsa is a highly configurable and robust mail client for
2810 the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2811 mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
2812 the use of a local MTA such as Sendmail.")
2822 (uri (pypi-uri "afew" version))
2825 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
2826 (build-system python-build-system)
2828 `(("python-chardet" ,python-chardet)
2829 ("python-notmuch" ,python-notmuch)))
2831 `(("python-setuptools-scm" ,python-setuptools-scm)))
2832 (home-page "https://github.com/afewmail/afew")
2833 (synopsis "Initial tagging script for notmuch mail")
2834 (description "afew is an initial tagging script for notmuch mail. It
2835 provides automatic tagging each time new mail is registered with notmuch. It
2836 can add tags based on email headers or Maildir folders and can handle spam and
2847 (uri (string-append "http://pan.rebelbase.com/download/releases/"
2848 version "/source/" name "-" version ".tar.bz2"))
2850 (base32 "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55"))))
2852 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
2853 "--enable-libnotify" "--enable-manual"
2856 (modify-phases %standard-phases
2857 (add-before 'configure 'patch-gpg2
2858 (lambda* (#:key inputs #:allow-other-keys)
2859 (substitute* "pan/usenet-utils/gpg.cc"
2860 (("\"gpg2\"") (string-append "\""
2861 (assoc-ref inputs "gnupg")
2865 `(("gmime" ,gmime-2.6)
2869 ("gtkspell3" ,gtkspell3)
2870 ("libnotify" ,libnotify)
2871 ("libsecret" ,libsecret)
2872 ("libxml2" ,libxml2)
2875 `(("gettext-minimal" ,gettext-minimal)
2876 ("itstool" ,itstool)
2877 ("pkg-config" ,pkg-config)))
2878 (build-system gnu-build-system)
2879 (home-page "http://pan.rebelbase.com/")
2880 (synopsis "Pan newsreader")
2881 (description "@code{pan} is a Usenet newsreader that's good at both text
2882 and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
2883 PGP handling, multiple servers, and secure connections.")
2884 ;; License of the docs: fdl-1.1; Others: gpl2.
2885 (license (list fdl1.1+ gpl2))))
2887 (define-public imapfilter
2895 (url "https://github.com/lefcha/imapfilter.git")
2896 (commit (string-append "v" version))))
2897 (file-name (git-file-name name version))
2899 (base32 "0f65sg6hhv6778fxwsz4hvarbm97dsb8jj0mg7a9qs273r35pqck"))))
2900 (build-system gnu-build-system)
2904 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2907 (modify-phases %standard-phases
2908 (delete 'configure)))) ; no configure script
2912 ("openssl" ,openssl)))
2913 (home-page "https://github.com/lefcha/imapfilter")
2914 (synopsis "IMAP mail filtering utility")
2915 (description "IMAPFilter is a mail filtering utility. It connects
2916 to remote mail servers using IMAP, sends searching queries to the server and
2917 processes mailboxes based on the results. It can be used to delete, copy,
2918 move, flag, etc. messages residing in mailboxes at the same or different mail
2919 servers. The 4rev1 and 4 versions of IMAP are supported.")
2920 (license license:expat)))
2922 (define-public urlscan
2929 (uri (pypi-uri "urlscan" version))
2931 (base32 "1q0vxv9haap01vz1cbkzss62cgwb9365lv5vnkg2gbpx4g5y7a9l"))))
2932 (build-system python-build-system)
2934 `(("python-urwid" ,python-urwid)))
2935 (home-page "https://github.com/firecat53/urlscan")
2936 (synopsis "View/select the URLs in an email message or file")
2938 "Urlscan is a small program that is designed to integrate with the
2939 @code{mutt} mailreader to allow you to easily launch a Web browser for URLs
2940 contained in email messages. It parses an email message or file and scans it
2941 for URLs and email addresses. It then displays the URLs and their context
2942 within the message, and allows you to choose one or more URLs to send to your
2943 Web browser. Alternatively, it send a list of all URLs to stdout. It is a
2944 replacement for the @code{urlview} program.")
2955 (url "https://github.com/verdammelt/tnef.git")
2958 (base32 "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"))
2959 (file-name (git-file-name name version))))
2960 (build-system gnu-build-system)
2962 `(("autoconf" ,autoconf)
2963 ("automake" ,automake)))
2964 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
2965 (home-page "https://github.com/verdammelt/tnef")
2966 (synopsis "Unpack @code{application/ms-tnef} attachments")
2968 "TNEF is a tar-like program that unpacks MIME attachments of type
2969 @code{application/ms-tnef}.")
2973 (let ((commit "8a57c87797ffb07baa88697130204184db643521")
2977 (version (git-version "0.0.0" revision commit))
2981 (url "https://git.elephly.net/software/mumi.git")
2983 (file-name (git-file-name name version))
2986 "1575gn5p086sjxz5hvg6iyskq6cxf6vf50s9nsc4xgrbcqa3pv2c"))
2987 (modules '((guix build utils)))
2990 (substitute* "Makefile.am"
2991 ;; Install .go files to $prefix/lib instead of
2993 (("^godir[[:space:]]*=.*")
2995 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")
3000 assetsdir = $(pkgdatadir)/assets
3001 assetscssdir = $(assetsdir)/css
3002 assetsimgdir = $(assetsdir)/img
3003 assetsjsdir = $(assetsdir)/js
3005 assetscss_DATA = $(wildcard assets/css/*)
3006 assetsimg_DATA = $(wildcard assets/img/*)
3007 assetsjs_DATA = $(wildcard assets/js/*)\n"))
3009 (build-system gnu-build-system)
3011 `(#:modules ((guix build gnu-build-system)
3012 ((guix build guile-build-system)
3013 #:select (target-guile-effective-version))
3015 #:imported-modules ((guix build guile-build-system)
3016 ,@%gnu-build-system-modules)
3018 #:configure-flags '("--localstatedir=/var")
3021 (modify-phases %standard-phases
3022 (add-after 'install 'wrap-executable
3023 (lambda* (#:key outputs #:allow-other-keys)
3024 (let* ((out (assoc-ref outputs "out"))
3025 (bin (string-append out "/bin"))
3026 (version (target-guile-effective-version))
3027 (scm (string-append out "/share/guile/site/" version))
3028 (go (string-append out "/lib/guile/" version
3030 (wrap-program (string-append bin "/mumi")
3031 `("GUILE_LOAD_PATH" ":" prefix
3032 (,scm ,(getenv "GUILE_LOAD_PATH")))
3033 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
3034 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
3037 `(("guile-debbugs" ,guile-debbugs-next)
3038 ("guile-email" ,guile-email)
3039 ("guile-fibers" ,guile-fibers)
3040 ("guile-json" ,guile-json-1)
3041 ("guile-syntax-highlight" ,guile-syntax-highlight)
3042 ("gnutls" ,gnutls) ;needed to talk to https://debbugs.gnu.org
3043 ("guile" ,guile-2.2)
3044 ("mumimu" ,mumimu))) ;'mumimu' executable recorded in (mumi config)
3046 `(("autoconf" ,autoconf)
3047 ("automake" ,automake)
3048 ("pkg-config" ,pkg-config)))
3049 (home-page "https://git.elephly.net/software/mumi.git")
3050 (synopsis "Debbugs web interface")
3051 (description "Mumi is a Debbugs web interface.")
3054 (define-public ytnef
3061 (url "https://github.com/Yeraze/ytnef.git")
3062 (commit (string-append "v" version))))
3063 (file-name (git-file-name name version))
3066 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))))
3067 (build-system gnu-build-system)
3069 `(("autoconf" ,autoconf)
3070 ("automake" ,automake)
3071 ("libtool" ,libtool)))
3072 (home-page "https://github.com/Yeraze/ytnef/")
3073 (synopsis "TNEF stream reader for winmail.dat files")
3074 (description "This package provides a TNEF stream reader library and
3075 related tools to process winmail.dat files.")
3078 (define-public public-inbox
3079 (let ((commit "05a06f3262a2ddbf46adb85169e13ce9127e4524")
3082 (name "public-inbox")
3083 (version (git-version "1.2.0" revision commit))
3085 (origin (method git-fetch)
3087 (url "https://public-inbox.org")
3091 "06cclxg46gsls3x19l9s8s9x8gkjghm6gd4jb1v9ng6fds6xi2fg"))
3092 (file-name (git-file-name name version))))
3093 (build-system perl-build-system)
3096 (modify-phases %standard-phases
3097 (add-before 'configure 'qualify-paths
3099 ;; Use absolute paths for 'xapian-compact'.
3100 (let ((xapian-compact (which "xapian-compact")))
3101 (substitute* "script/public-inbox-compact"
3102 (("xapian-compact") xapian-compact)))
3104 (add-before 'check 'pre-check
3106 (substitute* "t/spawn.t"
3107 (("\\['env'\\]") (string-append "['" (which "env") "']")))
3108 (substitute* "t/ds-leak.t"
3109 (("/bin/sh") (which "sh")))
3110 (invoke "./certs/create-certs.perl")
3111 ;; XXX: This test fails due to zombie process is not reaped by
3113 (substitute* "t/httpd-unix.t"
3114 (("^SKIP: \\{") "SKIP: { skip('Guix');"))
3116 (add-after 'install 'wrap-programs
3117 (lambda* (#:key inputs outputs #:allow-other-keys)
3118 (let ((out (assoc-ref outputs "out")))
3122 ;; Let those scripts find their perl modules.
3123 `("PERL5LIB" ":" prefix
3124 (,(string-append out "/lib/perl5/site_perl")
3125 ,(getenv "PERL5LIB")))
3126 ;; 'git' is invoked in various files of the PublicInbox
3129 (,(string-append (assoc-ref inputs "git") "/bin")))))
3130 (find-files (string-append out "/bin"))))
3137 ("openssl" ,openssl)))
3139 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
3140 ("perl-dbi" ,perl-dbi)
3141 ("perl-email-address-xs" ,perl-email-address-xs)
3142 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
3143 ("perl-email-mime" ,perl-email-mime)
3144 ("perl-email-simple" ,perl-email-simple)
3145 ("perl-net-server" ,perl-net-server)
3146 ("perl-filesys-notify-simple" ,perl-filesys-notify-simple)
3147 ("perl-plack-middleware-deflater" ,perl-plack-middleware-deflater)
3148 ("perl-plack-middleware-reverseproxy" ,perl-plack-middleware-reverseproxy)
3149 ("perl-plack" ,perl-plack)
3150 ("perl-search-xapian" ,perl-search-xapian)
3151 ("perl-timedate" ,perl-timedate)
3152 ("perl-uri-escape" ,perl-uri-escape)
3154 ("perl-ipc-run" ,perl-ipc-run)
3155 ("perl-xml-feed" ,perl-xml-feed)))
3156 (home-page "https://public-inbox.org/README.html")
3157 (synopsis "Archive mailing lists in git repositories")
3159 "public-inbox implements the sharing of an email inbox via git to
3160 complement or replace traditional mailing lists. Readers may read via NNTP,
3161 Atom feeds or HTML archives.")