1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 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 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
9 ;;; Copyright © 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
10 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
11 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
14 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
16 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
17 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
18 ;;; Copyright © 2016, 2017, 2018 ng0 <ng0@n0.is>
19 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20 ;;; Copyright © 2016, 2017, 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
21 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
22 ;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
23 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
24 ;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
25 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
26 ;;; Copyright © 2017, 2018 Rene Saavedra <pacoon@protonmail.com>
27 ;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
28 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
29 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
30 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
32 ;;; This file is part of GNU Guix.
34 ;;; GNU Guix is free software; you can redistribute it and/or modify it
35 ;;; under the terms of the GNU General Public License as published by
36 ;;; the Free Software Foundation; either version 3 of the License, or (at
37 ;;; your option) any later version.
39 ;;; GNU Guix is distributed in the hope that it will be useful, but
40 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
41 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 ;;; GNU General Public License for more details.
44 ;;; You should have received a copy of the GNU General Public License
45 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47 (define-module (gnu packages mail)
48 #:use-module (gnu packages)
49 #:use-module (gnu packages admin)
50 #:use-module (gnu packages aspell)
51 #:use-module (gnu packages autotools)
52 #:use-module (gnu packages backup)
53 #:use-module (gnu packages base)
54 #:use-module (gnu packages bash)
55 #:use-module (gnu packages bison)
56 #:use-module (gnu packages calendar)
57 #:use-module (gnu packages check)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages crypto)
60 #:use-module (gnu packages curl)
61 #:use-module (gnu packages cyrus-sasl)
62 #:use-module (gnu packages databases)
63 #:use-module (gnu packages dbm)
64 #:use-module (gnu packages dejagnu)
65 #:use-module (gnu packages django)
66 #:use-module (gnu packages dns)
67 #:use-module (gnu packages docbook)
68 #:use-module (gnu packages documentation)
69 #:use-module (gnu packages emacs)
70 #:use-module (gnu packages enchant)
71 #:use-module (gnu packages gdb)
72 #:use-module (gnu packages gettext)
73 #:use-module (gnu packages ghostscript)
74 #:use-module (gnu packages glib)
75 #:use-module (gnu packages gnome)
76 #:use-module (gnu packages gnupg)
77 #:use-module (gnu packages groff)
78 #:use-module (gnu packages gsasl)
79 #:use-module (gnu packages gtk)
80 #:use-module (gnu packages guile)
81 #:use-module (gnu packages guile-xyz)
82 #:use-module (gnu packages flex)
83 #:use-module (gnu packages kerberos)
84 #:use-module (gnu packages libcanberra)
85 #:use-module (gnu packages libevent)
86 #:use-module (gnu packages libidn)
87 #:use-module (gnu packages libunistring)
88 #:use-module (gnu packages linux)
89 #:use-module (gnu packages lua)
90 #:use-module (gnu packages m4)
91 #:use-module (gnu packages man)
92 #:use-module (gnu packages ncurses)
93 #:use-module (gnu packages networking)
94 #:use-module (gnu packages openldap)
95 #:use-module (gnu packages onc-rpc)
96 #:use-module (gnu packages pcre)
97 #:use-module (gnu packages perl)
98 #:use-module (gnu packages pkg-config)
99 #:use-module (gnu packages python)
100 #:use-module (gnu packages python-web)
101 #:use-module (gnu packages python-xyz)
102 #:use-module (gnu packages readline)
103 #:use-module (gnu packages ruby)
104 #:use-module (gnu packages search)
105 #:use-module (gnu packages serialization)
106 #:use-module (gnu packages samba)
107 #:use-module (gnu packages screen)
108 #:use-module (gnu packages sqlite)
109 #:use-module (gnu packages tcl)
110 #:use-module (gnu packages texinfo)
111 #:use-module (gnu packages time)
112 #:use-module (gnu packages tls)
113 #:use-module (gnu packages w3m)
114 #:use-module (gnu packages web)
115 #:use-module (gnu packages webkit)
116 #:use-module (gnu packages xorg)
117 #:use-module (gnu packages xml)
118 #:use-module ((guix licenses)
121 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
122 non-copyleft (expat . license:expat) bsd-3
123 public-domain bsd-4 isc (openssl . license:openssl)
124 bsd-2 x11-style agpl3 asl2.0 perl-license))
125 #:use-module (guix packages)
126 #:use-module (guix download)
127 #:use-module (guix git-download)
128 #:use-module (guix utils)
129 #:use-module (guix build-system gnu)
130 #:use-module (guix build-system guile)
131 #:use-module (guix build-system perl)
132 #:use-module (guix build-system python)
133 #:use-module (guix build-system trivial))
135 (define-public mailutils
141 (uri (string-append "mirror://gnu/mailutils/mailutils-"
145 "07phzpwrnkdclx6jvirljk9zcavl8wh02kpx3mfba9msr99kpqj6"))))
146 (build-system gnu-build-system)
149 (modify-phases %standard-phases
150 (add-before 'check 'prepare-test-suite
152 ;; Use the right file name for `cat'.
153 (substitute* "testsuite/lib/mailutils.exp"
157 ;; Tests try to invoke 'maidag' such that it looks up the
158 ;; 'root' user, which does not exist in the build
160 (substitute* "maidag/tests/testsuite"
161 (("root <") "nobody <")
162 (("spool/root") "spool/nobody")
163 (("root@localhost") "nobody@localhost"))
165 ;; The 'pipeact.at' tests generate a shell script; make
166 ;; sure it uses the right shell.
167 (substitute* '("sieve/tests/testsuite"
168 "mh/tests/testsuite")
170 (string-append "#!" (which "sh"))))
172 (substitute* "mh/tests/testsuite"
173 (("moreproc: /bin/cat")
174 (string-append "moreproc: " (which "cat"))))
176 ;; XXX: The comsatd tests rely on being able to open
177 ;; /dev/tty, but that gives ENODEV in the build
178 ;; environment. Thus, ignore test failures here.
179 (substitute* "comsat/tests/Makefile.in"
180 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
181 (string-append "-" all)))
183 ;; 'frm' tests expect write access to $HOME.
184 (setenv "HOME" (getcwd))
186 ;; Avoid the message "I'm going to create the standard MH path
187 ;; for you", which would lead to one test failure (when diffing
188 ;; stdout of 'fmtcheck'.)
189 (call-with-output-file ".mh_profile"
191 (format port "Path: ~a/Mail-for-tests~%"
195 ;; TODO: Add `--with-sql'.
196 #:configure-flags (list "--sysconfdir=/etc"
198 ;; Add "/2.2" to the installation directory.
199 (string-append "--with-guile-site-dir="
200 (assoc-ref %outputs "out")
201 "/share/guile/site/2.2"))
203 #:parallel-tests? #f))
205 `(("perl" ,perl))) ;for 'gylwrap'
207 `(("dejagnu" ,dejagnu)
214 ("readline" ,readline)
215 ("linux-pam" ,linux-pam)
219 ;; Required for SEARCH CHARSET.
220 ("libiconv" ,libiconv)
221 ("libunistring" ,libunistring)))
222 (home-page "https://mailutils.org")
223 (synopsis "Utilities and library for reading and serving mail")
225 "GNU Mailutils is a collection of programs for managing, viewing and
226 processing electronic mail. It contains both utilities and server daemons
227 and all operate in a protocol-agnostic way. The underlying libraries are
228 also available, simplifying the addition of mail capabilities to new
231 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
232 (list gpl3+ lgpl3+))))
234 (define-public nullmailer
242 (string-append "https://untroubled.org/nullmailer/"
243 "nullmailer-" version ".tar.gz")
244 ;; Previous releases are moved to this subdirectory.
245 (string-append "https://untroubled.org/nullmailer/archive/"
246 "nullmailer-" version ".tar.gz")))
248 (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
249 (build-system gnu-build-system)
253 "--localstatedir=/var"
256 (modify-phases %standard-phases
257 (add-before 'check 'patch-test-FHS-file-names
259 (with-directory-excursion "test"
260 (substitute* (list "functions.in"
262 ;; Fix some shebangs later generated on the fly.
263 (("/bin/sh") (which "bash"))))
265 (add-before 'check 'pass-PATH-to-tests
266 ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
267 ;; tests then source ‘functions’, which first demands a working $PATH
268 ;; only to clobber it later. Pass our $PATH to the test environment
269 ;; and don't touch it after that.
271 (with-directory-excursion "test"
272 (substitute* "runtests"
274 (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
275 (substitute* "functions.in"
276 (("export PATH=.*") "")))
278 (add-before 'check 'delete-failing-tests
280 (with-directory-excursion "test/tests"
281 (for-each delete-file
283 ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
285 ;; XXX These require the not-yet-packaged tcpserver.
286 "protocols" "smtp-auth")))
288 (add-before 'install 'skip-install-data-local
289 ;; Don't attempt to install run-time files outside of the store.
291 (substitute* "Makefile"
292 ((" install-data-local") ""))
296 `(("daemontools" ,daemontools))) ; for svc
298 `(("gnutls" ,gnutls)))
299 (home-page "https://untroubled.org/nullmailer/")
300 (synopsis "Simple relay-only mail transfer agent")
302 "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
303 hosts that receive no local mail and only relay mail to a fixed set of smart
304 relays. It's useful for systems such as Web servers that must be able to send
305 email notifications, without having to run a full-blown MTA such as sendmail
308 Nullmailer is designed to be simple to configure, easy to extend, and secure.
309 It requires little ongoing administration. The included @command{sendmail}
310 emulator front-end should allow most (if not all) sendmail-compatible programs
311 to run without any changes.")
312 (license (list lgpl2.1+ ; lib/cli++/ (but some files lack headers)
313 gpl2+)))) ; everything else
315 (define-public fetchmail
321 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
325 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
326 (build-system gnu-build-system)
328 `(("openssl" ,openssl)))
330 `(#:configure-flags (list (string-append "--with-ssl="
331 (assoc-ref %build-inputs "openssl")))))
332 (home-page "http://www.fetchmail.info/")
333 (synopsis "Remote-mail retrieval and forwarding utility")
335 "Fetchmail is a full-featured, robust, well-documented remote-mail
336 retrieval and forwarding utility intended to be used over on-demand
337 TCP/IP links (such as SLIP or PPP connections). It supports every
338 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
339 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
342 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
343 so it can then be read by normal mail user agents such as mutt, elm
344 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
345 aliasing facilities to work just as they would on normal mail.")
346 (license gpl2+))) ; most files are actually public domain or x11
354 (uri (string-append "https://bitbucket.org/mutt/mutt/downloads/"
355 "mutt-" version ".tar.gz"))
358 "0098pr4anmq2a0id8wfi2vci3cgcfwf9k4q411w22xn8lrz3aldn"))
359 (patches (search-patches "mutt-store-references.patch"))))
360 (build-system gnu-build-system)
362 `(("cyrus-sasl" ,cyrus-sasl)
369 `(#:configure-flags '("--enable-smtp"
373 "--enable-hcache" ; for header caching
377 ;; so that mutt does not check whether the path
378 ;; exists, which it does not in the chroot
379 "--with-mailpath=/var/mail")))
380 (home-page "http://www.mutt.org/")
381 (synopsis "Mail client")
383 "Mutt is a small but very powerful text-based mail client for Unix
387 (define-public neomutt
394 (uri (string-append "https://github.com/" name "/" name
395 "/archive/" name "-" version ".tar.gz"))
398 "0072in2d6znwqq461shsaxlf40r4zr7w3j9848qvm4xlh1lq52dx"))))
399 (build-system gnu-build-system)
401 `(("cyrus-sasl" ,cyrus-sasl)
406 ("openssl" ,openssl) ;For smime
408 ("kyotocabinet" ,kyotocabinet)
413 ("notmuch" ,notmuch)))
415 `(("automake" ,automake)
416 ("gettext-minimal" ,gettext-minimal)
417 ("pkg-config" ,pkg-config)
418 ("docbook-xsl" ,docbook-xsl)
419 ("docbook-xml" ,docbook-xml-4.2)
427 ;; database, implies header caching
428 "--disable-tokyocabinet"
439 (string-append "--with-sasl="
440 (assoc-ref %build-inputs "cyrus-sasl"))
447 ;; If we do not set this, neomutt wants to check
448 ;; whether the path exists, which it does not
449 ;; in the chroot. The workaround is this.
450 "--with-mailpath=/var/mail"
453 (string-append "--with-ncurses="
454 (assoc-ref %build-inputs "ncurses"))
455 (string-append "--prefix="
456 (assoc-ref %outputs "out"))
459 (modify-phases %standard-phases
460 ;; TODO: autosetup is meant to be included in the source,
461 ;; but we should package autosetup and use our own version of it.
462 (add-before 'configure 'fix-sasl-test
464 ;; Upstream suggestion to fix the failing sasl autosetup test.
465 (substitute* "auto.def"
466 (("cc-with \\[list -cflags -I\\$prefix/include -libs")
467 "cc-with [list -includes stddef.h -cflags -I$prefix/include -libs"))
470 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
471 (let* ((out (assoc-ref outputs "out"))
472 (flags `(,@configure-flags))
473 (bash (which "bash")))
474 (setenv "SHELL" bash)
475 (setenv "CONFIG_SHELL" bash)
477 (string-append (getcwd) "/configure")
479 (home-page "https://www.neomutt.org/")
480 (synopsis "Command-line mail reader based on Mutt")
482 "NeoMutt is a command-line mail reader which is based on mutt.
483 It adds a large amount of new and improved features to mutt.")
492 (uri (string-append "mirror://gnome/sources/gmime/"
493 (version-major+minor version)
494 "/gmime-" version ".tar.xz"))
497 "1q6palbpf6lh6bvy9ly26q5apl5k0z0r4mvl6zzqh90rz4rn1v3m"))))
498 (build-system gnu-build-system)
500 `(("pkg-config" ,pkg-config)
501 ("gnupg" ,gnupg))) ; for tests only
502 (inputs `(("glib" ,glib)
507 (modify-phases %standard-phases
509 'unpack 'patch-paths-in-tests
511 ;; The test programs run several programs using 'system' with
512 ;; hard-coded paths. Here we patch them all.
513 ;; We use ISO-8859-1 here because test-iconv.c contains
514 ;; raw byte sequences in several different encodings.
515 (with-fluids ((%default-port-encoding #f))
516 (substitute* (find-files "tests" "\\.c$")
517 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
518 (let* ((base (basename prog-path))
521 (or prog (error "not found: " base)))))))
523 (home-page "http://spruce.sourceforge.net/gmime/")
524 (synopsis "MIME message parser and creator library")
526 "GMime provides a core library and set of utilities which may be used for
527 the creation and parsing of messages using the Multipurpose Internet Mail
529 (license (list lgpl2.1+ gpl2+ gpl3+))))
531 ;; Some packages are not ready for GMime 3 yet.
532 (define-public gmime-2.6
538 (uri (string-append "mirror://gnome/sources/gmime/"
539 (version-major+minor version)
540 "/gmime-" version ".tar.xz"))
543 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
545 (define-public bogofilter
551 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
552 version "/bogofilter-"
556 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
557 (build-system gnu-build-system)
560 (modify-phases %standard-phases
561 (add-before 'check 'pre-check
563 (substitute* "src/tests/t.frame"
565 (string-append "GREP=" (which "grep") "\n")))
567 (native-inputs `(("flex" ,flex)))
568 (inputs `(("bdb" ,bdb)))
569 (home-page "http://bogofilter.sourceforge.net/")
570 (synopsis "Mail classifier based on a Bayesian filter")
572 "Bogofilter is a mail filter that classifies mail as spam or ham
573 (non-spam) by a statistical analysis of the message's header and
574 content (body). The program is able to learn from the user's classifications
575 and corrections. It is based on a Bayesian filter.")
578 (define-public offlineimap
585 (url "https://github.com/OfflineIMAP/offlineimap")
586 (commit (string-append "v" version))))
587 (file-name (git-file-name name version))
590 "18sdnhjldn8zs03bgqy1qa3ikmlfvyxcvwp3nbnv1a74biccqbpa"))))
591 (build-system python-build-system)
593 `(("asciidoc" ,asciidoc)))
594 (inputs `(("python2-pysqlite" ,python2-pysqlite)
595 ("python2-six" ,python2-six)))
597 ;; The setup.py script expects python-2.
599 ;; Tests require a modifiable IMAP account.
602 (modify-phases %standard-phases
603 (add-after 'build 'build-documentation
605 (substitute* "docs/Makefile"
606 ;; Prevent xmllint and xsltproc from downloading a DTD file.
607 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
608 (invoke "make" "-C" "docs" "man")))
609 (add-after 'install 'install-documentation
610 (lambda* (#:key outputs #:allow-other-keys)
611 (let* ((out (assoc-ref outputs "out"))
612 (man (string-append out "/share/man")))
613 (install-file "docs/offlineimap.1" (string-append man "/man1"))
614 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
616 (home-page "https://www.offlineimap.org")
617 (synopsis "Sync emails between two repositories")
619 "OfflineImap synchronizes emails between two repositories, so that you
620 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
621 repository and Maildir/IMAP as LOCAL repository.")
624 (define-public emacs-mew
630 (uri (string-append "https://mew.org/Release/mew-"
634 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
638 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
639 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
640 (build-system gnu-build-system)
642 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
643 (icon-dir "/share/mew"))
644 `(#:modules ((guix build gnu-build-system)
646 (guix build emacs-utils))
647 #:imported-modules (,@%gnu-build-system-modules
648 (guix build emacs-utils))
650 (list (string-append "--with-elispdir=" %output ,elisp-dir)
651 (string-append "--with-etcdir=" %output ,icon-dir))
653 (modify-phases %standard-phases
654 (add-after 'configure 'patch-mew-icon-directory
655 (lambda* (#:key outputs #:allow-other-keys)
656 (emacs-substitute-sexps "mew-key.el"
657 ("(def.* mew-icon-directory"
659 (add-to-list 'image-load-path 'mew-icon-directory)
660 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
662 (add-after 'install 'generate-autoloads
663 (lambda* (#:key outputs #:allow-other-keys)
664 (emacs-generate-autoloads
665 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
668 (home-page "https://mew.org")
669 (synopsis "Emacs e-mail client")
670 (description "Mew (Messaging in the Emacs World) is a user interface
671 for text messages, multimedia messages (MIME), news articles and
672 security functionality including PGP, S/MIME, SSH, and SSL.")
681 (uri (string-append "https://github.com/djcb/mu/releases/"
682 "download/v" version "/mu-"
686 "04x5azl19gszw2h7argq666gf9xs4hy9q7w9cbqxvy08n56xqsln"))))
687 (build-system gnu-build-system)
689 `(("pkg-config" ,pkg-config)
690 ("glib" ,glib "bin") ; for gtester
691 ("emacs" ,emacs-minimal)
692 ("tzdata" ,tzdata-for-tests))) ;for mu/test/test-mu-query.c
693 ;; TODO: Add webkit and gtk to build the mug GUI.
698 ("gmime" ,gmime-2.6)))
700 `(#:modules ((guix build gnu-build-system)
702 (guix build emacs-utils))
703 #:imported-modules (,@%gnu-build-system-modules
704 (guix build emacs-utils))
706 (modify-phases %standard-phases
707 (add-after 'unpack 'patch-configure
708 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
709 ;; so our Emacs package can't find it. Setting "--with-lispdir"
710 ;; configure flag doesn't help because "mu4e" will be added to
711 ;; the lispdir anyway, so we have to modify "configure.ac".
713 (substitute* "configure"
714 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
716 (("guile-2.0") "guile-2.2"))
717 (substitute* '("guile/Makefile.in"
718 "guile/mu/Makefile.in")
719 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
721 (add-after 'patch-configure 'fix-date-tests
722 ;; Loosen test tolerances to prevent failures caused by daylight
723 ;; saving time (DST). See: https://github.com/djcb/mu/issues/1214.
725 (substitute* "lib/parser/test-utils.cc"
726 (("\\* 60 \\* 60, 1 },")
727 "* 60 * 60, 3600 + 1 },"))
729 (add-before 'install 'fix-ffi
730 (lambda* (#:key outputs #:allow-other-keys)
731 (substitute* "guile/mu.scm"
733 (format #f "\"~a/lib/libguile-mu\""
734 (assoc-ref outputs "out"))))
736 (add-before 'check 'check-tz-setup
737 (lambda* (#:key inputs #:allow-other-keys)
738 ;; For mu/test/test-mu-query.c
740 (string-append (assoc-ref inputs "tzdata")
743 (add-after 'install 'install-emacs-autoloads
744 (lambda* (#:key outputs #:allow-other-keys)
745 (emacs-generate-autoloads
747 (string-append (assoc-ref outputs "out")
748 "/share/emacs/site-lisp"))
750 (home-page "http://www.djcbsoftware.nl/code/mu/")
751 (synopsis "Quickly find emails")
753 "Mu is a tool for dealing with e-mail messages stored in the
754 Maildir-format. Mu's purpose in life is to help you to quickly find the
755 messages you need; in addition, it allows you to view messages, extract
756 attachments, create new maildirs, and so on.")
765 ;; package author intends on distributing via github rather
767 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
768 (uri (string-append "https://github.com/pazz/alot/archive/"
770 (file-name (string-append "alot-" version ".tar.gz"))
773 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
774 (build-system python-build-system)
776 `(;; python 3 is currently unsupported, more info:
777 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
780 `(("python2-mock" ,python2-mock)))
782 `(("python2-magic" ,python2-magic)
783 ("python2-configobj" ,python2-configobj)
784 ("python2-twisted" ,python2-twisted)
785 ("python2-urwid" ,python2-urwid)
786 ("python2-urwidtrees" ,python2-urwidtrees)
787 ("python2-pygpgme" ,python2-pygpgme)
788 ("python2-notmuch" ,python2-notmuch)))
789 (home-page "https://github.com/pazz/alot")
790 (synopsis "Command-line MUA using @code{notmuch}")
792 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
793 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
796 (define-public notifymuch
798 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
802 (version (string-append "0.1-" revision "." (string-take commit 7)))
807 (url "https://github.com/kspi/notifymuch.git")
811 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
812 (file-name (string-append name "-" version "-checkout"))))
813 (build-system python-build-system)
815 `(("python-notmuch" ,python-notmuch)
816 ("python-pygobject" ,python-pygobject)
817 ("gobject-introspection" ,gobject-introspection)
818 ("libnotify" ,libnotify)
822 (modify-phases %standard-phases
823 (add-after 'install 'wrap-binary
824 (lambda* (#:key outputs #:allow-other-keys)
825 (let* ((out (assoc-ref outputs "out"))
826 (bin (string-append out "/bin/notifymuch")))
828 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
829 `("GI_TYPELIB_PATH" ":" prefix
830 (,(getenv "GI_TYPELIB_PATH")
831 ,(string-append out "/lib/girepository-1.0")))))
833 (home-page "https://github.com/kspi/notifymuch")
834 (synopsis "Displays notifications for changes in the notmuch email database")
835 (description "notifymuch displays desktop notifications for messages in
836 the notmuch database. The notifications are sent using libnotify to a
837 notification daemon. The query to find messages to send a notification about
838 is configurable, and a notification for the same message will not be send
839 within a configurable period (defaults to 48 hours). To use notifymuch, run
840 @command{notifymuch} after new mail is indexed, this can be automated by
841 invoking @command{notifymuch} from the post-new hook.")
844 (define-public notmuch
850 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
854 "1v0ff6qqwj42p3n6qw30czzqi52nvgf3dn05vd7a03g39a5js8af"))))
855 (build-system gnu-build-system)
857 `(#:modules ((guix build gnu-build-system)
858 ((guix build emacs-build-system) #:prefix emacs:)
860 #:imported-modules (,@%gnu-build-system-modules
861 (guix build emacs-build-system)
862 (guix build emacs-utils))
863 #:make-flags (list "V=1") ; Verbose test output.
864 #:phases (modify-phases %standard-phases
865 (add-after 'unpack 'patch-notmuch-lib.el
867 (substitute* "emacs/notmuch-lib.el"
868 (("/bin/sh") (which "sh")))
871 (lambda* (#:key outputs #:allow-other-keys)
873 (setenv "CONFIG_SHELL" (which "sh"))
875 (let* ((out (assoc-ref outputs "out"))
877 (string-append out "/share/emacs/site-lisp/guix.d/"
878 ,name "-" ,version)))
879 (invoke "./configure"
880 (string-append "--prefix=" out)
881 (string-append "--emacslispdir=" elisp)
882 (string-append "--emacsetcdir=" elisp)))))
883 (add-before 'check 'prepare-test-environment
885 (setenv "TEST_CC" "gcc")
886 ;; Patch various inline shell invocations.
887 (substitute* (find-files "test" "\\.sh$")
888 (("/bin/sh") (which "sh")))
890 (add-after 'install 'make-autoloads
891 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
893 `(("bash-completion" ,bash-completion)
894 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
895 ("pkg-config" ,pkg-config)
897 ("python-docutils" ,python2-docutils)
898 ("python-sphinx" ,python2-sphinx)
900 ;; The following are required for tests only.
912 (home-page "https://notmuchmail.org/")
913 (synopsis "Thread-based email index, search, and tagging")
915 "Notmuch is a command-line based program for indexing, searching, read-
916 ing, and tagging large collections of email messages.")
919 (define-public notmuch-addrlookup-c
920 ;; This commit includes a compatibility fix for notmuch-0.25, and is not
921 ;; currently part of any release. Please update this package when
922 ;; notmuch-addrlookup-c-9 is released.
923 (let ((commit "88f156d04990a71c6ad6fc2757b537b44e3c4d00")
924 (revision "1")) ;Guix package revision
926 (name "notmuch-addrlookup-c")
927 (version (string-append "8-" revision "."
928 (string-take commit 7)))
932 (url "https://github.com/aperezdc/notmuch-addrlookup-c.git")
934 (file-name (string-append name "-" version "-checkout"))
937 "0v0wzs7qzy4n1hbql8s10qrwgalcxdzbxf8pj6cii1pv2jwmkxbm"))))
938 (build-system gnu-build-system)
940 '(#:tests? #f ; no tests
941 #:make-flags (list "CC=gcc"
942 (string-append "PREFIX="
943 (assoc-ref %outputs "out")))
944 #:phases (modify-phases %standard-phases
946 ;; Remove vim code completion config, it's not needed to
947 ;; build (or be patched).
948 (add-before 'patch-source-shebangs 'delete-ycm-file
949 (lambda _ (delete-file ".ycm_extra_conf.py")))
951 (lambda* (#:key outputs #:allow-other-keys)
952 (let ((bin (string-append
953 (assoc-ref outputs "out") "/bin")))
954 (install-file "notmuch-addrlookup" bin)))))))
956 `(("pkg-config" ,pkg-config)))
959 ("notmuch" ,notmuch)))
960 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
961 (synopsis "Address lookup tool for Notmuch")
962 (description "This is an address lookup tool using a Notmuch database,
963 useful for email address completion.")
964 (license license:expat))))
966 (define-public python-notmuch
968 (name "python-notmuch")
969 (version (package-version notmuch))
970 ;; Notmuch python bindings are now unavailable on pypi. The
971 ;; bindings are distributed via the notmuch release tarball.
972 (source (package-source notmuch))
973 (build-system python-build-system)
974 (inputs `(("notmuch" ,notmuch)))
976 `(#:tests? #f ; no "test" target
978 (modify-phases %standard-phases
979 ;; This python package lives in a subdirectory of the notmuch source
980 ;; tree, so chdir into it before building.
981 (add-after 'unpack 'enter-python-dir
982 (lambda _ (chdir "bindings/python") #t))
983 ;; Make sure the correct notmuch shared library gets loaded.
984 (add-before 'build 'set-libnotmuch-file-name
985 (lambda* (#:key inputs #:allow-other-keys)
986 (let ((notmuch (assoc-ref inputs "notmuch")))
987 (substitute* "notmuch/globals.py"
988 (("libnotmuch\\.so\\.")
989 (string-append notmuch "/lib/libnotmuch.so.")))
991 (home-page (package-home-page notmuch))
992 (synopsis "Python bindings of the Notmuch mail indexing library")
994 "This package provides Python bindings to use the Notmuch mail indexing
995 and search library.")
998 (define-public python2-notmuch
999 (package-with-python2 python-notmuch))
1001 (define-public getmail
1008 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
1009 name "-" version ".tar.gz"))
1012 "16nmvj80szr6yvcxxgmxn2lxqpjqqj4xg5a0b66zhvck6j42q3a6"))))
1013 (build-system python-build-system)
1015 `(#:tests? #f ; no tests
1016 #:python ,python-2))
1017 (home-page "http://pyropus.ca/software/getmail/")
1018 (synopsis "Mail retriever")
1020 "A flexible, extensible mail retrieval system with support for
1021 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1022 arbitrary message filtering, single-user and domain-mailboxes, and many other
1025 ;; License is specified in file '__init__.py'.
1028 (define-public libetpan
1035 (url "https://github.com/dinhviethoa/libetpan.git")
1037 (file-name (git-file-name name version))
1039 (base32 "19g4qskg71jv7sxfxsdkjmrxk9mk5kf9b6fhw06g6wvm3205n95f"))))
1040 (build-system gnu-build-system)
1041 (native-inputs `(("autoconf" ,autoconf-wrapper)
1042 ("automake" ,automake)
1043 ("libtool" ,libtool)
1044 ("pkg-config" ,pkg-config)))
1046 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1047 ;; libraries need to be propagated.
1048 `(("cyrus-sasl" ,cyrus-sasl)
1049 ("openssl" ,openssl)))
1056 (modify-phases %standard-phases
1057 (add-after 'unpack 'autogen
1059 (setenv "NOCONFIGURE" "true")
1060 (invoke "sh" "autogen.sh"))))
1062 '("--disable-static" "--disable-db")))
1063 (home-page "https://www.etpan.org/libetpan.html")
1064 (synopsis "Portable middleware for email access")
1066 "The purpose of this mail library is to provide a portable, efficient
1067 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1068 provides an API for C language. It's the low-level API used by MailCore and
1072 (define-public compface
1078 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1079 "ftp.xemacs.org/aux/"
1080 name "-" version ".tar.gz"))
1083 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1084 (build-system gnu-build-system)
1087 (synopsis "Portrait image compressor")
1088 (description "This packages takes your 48x48x1 portrait image and
1090 (home-page "http://www.cs.indiana.edu/pub/faces/")
1091 (license (x11-style "file://README"))))
1093 (define-public claws-mail
1100 "https://www.claws-mail.org/releases/claws-mail-" version
1104 "1wnj6c9cbmhphs2l6wfvndkk2g08rmxw0sl2c8k1k008dxd1ykjh"))))
1105 (build-system gnu-build-system)
1106 (native-inputs `(("pkg-config" ,pkg-config)))
1107 (inputs `(("bogofilter" ,bogofilter)
1109 ("dbus-glib" ,dbus-glib)
1110 ("enchant" ,enchant)
1112 ("ghostscript" ,ghostscript)
1113 ("hicolor-icon-theme" ,hicolor-icon-theme)
1118 ("libarchive" ,libarchive)
1119 ("libcanberra" ,libcanberra)
1120 ("libetpan" ,libetpan)
1121 ("libical" ,libical)
1122 ("libnotify" ,libnotify)
1124 ("libxml2" ,libxml2)
1126 ("python-2" ,python-2)
1127 ("mime-info" ,shared-mime-info)))
1130 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
1132 ;; Disable updating icon cache since it's done by the profile hook.
1133 ;; Conflict with other packages in the profile would be inevitable
1135 '("gtk_update_icon_cache=true")
1136 #:phases (modify-phases %standard-phases
1137 (add-before 'build 'patch-mime
1138 (lambda* (#:key inputs #:allow-other-keys)
1139 (substitute* "src/procmime.c"
1140 (("/usr/share/mime/globs")
1141 (string-append (assoc-ref inputs "mime-info")
1142 "/share/mime/globs"))))))))
1143 (synopsis "GTK-based Email client")
1145 "Claws-Mail is an email client (and news reader) based on GTK+. The
1146 appearance and interface are designed to be familiar to new users coming from
1147 other popular email clients, as well as experienced users. Almost all commands
1148 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1149 which can add many functionalities to the base client.")
1150 (home-page "https://www.claws-mail.org/")
1151 (license gpl3+))) ; most files are actually public domain or x11
1153 (define-public msmtp
1160 (uri (string-append "https://marlam.de/msmtp/releases/"
1161 "/msmtp-" version ".tar.xz"))
1164 "1d4jdgrx4czp66nnwdsy938lzr4llhwyy0715pwg0j6h6gyyxciw"))))
1165 (build-system gnu-build-system)
1167 `(("libsecret" ,libsecret)
1172 `(("pkg-config" ,pkg-config)))
1173 (home-page "https://marlam.de/msmtp/")
1175 `(#:configure-flags (list "--with-libgsasl"
1177 "--with-tls=gnutls")
1179 (modify-phases %standard-phases
1180 (add-after 'install 'install-msmtpq
1181 (lambda* (#:key outputs #:allow-other-keys)
1182 (let* ((out (assoc-ref outputs "out"))
1183 (bin (string-append out "/bin"))
1184 (doc (string-append out "/share/doc/msmtp"))
1185 (msmtpq (string-append "scripts/msmtpq")))
1186 (install-file (string-append msmtpq "/msmtpq") bin)
1187 (install-file (string-append msmtpq "/msmtp-queue") bin)
1188 (install-file (string-append msmtpq "/README.msmtpq") doc)
1191 "Simple and easy to use SMTP client with decent sendmail compatibility")
1193 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1194 an SMTP server (for example at a free mail provider) which takes care of further
1205 (uri (list (string-append "https://ftp.exim.org/pub/exim/exim4/exim-"
1207 (string-append "https://ftp.exim.org/pub/exim/exim4/old/exim-"
1208 version ".tar.bz2")))
1210 (base32 "127spqn009wa6irp6r1k7a24r8vdwb6mf0raamxn8lbxsnrwy7sl"))))
1211 (build-system gnu-build-system)
1213 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
1221 ("libxaw" ,libxaw)))
1223 `(("pcre" ,pcre "bin")
1227 (modify-phases %standard-phases
1229 ;; We'd use #:make-flags but the top-level Makefile calls others
1230 ;; recursively, so just set all variables this way.
1231 (lambda* (#:key outputs inputs #:allow-other-keys)
1232 (substitute* '("Makefile" "OS/Makefile-Default")
1233 (("(RM_COMMAND=).*" all var)
1234 (string-append var "rm\n")))
1235 (copy-file "src/EDITME" "Local/Makefile")
1236 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1237 (let ((out (assoc-ref outputs "out"))
1238 (gzip (assoc-ref inputs "gzip"))
1239 (bzip2 (assoc-ref inputs "bzip2"))
1240 (xz (assoc-ref inputs "xz")))
1241 (substitute* '("Local/Makefile")
1242 (("(BIN_DIRECTORY=).*" all var)
1243 (string-append var out "/bin\n"))
1244 (("(CONFIGURE_FILE=).*" all var)
1245 (string-append var out "/etc/exim.conf\n"))
1246 (("(EXIM_USER=).*" all var)
1247 (string-append var "nobody\n"))
1248 (("(FIXED_NEVER_USERS=).*" all var)
1249 (string-append var "\n")) ; XXX no root in build environment
1250 (("(COMPRESS_COMMAND=).*" all var)
1251 (string-append var gzip "/bin/gzip\n"))
1252 (("(ZCAT_COMMAND=).*" all var)
1253 (string-append var gzip "/bin/zcat\n")))
1254 ;; This file has hardcoded names for tools despite the zcat
1255 ;; configuration above.
1256 (substitute* '("src/exigrep.src")
1257 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1258 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1259 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1260 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1262 (add-before 'build 'fix-sh-paths
1263 (lambda* (#:key inputs #:allow-other-keys)
1264 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1265 (("SHELL=/bin/sh") "SHELL=sh"))
1266 (substitute* '("scripts/Configure-config.h")
1267 (("\\| /bin/sh") "| sh"))
1268 (let ((bash (assoc-ref inputs "bash")))
1269 (substitute* '("scripts/Configure-eximon")
1270 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1272 #:make-flags '("INSTALL_ARG=-no_chown")
1273 ;; No 'check' target.
1275 (home-page "https://www.exim.org/")
1277 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1279 "Exim is a message transfer agent (MTA) developed at the University of
1280 Cambridge for use on Unix systems connected to the Internet. In style it is
1281 similar to Smail 3, but its facilities are more general. There is a great
1282 deal of flexibility in the way mail can be routed, and there are extensive
1283 facilities for checking incoming mail.")
1286 (define-public dovecot
1293 (uri (string-append "https://www.dovecot.org/releases/"
1294 (version-major+minor version) "/"
1295 "dovecot-" version ".tar.gz"))
1297 (base32 "1zxa9banams9nmk99sf1rqahr11cdqxhwi7hyz3ddxqidpn15qdz"))))
1298 (build-system gnu-build-system)
1300 `(("pkg-config" ,pkg-config)))
1302 `(("openssl" ,openssl)
1306 ("linux-pam" ,linux-pam)))
1308 `(#:configure-flags '("--sysconfdir=/etc"
1309 "--localstatedir=/var")
1311 (modify-phases %standard-phases
1312 (add-after 'unpack 'patch-file-names
1314 (substitute* "src/lib-program-client/test-program-client-local.c"
1315 (("(/bin/| )cat") (which "cat"))
1316 (("/bin/echo") (which "echo"))
1317 (("/bin/false") (which "false"))
1318 (("/bin/sh") (which "bash"))
1319 (("head") (which "head"))
1320 (("sleep") (which "sleep")))
1321 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1322 "src/lib-smtp/test-bin/sendmail-success.sh")
1323 (("cat") (which "cat")))
1326 (lambda* (#:key make-flags #:allow-other-keys)
1327 ;; Simple hack to avoid installing a trivial README in /etc.
1328 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1330 (home-page "https://www.dovecot.org")
1331 (synopsis "Secure POP3/IMAP server")
1333 "Dovecot is a mail server whose major goals are security and reliability.
1334 It supports mbox/Maildir and its own dbox/mdbox formats.")
1335 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1336 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1337 ;; Unicode, Inc. License Agreement for Data Files and Software.
1338 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1340 (define-public dovecot-trees
1342 (name "dovecot-trees")
1347 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1348 "archive.tar.gz?ref=v" version))
1349 (file-name (string-append name "-" version ".tar.gz"))
1352 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1354 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
1355 (build-system gnu-build-system)
1357 `(("automake" ,automake)
1358 ("autoconf" ,autoconf)
1359 ("libtool" ,libtool)
1360 ("dovecot" ,dovecot)
1361 ("pkg-config" ,pkg-config)))
1363 `(("libsodium" ,libsodium)))
1365 `(#:tests? #f ;No tests exist.
1366 #:configure-flags (list (string-append "--with-dovecot="
1367 (assoc-ref %build-inputs "dovecot")
1370 (modify-phases %standard-phases
1371 (add-after 'unpack 'autogen
1373 (invoke "sh" "autogen.sh"))))))
1374 (home-page "https://0xacab.org/riseuplabs/trees")
1375 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1377 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1378 Dovecot encryption plugin. This plugin adds individually encrypted mail
1379 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1380 which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1381 the Sodium crypto library (based on NaCL).
1385 @item On IMAP log in, the user's cleartext password is passed to the plugin.
1386 @item The plugin creates an argon2 digest from the password.
1387 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1388 @item Inside the secretbox is stored a Curve25519 private key.
1389 @item The Curve25519 private key is used to decrypt each individual message,
1390 using lidsodium sealed boxes.
1391 @item New mail is encrypted as it arrives using the Curve25519 public key.
1395 (define-public dovecot-libsodium-plugin
1396 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1399 (name "dovecot-libsodium-plugin")
1400 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1405 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1407 (file-name (string-append name "-" version "-checkout"))
1410 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1411 (build-system gnu-build-system)
1413 `(("automake" ,automake)
1414 ("autoconf" ,autoconf)
1415 ("libtool" ,libtool)
1416 ("dovecot" ,dovecot)
1417 ("pkg-config" ,pkg-config)))
1419 `(("libsodium" ,libsodium)))
1421 `(#:tests? #f ;No tests exist.
1422 #:configure-flags (list (string-append "--with-dovecot="
1423 (assoc-ref %build-inputs "dovecot")
1426 (modify-phases %standard-phases
1427 (add-after 'unpack 'autogen
1429 (invoke "sh" "autogen.sh"))))))
1430 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1431 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1433 "@code{dovecot-libsodium-plugin} provides libsodium password
1434 hashing schemes plugin for @code{Dovecot}.")
1437 (define-public isync
1444 (uri (string-append "mirror://sourceforge/isync/isync/"
1445 version "/isync-" version ".tar.gz"))
1447 "173wd7x8y5sp94slzwlnb7zhgs32r57zl9xspl2rf4g3fqwmhpwd"))))
1448 (build-system gnu-build-system)
1453 ("cyrus-sasl" ,cyrus-sasl)
1454 ("openssl" ,openssl)
1456 (home-page "http://isync.sourceforge.net/")
1457 (synopsis "Mailbox synchronization program")
1459 "isync/mbsync is a command-line tool for two-way synchronization of
1460 mailboxes. Currently Maildir and IMAP are supported types.")
1463 (define-public perl-email-abstract
1465 (name "perl-email-abstract")
1470 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1471 "Email-Abstract-" version ".tar.gz"))
1474 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1475 (build-system perl-build-system)
1477 `(("perl-email-simple" ,perl-email-simple)
1478 ("perl-module-pluggable" ,perl-module-pluggable)
1479 ("perl-mro-compat" ,perl-mro-compat)))
1480 (home-page "https://metacpan.org/release/Email-Abstract")
1481 (synopsis "Interface to mail representations")
1482 (description "Email::Abstract provides module writers with the ability to
1483 write simple, representation-independent mail handling code.")
1484 (license perl-license)))
1486 (define-public perl-email-address
1488 (name "perl-email-address")
1493 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1494 "Email-Address-" version ".tar.gz"))
1496 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
1497 (build-system perl-build-system)
1498 (home-page "https://metacpan.org/release/Email-Address")
1499 (synopsis "Email address parsing and creation")
1500 (description "Email::Address implements a regex-based RFC 2822 parser that
1501 locates email addresses in strings and returns a list of Email::Address
1502 objects found. Alternatively you may construct objects manually.")
1503 (license perl-license)))
1505 (define-public perl-email-date-format
1507 (name "perl-email-date-format")
1512 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1513 "Email-Date-Format-" version ".tar.gz"))
1516 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1517 (build-system perl-build-system)
1518 (home-page "https://metacpan.org/release/Email-Date-Format")
1519 (synopsis "Produce RFC 2822 date strings")
1520 (description "Email::Date::Format provides a means for generating an RFC
1521 2822 compliant datetime string.")
1522 (license perl-license)))
1524 (define-public perl-email-messageid
1526 (name "perl-email-messageid")
1531 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1532 "Email-MessageID-" version ".tar.gz"))
1535 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1536 (build-system perl-build-system)
1537 (home-page "https://metacpan.org/release/Email-MessageID")
1538 (synopsis "Generate world unique message-ids")
1539 (description "Email::MessageID generates recommended message-ids to
1540 identify a message uniquely.")
1541 (license perl-license)))
1543 (define-public perl-email-mime
1545 (name "perl-email-mime")
1550 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1551 "Email-MIME-" version ".tar.gz"))
1554 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
1555 (build-system perl-build-system)
1557 `(("perl-email-address" ,perl-email-address)
1558 ("perl-email-messageid" ,perl-email-messageid)
1559 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1560 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1561 ("perl-email-simple" ,perl-email-simple)
1562 ("perl-mime-types" ,perl-mime-types)
1563 ("perl-module-runtime" ,perl-module-runtime)))
1564 (home-page "https://metacpan.org/release/Email-MIME")
1565 (synopsis "MIME message handling")
1566 (description "Email::MIME is an extension of the Email::Simple module, to
1567 handle MIME encoded messages. It takes a message as a string, splits it up
1568 into its constituent parts, and allows you access to various parts of the
1569 message. Headers are decoded from MIME encoding.")
1570 (license perl-license)))
1572 (define-public perl-email-mime-contenttype
1574 (name "perl-email-mime-contenttype")
1579 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1580 "Email-MIME-ContentType-" version ".tar.gz"))
1583 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
1584 (build-system perl-build-system)
1586 `(("perl-capture-tiny" ,perl-capture-tiny)))
1587 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
1588 (synopsis "Parse MIME Content-Type headers")
1589 (description "Email::MIME::ContentType parses a MIME Content-Type
1591 (license perl-license)))
1593 (define-public perl-email-mime-encodings
1595 (name "perl-email-mime-encodings")
1600 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1601 "Email-MIME-Encodings-" version ".tar.gz"))
1604 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1605 (build-system perl-build-system)
1607 `(("perl-capture-tiny" ,perl-capture-tiny)))
1608 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
1609 (synopsis "Unified interface to MIME encoding and decoding")
1610 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1611 (license perl-license)))
1613 (define-public perl-email-sender
1615 (name "perl-email-sender")
1616 (version "1.300031")
1620 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1621 "Email-Sender-" version ".tar.gz"))
1624 "052g0slw3h2lzn93j71fi47nfawww2aph4jhr3c860ji70lkf4n4"))))
1625 (build-system perl-build-system)
1627 `(("perl-capture-tiny" ,perl-capture-tiny)))
1629 `(("perl-email-abstract" ,perl-email-abstract)
1630 ("perl-email-address" ,perl-email-address)
1631 ("perl-email-simple" ,perl-email-simple)
1632 ("perl-list-moreutils" ,perl-list-moreutils)
1633 ("perl-module-runtime" ,perl-module-runtime)
1634 ("perl-moo" ,perl-moo)
1635 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1636 ("perl-sub-exporter" ,perl-sub-exporter)
1637 ("perl-throwable" ,perl-throwable)
1638 ("perl-try-tiny" ,perl-try-tiny)))
1639 (home-page "https://metacpan.org/release/Email-Sender")
1640 (synopsis "Perl library for sending email")
1641 (description "Email::Sender replaces the old and sometimes problematic
1642 Email::Send library.")
1643 (license perl-license)))
1645 (define-public perl-email-simple
1647 (name "perl-email-simple")
1652 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1653 "Email-Simple-" version ".tar.gz"))
1656 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
1657 (build-system perl-build-system)
1659 `(("perl-email-date-format" ,perl-email-date-format)))
1660 (home-page "https://metacpan.org/release/Email-Simple")
1661 (synopsis "Parsing of RFC 2822 messages")
1662 (description "Email::Simple provides simple parsing of RFC 2822 message
1663 format and headers.")
1664 (license perl-license)))
1666 (define-public libesmtp
1673 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1674 "libesmtp/libesmtp-" version ".tar.bz2/"
1675 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1677 ;; XXX This site is offline, so we fetch Fedora's cached copy
1678 ;; of the source tarball.
1679 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1680 version ".tar.bz2")))
1683 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1684 (build-system gnu-build-system)
1686 `(("openssl" ,openssl)))
1687 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1688 (synopsis "Library for sending mail via remote hosts using SMTP")
1689 (description "libESMTP is an SMTP client which manages posting (or
1690 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1691 It may be used as part of a Mail User Agent (MUA) or other program that must
1692 be able to post electronic mail where mail functionality may not be that
1693 program's primary purpose.")
1694 (license (list lgpl2.1+ gpl2+))))
1696 (define-public esmtp
1704 (url "https://github.com/andywingo/esmtp.git")
1705 (commit "01bf9fc")))
1708 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1709 (file-name (string-append name "-" version "-checkout"))))
1711 `(#:phases (modify-phases %standard-phases
1713 (lambda _ (invoke "autoreconf" "-vfi"))))))
1714 (build-system gnu-build-system)
1718 ("autoconf" ,autoconf)
1719 ("automake" ,automake)
1720 ("libtool" ,libtool)))
1722 `(("libesmtp" ,libesmtp)))
1723 (home-page "https://sourceforge.net/projects/esmtp/")
1724 (synopsis "Relay-only mail transfer agent (MTA)")
1725 (description "Esmtp is a simple relay-only mail transfer agent built using
1726 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1727 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1728 page for more on configuration. This package also provides minimal
1729 compatibility shims for the @command{sendmail}, @command{mailq}, and
1730 @command{newaliases} commands.")
1739 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1740 version "/fdm-" version ".tar.gz"))
1742 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
1743 (build-system gnu-build-system)
1746 ("openssl" ,openssl)
1748 (home-page "https://github.com/nicm/fdm")
1749 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1750 (description "fdm is a program designed to fetch mail from POP3
1751 or IMAP servers, or receive local mail from stdin, and
1752 deliver it in various ways.")
1754 ;; Why point to a source file? Well, all the individual files have a
1755 ;; copy of this license in their headers, but there's no seprate file
1756 ;; with that information.
1757 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1760 (define-public procmail
1768 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1773 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1774 ;; The following patch fixes an ambiguous definition of
1775 ;; getline() in formail.c. The patch is provided by Debian as
1777 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1778 "procmail-CVE-2014-3618.patch"
1779 "procmail-CVE-2017-16844.patch"))))
1781 `(#:phases (modify-phases %standard-phases
1784 (substitute* "Makefile"
1788 (assoc-ref %outputs "out"))
1792 #:tests? #f)) ;; There are no tests indicating a successful
1793 ;; build. Some tests of basic locking mechanisms provided by the
1794 ;; file system are performed during 'make install'. However, these
1795 ;; are performed before the actual build process.
1796 (build-system gnu-build-system)
1797 (inputs `(("exim" ,exim)))
1798 (home-page "http://www.procmail.org/")
1799 (synopsis "Versatile mail delivery agent (MDA)")
1800 (description "Procmail is a mail delivery agent (MDA) featuring support
1801 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1802 can be sorted into separate files/directories and arbitrary commands can be
1803 executed on mail arrival. Procmail is considered stable, but is no longer
1805 (license gpl2+))) ;; procmail allows to choose the
1806 ;; nonfree Artistic License 1.0
1807 ;; as alternative to the GPL2+.
1808 ;; This option is not listed here.
1810 (define-public khard
1816 (uri (pypi-uri name version))
1819 "1lyjiskc6ckjjylzr04dnm66p3cnn7vlysw9c27qls3y3ywx14zw"))))
1820 (build-system python-build-system)
1823 (modify-phases %standard-phases
1824 (add-after 'install 'install-doc
1825 (lambda* (#:key outputs #:allow-other-keys)
1826 (let* ((out (assoc-ref outputs "out"))
1827 (doc (string-append out "/share/doc/khard")))
1828 (copy-recursively "misc/khard" doc)
1831 `(("python-atomicwrites" ,python-atomicwrites)
1832 ("python-configobj" ,python-configobj)
1833 ("python-pyyaml" ,python-pyyaml)
1834 ("python-ruamel.yaml" ,python-ruamel.yaml)
1835 ("python-unidecode" ,python-unidecode)
1836 ("python-vobject" ,python-vobject)))
1837 (synopsis "Console address book using CardDAV")
1838 (description "Khard is an address book for the console. It creates, reads,
1839 modifies and removes CardDAV address book entries at your local machine. For
1840 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1841 Khard can also be used from within the email client @command{mutt}.")
1842 (home-page "https://github.com/scheibler/khard")
1845 (define-public perl-mail-spf
1847 (name "perl-mail-spf")
1853 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
1857 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1858 (build-system perl-build-system)
1860 `(("perl-module-build" ,perl-module-build)
1861 ("perl-net-dns-resolver-programmable"
1862 ,perl-net-dns-resolver-programmable)))
1865 (modify-phases %standard-phases
1866 (add-before 'configure 'modify-Build.PL
1867 (lambda* (#:key outputs #:allow-other-keys)
1868 (substitute* "Build.PL"
1869 (("'/usr/sbin'") (string-append "'"
1870 (assoc-ref outputs "out")
1874 `(("perl-error" ,perl-error)
1875 ("perl-net-dns" ,perl-net-dns)
1876 ("perl-netaddr-ip" ,perl-netaddr-ip)
1877 ("perl-uri" ,perl-uri)))
1878 (home-page "https://metacpan.org/release/Mail-SPF")
1879 (synopsis "Perl implementation of Sender Policy Framework")
1880 (description "Mail::SPF is the Sender Policy Framework implemented
1884 (define-public mb2md
1891 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1895 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1896 (build-system trivial-build-system)
1898 '(#:modules ((guix build utils))
1901 (use-modules (guix build utils))
1902 (let* ((source (assoc-ref %build-inputs "source"))
1903 (out (assoc-ref %outputs "out"))
1904 (bin (string-append out "/bin"))
1905 (perl (assoc-ref %build-inputs "perl"))
1906 (gzip (assoc-ref %build-inputs "gzip"))
1907 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1908 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1910 (with-directory-excursion bin
1911 (copy-file source "mb2md.gz")
1912 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1913 (substitute* "mb2md"
1914 (("#!/usr/bin/perl")
1915 (string-append "#!/usr/bin/perl -I " perl5lib)))
1916 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1917 (chmod "mb2md" #o555))
1919 (native-inputs `(("gzip" ,gzip)))
1920 (inputs `(("perl" ,perl)
1921 ("perl-timedate" ,perl-timedate)))
1922 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1923 (synopsis "Mbox to maildir converter")
1925 "Mb2md is a Perl script that takes one or more mbox format files and
1926 converts them to maildir format directories.")
1927 (license public-domain)))
1936 (uri (string-append "https://marlam.de/mpop/releases/"
1937 "mpop-" version ".tar.xz"))
1939 (base32 "1di86frxv4gj8fasni409m87qmv0j0vmj13lawkz1pwv9hbynhjb"))))
1940 (build-system gnu-build-system)
1942 `(("gnutls" ,gnutls)
1943 ("libidn" ,libidn)))
1945 `(("pkg-config" ,pkg-config)))
1946 (home-page "https://marlam.de/mpop/")
1947 (synopsis "POP3 mail client")
1948 (description "mpop is a small and fast POP3 client suitable as a
1949 fetchmail replacement.
1951 mpop supports multiple accounts, header based mail filtering, delivery
1952 to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1953 TLS/SSL, several authentication methods, Internationalized Domain
1954 Names (IDN) and SOCKS proxies.")
1957 (define-public mhonarc
1964 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1968 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1969 (build-system perl-build-system)
1970 (home-page "https://www.mhonarc.org/")
1971 (synopsis "Create HTML archives of mail/news messages")
1973 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1974 provides HTML mail archiving with index, mail thread linking,
1975 etc; plus other capabilities including support for MIME and
1976 powerful user customization features.")
1980 (define-public sendmail
1988 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1992 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1993 (build-system gnu-build-system)
1996 (modify-phases %standard-phases
1997 (add-before 'build 'replace-/bin/sh
2001 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2002 "contrib/mmuegel" "devtools/bin/configure.sh")
2003 (find-files "." ".*\\.m4")
2004 (find-files "." ".*\\.cf"))
2005 (("/bin/sh") (which "sh")))
2007 (substitute* "devtools/bin/Build"
2008 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
2013 ;; Render harmless any attempts to chown or chgrp
2014 (substitute* "devtools/bin/install.sh"
2015 (("owner=\\$2") "owner=''")
2016 (("group=\\$2") "group=''"))
2018 (with-output-to-file "devtools/Site/site.config.m4"
2021 define(`confCC', `gcc')
2022 define(`confOPTIMIZE', `-g -O2')
2023 define(`confLIBS', `-lresolv')
2024 define(`confINSTALL', `~a/devtools/bin/install.sh')
2025 define(`confDEPEND_TYPE', `CC-M')
2026 define(`confINST_DEP', `')
2031 (invoke "sh" "Build")
2032 (with-directory-excursion "cf/cf"
2033 (copy-file "generic-linux.mc" "sendmail.mc")
2034 (invoke "sh" "Build" "sendmail.cf"))
2036 (add-before 'install 'pre-install
2038 (let ((out (assoc-ref %outputs "out")))
2039 (mkdir-p (string-append out "/usr/bin"))
2040 (mkdir-p (string-append out "/usr/sbin"))
2041 (mkdir-p (string-append out "/etc/mail"))
2042 (setenv "DESTDIR" out)
2043 (with-directory-excursion "cf/cf"
2044 (invoke "sh" "Build" "install-cf"))
2046 ;; There is no make check. There are some post installation tests, but those
2047 ;; require root privileges
2052 (home-page "http://sendmail.org")
2054 "Highly configurable Mail Transfer Agent (MTA)")
2056 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2057 Allman. It is highly configurable and supports many delivery methods and many
2058 transfer protocols.")
2059 (license (non-copyleft "file://LICENSE"
2060 "See LICENSE in the distribution."))))
2062 (define-public opensmtpd
2068 (uri (string-append "https://www.opensmtpd.org/archives/"
2069 name "-" version ".tar.gz"))
2072 "10bsfsnlg9d9i6l2izdnxp05s3ri8fvwzqxvx1jmarc852382619"))
2073 ;; Fixed upstream: <github.com/OpenSMTPD/OpenSMTPD/pull/835>.
2074 (patches (search-patches "opensmtpd-fix-crash.patch"))))
2075 (build-system gnu-build-system)
2078 ("libressl" ,libressl)
2079 ("libevent" ,libevent)
2081 ("linux-pam" ,linux-pam)
2088 (list "--with-table-db" "--with-auth-pam" "--localstatedir=/var"
2089 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
2090 "--with-group-queue=smtpq"
2091 "--with-path-socket=/var/run" ; not default (./configure lies)
2092 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
2094 (modify-phases %standard-phases
2095 ;; Fix some incorrectly hard-coded external tool file names.
2096 (add-after 'unpack 'patch-FHS-file-names
2098 (substitute* "smtpd/smtpctl.c"
2099 (("/bin/cat") (which "cat"))
2100 (("/bin/sh") (which "sh")))
2102 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
2103 ;; the local submission subsystem. To accomodate systems that require
2104 ;; historical interfaces such as sendmail, newaliases or makemap, the
2105 ;; smtpctl utility can operate in compatibility mode if called with the
2107 (add-after 'install 'install-compability-links
2108 (lambda* (#:key outputs #:allow-other-keys)
2109 (let* ((out (assoc-ref outputs "out"))
2110 (sbin (string-append out "/sbin/")))
2111 (for-each (lambda (command)
2112 (symlink "smtpctl" (string-append sbin command)))
2113 '("makemap" "sendmail" "send-mail"
2114 "newaliases" "mailq")))
2116 (synopsis "Lightweight SMTP daemon")
2118 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
2119 some additional standard extensions. It allows ordinary machines to exchange
2120 e-mails with other systems speaking the SMTP protocol.")
2121 (home-page "https://www.opensmtpd.org")
2122 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2123 public-domain isc license:openssl))))
2125 ;; OpenSMTPd 6.4 introduced a new and incompatible configuration file format.
2126 ;; Use a different name, for now, to avoid auto-upgrades and broken mail boxes.
2127 ;; OPENSMTP-CONFIGURATION in (gnu services mail) will also need an overhaul.
2128 (define-public opensmtpd-next
2130 (name "opensmtpd-next")
2135 (uri (string-append "https://www.opensmtpd.org/archives/"
2136 "opensmtpd-" version ".tar.gz"))
2138 (base32 "0cppqlx4fk6l8rbim5symh2fm1kzshf421256g596j6c9f9q96xn"))))
2139 (build-system gnu-build-system)
2143 ("libevent" ,libevent)
2144 ("libressl" ,libressl)
2145 ("linux-pam" ,linux-pam)
2149 ("groff" ,groff))) ; for man pages
2152 (list "--localstatedir=/var"
2153 ;; This is the default only if it exists at build time—it doesn't.
2154 "--with-path-socket=/var/run"
2155 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2156 "--with-user-smtpd=smtpd"
2157 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2161 (modify-phases %standard-phases
2162 ;; Fix some incorrectly hard-coded external tool file names.
2163 (add-after 'unpack 'patch-FHS-file-names
2165 (substitute* "smtpd/smtpctl.c"
2166 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
2167 (("/bin/cat") (which "cat")))
2168 (substitute* "smtpd/mda_unpriv.c"
2169 (("/bin/sh") (which "sh")))
2171 ;; OpenSMTPD provides a single smtpctl utility to control both the
2172 ;; daemon and the local submission subsystem. To accomodate systems
2173 ;; that require historical interfaces such as sendmail, newaliases or
2174 ;; makemap, smtpctl operates in compatibility mode if called with the
2176 (add-after 'install 'install-compability-links
2177 (lambda* (#:key outputs #:allow-other-keys)
2178 (let* ((out (assoc-ref outputs "out"))
2179 (sbin (string-append out "/sbin/")))
2180 (for-each (lambda (command)
2181 (symlink "smtpctl" (string-append sbin command)))
2182 (list "mailq" "makemap" "newaliases"
2183 "send-mail" "sendmail")))
2185 (synopsis "Lightweight SMTP daemon")
2187 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
2188 Transfer Protocol}, with some additional standard extensions. It allows
2189 ordinary machines to exchange e-mails with other systems speaking the SMTP
2190 protocol, or to deliver them to local users.
2192 In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
2193 functionality than those available in other SMTP daemons. The objective is to
2194 provide enough features to satisfy typical usage at the risk of unsuitability
2195 to esoteric or niche requirements.")
2196 (home-page "https://www.opensmtpd.org")
2197 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2198 public-domain isc license:openssl))))
2200 (define-public opensmtpd-extras
2202 (name "opensmtpd-extras")
2206 (uri (string-append "https://www.opensmtpd.org/archives/"
2207 name "-" version ".tar.gz"))
2210 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
2211 (build-system gnu-build-system)
2213 `(("libressl" ,libressl)
2214 ("libevent" ,libevent)
2216 ("python-2" ,python-2)
2217 ("opensmtpd" ,opensmtpd)
2220 ("postgresql" ,postgresql)
2222 ("linux-pam" ,linux-pam)))
2225 ("pkg-config" ,pkg-config)
2227 ("automake" ,automake)
2228 ("autoconf" ,autoconf)))
2230 `(;; We have to configure it like this because the default checks for for example
2231 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2232 #:configure-flags (list
2233 "--with-filter-clamav" "--with-filter-dkim-signer"
2234 "--with-filter-dnsbl" "--with-filter-lua"
2235 "--with-filter-monkey" "--with-filter-pause"
2236 "--with-filter-perl" "--with-filter-python"
2237 "--with-filter-regex" "--with-filter-spamassassin"
2238 "--with-filter-stub" "--with-filter-trace"
2239 "--with-filter-void"
2241 "--with-queue-null" "--with-queue-python"
2242 "--with-queue-ram" "--with-queue-stub"
2244 "--with-scheduler-python" "--with-scheduler-ram"
2245 "--with-scheduler-stub"
2247 "--with-table-ldap" ; "--with-table-mysql"
2248 "--with-table-passwd" "--with-table-postgres"
2249 "--with-table-python" "--with-table-socketmap"
2250 "--with-table-sqlite" "--with-table-stub"
2251 ;;"--with-table-redis" ; TODO: package hiredis
2253 "--with-user=smtpd" "--with-privsep-user=smtpd"
2254 "--localstatedir=/var" "--sysconfdir=/etc"
2255 "--with-lua-type=lua" ; can use lua or luajit
2257 (string-append "--with-python="
2258 (assoc-ref %build-inputs "python-2"))
2259 (string-append "--with-lua="
2260 (assoc-ref %build-inputs "lua")))))
2261 (license (list bsd-2 bsd-3 bsd-4
2262 public-domain isc license:openssl))
2263 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2265 "This package provides extra tables, filters, and various other addons
2266 for OpenSMTPD to extend its functionality.")
2267 (home-page "https://www.opensmtpd.org")))
2269 (define-public python-mailmanclient
2271 (name "python-mailmanclient")
2276 (uri (pypi-uri "mailmanclient" version))
2279 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
2280 (build-system python-build-system)
2282 `(#:tests? #f)) ; Requires mailman running
2284 `(("python-six" ,python-six)
2285 ("python-httplib2" ,python-httplib2)))
2286 (home-page "https://launchpad.net/mailman.client")
2287 (synopsis "Python bindings for the Mailman 3 REST API")
2289 "The mailmanclient library provides official Python bindings for
2290 the GNU Mailman 3 REST API.")
2293 (define-public python2-mailmanclient
2294 (package-with-python2 python-mailmanclient))
2296 (define-public mlmmj
2303 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2304 version ".tar.bz2"))
2307 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
2308 (build-system gnu-build-system)
2310 `(("perl" ,perl))) ; For "contrib/web/"
2312 `(("pkg-config" ,pkg-config)))
2315 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2316 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2317 ;; of mimetypes for parts of multipart/mime messages that should be denied
2318 ;; or stripped. The parts then get stripped directly when the mail is
2319 ;; received. mlmmj-receive-strip also appends an extra header
2320 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2322 (list "--enable-receive-strip")
2324 (modify-phases %standard-phases
2325 (add-before 'install 'install-contrib
2326 (lambda* (#:key outputs #:allow-other-keys)
2327 (let* ((out (assoc-ref outputs "out"))
2328 (share (string-append out "/share/mlmmj"))
2329 (contrib (string-append share "/contrib/web"))
2330 (texts (string-append share "/listtexts")))
2331 (copy-recursively "contrib/web/" contrib)
2332 (copy-recursively "listtexts" texts)
2333 (rename-file texts (string-append share "/texts"))
2335 (home-page "http://mlmmj.org")
2336 (synopsis "Mailing list managing made joyful")
2338 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2339 It works with many different Mail Transport Agents (MTAs) and is simple for a
2340 system administrator to install, configure and integrate with other software.
2341 As it uses very few resources, and requires no daemons, it is ideal for
2342 installation on systems where resources are limited. Its features include:
2344 @item Archive, Custom headers / footer,
2345 @item Fully automated bounce handling (similar to ezmlm),
2346 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
2347 @item Subscribers only posting, Regular expression access control,
2348 @item Functionality to retrieve old posts, Web interface, Digests,
2349 @item No-mail subscription, VERP support,
2350 @item Delivery Status Notification (RFC1891) support,
2351 @item Rich and customisable texts for automated operations.
2353 (license license:expat)))
2355 (define-public python2-django-mailman3
2357 (name "python2-django-mailman3")
2362 (uri (pypi-uri "django-mailman3" version))
2365 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
2366 (build-system python-build-system)
2369 (modify-phases %standard-phases
2372 (invoke "django-admin"
2374 "--settings=django_mailman3.tests.settings_test"
2375 "django_mailman3"))))
2376 #:python ,python-2))
2378 `(("python2-django" ,python2-django)))
2380 `(("python2-requests" ,python2-requests)
2381 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2382 ("python2-openid" ,python2-openid)
2383 ("python2-mailmanclient" ,python2-mailmanclient)
2384 ("python2-django-allauth" ,python2-django-allauth)
2385 ("python2-django-gravatar2" ,python2-django-gravatar2)
2386 ("python2-pytz" ,python2-pytz)))
2387 (home-page "https://gitlab.com/mailman/django-mailman3")
2388 (synopsis "Django library for Mailman UIs")
2390 "Libraries and templates for Django-based interfaces
2391 interacting with Mailman.")
2394 (define-public postorius
2401 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2402 (file-name (string-append name "-" version ".tar.gz"))
2405 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2406 (build-system python-build-system)
2408 `(; One test dependency relies on Persona, which was shut down in
2411 ;; The part of the frontend of Mailman is still python 2.7.
2412 #:python ,python-2))
2414 `(("python2-django" ,python2-django)
2415 ("python2-django-mailman3" ,python2-django-mailman3)
2416 ("python2-mailmanclient" ,python2-mailmanclient)))
2417 (home-page "https://gitlab.com/mailman/postorius")
2418 (synopsis "Web user interface for GNU Mailman")
2420 "Postorius is a Django app which provides a web user interface
2421 to access GNU Mailman.")
2422 (license (list gpl3+ lgpl3+))))
2424 (define-public blists
2431 (uri (string-append "http://download.openwall.net/pub/projects/"
2432 "blists/blists-" version ".tar.gz"))
2435 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
2436 (build-system gnu-build-system)
2438 `(#:tests? #f ; No tests
2440 (modify-phases %standard-phases
2443 (lambda* (#:key outputs #:allow-other-keys)
2444 (let* ((out (assoc-ref outputs "out"))
2445 (bin (string-append out "/bin")))
2446 (install-file "bindex" bin)
2447 (install-file "bit" bin)
2449 (home-page "http://www.openwall.com/blists/")
2450 (synopsis "Web interface to mailing list archives")
2452 "Blists is a web interface to mailing list archives that works off
2453 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2454 @code{bindex} generates or updates the index file (incremental updates
2455 are supported). @code{bit} is a CGI/SSI program that generates web pages
2456 on the fly. Both programs are written in C and are very fast.")
2457 (license license:expat)))
2459 (define-public swaks
2462 (version "20181104.0")
2467 "https://jetmore.org/john/code/swaks/files/swaks-"
2471 "0n1yd27xcyb1ylp5gln3yv5gzi9r377hjy1j32367kgb3247ygq2"))))
2472 (build-system perl-build-system)
2474 `(("perl-net-dns" ,perl-net-dns)
2475 ("perl-net-ssleay" ,perl-net-ssleay)))
2477 `(#:tests? #f ; No tests
2479 (modify-phases %standard-phases
2483 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
2485 (lambda* (#:key outputs #:allow-other-keys)
2486 (let ((out (assoc-ref outputs "out")))
2487 (install-file "swaks" (string-append out "/bin"))
2488 (install-file "swaks.1" (string-append out "/share/man/man1")))
2490 (add-after 'install 'wrap-program
2491 (lambda* (#:key outputs #:allow-other-keys)
2492 (wrap-program (string-append (assoc-ref outputs "out")
2494 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2496 (home-page "https://jetmore.org/john/code/swaks/")
2497 (synopsis "Featureful SMTP test tool")
2498 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2499 test tool. It handles SMTP features and extensions such as TLS,
2500 authentication, and pipelining; multiple versions of the SMTP protocol
2501 including SMTP, ESMTP, and LMTP; and multiple transport methods including
2502 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2503 Options can be specified in environment variables, configuration files, and
2504 the command line allowing maximum configurability and ease of use for
2505 operators and scripters.")
2508 (define-public alpine
2511 (version "2.21.9999")
2515 ;; There are two versions: the plain continuation of Alpine without extra
2516 ;; patches and the version which adds extra fixes. Every distro uses
2517 ;; the patched version, and so do we to not break expectations.
2518 ;; http://alpine.freeiz.com/alpine/readme/README.patches
2519 (uri (string-append "http://repo.or.cz/alpine.git/snapshot/"
2520 "d3e6f3932f2af9deca8eed09e30a55e9bd524362.tar.gz"))
2521 (file-name (string-append name "-" version ".tar.gz"))
2524 "0w4qyybfdxi29r2z3giq0by6aa6v6nrgibh1xgv4d1vwwq4hw35w"))))
2525 (build-system gnu-build-system)
2527 `(#:make-flags (list "CC=gcc")
2528 #:configure-flags (list (string-append "--with-ssl-include-dir="
2529 (assoc-ref %build-inputs "openssl")
2531 (string-append "--with-ssl-dir="
2532 (assoc-ref %build-inputs "openssl"))
2533 (string-append "--with-ssl-certs-dir="
2535 (string-append "--with-ssl-lib-dir="
2536 (assoc-ref %build-inputs "openssl")
2538 (string-append "--with-interactive-spellcheck="
2539 (assoc-ref %build-inputs "aspell")
2542 (modify-phases %standard-phases
2543 (add-after 'unpack 'make-reproducible
2545 ;; This removes time-dependent code to make alpine reproducible.
2546 (substitute* "pico/blddate.c"
2547 (("%02d-%s-%d") "1970-01-01"))
2548 (substitute* (list "alpine/Makefile.in"
2549 "web/src/alpined.d/Makefile.in")
2550 (("`date`") "1970-01-01"))
2553 `(("ncurses" ,ncurses)
2554 ("openssl" ,openssl)
2556 ("openldap" ,openldap)
2557 ("cyrus-sasl" ,cyrus-sasl)
2558 ("mit-krb5" ,mit-krb5)
2561 ("linux-pam" ,linux-pam)))
2562 (home-page "http://repo.or.cz/alpine.git")
2563 (synopsis "Alternatively Licensed Program for Internet News and Email")
2565 "Alpine is a text-based mail and news client. Alpine includes several
2566 tools and applications:
2568 @item alpine, the Alpine mailer
2569 @item pico, the standalone text editor, GNU nano's predecessor
2570 @item pilot, the standalone file system navigator
2574 (define-public balsa
2581 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
2582 name "-" version ".tar.bz2"))
2585 "17k6wcsl8gki7cskr3hhmfj6n54rha8ca3b6fzd8blsl5shsankx"))))
2586 (build-system gnu-build-system)
2589 '(;; Balsa tries to install additional MIME icons
2590 ;; under gtk+ directory.
2591 "--enable-extra-mimeicons=no"
2592 "--with-gtksourceview"
2594 "--with-spell-checker=gtkspell"
2600 `(("cyrus-sasl" ,cyrus-sasl)
2601 ("enchant" ,enchant)
2602 ("gdk-pixbuf" ,gdk-pixbuf)
2603 ("gmime" ,gmime-2.6)
2607 ("gtksourceview" ,gtksourceview)
2608 ("gtkspell3" ,gtkspell3)
2609 ("libcanberra" ,libcanberra)
2610 ("libesmtp" ,libesmtp)
2611 ("libnotify" ,libnotify)
2612 ("openldap" ,openldap)
2614 ("webkitgtk" ,webkitgtk)))
2616 `(("compface" ,compface)
2617 ("glib" ,glib "bin")
2618 ("intltool" ,intltool)
2619 ("pkg-config" ,pkg-config)
2620 ("yelp-tools" ,yelp-tools)))
2621 (home-page "https://pawsa.fedorapeople.org/balsa")
2622 (synopsis "E-mail client for GNOME")
2623 (description "Balsa is a highly configurable and robust mail client for
2624 the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2625 mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
2626 the use of a local MTA such as Sendmail.")
2636 (uri (pypi-uri "afew" version))
2639 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
2640 (build-system python-build-system)
2642 `(("python-chardet" ,python-chardet)
2643 ("python-notmuch" ,python-notmuch)))
2645 `(("python-setuptools-scm" ,python-setuptools-scm)))
2646 (home-page "https://github.com/afewmail/afew")
2647 (synopsis "Initial tagging script for notmuch mail")
2648 (description "afew is an initial tagging script for notmuch mail. It
2649 provides automatic tagging each time new mail is registered with notmuch. It
2650 can add tags based on email headers or Maildir folders and can handle spam and
2661 (uri (string-append "http://pan.rebelbase.com/download/releases/"
2662 version "/source/" name "-" version ".tar.bz2"))
2665 "1b4wamv33hprghcjk903bpvnd233yxyrm18qnh13alc8h1553nk8"))))
2667 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
2668 "--enable-libnotify" "--enable-manual"
2671 (modify-phases %standard-phases
2672 (add-before 'configure 'patch-gpg2
2673 (lambda* (#:key inputs #:allow-other-keys)
2674 (substitute* "pan/usenet-utils/gpg.cc"
2675 (("\"gpg2\"") (string-append "\""
2676 (assoc-ref inputs "gnupg")
2680 `(("gmime" ,gmime-2.6)
2684 ("gtkspell3" ,gtkspell3)
2685 ("libnotify" ,libnotify)
2686 ("libsecret" ,libsecret)
2687 ("libxml2" ,libxml2)
2690 `(("gettext-minimal" ,gettext-minimal)
2691 ("itstool" ,itstool)
2692 ("pkg-config" ,pkg-config)))
2693 (build-system gnu-build-system)
2694 (home-page "http://pan.rebelbase.com/")
2695 (synopsis "Pan newsreader")
2696 (description "@code{pan} is a Usenet newsreader that's good at both text
2697 and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
2698 PGP handling, multiple servers, and secure connections.")
2699 ;; License of the docs: fdl-1.1; Others: gpl2.
2700 (license (list fdl1.1+ gpl2))))
2702 (define-public imapfilter
2710 (url "https://github.com/lefcha/imapfilter.git")
2711 (commit (string-append "v" version))))
2712 (file-name (git-file-name name version))
2714 (base32 "0vzpc54fjf5vb5vx5w0fl20xvx1k9cg6a3hbl86mm8kwsqf3wrab"))))
2715 (build-system gnu-build-system)
2719 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2722 (modify-phases %standard-phases
2724 (add-after 'unpack 'fix-include-path
2725 (lambda* (#:key inputs #:allow-other-keys)
2726 (let ((pcre (assoc-ref inputs "pcre")))
2727 (substitute* "src/Makefile"
2729 (string-append "INCDIRS ="
2730 "-I" pcre "/include")))
2735 ("openssl" ,openssl)))
2736 (home-page "https://github.com/lefcha/imapfilter")
2737 (synopsis "IMAP mail filtering utility")
2738 (description "IMAPFilter is a mail filtering utility. It connects
2739 to remote mail servers using IMAP, sends searching queries to the server and
2740 processes mailboxes based on the results. It can be used to delete, copy,
2741 move, flag, etc. messages residing in mailboxes at the same or different mail
2742 servers. The 4rev1 and 4 versions of IMAP are supported.")
2743 (license license:expat)))
2745 (define-public urlscan
2752 (uri (pypi-uri "urlscan" version))
2755 "1zldck7vnp7z04aacbx3cprf5kzha4gfhjmss4iv2lh5nccxjfzx"))))
2756 (build-system python-build-system)
2758 `(("python-urwid" ,python-urwid)))
2759 (home-page "https://github.com/firecat53/urlscan")
2760 (synopsis "View/select the URLs in an email message or file")
2762 "Urlscan is a small program that is designed to integrate with the
2763 @code{mutt} mailreader to allow you to easily launch a Web browser for URLs
2764 contained in email messages. It parses an email message or file and scans it
2765 for URLs and email addresses. It then displays the URLs and their context
2766 within the message, and allows you to choose one or more URLs to send to your
2767 Web browser. Alternatively, it send a list of all URLs to stdout. It is a
2768 replacement for the @code{urlview} program.")
2779 (url "https://github.com/verdammelt/tnef.git")
2783 "0cq2xh5wd74qn6k2nnw5rayxgqhjl3jbzf4zlc4babcwxrv32ldh"))
2784 (file-name (git-file-name name version))))
2785 (build-system gnu-build-system)
2787 `(("autoconf" ,autoconf)
2788 ("automake" ,automake)))
2789 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
2790 (home-page "https://github.com/verdammelt/tnef")
2791 (synopsis "Unpack @code{application/ms-tnef} attachments")
2793 "TNEF is a tar-like program that unpacks MIME attachments of type
2794 @code{application/ms-tnef}.")
2798 (let ((commit "ea5a738010148284aed211da953ad670003aefea")
2802 (version (git-version "0.0.0" revision commit))
2806 (url "https://git.elephly.net/software/mumi.git")
2808 (file-name (git-file-name name version))
2811 "0ci5x8dqjmp74w33q2dbs5csxp4ilfmc1xxaa8q2jnh52d7597hl"))))
2812 (build-system gnu-build-system)
2815 (modify-phases %standard-phases
2816 (add-after 'install 'wrap-executable
2817 (lambda* (#:key outputs #:allow-other-keys)
2818 (let* ((out (assoc-ref outputs "out"))
2819 (bin (string-append out "/bin"))
2820 (scm (string-append out "/share/guile/site/2.2"))
2821 (go (string-append out "/lib/guile/2.2/site-ccache")))
2822 (wrap-program (string-append bin "/mumi")
2823 `("GUILE_LOAD_PATH" ":" prefix
2824 (,scm ,(getenv "GUILE_LOAD_PATH")))
2825 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2826 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
2829 `(("guile-debbugs" ,guile-debbugs-next)
2830 ("guile-email" ,guile-email)
2831 ("guile-fibers" ,guile-fibers)
2832 ("guile-json" ,guile-json)
2833 ("guile-syntax-highlight" ,guile-syntax-highlight)
2834 ("guile" ,guile-2.2)))
2836 `(("autoconf" ,autoconf)
2837 ("automake" ,automake)
2838 ("pkg-config" ,pkg-config)))
2839 (home-page "https://git.elephly.net/software/mumi.git")
2840 (synopsis "Debbugs web interface")
2841 (description "Mumi is a Debbugs web interface.")
2844 (define-public ytnef
2851 (url "https://github.com/Yeraze/ytnef.git")
2852 (commit (string-append "v" version))))
2853 (file-name (git-file-name name version))
2856 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))))
2857 (build-system gnu-build-system)
2859 `(("autoconf" ,autoconf)
2860 ("automake" ,automake)
2861 ("libtool" ,libtool)))
2862 (home-page "https://github.com/Yeraze/ytnef/")
2863 (synopsis "TNEF stream reader for winmail.dat files")
2864 (description "This package provides a TNEF stream reader library and
2865 related tools to process winmail.dat files.")