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 linux)
88 #:use-module (gnu packages lua)
89 #:use-module (gnu packages m4)
90 #:use-module (gnu packages man)
91 #:use-module (gnu packages ncurses)
92 #:use-module (gnu packages networking)
93 #:use-module (gnu packages openldap)
94 #:use-module (gnu packages onc-rpc)
95 #:use-module (gnu packages pcre)
96 #:use-module (gnu packages perl)
97 #:use-module (gnu packages pkg-config)
98 #:use-module (gnu packages python)
99 #:use-module (gnu packages python-web)
100 #:use-module (gnu packages python-xyz)
101 #:use-module (gnu packages readline)
102 #:use-module (gnu packages ruby)
103 #:use-module (gnu packages search)
104 #:use-module (gnu packages serialization)
105 #:use-module (gnu packages samba)
106 #:use-module (gnu packages screen)
107 #:use-module (gnu packages sqlite)
108 #:use-module (gnu packages tcl)
109 #:use-module (gnu packages texinfo)
110 #:use-module (gnu packages time)
111 #:use-module (gnu packages tls)
112 #:use-module (gnu packages w3m)
113 #:use-module (gnu packages web)
114 #:use-module (gnu packages webkit)
115 #:use-module (gnu packages xorg)
116 #:use-module (gnu packages xml)
117 #:use-module ((guix licenses)
120 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
121 non-copyleft (expat . license:expat) bsd-3
122 public-domain bsd-4 isc (openssl . license:openssl)
123 bsd-2 x11-style agpl3 asl2.0 perl-license))
124 #:use-module (guix packages)
125 #:use-module (guix download)
126 #:use-module (guix git-download)
127 #:use-module (guix utils)
128 #:use-module (guix build-system gnu)
129 #:use-module (guix build-system guile)
130 #:use-module (guix build-system perl)
131 #:use-module (guix build-system python)
132 #:use-module (guix build-system trivial))
134 (define-public mailutils
140 (uri (string-append "mirror://gnu/mailutils/mailutils-"
144 "07phzpwrnkdclx6jvirljk9zcavl8wh02kpx3mfba9msr99kpqj6"))))
145 (build-system gnu-build-system)
148 (modify-phases %standard-phases
149 (add-before 'check 'prepare-test-suite
151 ;; Use the right file name for `cat'.
152 (substitute* "testsuite/lib/mailutils.exp"
156 ;; Tests try to invoke 'maidag' such that it looks up the
157 ;; 'root' user, which does not exist in the build
159 (substitute* "maidag/tests/testsuite"
160 (("root <") "nobody <")
161 (("spool/root") "spool/nobody")
162 (("root@localhost") "nobody@localhost"))
164 ;; The 'pipeact.at' tests generate a shell script; make
165 ;; sure it uses the right shell.
166 (substitute* '("sieve/tests/testsuite"
167 "mh/tests/testsuite")
169 (string-append "#!" (which "sh"))))
171 (substitute* "mh/tests/testsuite"
172 (("moreproc: /bin/cat")
173 (string-append "moreproc: " (which "cat"))))
175 ;; XXX: The comsatd tests rely on being able to open
176 ;; /dev/tty, but that gives ENODEV in the build
177 ;; environment. Thus, ignore test failures here.
178 (substitute* "comsat/tests/Makefile.in"
179 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
180 (string-append "-" all)))
182 ;; 'frm' tests expect write access to $HOME.
183 (setenv "HOME" (getcwd))
185 ;; Avoid the message "I'm going to create the standard MH path
186 ;; for you", which would lead to one test failure (when diffing
187 ;; stdout of 'fmtcheck'.)
188 (call-with-output-file ".mh_profile"
190 (format port "Path: ~a/Mail-for-tests~%"
194 ;; TODO: Add `--with-sql'.
195 #:configure-flags (list "--sysconfdir=/etc"
197 ;; Add "/2.2" to the installation directory.
198 (string-append "--with-guile-site-dir="
199 (assoc-ref %outputs "out")
200 "/share/guile/site/2.2"))
202 #:parallel-tests? #f))
204 `(("perl" ,perl))) ;for 'gylwrap'
206 `(("dejagnu" ,dejagnu)
213 ("readline" ,readline)
214 ("linux-pam" ,linux-pam)
217 (home-page "https://mailutils.org")
218 (synopsis "Utilities and library for reading and serving mail")
220 "GNU Mailutils is a collection of programs for managing, viewing and
221 processing electronic mail. It contains both utilities and server daemons
222 and all operate in a protocol-agnostic way. The underlying libraries are
223 also available, simplifying the addition of mail capabilities to new
226 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
227 (list gpl3+ lgpl3+))))
229 (define-public nullmailer
237 (string-append "https://untroubled.org/nullmailer/"
238 "nullmailer-" version ".tar.gz")
239 ;; Previous releases are moved to this subdirectory.
240 (string-append "https://untroubled.org/nullmailer/archive/"
241 "nullmailer-" version ".tar.gz")))
243 (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
244 (build-system gnu-build-system)
248 "--localstatedir=/var"
251 (modify-phases %standard-phases
252 (add-before 'check 'patch-test-FHS-file-names
254 (with-directory-excursion "test"
255 (substitute* (list "functions.in"
257 ;; Fix some shebangs later generated on the fly.
258 (("/bin/sh") (which "bash"))))
260 (add-before 'check 'pass-PATH-to-tests
261 ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
262 ;; tests then source ‘functions’, which first demands a working $PATH
263 ;; only to clobber it later. Pass our $PATH to the test environment
264 ;; and don't touch it after that.
266 (with-directory-excursion "test"
267 (substitute* "runtests"
269 (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
270 (substitute* "functions.in"
271 (("export PATH=.*") "")))
273 (add-before 'check 'delete-failing-tests
275 (with-directory-excursion "test/tests"
276 (for-each delete-file
278 ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
280 ;; XXX These require the not-yet-packaged tcpserver.
281 "protocols" "smtp-auth")))
283 (add-before 'install 'skip-install-data-local
284 ;; Don't attempt to install run-time files outside of the store.
286 (substitute* "Makefile"
287 ((" install-data-local") ""))
291 `(("daemontools" ,daemontools))) ; for svc
293 `(("gnutls" ,gnutls)))
294 (home-page "https://untroubled.org/nullmailer/")
295 (synopsis "Simple relay-only mail transfer agent")
297 "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
298 hosts that receive no local mail and only relay mail to a fixed set of smart
299 relays. It's useful for systems such as Web servers that must be able to send
300 email notifications, without having to run a full-blown MTA such as sendmail
303 Nullmailer is designed to be simple to configure, easy to extend, and secure.
304 It requires little ongoing administration. The included @command{sendmail}
305 emulator front-end should allow most (if not all) sendmail-compatible programs
306 to run without any changes.")
307 (license (list lgpl2.1+ ; lib/cli++/ (but some files lack headers)
308 gpl2+)))) ; everything else
310 (define-public fetchmail
316 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
320 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
321 (build-system gnu-build-system)
323 `(("openssl" ,openssl)))
325 `(#:configure-flags (list (string-append "--with-ssl="
326 (assoc-ref %build-inputs "openssl")))))
327 (home-page "http://www.fetchmail.info/")
328 (synopsis "Remote-mail retrieval and forwarding utility")
330 "Fetchmail is a full-featured, robust, well-documented remote-mail
331 retrieval and forwarding utility intended to be used over on-demand
332 TCP/IP links (such as SLIP or PPP connections). It supports every
333 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
334 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
337 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
338 so it can then be read by normal mail user agents such as mutt, elm
339 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
340 aliasing facilities to work just as they would on normal mail.")
341 (license gpl2+))) ; most files are actually public domain or x11
349 (uri (string-append "https://bitbucket.org/mutt/mutt/downloads/"
350 "mutt-" version ".tar.gz"))
353 "0098pr4anmq2a0id8wfi2vci3cgcfwf9k4q411w22xn8lrz3aldn"))
354 (patches (search-patches "mutt-store-references.patch"))))
355 (build-system gnu-build-system)
357 `(("cyrus-sasl" ,cyrus-sasl)
364 `(#:configure-flags '("--enable-smtp"
368 "--enable-hcache" ; for header caching
372 ;; so that mutt does not check whether the path
373 ;; exists, which it does not in the chroot
374 "--with-mailpath=/var/mail")))
375 (home-page "http://www.mutt.org/")
376 (synopsis "Mail client")
378 "Mutt is a small but very powerful text-based mail client for Unix
382 (define-public neomutt
389 (uri (string-append "https://github.com/" name "/" name
390 "/archive/" name "-" version ".tar.gz"))
393 "0072in2d6znwqq461shsaxlf40r4zr7w3j9848qvm4xlh1lq52dx"))))
394 (build-system gnu-build-system)
396 `(("cyrus-sasl" ,cyrus-sasl)
401 ("openssl" ,openssl) ;For smime
403 ("kyotocabinet" ,kyotocabinet)
408 ("notmuch" ,notmuch)))
410 `(("automake" ,automake)
411 ("gettext-minimal" ,gettext-minimal)
412 ("pkg-config" ,pkg-config)
413 ("docbook-xsl" ,docbook-xsl)
414 ("docbook-xml" ,docbook-xml-4.2)
422 ;; database, implies header caching
423 "--disable-tokyocabinet"
434 (string-append "--with-sasl="
435 (assoc-ref %build-inputs "cyrus-sasl"))
442 ;; If we do not set this, neomutt wants to check
443 ;; whether the path exists, which it does not
444 ;; in the chroot. The workaround is this.
445 "--with-mailpath=/var/mail"
448 (string-append "--with-ncurses="
449 (assoc-ref %build-inputs "ncurses"))
450 (string-append "--prefix="
451 (assoc-ref %outputs "out"))
454 (modify-phases %standard-phases
455 ;; TODO: autosetup is meant to be included in the source,
456 ;; but we should package autosetup and use our own version of it.
457 (add-before 'configure 'fix-sasl-test
459 ;; Upstream suggestion to fix the failing sasl autosetup test.
460 (substitute* "auto.def"
461 (("cc-with \\[list -cflags -I\\$prefix/include -libs")
462 "cc-with [list -includes stddef.h -cflags -I$prefix/include -libs"))
465 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
466 (let* ((out (assoc-ref outputs "out"))
467 (flags `(,@configure-flags))
468 (bash (which "bash")))
469 (setenv "SHELL" bash)
470 (setenv "CONFIG_SHELL" bash)
472 (string-append (getcwd) "/configure")
474 (home-page "https://www.neomutt.org/")
475 (synopsis "Command-line mail reader based on Mutt")
477 "NeoMutt is a command-line mail reader which is based on mutt.
478 It adds a large amount of new and improved features to mutt.")
487 (uri (string-append "mirror://gnome/sources/gmime/"
488 (version-major+minor version)
489 "/gmime-" version ".tar.xz"))
492 "1q6palbpf6lh6bvy9ly26q5apl5k0z0r4mvl6zzqh90rz4rn1v3m"))))
493 (build-system gnu-build-system)
495 `(("pkg-config" ,pkg-config)
496 ("gnupg" ,gnupg))) ; for tests only
497 (inputs `(("glib" ,glib)
502 (modify-phases %standard-phases
504 'unpack 'patch-paths-in-tests
506 ;; The test programs run several programs using 'system' with
507 ;; hard-coded paths. Here we patch them all.
508 ;; We use ISO-8859-1 here because test-iconv.c contains
509 ;; raw byte sequences in several different encodings.
510 (with-fluids ((%default-port-encoding #f))
511 (substitute* (find-files "tests" "\\.c$")
512 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
513 (let* ((base (basename prog-path))
516 (or prog (error "not found: " base)))))))
518 (home-page "http://spruce.sourceforge.net/gmime/")
519 (synopsis "MIME message parser and creator library")
521 "GMime provides a core library and set of utilities which may be used for
522 the creation and parsing of messages using the Multipurpose Internet Mail
524 (license (list lgpl2.1+ gpl2+ gpl3+))))
526 ;; Some packages are not ready for GMime 3 yet.
527 (define-public gmime-2.6
533 (uri (string-append "mirror://gnome/sources/gmime/"
534 (version-major+minor version)
535 "/gmime-" version ".tar.xz"))
538 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
540 (define-public bogofilter
546 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
547 version "/bogofilter-"
551 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
552 (build-system gnu-build-system)
555 (modify-phases %standard-phases
556 (add-before 'check 'pre-check
558 (substitute* "src/tests/t.frame"
560 (string-append "GREP=" (which "grep") "\n")))
562 (native-inputs `(("flex" ,flex)))
563 (inputs `(("bdb" ,bdb)))
564 (home-page "http://bogofilter.sourceforge.net/")
565 (synopsis "Mail classifier based on a Bayesian filter")
567 "Bogofilter is a mail filter that classifies mail as spam or ham
568 (non-spam) by a statistical analysis of the message's header and
569 content (body). The program is able to learn from the user's classifications
570 and corrections. It is based on a Bayesian filter.")
573 (define-public offlineimap
580 (url "https://github.com/OfflineIMAP/offlineimap")
581 (commit (string-append "v" version))))
582 (file-name (git-file-name name version))
585 "18sdnhjldn8zs03bgqy1qa3ikmlfvyxcvwp3nbnv1a74biccqbpa"))))
586 (build-system python-build-system)
588 `(("asciidoc" ,asciidoc)))
589 (inputs `(("python2-pysqlite" ,python2-pysqlite)
590 ("python2-six" ,python2-six)))
592 ;; The setup.py script expects python-2.
594 ;; Tests require a modifiable IMAP account.
597 (modify-phases %standard-phases
598 (add-after 'build 'build-documentation
600 (substitute* "docs/Makefile"
601 ;; Prevent xmllint and xsltproc from downloading a DTD file.
602 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
603 (invoke "make" "-C" "docs" "man")))
604 (add-after 'install 'install-documentation
605 (lambda* (#:key outputs #:allow-other-keys)
606 (let* ((out (assoc-ref outputs "out"))
607 (man (string-append out "/share/man")))
608 (install-file "docs/offlineimap.1" (string-append man "/man1"))
609 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
611 (home-page "https://www.offlineimap.org")
612 (synopsis "Sync emails between two repositories")
614 "OfflineImap synchronizes emails between two repositories, so that you
615 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
616 repository and Maildir/IMAP as LOCAL repository.")
619 (define-public emacs-mew
625 (uri (string-append "https://mew.org/Release/mew-"
629 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
633 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
634 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
635 (build-system gnu-build-system)
637 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
638 (icon-dir "/share/mew"))
639 `(#:modules ((guix build gnu-build-system)
641 (guix build emacs-utils))
642 #:imported-modules (,@%gnu-build-system-modules
643 (guix build emacs-utils))
645 (list (string-append "--with-elispdir=" %output ,elisp-dir)
646 (string-append "--with-etcdir=" %output ,icon-dir))
648 (modify-phases %standard-phases
649 (add-after 'configure 'patch-mew-icon-directory
650 (lambda* (#:key outputs #:allow-other-keys)
651 (emacs-substitute-sexps "mew-key.el"
652 ("(def.* mew-icon-directory"
654 (add-to-list 'image-load-path 'mew-icon-directory)
655 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
657 (add-after 'install 'generate-autoloads
658 (lambda* (#:key outputs #:allow-other-keys)
659 (emacs-generate-autoloads
660 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
663 (home-page "https://mew.org")
664 (synopsis "Emacs e-mail client")
665 (description "Mew (Messaging in the Emacs World) is a user interface
666 for text messages, multimedia messages (MIME), news articles and
667 security functionality including PGP, S/MIME, SSH, and SSL.")
676 (uri (string-append "https://github.com/djcb/mu/releases/"
677 "download/v" version "/mu-"
681 "04x5azl19gszw2h7argq666gf9xs4hy9q7w9cbqxvy08n56xqsln"))))
682 (build-system gnu-build-system)
684 `(("pkg-config" ,pkg-config)
685 ("glib" ,glib "bin") ; for gtester
686 ("emacs" ,emacs-minimal)
687 ("tzdata" ,tzdata-for-tests))) ;for mu/test/test-mu-query.c
688 ;; TODO: Add webkit and gtk to build the mug GUI.
693 ("gmime" ,gmime-2.6)))
695 `(#:modules ((guix build gnu-build-system)
697 (guix build emacs-utils))
698 #:imported-modules (,@%gnu-build-system-modules
699 (guix build emacs-utils))
701 (modify-phases %standard-phases
702 (add-after 'unpack 'patch-configure
703 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
704 ;; so our Emacs package can't find it. Setting "--with-lispdir"
705 ;; configure flag doesn't help because "mu4e" will be added to
706 ;; the lispdir anyway, so we have to modify "configure.ac".
708 (substitute* "configure"
709 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
711 (("guile-2.0") "guile-2.2"))
712 (substitute* '("guile/Makefile.in"
713 "guile/mu/Makefile.in")
714 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
716 (add-after 'patch-configure 'fix-date-tests
717 ;; Loosen test tolerances to prevent failures caused by daylight
718 ;; saving time (DST). See: https://github.com/djcb/mu/issues/1214.
720 (substitute* "lib/parser/test-utils.cc"
721 (("\\* 60 \\* 60, 1 },")
722 "* 60 * 60, 3600 + 1 },"))
724 (add-before 'install 'fix-ffi
725 (lambda* (#:key outputs #:allow-other-keys)
726 (substitute* "guile/mu.scm"
728 (format #f "\"~a/lib/libguile-mu\""
729 (assoc-ref outputs "out"))))
731 (add-before 'check 'check-tz-setup
732 (lambda* (#:key inputs #:allow-other-keys)
733 ;; For mu/test/test-mu-query.c
735 (string-append (assoc-ref inputs "tzdata")
738 (add-after 'install 'install-emacs-autoloads
739 (lambda* (#:key outputs #:allow-other-keys)
740 (emacs-generate-autoloads
742 (string-append (assoc-ref outputs "out")
743 "/share/emacs/site-lisp"))
745 (home-page "http://www.djcbsoftware.nl/code/mu/")
746 (synopsis "Quickly find emails")
748 "Mu is a tool for dealing with e-mail messages stored in the
749 Maildir-format. Mu's purpose in life is to help you to quickly find the
750 messages you need; in addition, it allows you to view messages, extract
751 attachments, create new maildirs, and so on.")
760 ;; package author intends on distributing via github rather
762 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
763 (uri (string-append "https://github.com/pazz/alot/archive/"
765 (file-name (string-append "alot-" version ".tar.gz"))
768 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
769 (build-system python-build-system)
771 `(;; python 3 is currently unsupported, more info:
772 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
775 `(("python2-mock" ,python2-mock)))
777 `(("python2-magic" ,python2-magic)
778 ("python2-configobj" ,python2-configobj)
779 ("python2-twisted" ,python2-twisted)
780 ("python2-urwid" ,python2-urwid)
781 ("python2-urwidtrees" ,python2-urwidtrees)
782 ("python2-pygpgme" ,python2-pygpgme)
783 ("python2-notmuch" ,python2-notmuch)))
784 (home-page "https://github.com/pazz/alot")
785 (synopsis "Command-line MUA using @code{notmuch}")
787 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
788 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
791 (define-public notifymuch
793 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
797 (version (string-append "0.1-" revision "." (string-take commit 7)))
802 (url "https://github.com/kspi/notifymuch.git")
806 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
807 (file-name (string-append name "-" version "-checkout"))))
808 (build-system python-build-system)
810 `(("python-notmuch" ,python-notmuch)
811 ("python-pygobject" ,python-pygobject)
812 ("gobject-introspection" ,gobject-introspection)
813 ("libnotify" ,libnotify)
817 (modify-phases %standard-phases
818 (add-after 'install 'wrap-binary
819 (lambda* (#:key outputs #:allow-other-keys)
820 (let* ((out (assoc-ref outputs "out"))
821 (bin (string-append out "/bin/notifymuch")))
823 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
824 `("GI_TYPELIB_PATH" ":" prefix
825 (,(getenv "GI_TYPELIB_PATH")
826 ,(string-append out "/lib/girepository-1.0")))))
828 (home-page "https://github.com/kspi/notifymuch")
829 (synopsis "Displays notifications for changes in the notmuch email database")
830 (description "notifymuch displays desktop notifications for messages in
831 the notmuch database. The notifications are sent using libnotify to a
832 notification daemon. The query to find messages to send a notification about
833 is configurable, and a notification for the same message will not be send
834 within a configurable period (defaults to 48 hours). To use notifymuch, run
835 @command{notifymuch} after new mail is indexed, this can be automated by
836 invoking @command{notifymuch} from the post-new hook.")
839 (define-public notmuch
845 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
849 "1v0ff6qqwj42p3n6qw30czzqi52nvgf3dn05vd7a03g39a5js8af"))))
850 (build-system gnu-build-system)
852 `(#:modules ((guix build gnu-build-system)
853 ((guix build emacs-build-system) #:prefix emacs:)
855 #:imported-modules (,@%gnu-build-system-modules
856 (guix build emacs-build-system)
857 (guix build emacs-utils))
858 #:make-flags (list "V=1") ; Verbose test output.
859 #:phases (modify-phases %standard-phases
860 (add-after 'unpack 'patch-notmuch-lib.el
862 (substitute* "emacs/notmuch-lib.el"
863 (("/bin/sh") (which "sh")))
866 (lambda* (#:key outputs #:allow-other-keys)
868 (setenv "CONFIG_SHELL" (which "sh"))
870 (let* ((out (assoc-ref outputs "out"))
872 (string-append out "/share/emacs/site-lisp/guix.d/"
873 ,name "-" ,version)))
874 (invoke "./configure"
875 (string-append "--prefix=" out)
876 (string-append "--emacslispdir=" elisp)
877 (string-append "--emacsetcdir=" elisp)))))
878 (add-before 'check 'prepare-test-environment
880 (setenv "TEST_CC" "gcc")
881 ;; Patch various inline shell invocations.
882 (substitute* (find-files "test" "\\.sh$")
883 (("/bin/sh") (which "sh")))
885 (add-after 'install 'make-autoloads
886 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
888 `(("bash-completion" ,bash-completion)
889 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
890 ("pkg-config" ,pkg-config)
892 ("python-docutils" ,python2-docutils)
893 ("python-sphinx" ,python2-sphinx)
895 ;; The following are required for tests only.
907 (home-page "https://notmuchmail.org/")
908 (synopsis "Thread-based email index, search, and tagging")
910 "Notmuch is a command-line based program for indexing, searching, read-
911 ing, and tagging large collections of email messages.")
914 (define-public notmuch-addrlookup-c
915 ;; This commit includes a compatibility fix for notmuch-0.25, and is not
916 ;; currently part of any release. Please update this package when
917 ;; notmuch-addrlookup-c-9 is released.
918 (let ((commit "88f156d04990a71c6ad6fc2757b537b44e3c4d00")
919 (revision "1")) ;Guix package revision
921 (name "notmuch-addrlookup-c")
922 (version (string-append "8-" revision "."
923 (string-take commit 7)))
927 (url "https://github.com/aperezdc/notmuch-addrlookup-c.git")
929 (file-name (string-append name "-" version "-checkout"))
932 "0v0wzs7qzy4n1hbql8s10qrwgalcxdzbxf8pj6cii1pv2jwmkxbm"))))
933 (build-system gnu-build-system)
935 '(#:tests? #f ; no tests
936 #:make-flags (list "CC=gcc"
937 (string-append "PREFIX="
938 (assoc-ref %outputs "out")))
939 #:phases (modify-phases %standard-phases
941 ;; Remove vim code completion config, it's not needed to
942 ;; build (or be patched).
943 (add-before 'patch-source-shebangs 'delete-ycm-file
944 (lambda _ (delete-file ".ycm_extra_conf.py")))
946 (lambda* (#:key outputs #:allow-other-keys)
947 (let ((bin (string-append
948 (assoc-ref outputs "out") "/bin")))
949 (install-file "notmuch-addrlookup" bin)))))))
951 `(("pkg-config" ,pkg-config)))
954 ("notmuch" ,notmuch)))
955 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
956 (synopsis "Address lookup tool for Notmuch")
957 (description "This is an address lookup tool using a Notmuch database,
958 useful for email address completion.")
959 (license license:expat))))
961 (define-public python-notmuch
963 (name "python-notmuch")
964 (version (package-version notmuch))
965 ;; Notmuch python bindings are now unavailable on pypi. The
966 ;; bindings are distributed via the notmuch release tarball.
967 (source (package-source notmuch))
968 (build-system python-build-system)
969 (inputs `(("notmuch" ,notmuch)))
971 `(#:tests? #f ; no "test" target
973 (modify-phases %standard-phases
974 ;; This python package lives in a subdirectory of the notmuch source
975 ;; tree, so chdir into it before building.
976 (add-after 'unpack 'enter-python-dir
977 (lambda _ (chdir "bindings/python") #t))
978 ;; Make sure the correct notmuch shared library gets loaded.
979 (add-before 'build 'set-libnotmuch-file-name
980 (lambda* (#:key inputs #:allow-other-keys)
981 (let ((notmuch (assoc-ref inputs "notmuch")))
982 (substitute* "notmuch/globals.py"
983 (("libnotmuch\\.so\\.")
984 (string-append notmuch "/lib/libnotmuch.so.")))
986 (home-page (package-home-page notmuch))
987 (synopsis "Python bindings of the Notmuch mail indexing library")
989 "This package provides Python bindings to use the Notmuch mail indexing
990 and search library.")
993 (define-public python2-notmuch
994 (package-with-python2 python-notmuch))
996 (define-public getmail
1003 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
1004 name "-" version ".tar.gz"))
1007 "16nmvj80szr6yvcxxgmxn2lxqpjqqj4xg5a0b66zhvck6j42q3a6"))))
1008 (build-system python-build-system)
1010 `(#:tests? #f ; no tests
1011 #:python ,python-2))
1012 (home-page "http://pyropus.ca/software/getmail/")
1013 (synopsis "Mail retriever")
1015 "A flexible, extensible mail retrieval system with support for
1016 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1017 arbitrary message filtering, single-user and domain-mailboxes, and many other
1020 ;; License is specified in file '__init__.py'.
1023 (define-public libetpan
1030 (url "https://github.com/dinhviethoa/libetpan.git")
1032 (file-name (git-file-name name version))
1034 (base32 "19g4qskg71jv7sxfxsdkjmrxk9mk5kf9b6fhw06g6wvm3205n95f"))))
1035 (build-system gnu-build-system)
1036 (native-inputs `(("autoconf" ,autoconf-wrapper)
1037 ("automake" ,automake)
1038 ("libtool" ,libtool)
1039 ("pkg-config" ,pkg-config)))
1041 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1042 ;; libraries need to be propagated.
1043 `(("cyrus-sasl" ,cyrus-sasl)
1044 ("openssl" ,openssl)))
1051 (modify-phases %standard-phases
1052 (add-after 'unpack 'autogen
1054 (setenv "NOCONFIGURE" "true")
1055 (invoke "sh" "autogen.sh"))))
1057 '("--disable-static" "--disable-db")))
1058 (home-page "https://www.etpan.org/libetpan.html")
1059 (synopsis "Portable middleware for email access")
1061 "The purpose of this mail library is to provide a portable, efficient
1062 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1063 provides an API for C language. It's the low-level API used by MailCore and
1067 (define-public compface
1073 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1074 "ftp.xemacs.org/aux/"
1075 name "-" version ".tar.gz"))
1078 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1079 (build-system gnu-build-system)
1082 (synopsis "Portrait image compressor")
1083 (description "This packages takes your 48x48x1 portrait image and
1085 (home-page "http://www.cs.indiana.edu/pub/faces/")
1086 (license (x11-style "file://README"))))
1088 (define-public claws-mail
1095 "https://www.claws-mail.org/releases/claws-mail-" version
1099 "1wnj6c9cbmhphs2l6wfvndkk2g08rmxw0sl2c8k1k008dxd1ykjh"))))
1100 (build-system gnu-build-system)
1101 (native-inputs `(("pkg-config" ,pkg-config)))
1102 (inputs `(("bogofilter" ,bogofilter)
1104 ("dbus-glib" ,dbus-glib)
1105 ("enchant" ,enchant)
1107 ("ghostscript" ,ghostscript)
1108 ("hicolor-icon-theme" ,hicolor-icon-theme)
1113 ("libarchive" ,libarchive)
1114 ("libcanberra" ,libcanberra)
1115 ("libetpan" ,libetpan)
1116 ("libical" ,libical)
1117 ("libnotify" ,libnotify)
1119 ("libxml2" ,libxml2)
1121 ("python-2" ,python-2)
1122 ("mime-info" ,shared-mime-info)))
1125 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
1127 ;; Disable updating icon cache since it's done by the profile hook.
1128 ;; Conflict with other packages in the profile would be inevitable
1130 '("gtk_update_icon_cache=true")
1131 #:phases (modify-phases %standard-phases
1132 (add-before 'build 'patch-mime
1133 (lambda* (#:key inputs #:allow-other-keys)
1134 (substitute* "src/procmime.c"
1135 (("/usr/share/mime/globs")
1136 (string-append (assoc-ref inputs "mime-info")
1137 "/share/mime/globs"))))))))
1138 (synopsis "GTK-based Email client")
1140 "Claws-Mail is an email client (and news reader) based on GTK+. The
1141 appearance and interface are designed to be familiar to new users coming from
1142 other popular email clients, as well as experienced users. Almost all commands
1143 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1144 which can add many functionalities to the base client.")
1145 (home-page "https://www.claws-mail.org/")
1146 (license gpl3+))) ; most files are actually public domain or x11
1148 (define-public msmtp
1155 (uri (string-append "https://marlam.de/msmtp/releases/"
1156 "/msmtp-" version ".tar.xz"))
1159 "1d4jdgrx4czp66nnwdsy938lzr4llhwyy0715pwg0j6h6gyyxciw"))))
1160 (build-system gnu-build-system)
1162 `(("libsecret" ,libsecret)
1167 `(("pkg-config" ,pkg-config)))
1168 (home-page "https://marlam.de/msmtp/")
1170 `(#:configure-flags (list "--with-libgsasl"
1172 "--with-tls=gnutls")
1174 (modify-phases %standard-phases
1175 (add-after 'install 'install-msmtpq
1176 (lambda* (#:key outputs #:allow-other-keys)
1177 (let* ((out (assoc-ref outputs "out"))
1178 (bin (string-append out "/bin"))
1179 (doc (string-append out "/share/doc/msmtp"))
1180 (msmtpq (string-append "scripts/msmtpq")))
1181 (install-file (string-append msmtpq "/msmtpq") bin)
1182 (install-file (string-append msmtpq "/msmtp-queue") bin)
1183 (install-file (string-append msmtpq "/README.msmtpq") doc)
1186 "Simple and easy to use SMTP client with decent sendmail compatibility")
1188 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1189 an SMTP server (for example at a free mail provider) which takes care of further
1200 (uri (list (string-append "https://ftp.exim.org/pub/exim/exim4/exim-"
1202 (string-append "https://ftp.exim.org/pub/exim/exim4/old/exim-"
1203 version ".tar.bz2")))
1205 (base32 "127spqn009wa6irp6r1k7a24r8vdwb6mf0raamxn8lbxsnrwy7sl"))))
1206 (build-system gnu-build-system)
1208 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
1216 ("libxaw" ,libxaw)))
1218 `(("pcre" ,pcre "bin")
1222 (modify-phases %standard-phases
1224 ;; We'd use #:make-flags but the top-level Makefile calls others
1225 ;; recursively, so just set all variables this way.
1226 (lambda* (#:key outputs inputs #:allow-other-keys)
1227 (substitute* '("Makefile" "OS/Makefile-Default")
1228 (("(RM_COMMAND=).*" all var)
1229 (string-append var "rm\n")))
1230 (copy-file "src/EDITME" "Local/Makefile")
1231 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1232 (let ((out (assoc-ref outputs "out"))
1233 (gzip (assoc-ref inputs "gzip"))
1234 (bzip2 (assoc-ref inputs "bzip2"))
1235 (xz (assoc-ref inputs "xz")))
1236 (substitute* '("Local/Makefile")
1237 (("(BIN_DIRECTORY=).*" all var)
1238 (string-append var out "/bin\n"))
1239 (("(CONFIGURE_FILE=).*" all var)
1240 (string-append var out "/etc/exim.conf\n"))
1241 (("(EXIM_USER=).*" all var)
1242 (string-append var "nobody\n"))
1243 (("(FIXED_NEVER_USERS=).*" all var)
1244 (string-append var "\n")) ; XXX no root in build environment
1245 (("(COMPRESS_COMMAND=).*" all var)
1246 (string-append var gzip "/bin/gzip\n"))
1247 (("(ZCAT_COMMAND=).*" all var)
1248 (string-append var gzip "/bin/zcat\n")))
1249 ;; This file has hardcoded names for tools despite the zcat
1250 ;; configuration above.
1251 (substitute* '("src/exigrep.src")
1252 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1253 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1254 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1255 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1257 (add-before 'build 'fix-sh-paths
1258 (lambda* (#:key inputs #:allow-other-keys)
1259 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1260 (("SHELL=/bin/sh") "SHELL=sh"))
1261 (substitute* '("scripts/Configure-config.h")
1262 (("\\| /bin/sh") "| sh"))
1263 (let ((bash (assoc-ref inputs "bash")))
1264 (substitute* '("scripts/Configure-eximon")
1265 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1267 #:make-flags '("INSTALL_ARG=-no_chown")
1268 ;; No 'check' target.
1270 (home-page "https://www.exim.org/")
1272 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1274 "Exim is a message transfer agent (MTA) developed at the University of
1275 Cambridge for use on Unix systems connected to the Internet. In style it is
1276 similar to Smail 3, but its facilities are more general. There is a great
1277 deal of flexibility in the way mail can be routed, and there are extensive
1278 facilities for checking incoming mail.")
1281 (define-public dovecot
1288 (uri (string-append "https://www.dovecot.org/releases/"
1289 (version-major+minor version) "/"
1290 "dovecot-" version ".tar.gz"))
1292 (base32 "1zxa9banams9nmk99sf1rqahr11cdqxhwi7hyz3ddxqidpn15qdz"))))
1293 (build-system gnu-build-system)
1295 `(("pkg-config" ,pkg-config)))
1297 `(("openssl" ,openssl)
1301 ("linux-pam" ,linux-pam)))
1303 `(#:configure-flags '("--sysconfdir=/etc"
1304 "--localstatedir=/var")
1306 (modify-phases %standard-phases
1307 (add-after 'unpack 'patch-file-names
1309 (substitute* "src/lib-program-client/test-program-client-local.c"
1310 (("(/bin/| )cat") (which "cat"))
1311 (("/bin/echo") (which "echo"))
1312 (("/bin/false") (which "false"))
1313 (("/bin/sh") (which "bash"))
1314 (("head") (which "head"))
1315 (("sleep") (which "sleep")))
1316 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1317 "src/lib-smtp/test-bin/sendmail-success.sh")
1318 (("cat") (which "cat")))
1321 (lambda* (#:key make-flags #:allow-other-keys)
1322 ;; Simple hack to avoid installing a trivial README in /etc.
1323 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1325 (home-page "https://www.dovecot.org")
1326 (synopsis "Secure POP3/IMAP server")
1328 "Dovecot is a mail server whose major goals are security and reliability.
1329 It supports mbox/Maildir and its own dbox/mdbox formats.")
1330 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1331 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1332 ;; Unicode, Inc. License Agreement for Data Files and Software.
1333 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1335 (define-public dovecot-trees
1337 (name "dovecot-trees")
1342 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1343 "archive.tar.gz?ref=v" version))
1344 (file-name (string-append name "-" version ".tar.gz"))
1347 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1349 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
1350 (build-system gnu-build-system)
1352 `(("automake" ,automake)
1353 ("autoconf" ,autoconf)
1354 ("libtool" ,libtool)
1355 ("dovecot" ,dovecot)
1356 ("pkg-config" ,pkg-config)))
1358 `(("libsodium" ,libsodium)))
1360 `(#:tests? #f ;No tests exist.
1361 #:configure-flags (list (string-append "--with-dovecot="
1362 (assoc-ref %build-inputs "dovecot")
1365 (modify-phases %standard-phases
1366 (add-after 'unpack 'autogen
1368 (invoke "sh" "autogen.sh"))))))
1369 (home-page "https://0xacab.org/riseuplabs/trees")
1370 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1372 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1373 Dovecot encryption plugin. This plugin adds individually encrypted mail
1374 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1375 which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1376 the Sodium crypto library (based on NaCL).
1380 @item On IMAP log in, the user's cleartext password is passed to the plugin.
1381 @item The plugin creates an argon2 digest from the password.
1382 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1383 @item Inside the secretbox is stored a Curve25519 private key.
1384 @item The Curve25519 private key is used to decrypt each individual message,
1385 using lidsodium sealed boxes.
1386 @item New mail is encrypted as it arrives using the Curve25519 public key.
1390 (define-public dovecot-libsodium-plugin
1391 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1394 (name "dovecot-libsodium-plugin")
1395 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1400 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1402 (file-name (string-append name "-" version "-checkout"))
1405 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1406 (build-system gnu-build-system)
1408 `(("automake" ,automake)
1409 ("autoconf" ,autoconf)
1410 ("libtool" ,libtool)
1411 ("dovecot" ,dovecot)
1412 ("pkg-config" ,pkg-config)))
1414 `(("libsodium" ,libsodium)))
1416 `(#:tests? #f ;No tests exist.
1417 #:configure-flags (list (string-append "--with-dovecot="
1418 (assoc-ref %build-inputs "dovecot")
1421 (modify-phases %standard-phases
1422 (add-after 'unpack 'autogen
1424 (invoke "sh" "autogen.sh"))))))
1425 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1426 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1428 "@code{dovecot-libsodium-plugin} provides libsodium password
1429 hashing schemes plugin for @code{Dovecot}.")
1432 (define-public isync
1439 (uri (string-append "mirror://sourceforge/isync/isync/"
1440 version "/isync-" version ".tar.gz"))
1442 "173wd7x8y5sp94slzwlnb7zhgs32r57zl9xspl2rf4g3fqwmhpwd"))))
1443 (build-system gnu-build-system)
1448 ("cyrus-sasl" ,cyrus-sasl)
1449 ("openssl" ,openssl)
1451 (home-page "http://isync.sourceforge.net/")
1452 (synopsis "Mailbox synchronization program")
1454 "isync/mbsync is a command-line tool for two-way synchronization of
1455 mailboxes. Currently Maildir and IMAP are supported types.")
1458 (define-public perl-email-abstract
1460 (name "perl-email-abstract")
1465 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1466 "Email-Abstract-" version ".tar.gz"))
1469 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1470 (build-system perl-build-system)
1472 `(("perl-email-simple" ,perl-email-simple)
1473 ("perl-module-pluggable" ,perl-module-pluggable)
1474 ("perl-mro-compat" ,perl-mro-compat)))
1475 (home-page "https://metacpan.org/release/Email-Abstract")
1476 (synopsis "Interface to mail representations")
1477 (description "Email::Abstract provides module writers with the ability to
1478 write simple, representation-independent mail handling code.")
1479 (license perl-license)))
1481 (define-public perl-email-address
1483 (name "perl-email-address")
1488 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1489 "Email-Address-" version ".tar.gz"))
1491 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
1492 (build-system perl-build-system)
1493 (home-page "https://metacpan.org/release/Email-Address")
1494 (synopsis "Email address parsing and creation")
1495 (description "Email::Address implements a regex-based RFC 2822 parser that
1496 locates email addresses in strings and returns a list of Email::Address
1497 objects found. Alternatively you may construct objects manually.")
1498 (license perl-license)))
1500 (define-public perl-email-date-format
1502 (name "perl-email-date-format")
1507 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1508 "Email-Date-Format-" version ".tar.gz"))
1511 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1512 (build-system perl-build-system)
1513 (home-page "https://metacpan.org/release/Email-Date-Format")
1514 (synopsis "Produce RFC 2822 date strings")
1515 (description "Email::Date::Format provides a means for generating an RFC
1516 2822 compliant datetime string.")
1517 (license perl-license)))
1519 (define-public perl-email-messageid
1521 (name "perl-email-messageid")
1526 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1527 "Email-MessageID-" version ".tar.gz"))
1530 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1531 (build-system perl-build-system)
1532 (home-page "https://metacpan.org/release/Email-MessageID")
1533 (synopsis "Generate world unique message-ids")
1534 (description "Email::MessageID generates recommended message-ids to
1535 identify a message uniquely.")
1536 (license perl-license)))
1538 (define-public perl-email-mime
1540 (name "perl-email-mime")
1545 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1546 "Email-MIME-" version ".tar.gz"))
1549 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
1550 (build-system perl-build-system)
1552 `(("perl-email-address" ,perl-email-address)
1553 ("perl-email-messageid" ,perl-email-messageid)
1554 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1555 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1556 ("perl-email-simple" ,perl-email-simple)
1557 ("perl-mime-types" ,perl-mime-types)
1558 ("perl-module-runtime" ,perl-module-runtime)))
1559 (home-page "https://metacpan.org/release/Email-MIME")
1560 (synopsis "MIME message handling")
1561 (description "Email::MIME is an extension of the Email::Simple module, to
1562 handle MIME encoded messages. It takes a message as a string, splits it up
1563 into its constituent parts, and allows you access to various parts of the
1564 message. Headers are decoded from MIME encoding.")
1565 (license perl-license)))
1567 (define-public perl-email-mime-contenttype
1569 (name "perl-email-mime-contenttype")
1574 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1575 "Email-MIME-ContentType-" version ".tar.gz"))
1578 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
1579 (build-system perl-build-system)
1581 `(("perl-capture-tiny" ,perl-capture-tiny)))
1582 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
1583 (synopsis "Parse MIME Content-Type headers")
1584 (description "Email::MIME::ContentType parses a MIME Content-Type
1586 (license perl-license)))
1588 (define-public perl-email-mime-encodings
1590 (name "perl-email-mime-encodings")
1595 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1596 "Email-MIME-Encodings-" version ".tar.gz"))
1599 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1600 (build-system perl-build-system)
1602 `(("perl-capture-tiny" ,perl-capture-tiny)))
1603 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
1604 (synopsis "Unified interface to MIME encoding and decoding")
1605 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1606 (license perl-license)))
1608 (define-public perl-email-sender
1610 (name "perl-email-sender")
1611 (version "1.300031")
1615 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1616 "Email-Sender-" version ".tar.gz"))
1619 "052g0slw3h2lzn93j71fi47nfawww2aph4jhr3c860ji70lkf4n4"))))
1620 (build-system perl-build-system)
1622 `(("perl-capture-tiny" ,perl-capture-tiny)))
1624 `(("perl-email-abstract" ,perl-email-abstract)
1625 ("perl-email-address" ,perl-email-address)
1626 ("perl-email-simple" ,perl-email-simple)
1627 ("perl-list-moreutils" ,perl-list-moreutils)
1628 ("perl-module-runtime" ,perl-module-runtime)
1629 ("perl-moo" ,perl-moo)
1630 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1631 ("perl-sub-exporter" ,perl-sub-exporter)
1632 ("perl-throwable" ,perl-throwable)
1633 ("perl-try-tiny" ,perl-try-tiny)))
1634 (home-page "https://metacpan.org/release/Email-Sender")
1635 (synopsis "Perl library for sending email")
1636 (description "Email::Sender replaces the old and sometimes problematic
1637 Email::Send library.")
1638 (license perl-license)))
1640 (define-public perl-email-simple
1642 (name "perl-email-simple")
1647 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1648 "Email-Simple-" version ".tar.gz"))
1651 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
1652 (build-system perl-build-system)
1654 `(("perl-email-date-format" ,perl-email-date-format)))
1655 (home-page "https://metacpan.org/release/Email-Simple")
1656 (synopsis "Parsing of RFC 2822 messages")
1657 (description "Email::Simple provides simple parsing of RFC 2822 message
1658 format and headers.")
1659 (license perl-license)))
1661 (define-public libesmtp
1668 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1669 "libesmtp/libesmtp-" version ".tar.bz2/"
1670 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1672 ;; XXX This site is offline, so we fetch Fedora's cached copy
1673 ;; of the source tarball.
1674 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1675 version ".tar.bz2")))
1678 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1679 (build-system gnu-build-system)
1681 `(("openssl" ,openssl)))
1682 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1683 (synopsis "Library for sending mail via remote hosts using SMTP")
1684 (description "libESMTP is an SMTP client which manages posting (or
1685 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1686 It may be used as part of a Mail User Agent (MUA) or other program that must
1687 be able to post electronic mail where mail functionality may not be that
1688 program's primary purpose.")
1689 (license (list lgpl2.1+ gpl2+))))
1691 (define-public esmtp
1699 (url "https://github.com/andywingo/esmtp.git")
1700 (commit "01bf9fc")))
1703 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1704 (file-name (string-append name "-" version "-checkout"))))
1706 `(#:phases (modify-phases %standard-phases
1708 (lambda _ (invoke "autoreconf" "-vfi"))))))
1709 (build-system gnu-build-system)
1713 ("autoconf" ,autoconf)
1714 ("automake" ,automake)
1715 ("libtool" ,libtool)))
1717 `(("libesmtp" ,libesmtp)))
1718 (home-page "https://sourceforge.net/projects/esmtp/")
1719 (synopsis "Relay-only mail transfer agent (MTA)")
1720 (description "Esmtp is a simple relay-only mail transfer agent built using
1721 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1722 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1723 page for more on configuration. This package also provides minimal
1724 compatibility shims for the @command{sendmail}, @command{mailq}, and
1725 @command{newaliases} commands.")
1734 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1735 version "/fdm-" version ".tar.gz"))
1737 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
1738 (build-system gnu-build-system)
1741 ("openssl" ,openssl)
1743 (home-page "https://github.com/nicm/fdm")
1744 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1745 (description "fdm is a program designed to fetch mail from POP3
1746 or IMAP servers, or receive local mail from stdin, and
1747 deliver it in various ways.")
1749 ;; Why point to a source file? Well, all the individual files have a
1750 ;; copy of this license in their headers, but there's no seprate file
1751 ;; with that information.
1752 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1755 (define-public procmail
1763 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1768 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1769 ;; The following patch fixes an ambiguous definition of
1770 ;; getline() in formail.c. The patch is provided by Debian as
1772 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1773 "procmail-CVE-2014-3618.patch"
1774 "procmail-CVE-2017-16844.patch"))))
1776 `(#:phases (modify-phases %standard-phases
1779 (substitute* "Makefile"
1783 (assoc-ref %outputs "out"))
1787 #:tests? #f)) ;; There are no tests indicating a successful
1788 ;; build. Some tests of basic locking mechanisms provided by the
1789 ;; file system are performed during 'make install'. However, these
1790 ;; are performed before the actual build process.
1791 (build-system gnu-build-system)
1792 (inputs `(("exim" ,exim)))
1793 (home-page "http://www.procmail.org/")
1794 (synopsis "Versatile mail delivery agent (MDA)")
1795 (description "Procmail is a mail delivery agent (MDA) featuring support
1796 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1797 can be sorted into separate files/directories and arbitrary commands can be
1798 executed on mail arrival. Procmail is considered stable, but is no longer
1800 (license gpl2+))) ;; procmail allows to choose the
1801 ;; nonfree Artistic License 1.0
1802 ;; as alternative to the GPL2+.
1803 ;; This option is not listed here.
1805 (define-public khard
1811 (uri (pypi-uri name version))
1814 "1lyjiskc6ckjjylzr04dnm66p3cnn7vlysw9c27qls3y3ywx14zw"))))
1815 (build-system python-build-system)
1818 (modify-phases %standard-phases
1819 (add-after 'install 'install-doc
1820 (lambda* (#:key outputs #:allow-other-keys)
1821 (let* ((out (assoc-ref outputs "out"))
1822 (doc (string-append out "/share/doc/khard")))
1823 (copy-recursively "misc/khard" doc)
1826 `(("python-atomicwrites" ,python-atomicwrites)
1827 ("python-configobj" ,python-configobj)
1828 ("python-pyyaml" ,python-pyyaml)
1829 ("python-ruamel.yaml" ,python-ruamel.yaml)
1830 ("python-unidecode" ,python-unidecode)
1831 ("python-vobject" ,python-vobject)))
1832 (synopsis "Console address book using CardDAV")
1833 (description "Khard is an address book for the console. It creates, reads,
1834 modifies and removes CardDAV address book entries at your local machine. For
1835 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1836 Khard can also be used from within the email client @command{mutt}.")
1837 (home-page "https://github.com/scheibler/khard")
1840 (define-public perl-mail-spf
1842 (name "perl-mail-spf")
1848 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
1852 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1853 (build-system perl-build-system)
1855 `(("perl-module-build" ,perl-module-build)
1856 ("perl-net-dns-resolver-programmable"
1857 ,perl-net-dns-resolver-programmable)))
1860 (modify-phases %standard-phases
1861 (add-before 'configure 'modify-Build.PL
1862 (lambda* (#:key outputs #:allow-other-keys)
1863 (substitute* "Build.PL"
1864 (("'/usr/sbin'") (string-append "'"
1865 (assoc-ref outputs "out")
1869 `(("perl-error" ,perl-error)
1870 ("perl-net-dns" ,perl-net-dns)
1871 ("perl-netaddr-ip" ,perl-netaddr-ip)
1872 ("perl-uri" ,perl-uri)))
1873 (home-page "https://metacpan.org/release/Mail-SPF")
1874 (synopsis "Perl implementation of Sender Policy Framework")
1875 (description "Mail::SPF is the Sender Policy Framework implemented
1879 (define-public mb2md
1886 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1890 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1891 (build-system trivial-build-system)
1893 '(#:modules ((guix build utils))
1896 (use-modules (guix build utils))
1897 (let* ((source (assoc-ref %build-inputs "source"))
1898 (out (assoc-ref %outputs "out"))
1899 (bin (string-append out "/bin"))
1900 (perl (assoc-ref %build-inputs "perl"))
1901 (gzip (assoc-ref %build-inputs "gzip"))
1902 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1903 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1905 (with-directory-excursion bin
1906 (copy-file source "mb2md.gz")
1907 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1908 (substitute* "mb2md"
1909 (("#!/usr/bin/perl")
1910 (string-append "#!/usr/bin/perl -I " perl5lib)))
1911 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1912 (chmod "mb2md" #o555))
1914 (native-inputs `(("gzip" ,gzip)))
1915 (inputs `(("perl" ,perl)
1916 ("perl-timedate" ,perl-timedate)))
1917 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1918 (synopsis "Mbox to maildir converter")
1920 "Mb2md is a Perl script that takes one or more mbox format files and
1921 converts them to maildir format directories.")
1922 (license public-domain)))
1931 (uri (string-append "https://marlam.de/mpop/releases/"
1932 "mpop-" version ".tar.xz"))
1934 (base32 "1di86frxv4gj8fasni409m87qmv0j0vmj13lawkz1pwv9hbynhjb"))))
1935 (build-system gnu-build-system)
1937 `(("gnutls" ,gnutls)
1938 ("libidn" ,libidn)))
1940 `(("pkg-config" ,pkg-config)))
1941 (home-page "https://marlam.de/mpop/")
1942 (synopsis "POP3 mail client")
1943 (description "mpop is a small and fast POP3 client suitable as a
1944 fetchmail replacement.
1946 mpop supports multiple accounts, header based mail filtering, delivery
1947 to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1948 TLS/SSL, several authentication methods, Internationalized Domain
1949 Names (IDN) and SOCKS proxies.")
1952 (define-public mhonarc
1959 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1963 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1964 (build-system perl-build-system)
1965 (home-page "https://www.mhonarc.org/")
1966 (synopsis "Create HTML archives of mail/news messages")
1968 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1969 provides HTML mail archiving with index, mail thread linking,
1970 etc; plus other capabilities including support for MIME and
1971 powerful user customization features.")
1975 (define-public sendmail
1983 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1987 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1988 (build-system gnu-build-system)
1991 (modify-phases %standard-phases
1992 (add-before 'build 'replace-/bin/sh
1996 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1997 "contrib/mmuegel" "devtools/bin/configure.sh")
1998 (find-files "." ".*\\.m4")
1999 (find-files "." ".*\\.cf"))
2000 (("/bin/sh") (which "sh")))
2002 (substitute* "devtools/bin/Build"
2003 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
2008 ;; Render harmless any attempts to chown or chgrp
2009 (substitute* "devtools/bin/install.sh"
2010 (("owner=\\$2") "owner=''")
2011 (("group=\\$2") "group=''"))
2013 (with-output-to-file "devtools/Site/site.config.m4"
2016 define(`confCC', `gcc')
2017 define(`confOPTIMIZE', `-g -O2')
2018 define(`confLIBS', `-lresolv')
2019 define(`confINSTALL', `~a/devtools/bin/install.sh')
2020 define(`confDEPEND_TYPE', `CC-M')
2021 define(`confINST_DEP', `')
2026 (invoke "sh" "Build")
2027 (with-directory-excursion "cf/cf"
2028 (copy-file "generic-linux.mc" "sendmail.mc")
2029 (invoke "sh" "Build" "sendmail.cf"))
2031 (add-before 'install 'pre-install
2033 (let ((out (assoc-ref %outputs "out")))
2034 (mkdir-p (string-append out "/usr/bin"))
2035 (mkdir-p (string-append out "/usr/sbin"))
2036 (mkdir-p (string-append out "/etc/mail"))
2037 (setenv "DESTDIR" out)
2038 (with-directory-excursion "cf/cf"
2039 (invoke "sh" "Build" "install-cf"))
2041 ;; There is no make check. There are some post installation tests, but those
2042 ;; require root privileges
2047 (home-page "http://sendmail.org")
2049 "Highly configurable Mail Transfer Agent (MTA)")
2051 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2052 Allman. It is highly configurable and supports many delivery methods and many
2053 transfer protocols.")
2054 (license (non-copyleft "file://LICENSE"
2055 "See LICENSE in the distribution."))))
2057 (define-public opensmtpd
2063 (uri (string-append "https://www.opensmtpd.org/archives/"
2064 name "-" version ".tar.gz"))
2067 "10bsfsnlg9d9i6l2izdnxp05s3ri8fvwzqxvx1jmarc852382619"))
2068 ;; Fixed upstream: <github.com/OpenSMTPD/OpenSMTPD/pull/835>.
2069 (patches (search-patches "opensmtpd-fix-crash.patch"))))
2070 (build-system gnu-build-system)
2073 ("libressl" ,libressl)
2074 ("libevent" ,libevent)
2076 ("linux-pam" ,linux-pam)
2083 (list "--with-table-db" "--with-auth-pam" "--localstatedir=/var"
2084 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
2085 "--with-group-queue=smtpq"
2086 "--with-path-socket=/var/run" ; not default (./configure lies)
2087 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
2089 (modify-phases %standard-phases
2090 ;; Fix some incorrectly hard-coded external tool file names.
2091 (add-after 'unpack 'patch-FHS-file-names
2093 (substitute* "smtpd/smtpctl.c"
2094 (("/bin/cat") (which "cat"))
2095 (("/bin/sh") (which "sh")))
2097 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
2098 ;; the local submission subsystem. To accomodate systems that require
2099 ;; historical interfaces such as sendmail, newaliases or makemap, the
2100 ;; smtpctl utility can operate in compatibility mode if called with the
2102 (add-after 'install 'install-compability-links
2103 (lambda* (#:key outputs #:allow-other-keys)
2104 (let* ((out (assoc-ref outputs "out"))
2105 (sbin (string-append out "/sbin/")))
2106 (for-each (lambda (command)
2107 (symlink "smtpctl" (string-append sbin command)))
2108 '("makemap" "sendmail" "send-mail"
2109 "newaliases" "mailq")))
2111 (synopsis "Lightweight SMTP daemon")
2113 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
2114 some additional standard extensions. It allows ordinary machines to exchange
2115 e-mails with other systems speaking the SMTP protocol.")
2116 (home-page "https://www.opensmtpd.org")
2117 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2118 public-domain isc license:openssl))))
2120 ;; OpenSMTPd 6.4 introduced a new and incompatible configuration file format.
2121 ;; Use a different name, for now, to avoid auto-upgrades and broken mail boxes.
2122 ;; OPENSMTP-CONFIGURATION in (gnu services mail) will also need an overhaul.
2123 (define-public opensmtpd-next
2125 (name "opensmtpd-next")
2130 (uri (string-append "https://www.opensmtpd.org/archives/"
2131 "opensmtpd-" version ".tar.gz"))
2133 (base32 "0cppqlx4fk6l8rbim5symh2fm1kzshf421256g596j6c9f9q96xn"))))
2134 (build-system gnu-build-system)
2138 ("libevent" ,libevent)
2139 ("libressl" ,libressl)
2140 ("linux-pam" ,linux-pam)
2144 ("groff" ,groff))) ; for man pages
2147 (list "--localstatedir=/var"
2148 ;; This is the default only if it exists at build time—it doesn't.
2149 "--with-path-socket=/var/run"
2150 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2151 "--with-user-smtpd=smtpd"
2152 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2156 (modify-phases %standard-phases
2157 ;; Fix some incorrectly hard-coded external tool file names.
2158 (add-after 'unpack 'patch-FHS-file-names
2160 (substitute* "smtpd/smtpctl.c"
2161 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
2162 (("/bin/cat") (which "cat")))
2163 (substitute* "smtpd/mda_unpriv.c"
2164 (("/bin/sh") (which "sh")))
2166 ;; OpenSMTPD provides a single smtpctl utility to control both the
2167 ;; daemon and the local submission subsystem. To accomodate systems
2168 ;; that require historical interfaces such as sendmail, newaliases or
2169 ;; makemap, smtpctl operates in compatibility mode if called with the
2171 (add-after 'install 'install-compability-links
2172 (lambda* (#:key outputs #:allow-other-keys)
2173 (let* ((out (assoc-ref outputs "out"))
2174 (sbin (string-append out "/sbin/")))
2175 (for-each (lambda (command)
2176 (symlink "smtpctl" (string-append sbin command)))
2177 (list "mailq" "makemap" "newaliases"
2178 "send-mail" "sendmail")))
2180 (synopsis "Lightweight SMTP daemon")
2182 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
2183 Transfer Protocol}, with some additional standard extensions. It allows
2184 ordinary machines to exchange e-mails with other systems speaking the SMTP
2185 protocol, or to deliver them to local users.
2187 In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
2188 functionality than those available in other SMTP daemons. The objective is to
2189 provide enough features to satisfy typical usage at the risk of unsuitability
2190 to esoteric or niche requirements.")
2191 (home-page "https://www.opensmtpd.org")
2192 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2193 public-domain isc license:openssl))))
2195 (define-public opensmtpd-extras
2197 (name "opensmtpd-extras")
2201 (uri (string-append "https://www.opensmtpd.org/archives/"
2202 name "-" version ".tar.gz"))
2205 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
2206 (build-system gnu-build-system)
2208 `(("libressl" ,libressl)
2209 ("libevent" ,libevent)
2211 ("python-2" ,python-2)
2212 ("opensmtpd" ,opensmtpd)
2215 ("postgresql" ,postgresql)
2217 ("linux-pam" ,linux-pam)))
2220 ("pkg-config" ,pkg-config)
2222 ("automake" ,automake)
2223 ("autoconf" ,autoconf)))
2225 `(;; We have to configure it like this because the default checks for for example
2226 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2227 #:configure-flags (list
2228 "--with-filter-clamav" "--with-filter-dkim-signer"
2229 "--with-filter-dnsbl" "--with-filter-lua"
2230 "--with-filter-monkey" "--with-filter-pause"
2231 "--with-filter-perl" "--with-filter-python"
2232 "--with-filter-regex" "--with-filter-spamassassin"
2233 "--with-filter-stub" "--with-filter-trace"
2234 "--with-filter-void"
2236 "--with-queue-null" "--with-queue-python"
2237 "--with-queue-ram" "--with-queue-stub"
2239 "--with-scheduler-python" "--with-scheduler-ram"
2240 "--with-scheduler-stub"
2242 "--with-table-ldap" ; "--with-table-mysql"
2243 "--with-table-passwd" "--with-table-postgres"
2244 "--with-table-python" "--with-table-socketmap"
2245 "--with-table-sqlite" "--with-table-stub"
2246 ;;"--with-table-redis" ; TODO: package hiredis
2248 "--with-user=smtpd" "--with-privsep-user=smtpd"
2249 "--localstatedir=/var" "--sysconfdir=/etc"
2250 "--with-lua-type=lua" ; can use lua or luajit
2252 (string-append "--with-python="
2253 (assoc-ref %build-inputs "python-2"))
2254 (string-append "--with-lua="
2255 (assoc-ref %build-inputs "lua")))))
2256 (license (list bsd-2 bsd-3 bsd-4
2257 public-domain isc license:openssl))
2258 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2260 "This package provides extra tables, filters, and various other addons
2261 for OpenSMTPD to extend its functionality.")
2262 (home-page "https://www.opensmtpd.org")))
2264 (define-public python-mailmanclient
2266 (name "python-mailmanclient")
2271 (uri (pypi-uri "mailmanclient" version))
2274 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
2275 (build-system python-build-system)
2277 `(#:tests? #f)) ; Requires mailman running
2279 `(("python-six" ,python-six)
2280 ("python-httplib2" ,python-httplib2)))
2281 (home-page "https://launchpad.net/mailman.client")
2282 (synopsis "Python bindings for the Mailman 3 REST API")
2284 "The mailmanclient library provides official Python bindings for
2285 the GNU Mailman 3 REST API.")
2288 (define-public python2-mailmanclient
2289 (package-with-python2 python-mailmanclient))
2291 (define-public mlmmj
2298 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2299 version ".tar.bz2"))
2302 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
2303 (build-system gnu-build-system)
2305 `(("perl" ,perl))) ; For "contrib/web/"
2307 `(("pkg-config" ,pkg-config)))
2310 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2311 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2312 ;; of mimetypes for parts of multipart/mime messages that should be denied
2313 ;; or stripped. The parts then get stripped directly when the mail is
2314 ;; received. mlmmj-receive-strip also appends an extra header
2315 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2317 (list "--enable-receive-strip")
2319 (modify-phases %standard-phases
2320 (add-before 'install 'install-contrib
2321 (lambda* (#:key outputs #:allow-other-keys)
2322 (let* ((out (assoc-ref outputs "out"))
2323 (share (string-append out "/share/mlmmj"))
2324 (contrib (string-append share "/contrib/web"))
2325 (texts (string-append share "/listtexts")))
2326 (copy-recursively "contrib/web/" contrib)
2327 (copy-recursively "listtexts" texts)
2328 (rename-file texts (string-append share "/texts"))
2330 (home-page "http://mlmmj.org")
2331 (synopsis "Mailing list managing made joyful")
2333 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2334 It works with many different Mail Transport Agents (MTAs) and is simple for a
2335 system administrator to install, configure and integrate with other software.
2336 As it uses very few resources, and requires no daemons, it is ideal for
2337 installation on systems where resources are limited. Its features include:
2339 @item Archive, Custom headers / footer,
2340 @item Fully automated bounce handling (similar to ezmlm),
2341 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
2342 @item Subscribers only posting, Regular expression access control,
2343 @item Functionality to retrieve old posts, Web interface, Digests,
2344 @item No-mail subscription, VERP support,
2345 @item Delivery Status Notification (RFC1891) support,
2346 @item Rich and customisable texts for automated operations.
2348 (license license:expat)))
2350 (define-public python2-django-mailman3
2352 (name "python2-django-mailman3")
2357 (uri (pypi-uri "django-mailman3" version))
2360 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
2361 (build-system python-build-system)
2364 (modify-phases %standard-phases
2367 (invoke "django-admin"
2369 "--settings=django_mailman3.tests.settings_test"
2370 "django_mailman3"))))
2371 #:python ,python-2))
2373 `(("python2-django" ,python2-django)))
2375 `(("python2-requests" ,python2-requests)
2376 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2377 ("python2-openid" ,python2-openid)
2378 ("python2-mailmanclient" ,python2-mailmanclient)
2379 ("python2-django-allauth" ,python2-django-allauth)
2380 ("python2-django-gravatar2" ,python2-django-gravatar2)
2381 ("python2-pytz" ,python2-pytz)))
2382 (home-page "https://gitlab.com/mailman/django-mailman3")
2383 (synopsis "Django library for Mailman UIs")
2385 "Libraries and templates for Django-based interfaces
2386 interacting with Mailman.")
2389 (define-public postorius
2396 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2397 (file-name (string-append name "-" version ".tar.gz"))
2400 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2401 (build-system python-build-system)
2403 `(; One test dependency relies on Persona, which was shut down in
2406 ;; The part of the frontend of Mailman is still python 2.7.
2407 #:python ,python-2))
2409 `(("python2-django" ,python2-django)
2410 ("python2-django-mailman3" ,python2-django-mailman3)
2411 ("python2-mailmanclient" ,python2-mailmanclient)))
2412 (home-page "https://gitlab.com/mailman/postorius")
2413 (synopsis "Web user interface for GNU Mailman")
2415 "Postorius is a Django app which provides a web user interface
2416 to access GNU Mailman.")
2417 (license (list gpl3+ lgpl3+))))
2419 (define-public blists
2426 (uri (string-append "http://download.openwall.net/pub/projects/"
2427 "blists/blists-" version ".tar.gz"))
2430 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
2431 (build-system gnu-build-system)
2433 `(#:tests? #f ; No tests
2435 (modify-phases %standard-phases
2438 (lambda* (#:key outputs #:allow-other-keys)
2439 (let* ((out (assoc-ref outputs "out"))
2440 (bin (string-append out "/bin")))
2441 (install-file "bindex" bin)
2442 (install-file "bit" bin)
2444 (home-page "http://www.openwall.com/blists/")
2445 (synopsis "Web interface to mailing list archives")
2447 "Blists is a web interface to mailing list archives that works off
2448 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2449 @code{bindex} generates or updates the index file (incremental updates
2450 are supported). @code{bit} is a CGI/SSI program that generates web pages
2451 on the fly. Both programs are written in C and are very fast.")
2452 (license license:expat)))
2454 (define-public swaks
2457 (version "20181104.0")
2462 "https://jetmore.org/john/code/swaks/files/swaks-"
2466 "0n1yd27xcyb1ylp5gln3yv5gzi9r377hjy1j32367kgb3247ygq2"))))
2467 (build-system perl-build-system)
2469 `(("perl-net-dns" ,perl-net-dns)
2470 ("perl-net-ssleay" ,perl-net-ssleay)))
2472 `(#:tests? #f ; No tests
2474 (modify-phases %standard-phases
2478 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
2480 (lambda* (#:key outputs #:allow-other-keys)
2481 (let ((out (assoc-ref outputs "out")))
2482 (install-file "swaks" (string-append out "/bin"))
2483 (install-file "swaks.1" (string-append out "/share/man/man1")))
2485 (add-after 'install 'wrap-program
2486 (lambda* (#:key outputs #:allow-other-keys)
2487 (wrap-program (string-append (assoc-ref outputs "out")
2489 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2491 (home-page "https://jetmore.org/john/code/swaks/")
2492 (synopsis "Featureful SMTP test tool")
2493 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2494 test tool. It handles SMTP features and extensions such as TLS,
2495 authentication, and pipelining; multiple versions of the SMTP protocol
2496 including SMTP, ESMTP, and LMTP; and multiple transport methods including
2497 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2498 Options can be specified in environment variables, configuration files, and
2499 the command line allowing maximum configurability and ease of use for
2500 operators and scripters.")
2503 (define-public alpine
2506 (version "2.21.9999")
2510 ;; There are two versions: the plain continuation of Alpine without extra
2511 ;; patches and the version which adds extra fixes. Every distro uses
2512 ;; the patched version, and so do we to not break expectations.
2513 ;; http://alpine.freeiz.com/alpine/readme/README.patches
2514 (uri (string-append "http://repo.or.cz/alpine.git/snapshot/"
2515 "d3e6f3932f2af9deca8eed09e30a55e9bd524362.tar.gz"))
2516 (file-name (string-append name "-" version ".tar.gz"))
2519 "0w4qyybfdxi29r2z3giq0by6aa6v6nrgibh1xgv4d1vwwq4hw35w"))))
2520 (build-system gnu-build-system)
2522 `(#:make-flags (list "CC=gcc")
2523 #:configure-flags (list (string-append "--with-ssl-include-dir="
2524 (assoc-ref %build-inputs "openssl")
2526 (string-append "--with-ssl-dir="
2527 (assoc-ref %build-inputs "openssl"))
2528 (string-append "--with-ssl-certs-dir="
2530 (string-append "--with-ssl-lib-dir="
2531 (assoc-ref %build-inputs "openssl")
2533 (string-append "--with-interactive-spellcheck="
2534 (assoc-ref %build-inputs "aspell")
2537 (modify-phases %standard-phases
2538 (add-after 'unpack 'make-reproducible
2540 ;; This removes time-dependent code to make alpine reproducible.
2541 (substitute* "pico/blddate.c"
2542 (("%02d-%s-%d") "1970-01-01"))
2543 (substitute* (list "alpine/Makefile.in"
2544 "web/src/alpined.d/Makefile.in")
2545 (("`date`") "1970-01-01"))
2548 `(("ncurses" ,ncurses)
2549 ("openssl" ,openssl)
2551 ("openldap" ,openldap)
2552 ("cyrus-sasl" ,cyrus-sasl)
2553 ("mit-krb5" ,mit-krb5)
2556 ("linux-pam" ,linux-pam)))
2557 (home-page "http://repo.or.cz/alpine.git")
2558 (synopsis "Alternatively Licensed Program for Internet News and Email")
2560 "Alpine is a text-based mail and news client. Alpine includes several
2561 tools and applications:
2563 @item alpine, the Alpine mailer
2564 @item pico, the standalone text editor, GNU nano's predecessor
2565 @item pilot, the standalone file system navigator
2569 (define-public balsa
2576 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
2577 name "-" version ".tar.bz2"))
2580 "17k6wcsl8gki7cskr3hhmfj6n54rha8ca3b6fzd8blsl5shsankx"))))
2581 (build-system gnu-build-system)
2584 '(;; Balsa tries to install additional MIME icons
2585 ;; under gtk+ directory.
2586 "--enable-extra-mimeicons=no"
2587 "--with-gtksourceview"
2589 "--with-spell-checker=gtkspell"
2595 `(("cyrus-sasl" ,cyrus-sasl)
2596 ("enchant" ,enchant)
2597 ("gdk-pixbuf" ,gdk-pixbuf)
2598 ("gmime" ,gmime-2.6)
2602 ("gtksourceview" ,gtksourceview)
2603 ("gtkspell3" ,gtkspell3)
2604 ("libcanberra" ,libcanberra)
2605 ("libesmtp" ,libesmtp)
2606 ("libnotify" ,libnotify)
2607 ("openldap" ,openldap)
2609 ("webkitgtk" ,webkitgtk)))
2611 `(("compface" ,compface)
2612 ("glib" ,glib "bin")
2613 ("intltool" ,intltool)
2614 ("pkg-config" ,pkg-config)
2615 ("yelp-tools" ,yelp-tools)))
2616 (home-page "https://pawsa.fedorapeople.org/balsa")
2617 (synopsis "E-mail client for GNOME")
2618 (description "Balsa is a highly configurable and robust mail client for
2619 the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2620 mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
2621 the use of a local MTA such as Sendmail.")
2631 (uri (pypi-uri "afew" version))
2634 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
2635 (build-system python-build-system)
2637 `(("python-chardet" ,python-chardet)
2638 ("python-notmuch" ,python-notmuch)))
2640 `(("python-setuptools-scm" ,python-setuptools-scm)))
2641 (home-page "https://github.com/afewmail/afew")
2642 (synopsis "Initial tagging script for notmuch mail")
2643 (description "afew is an initial tagging script for notmuch mail. It
2644 provides automatic tagging each time new mail is registered with notmuch. It
2645 can add tags based on email headers or Maildir folders and can handle spam and
2656 (uri (string-append "http://pan.rebelbase.com/download/releases/"
2657 version "/source/" name "-" version ".tar.bz2"))
2660 "1b4wamv33hprghcjk903bpvnd233yxyrm18qnh13alc8h1553nk8"))))
2662 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
2663 "--enable-libnotify" "--enable-manual"
2666 (modify-phases %standard-phases
2667 (add-before 'configure 'patch-gpg2
2668 (lambda* (#:key inputs #:allow-other-keys)
2669 (substitute* "pan/usenet-utils/gpg.cc"
2670 (("\"gpg2\"") (string-append "\""
2671 (assoc-ref inputs "gnupg")
2675 `(("gmime" ,gmime-2.6)
2679 ("gtkspell3" ,gtkspell3)
2680 ("libnotify" ,libnotify)
2681 ("libsecret" ,libsecret)
2682 ("libxml2" ,libxml2)
2685 `(("gettext-minimal" ,gettext-minimal)
2686 ("itstool" ,itstool)
2687 ("pkg-config" ,pkg-config)))
2688 (build-system gnu-build-system)
2689 (home-page "http://pan.rebelbase.com/")
2690 (synopsis "Pan newsreader")
2691 (description "@code{pan} is a Usenet newsreader that's good at both text
2692 and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
2693 PGP handling, multiple servers, and secure connections.")
2694 ;; License of the docs: fdl-1.1; Others: gpl2.
2695 (license (list fdl1.1+ gpl2))))
2697 (define-public imapfilter
2705 (url "https://github.com/lefcha/imapfilter.git")
2706 (commit (string-append "v" version))))
2707 (file-name (git-file-name name version))
2709 (base32 "0vzpc54fjf5vb5vx5w0fl20xvx1k9cg6a3hbl86mm8kwsqf3wrab"))))
2710 (build-system gnu-build-system)
2714 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2717 (modify-phases %standard-phases
2719 (add-after 'unpack 'fix-include-path
2720 (lambda* (#:key inputs #:allow-other-keys)
2721 (let ((pcre (assoc-ref inputs "pcre")))
2722 (substitute* "src/Makefile"
2724 (string-append "INCDIRS ="
2725 "-I" pcre "/include")))
2730 ("openssl" ,openssl)))
2731 (home-page "https://github.com/lefcha/imapfilter")
2732 (synopsis "IMAP mail filtering utility")
2733 (description "IMAPFilter is a mail filtering utility. It connects
2734 to remote mail servers using IMAP, sends searching queries to the server and
2735 processes mailboxes based on the results. It can be used to delete, copy,
2736 move, flag, etc. messages residing in mailboxes at the same or different mail
2737 servers. The 4rev1 and 4 versions of IMAP are supported.")
2738 (license license:expat)))
2740 (define-public urlscan
2747 (uri (pypi-uri "urlscan" version))
2750 "1zldck7vnp7z04aacbx3cprf5kzha4gfhjmss4iv2lh5nccxjfzx"))))
2751 (build-system python-build-system)
2753 `(("python-urwid" ,python-urwid)))
2754 (home-page "https://github.com/firecat53/urlscan")
2755 (synopsis "View/select the URLs in an email message or file")
2757 "Urlscan is a small program that is designed to integrate with the
2758 @code{mutt} mailreader to allow you to easily launch a Web browser for URLs
2759 contained in email messages. It parses an email message or file and scans it
2760 for URLs and email addresses. It then displays the URLs and their context
2761 within the message, and allows you to choose one or more URLs to send to your
2762 Web browser. Alternatively, it send a list of all URLs to stdout. It is a
2763 replacement for the @code{urlview} program.")
2774 (url "https://github.com/verdammelt/tnef.git")
2778 "0cq2xh5wd74qn6k2nnw5rayxgqhjl3jbzf4zlc4babcwxrv32ldh"))
2779 (file-name (git-file-name name version))))
2780 (build-system gnu-build-system)
2782 `(("autoconf" ,autoconf)
2783 ("automake" ,automake)))
2784 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
2785 (home-page "https://github.com/verdammelt/tnef")
2786 (synopsis "Unpack @code{application/ms-tnef} attachments")
2788 "TNEF is a tar-like program that unpacks MIME attachments of type
2789 @code{application/ms-tnef}.")
2793 (let ((commit "ea5a738010148284aed211da953ad670003aefea")
2797 (version (git-version "0.0.0" revision commit))
2801 (url "https://git.elephly.net/software/mumi.git")
2803 (file-name (git-file-name name version))
2806 "0ci5x8dqjmp74w33q2dbs5csxp4ilfmc1xxaa8q2jnh52d7597hl"))))
2807 (build-system gnu-build-system)
2810 (modify-phases %standard-phases
2811 (add-after 'install 'wrap-executable
2812 (lambda* (#:key outputs #:allow-other-keys)
2813 (let* ((out (assoc-ref outputs "out"))
2814 (bin (string-append out "/bin"))
2815 (scm (string-append out "/share/guile/site/2.2"))
2816 (go (string-append out "/lib/guile/2.2/site-ccache")))
2817 (wrap-program (string-append bin "/mumi")
2818 `("GUILE_LOAD_PATH" ":" prefix
2819 (,scm ,(getenv "GUILE_LOAD_PATH")))
2820 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2821 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
2824 `(("guile-debbugs" ,guile-debbugs-next)
2825 ("guile-email" ,guile-email)
2826 ("guile-fibers" ,guile-fibers)
2827 ("guile-json" ,guile-json)
2828 ("guile-syntax-highlight" ,guile-syntax-highlight)
2829 ("guile" ,guile-2.2)))
2831 `(("autoconf" ,autoconf)
2832 ("automake" ,automake)
2833 ("pkg-config" ,pkg-config)))
2834 (home-page "https://git.elephly.net/software/mumi.git")
2835 (synopsis "Debbugs web interface")
2836 (description "Mumi is a Debbugs web interface.")
2839 (define-public ytnef
2846 (url "https://github.com/Yeraze/ytnef.git")
2847 (commit (string-append "v" version))))
2848 (file-name (git-file-name name version))
2851 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))))
2852 (build-system gnu-build-system)
2854 `(("autoconf" ,autoconf)
2855 ("automake" ,automake)
2856 ("libtool" ,libtool)))
2857 (home-page "https://github.com/Yeraze/ytnef/")
2858 (synopsis "TNEF stream reader for winmail.dat files")
2859 (description "This package provides a TNEF stream reader library and
2860 related tools to process winmail.dat files.")