1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 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 Eric Bavier <bavier@member.fsf.org>
10 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
11 ;;; Copyright © 2015, 2016, 2017 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 Troy Sankey <sankeytms@gmail.com>
18 ;;; Copyright © 2016, 2017 <contact.ng0@cryptolab.net>
19 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
21 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
22 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
23 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
25 ;;; This file is part of GNU Guix.
27 ;;; GNU Guix is free software; you can redistribute it and/or modify it
28 ;;; under the terms of the GNU General Public License as published by
29 ;;; the Free Software Foundation; either version 3 of the License, or (at
30 ;;; your option) any later version.
32 ;;; GNU Guix is distributed in the hope that it will be useful, but
33 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 ;;; GNU General Public License for more details.
37 ;;; You should have received a copy of the GNU General Public License
38 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40 (define-module (gnu packages mail)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages backup)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages bison)
47 #:use-module (gnu packages crypto)
48 #:use-module (gnu packages curl)
49 #:use-module (gnu packages cyrus-sasl)
50 #:use-module (gnu packages databases)
51 #:use-module (gnu packages dejagnu)
52 #:use-module (gnu packages dns)
53 #:use-module (gnu packages documentation)
54 #:use-module (gnu packages emacs)
55 #:use-module (gnu packages enchant)
56 #:use-module (gnu packages ghostscript)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages gnupg)
60 #:use-module (gnu packages groff)
61 #:use-module (gnu packages gsasl)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages flex)
65 #:use-module (gnu packages libcanberra)
66 #:use-module (gnu packages libevent)
67 #:use-module (gnu packages libidn)
68 #:use-module (gnu packages linux)
69 #:use-module (gnu packages lua)
70 #:use-module (gnu packages m4)
71 #:use-module (gnu packages ncurses)
72 #:use-module (gnu packages pcre)
73 #:use-module (gnu packages perl)
74 #:use-module (gnu packages python)
75 #:use-module (gnu packages readline)
76 #:use-module (gnu packages search)
77 #:use-module (gnu packages texinfo)
78 #:use-module (gnu packages compression)
79 #:use-module (gnu packages glib)
80 #:use-module (gnu packages pkg-config)
81 #:use-module (gnu packages flex)
82 #:use-module (gnu packages gdb)
83 #:use-module (gnu packages man)
84 #:use-module (gnu packages ruby)
85 #:use-module (gnu packages samba)
86 #:use-module (gnu packages screen)
87 #:use-module (gnu packages tls)
88 #:use-module (gnu packages networking)
89 #:use-module (gnu packages web)
90 #:use-module (gnu packages xml)
91 #:use-module (gnu packages xorg)
92 #:use-module (gnu packages docbook)
93 #:use-module ((guix licenses)
94 #:select (gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
95 non-copyleft (expat . license:expat) bsd-3
96 public-domain bsd-4 isc (openssl . license:openssl)
97 bsd-2 x11-style agpl3))
98 #:use-module (guix packages)
99 #:use-module (guix download)
100 #:use-module (guix git-download)
101 #:use-module (guix utils)
102 #:use-module (guix build-system gnu)
103 #:use-module (guix build-system perl)
104 #:use-module (guix build-system python)
105 #:use-module (guix build-system trivial))
107 (define-public mailutils
113 (uri (string-append "mirror://gnu/mailutils/mailutils-"
117 "1dpylyg79avi7brpkcmzaq7bqqkz45flp0ws6f2c8b1gyz4hdnzm"))))
118 (build-system gnu-build-system)
121 (modify-phases %standard-phases
122 (add-before 'build 'pre-build
124 ;; Use the right file name for `cat'.
125 (substitute* "testsuite/lib/mailutils.exp"
129 ;; Tests try to invoke 'maidag' such that it looks up the
130 ;; 'root' user, which does not exist in the build
132 (substitute* "maidag/tests/testsuite"
133 (("root <") "nobody <")
134 (("spool/root") "spool/nobody")
135 (("root@localhost") "nobody@localhost"))
137 ;; The 'pipeact.at' tests generate a shell script; make
138 ;; sure it uses the right shell.
139 (substitute* '("sieve/tests/testsuite"
140 "mh/tests/testsuite")
142 (string-append "#!" (which "sh"))))
144 (substitute* "mh/tests/testsuite"
145 (("moreproc: /bin/cat")
146 (string-append "moreproc: " (which "cat"))))
148 ;; XXX: The comsatd tests rely on being able to open
149 ;; /dev/tty, but that gives ENODEV in the build
150 ;; environment. Thus, ignore test failures here.
151 (substitute* "comsat/tests/Makefile.in"
152 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
153 (string-append "-" all)))
156 ;; TODO: Add `--with-sql'.
157 #:configure-flags '("--sysconfdir=/etc")
158 #:parallel-tests? #f))
160 `(("dejagnu" ,dejagnu)
166 ("readline" ,readline)
167 ("linux-pam" ,linux-pam)
170 (home-page "https://www.gnu.org/software/mailutils/")
171 (synopsis "Utilities and library for reading and serving mail")
173 "GNU Mailutils is a collection of programs for managing, viewing and
174 processing electronic mail. It contains both utilities and server daemons
175 and all operate in a protocol-agnostic way. The underlying libraries are
176 also available, simplifying the addition of mail capabilities to new
179 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
180 (list gpl3+ lgpl3+))))
182 (define-public fetchmail
188 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
192 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
193 (build-system gnu-build-system)
195 `(("openssl" ,openssl)))
197 `(#:configure-flags (list (string-append "--with-ssl="
198 (assoc-ref %build-inputs "openssl")))))
199 (home-page "http://www.fetchmail.info/")
200 (synopsis "Remote-mail retrieval and forwarding utility")
202 "Fetchmail is a full-featured, robust, well-documented remote-mail
203 retrieval and forwarding utility intended to be used over on-demand
204 TCP/IP links (such as SLIP or PPP connections). It supports every
205 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
206 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
209 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
210 so it can then be read by normal mail user agents such as mutt, elm
211 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
212 aliasing facilities to work just as they would on normal mail.")
213 (license gpl2+))) ; most files are actually public domain or x11
221 (uri (string-append "ftp://ftp.mutt.org/pub/mutt/mutt-"
225 "1axdcylyv0p194y6lj1jx127g5yc74zqzzxdc014cjw02bd1x125"))
226 (patches (search-patches "mutt-store-references.patch"))))
227 (build-system gnu-build-system)
229 `(("cyrus-sasl" ,cyrus-sasl)
236 `(#:configure-flags '("--enable-smtp"
240 "--enable-hcache" ; for header caching
244 ;; so that mutt does not check whether the path
245 ;; exists, which it does not in the chroot
246 "--with-mailpath=/var/mail")))
247 (home-page "http://www.mutt.org/")
248 (synopsis "Mail client")
250 "Mutt is a small but very powerful text-based mail client for Unix
254 (define-public neomutt
262 (uri (string-append "https://github.com/" name "/" name
263 "/archive/" name "-" version ".tar.gz"))
264 (file-name (string-append name "-" version ".tar.gz"))
267 "0qwcbjm9j1hgzmybw15w53pvfbqcdf47d4sw21s6r2yaj8kx1hag"))))
269 `(("cyrus-sasl" ,cyrus-sasl)
274 ("openssl" ,openssl) ;For smime
276 ("kyotocabinet" ,kyotocabinet)
281 ("docbook-xsl" ,docbook-xsl)
282 ("notmuch" ,notmuch)))
284 `(("autoconf" ,autoconf)
285 ("automake" ,automake)
286 ("pkg-config" ,pkg-config)))
289 (list "--enable-smtp"
294 ;; database, implies header caching
295 "--without-tokyocabinet"
299 (string-append "--with-kyotocabinet="
300 (assoc-ref %build-inputs "kyotocabinet"))
312 ;; If we do not set this, neomutt wants to check
313 ;; whether the path exists, which it does not
314 ;; in the chroot. The workaround is this.
315 "--with-mailpath=/var/mail"
317 "--with-external-dotlock"
319 "--enable-compressed"
321 (string-append "--with-curses="
322 (assoc-ref %build-inputs "ncurses")))
324 (modify-phases %standard-phases
325 (add-after 'unpack 'autoconf
327 (zero? (system* "sh" "autoreconf" "-vfi")))))))
328 (home-page "https://www.neomutt.org/")
329 (synopsis "Command-line mail reader based on Mutt")
331 "NeoMutt is a command-line mail reader which is based on mutt.
332 It adds a large amount of features to mutt, and they all find their way
333 into mutt, so it is not a fork but a large set of feature patches.")))
341 (uri (string-append "mirror://gnome/sources/gmime/"
342 (version-major+minor version)
343 "/gmime-" version ".tar.xz"))
346 "0fjmsphvz8srsmcdl4v13p2z4jp2migaybyny444hal4snbr0py2"))))
347 (build-system gnu-build-system)
349 `(("pkg-config" ,pkg-config)
350 ("gnupg" ,gnupg))) ; for tests only
351 (inputs `(("glib" ,glib)
356 (modify-phases %standard-phases
358 'unpack 'patch-paths-in-tests
360 ;; The test programs run several programs using 'system' with
361 ;; hard-coded paths. Here we patch them all.
362 ;; We use ISO-8859-1 here because test-iconv.c contains
363 ;; raw byte sequences in several different encodings.
364 (with-fluids ((%default-port-encoding #f))
365 (substitute* (find-files "tests" "\\.c$")
366 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
367 (let* ((base (basename prog-path))
370 (or prog (error "not found: " base))))))))))))
371 (home-page "http://spruce.sourceforge.net/gmime/")
372 (synopsis "MIME message parser and creator library")
374 "GMime provides a core library and set of utilities which may be used for
375 the creation and parsing of messages using the Multipurpose Internet Mail
377 (license (list lgpl2.1+ gpl2+ gpl3+))))
379 (define-public bogofilter
385 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
386 version "/bogofilter-"
390 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
391 (build-system gnu-build-system)
394 (modify-phases %standard-phases
395 (add-before 'check 'pre-check
397 (substitute* "src/tests/t.frame"
399 (string-append "GREP=" (which "grep") "\n")))
401 (native-inputs `(("flex" ,flex)))
402 (inputs `(("bdb" ,bdb)))
403 (home-page "http://bogofilter.sourceforge.net/")
404 (synopsis "Mail classifier based on a Bayesian filter")
406 "Bogofilter is a mail filter that classifies mail as spam or ham
407 (non-spam) by a statistical analysis of the message's header and
408 content (body). The program is able to learn from the user's classifications
409 and corrections. It is based on a Bayesian filter.")
412 (define-public offlineimap
418 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
419 "archive/v" version ".tar.gz"))
420 (file-name (string-append name "-" version ".tar.gz"))
423 "0i5dvygps1ai2qwgamab8kngrp0c5m3bgaw0jk34l8ypsk54wj8r"))))
424 (build-system python-build-system)
426 `(("asciidoc" ,asciidoc)
427 ("libxslt" ,libxslt))) ; for xsltproc
428 (inputs `(("python2-pysqlite" ,python2-pysqlite)
429 ("python2-six" ,python2-six)))
431 ;; The setup.py script expects python-2.
433 ;; Tests require a modifiable IMAP account.
436 (modify-phases %standard-phases
437 (add-after 'build 'build-documentation
439 (substitute* "docs/Makefile"
440 ;; Prevent xmllint and xsltproc from downloading a DTD file.
441 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
442 (zero? (system* "make" "-C" "docs" "man"))))
443 (add-after 'install 'install-documentation
444 (lambda* (#:key outputs #:allow-other-keys)
445 (let* ((out (assoc-ref outputs "out"))
446 (man (string-append out "/share/man")))
447 (install-file "docs/offlineimap.1" (string-append man "/man1"))
448 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
450 (add-after 'install-documentation 'wrap-binary
451 (lambda* (#:key outputs #:allow-other-keys)
452 (let* ((out (assoc-ref outputs "out"))
453 (bin (string-append out "/bin/offlineimap")))
455 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
457 (home-page "http://www.offlineimap.org")
458 (synopsis "Sync emails between two repositories")
460 "OfflineImap synchronizes emails between two repositories, so that you
461 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
462 repository and Maildir/IMAP as LOCAL repository.")
465 (define-public emacs-mew
471 (uri (string-append "http://mew.org/Release/mew-"
475 "03fzky2kz73vgx4cbps2psbbnrgqgkk5q7jwfldisymkzr9iz03y"))))
479 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
480 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
481 (build-system gnu-build-system)
483 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
484 (icon-dir "/share/mew"))
485 `(#:modules ((guix build gnu-build-system)
487 (guix build emacs-utils))
488 #:imported-modules (,@%gnu-build-system-modules
489 (guix build emacs-utils))
491 (list (string-append "--with-elispdir=" %output ,elisp-dir)
492 (string-append "--with-etcdir=" %output ,icon-dir))
494 (modify-phases %standard-phases
495 (add-after 'configure 'patch-mew-icon-directory
496 (lambda* (#:key outputs #:allow-other-keys)
497 (emacs-substitute-sexps "mew-key.el"
498 ("(def.* mew-icon-directory"
500 (add-to-list 'image-load-path 'mew-icon-directory)
501 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
503 (add-after 'install 'generate-autoloads
504 (lambda* (#:key outputs #:allow-other-keys)
505 (emacs-generate-autoloads
506 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
509 (home-page "http://www.mew.org")
510 (synopsis "Emacs e-mail client")
511 (description "Mew (Messaging in the Emacs World) is a user interface
512 for text messages, multimedia messages (MIME), news articles and
513 security functionality including PGP, S/MIME, SSH, and SSL.")
522 (uri (string-append "https://github.com/djcb/mu/releases/"
523 "download/" version "/mu-"
527 "02g82zvxfgn17wzy846bfxj0izjj7yklhwdnhwxy1y2kin4fqnb5"))))
528 (build-system gnu-build-system)
530 `(("pkg-config" ,pkg-config)
531 ("glib" ,glib "bin") ; for gtester
532 ("emacs" ,emacs-minimal)))
533 ;; TODO: Add webkit and gtk to build the mug GUI.
539 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
541 `(#:modules ((guix build gnu-build-system)
543 (guix build emacs-utils))
544 #:imported-modules (,@%gnu-build-system-modules
545 (guix build emacs-utils))
547 (modify-phases %standard-phases
548 (add-after 'unpack 'patch-configure
549 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
550 ;; so our Emacs package can't find it. Setting "--with-lispdir"
551 ;; configure flag doesn't help because "mu4e" will be added to
552 ;; the lispdir anyway, so we have to modify "configure.ac".
554 (substitute* "configure"
555 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") ""))
557 (add-before 'check 'check-tz-setup
558 (lambda* (#:key inputs #:allow-other-keys)
559 ;; For mu/test/test-mu-query.c
561 (string-append (assoc-ref inputs "tzdata")
564 (add-after 'install 'install-emacs-autoloads
565 (lambda* (#:key outputs #:allow-other-keys)
566 (emacs-generate-autoloads
568 (string-append (assoc-ref outputs "out")
569 "/share/emacs/site-lisp"))
571 (home-page "http://www.djcbsoftware.nl/code/mu/")
572 (synopsis "Quickly find emails")
574 "Mu is a tool for dealing with e-mail messages stored in the
575 Maildir-format. Mu's purpose in life is to help you to quickly find the
576 messages you need; in addition, it allows you to view messages, extract
577 attachments, create new maildirs, and so on.")
586 ;; package author intends on distributing via github rather
588 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
589 (uri (string-append "https://github.com/pazz/alot/archive/"
591 (file-name (string-append "alot-" version ".tar.gz"))
594 "0sl1kl2fhkv208llnbny4blcvrfdk4vx6bcw5pnyh9ylwb0pipi2"))))
595 (build-system python-build-system)
597 `(#:tests? #f ; no tests
598 ;; python 3 is currently unsupported, more info:
599 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
602 `(("python2-magic" ,python2-magic)
603 ("python2-configobj" ,python2-configobj)
604 ("python2-twisted" ,python2-twisted)
605 ("python2-urwid" ,python2-urwid)
606 ("python2-urwidtrees" ,python2-urwidtrees)
607 ("python2-pygpgme" ,python2-pygpgme)
608 ("python2-notmuch" ,python2-notmuch)))
609 (home-page "https://github.com/pazz/alot")
610 (synopsis "Commandline MUA using notmuch")
612 "Alot is an experimental terminal mail user agent (MUA) based on
613 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
616 (define-public notifymuch
618 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
622 (version (string-append "0.1-" revision "." (string-take commit 7)))
627 (url "https://github.com/kspi/notifymuch.git")
631 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
632 (file-name (string-append name "-" version "-checkout"))))
633 (build-system python-build-system)
635 `(("python-notmuch" ,python-notmuch)
636 ("python-pygobject" ,python-pygobject)
637 ("gobject-introspection" ,gobject-introspection)
638 ("libnotify" ,libnotify)
642 (modify-phases %standard-phases
643 (add-after 'install 'wrap-binary
644 (lambda* (#:key outputs #:allow-other-keys)
645 (let* ((out (assoc-ref outputs "out"))
646 (bin (string-append out "/bin/notifymuch")))
648 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
649 `("GI_TYPELIB_PATH" ":" prefix
650 (,(getenv "GI_TYPELIB_PATH")
651 ,(string-append out "/lib/girepository-1.0")))))
653 (home-page "https://github.com/kspi/notifymuch")
654 (synopsis "Displays notifications for changes in the notmuch email database")
655 (description "notifymuch displays desktop notifications for messages in
656 the notmuch database. The notifications are sent using libnotify to a
657 notification daemon. The query to find messages to send a notification about
658 is configurable, and a notification for the same message will not be send
659 within a configurable period (defaults to 48 hours). To use notifymuch, run
660 @command{notifymuch} after new mail is indexed, this can be automated by
661 invoking @command{notifymuch} from the post-new hook.")
664 (define-public notmuch
670 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
674 "1z3m9knsdmchvfjzjhjf2cmdc9yahmvbvzn46wsrsrihfvv4rr7p"))))
675 (build-system gnu-build-system)
677 '(#:make-flags (list "V=1") ; Verbose test output.
678 #:phases (modify-phases %standard-phases
679 (add-after 'unpack 'patch-notmuch-lib.el
681 (substitute* "emacs/notmuch-lib.el"
682 (("/bin/sh") (which "sh")))
685 (lambda* (#:key outputs #:allow-other-keys)
687 (setenv "CONFIG_SHELL" (which "sh"))
689 (let ((out (assoc-ref outputs "out")))
690 (zero? (system* "./configure"
691 (string-append "--prefix=" out))))))
692 (add-before 'check 'prepare-test-environment
694 (setenv "TEST_CC" "gcc")
695 ;; Patch various inline shell invocations.
696 (substitute* (find-files "test" "\\.sh$")
697 (("/bin/sh") (which "sh")))
700 `(("bash-completion" ,bash-completion)
701 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
702 ("pkg-config" ,pkg-config)
704 ("python-docutils" ,python2-docutils)
705 ("python-sphinx" ,python2-sphinx)
707 ;; The following are required for tests only.
719 (home-page "https://notmuchmail.org/")
720 (synopsis "Thread-based email index, search, and tagging")
722 "Notmuch is a command-line based program for indexing, searching, read-
723 ing, and tagging large collections of email messages.")
726 (define-public notmuch-addrlookup-c
728 (name "notmuch-addrlookup-c")
733 "https://github.com/aperezdc/" name "/archive/v"
735 (file-name (string-append name "-" version ".tar.gz"))
738 "0rslg2ifgyhl6asv3yr1f62m9xjfcinv7i6qb07h2k217jqlmrri"))))
739 (build-system gnu-build-system)
741 '(#:tests? #f ; no tests
742 #:make-flags (list "CC=gcc"
743 (string-append "PREFIX="
744 (assoc-ref %outputs "out")))
745 #:phases (modify-phases %standard-phases
747 ;; Remove vim code completion config, it's not needed to
748 ;; build (or be patched).
749 (add-before 'patch-source-shebangs 'delete-ycm-file
750 (lambda _ (delete-file ".ycm_extra_conf.py")))
752 (lambda* (#:key outputs #:allow-other-keys)
753 (let ((bin (string-append
754 (assoc-ref outputs "out") "/bin")))
755 (install-file "notmuch-addrlookup" bin)))))))
757 `(("pkg-config" ,pkg-config)))
760 ("notmuch" ,notmuch)))
761 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
762 (synopsis "Address lookup tool for Notmuch")
763 (description "This is an address lookup tool using a Notmuch database,
764 useful for email address completion.")
765 (license license:expat)))
767 (define-public python-notmuch
769 (name "python-notmuch")
770 (version (package-version notmuch))
771 ;; Notmuch python bindings are now unavailable on pypi. The
772 ;; bindings are distributed via the notmuch release tarball.
773 (source (package-source notmuch))
774 (build-system python-build-system)
775 (inputs `(("notmuch" ,notmuch)))
777 `(#:tests? #f ; no "test" target
779 (modify-phases %standard-phases
780 ;; This python package lives in a subdirectory of the notmuch source
781 ;; tree, so chdir into it before building.
782 (add-after 'unpack 'enter-python-dir
783 (lambda _ (chdir "bindings/python") #t))
784 ;; Make sure the correct notmuch shared library gets loaded.
785 (add-before 'build 'set-libnotmuch-file-name
786 (lambda* (#:key inputs #:allow-other-keys)
787 (let ((notmuch (assoc-ref inputs "notmuch")))
788 (substitute* "notmuch/globals.py"
789 (("libnotmuch\\.so\\.")
790 (string-append notmuch "/lib/libnotmuch.so.")))
792 (home-page (package-home-page notmuch))
793 (synopsis "Python bindings of the Notmuch mail indexing library")
795 "This package provides Python bindings to use the Notmuch mail indexing
796 and search library.")
799 (define-public python2-notmuch
800 (package-with-python2 python-notmuch))
802 (define-public getmail
809 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
810 name "-" version ".tar.gz"))
813 "0pzplrlxwbxydvfw4kkwn60l40hk1h5sxawaa6pi0k75c220k4ni"))))
814 (build-system python-build-system)
816 `(#:tests? #f ; no tests
818 (home-page "http://pyropus.ca/software/getmail/")
819 (synopsis "Mail retriever")
821 "A flexible, extensible mail retrieval system with support for
822 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
823 arbitrary message filtering, single-user and domain-mailboxes, and many other
826 ;; License is specified in file '__init__.py'.
829 (define-public libetpan
835 (uri (string-append "https://github.com/dinhviethoa/" name
836 "/archive/" version ".tar.gz"))
837 (file-name (string-append name "-" version ".tar.gz"))
839 (base32 "081ixgj3skglq9i7v0jb835lmfx21zi4i5b7997igwr0lj174y9j"))))
840 (build-system gnu-build-system)
841 (native-inputs `(("autoconf" ,(autoconf-wrapper))
842 ("automake" ,automake)
844 ("pkg-config" ,pkg-config)))
846 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
847 ;; libraries need to be propagated.
848 `(("cyrus-sasl" ,cyrus-sasl)
849 ("openssl" ,openssl)))
856 (modify-phases %standard-phases
857 (add-after 'unpack 'autogen
859 (setenv "NOCONFIGURE" "true")
860 (zero? (system* "sh" "autogen.sh")))))
862 '("--disable-static" "--disable-db")))
863 (home-page "http://www.etpan.org/libetpan.html")
864 (synopsis "Portable middleware for email access")
866 "The purpose of this mail library is to provide a portable, efficient
867 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
868 provides an API for C language. It's the low-level API used by MailCore and
870 (license (non-copyleft "file://COPYING"))))
872 (define-public compface
878 (uri (string-append "https://ftp.heanet.ie/mirrors/"
879 "ftp.xemacs.org/aux/"
880 name "-" version ".tar.gz"))
883 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
884 (build-system gnu-build-system)
887 (synopsis "Portrait image compressor")
888 (description "This packages takes your 48x48x1 portrait image and
890 (home-page "http://www.cs.indiana.edu/pub/faces/")
891 (license (x11-style "file://README"))))
893 (define-public claws-mail
900 "http://www.claws-mail.org/releases/" name "-" version
904 "0df34gj4r5cbb92834hph19gnh7ih9rgmmw47rliyg8b9z01v6mp"))))
905 (build-system gnu-build-system)
906 (native-inputs `(("pkg-config" ,pkg-config)))
907 (inputs `(("bogofilter" ,bogofilter)
909 ("dbus-glib" ,dbus-glib)
912 ("ghostscript" ,ghostscript)
913 ("hicolor-icon-theme" ,hicolor-icon-theme)
918 ("libarchive" ,libarchive)
919 ("libcanberra" ,libcanberra)
920 ("libetpan" ,libetpan)
921 ("libnotify" ,libnotify)
925 ("python-2" ,python-2)
926 ("mime-info" ,shared-mime-info)))
929 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
930 #:phases (modify-phases %standard-phases
931 (add-before 'build 'patch-mime
932 (lambda* (#:key inputs #:allow-other-keys)
933 (substitute* "src/procmime.c"
934 (("/usr/share/mime/globs")
935 (string-append (assoc-ref inputs "mime-info")
936 "/share/mime/globs"))))))))
937 (synopsis "GTK-based Email client")
939 "Claws-Mail is an email client (and news reader) based on GTK+. The
940 appearance and interface are designed to be familiar to new users coming from
941 other popular email clients, as well as experienced users. Almost all commands
942 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
943 which can add many functionalities to the base client.")
944 (home-page "http://www.claws-mail.org/")
945 (license gpl3+))) ; most files are actually public domain or x11
954 (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
955 "/msmtp-" version ".tar.xz"))
958 "0ppvww0sb09bnsrpqnvlrn8vx231r24xn2iiwpy020mxc8gxn5fs"))))
959 (build-system gnu-build-system)
962 ("libsecret" ,libsecret)
967 `(("pkg-config" ,pkg-config)))
968 (home-page "http://msmtp.sourceforge.net/")
970 `(#:configure-flags (list "--with-libgsasl"
974 (modify-phases %standard-phases
975 (add-after 'install 'install-msmtpq
976 (lambda* (#:key outputs #:allow-other-keys)
977 (let* ((out (assoc-ref outputs "out"))
978 (bin (string-append out "/bin"))
979 (doc (string-append out "/share/doc/msmtp"))
980 (msmtpq (string-append "scripts/msmtpq")))
981 (install-file (string-append msmtpq "/msmtpq") bin)
982 (install-file (string-append msmtpq "/msmtp-queue") bin)
983 (install-file (string-append msmtpq "/README.msmtpq") doc)
986 "Simple and easy to use SMTP client with decent sendmail compatibility")
988 "msmtp is an SMTP client. In the default mode, it transmits a mail to
989 an SMTP server (for example at a free mail provider) which takes care of further
1000 (uri (list (string-append "ftp://ftp.exim.org/pub/exim/exim4/exim-"
1002 (string-append "ftp://ftp.exim.org/pub/exim/exim4/old/exim-"
1003 version ".tar.bz2")))
1006 "050m2gjzpc6vyik458h1j0vi8bxplkzjsyndkyd2y394i569kdyl"))))
1007 (build-system gnu-build-system)
1016 ("libxaw" ,libxaw)))
1018 `(("pcre" ,pcre "bin")
1024 ;; We'd use #:make-flags but the top-level Makefile calls others
1025 ;; recursively, so just set all variables this way.
1026 (lambda* (#:key outputs inputs #:allow-other-keys)
1027 (substitute* '("Makefile" "OS/Makefile-Default")
1028 (("(RM_COMMAND=).*" all var)
1029 (string-append var "rm\n")))
1030 (copy-file "src/EDITME" "Local/Makefile")
1031 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1032 (let ((out (assoc-ref outputs "out"))
1033 (gzip (assoc-ref inputs "gzip"))
1034 (bzip2 (assoc-ref inputs "bzip2"))
1035 (xz (assoc-ref inputs "xz")))
1036 (substitute* '("Local/Makefile")
1037 (("(BIN_DIRECTORY=).*" all var)
1038 (string-append var out "/bin\n"))
1039 (("(CONFIGURE_FILE=).*" all var)
1040 (string-append var out "/etc/exim.conf\n"))
1041 (("(EXIM_USER=).*" all var)
1042 (string-append var "nobody\n"))
1043 (("(FIXED_NEVER_USERS=).*" all var)
1044 (string-append var "\n")) ;XXX no root in build environment
1045 (("(COMPRESS_COMMAND=).*" all var)
1046 (string-append var gzip "/bin/gzip\n"))
1047 (("(ZCAT_COMMAND=).*" all var)
1048 (string-append var gzip "/bin/zcat\n")))
1049 ;; This file has hardcoded names for tools despite the zcat
1050 ;; configuration above.
1051 (substitute* '("src/exigrep.src")
1052 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1053 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1054 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1055 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
1057 'build 'fix-sh-paths
1058 (lambda* (#:key inputs #:allow-other-keys)
1059 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1060 (("SHELL=/bin/sh") "SHELL=sh"))
1061 (substitute* '("scripts/Configure-config.h")
1062 (("\\| /bin/sh") "| sh"))
1063 (let ((bash (assoc-ref inputs "bash")))
1064 (substitute* '("scripts/Configure-eximon")
1065 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
1067 #:make-flags '("INSTALL_ARG=-no_chown")
1068 ;; No 'check' target.
1070 (home-page "http://www.exim.org/")
1072 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1074 "Exim is a message transfer agent (MTA) developed at the University of
1075 Cambridge for use on Unix systems connected to the Internet. In style it is
1076 similar to Smail 3, but its facilities are more general. There is a great
1077 deal of flexibility in the way mail can be routed, and there are extensive
1078 facilities for checking incoming mail.")
1081 (define-public dovecot
1088 (uri (string-append "https://www.dovecot.org/releases/"
1089 (version-major+minor version) "/"
1090 name "-" version ".tar.gz"))
1092 "1s8qvr6fa9d0n179kdwgpsi72zkvpbh9q57q8fr2fjysgjl94zw9"))))
1093 (build-system gnu-build-system)
1095 `(("pkg-config" ,pkg-config)))
1097 `(("openssl" ,openssl)
1101 ("linux-pam" ,linux-pam)))
1103 `(#:configure-flags '("--sysconfdir=/etc"
1104 "--localstatedir=/var")
1105 #:phases (modify-phases %standard-phases
1107 'configure 'pre-configure
1109 ;; Simple hack to avoid installing in /etc
1110 (substitute* '("doc/Makefile.in"
1111 "doc/example-config/Makefile.in")
1112 (("pkgsysconfdir = .*")
1113 "pkgsysconfdir = /tmp/etc"))
1116 'unpack 'patch-other-shebangs
1119 "src/lib-program-client/test-program-client-local.c"
1120 (("/bin/echo") (which "echo"))
1121 (("/bin/cat") (which "cat"))
1122 (("/bin/false") (which "false")))
1124 (home-page "https://www.dovecot.org")
1125 (synopsis "Secure POP3/IMAP server")
1127 "Dovecot is a mail server whose major goals are security and reliability.
1128 It supports mbox/Maildir and its own dbox/mdbox formats.")
1129 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1130 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1131 ;; Unicode, Inc. License Agreement for Data Files and Software.
1132 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1134 (define-public dovecot-trees
1135 (let ((commit "006059c8a47d68f14f73c09743e45b9a73014dbf")
1138 (name "dovecot-trees")
1139 (version (string-append "2.0.0-" revision "." (string-take commit 7)))
1144 (url "https://0xacab.org/riseuplabs/trees.git")
1146 (file-name (string-append name "-" version "-checkout"))
1149 "0ax90bzc66x179wi1m7ywqwa8nssyhjngs7ij109hqqxg5ymfp73"))))
1150 (build-system gnu-build-system)
1152 `(("automake" ,automake)
1153 ("autoconf" ,autoconf)
1154 ("libtool" ,libtool)
1155 ("dovecot" ,dovecot)
1156 ("pkg-config" ,pkg-config)))
1158 `(("libsodium" ,libsodium)))
1160 `(#:tests? #f ;No tests exist.
1161 #:configure-flags (list (string-append "--with-dovecot="
1162 (assoc-ref %build-inputs "dovecot")
1165 (modify-phases %standard-phases
1166 (add-before 'configure 'autogen
1168 (zero? (system* "./autogen.sh")))))))
1169 (home-page "https://0xacab.org/riseuplabs/trees")
1170 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1172 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1173 Dovecot encryption plugin. This plugin adds individually encrypted mail
1174 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1175 which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1176 the Sodium crypto library (based on NaCL).
1180 @item On IMAP log in, the user's cleartext password is passed to the plugin.
1181 @item The plugin creates an argon2 digest from the password.
1182 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1183 @item Inside the secretbox is stored a Curve25519 private key.
1184 @item The Curve25519 private key is used to decrypt each individual message,
1185 using lidsodium sealed boxes.
1186 @item New mail is encrypted as it arrives using the Curve25519 public key.
1190 (define-public isync
1197 (uri (string-append "mirror://sourceforge/isync/isync/"
1198 version "/isync-" version ".tar.gz"))
1200 "1bij6nm06ghkg98n2pdyacam2fyg5y8f7ajw0d5653m0r4ldw5p7"))))
1201 (build-system gnu-build-system)
1204 ("openssl" ,openssl)))
1205 (home-page "http://isync.sourceforge.net/")
1206 (synopsis "Mailbox synchronization program")
1208 "isync/mbsync is command line tool for two-way synchronization of
1209 mailboxes. Currently Maildir and IMAP are supported types.")
1212 (define-public perl-email-abstract
1214 (name "perl-email-abstract")
1219 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1220 "Email-Abstract-" version ".tar.gz"))
1223 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1224 (build-system perl-build-system)
1226 `(("perl-email-simple" ,perl-email-simple)
1227 ("perl-module-pluggable" ,perl-module-pluggable)
1228 ("perl-mro-compat" ,perl-mro-compat)))
1229 (home-page "http://search.cpan.org/dist/Email-Abstract")
1230 (synopsis "Interface to mail representations")
1231 (description "Email::Abstract provides module writers with the ability to
1232 write simple, representation-independent mail handling code.")
1233 (license (package-license perl))))
1235 (define-public perl-email-address
1237 (name "perl-email-address")
1242 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1243 "Email-Address-" version ".tar.gz"))
1246 "0i6ljdvpy279hpbqf6lgv4figr376rb2sh4yphj86xkdzsyn1y75"))))
1247 (build-system perl-build-system)
1248 (home-page "http://search.cpan.org/dist/Email-Address")
1249 (synopsis "Email address parsing and creation")
1250 (description "Email::Address implements a regex-based RFC 2822 parser that
1251 locates email addresses in strings and returns a list of Email::Address
1252 objects found. Alternatively you may construct objects manually.")
1253 (license (package-license perl))))
1255 (define-public perl-email-date-format
1257 (name "perl-email-date-format")
1262 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1263 "Email-Date-Format-" version ".tar.gz"))
1266 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1267 (build-system perl-build-system)
1268 (home-page "http://search.cpan.org/dist/Email-Date-Format")
1269 (synopsis "Produce RFC 2822 date strings")
1270 (description "Email::Date::Format provides a means for generating an RFC
1271 2822 compliant datetime string.")
1272 (license (package-license perl))))
1274 (define-public perl-email-messageid
1276 (name "perl-email-messageid")
1281 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1282 "Email-MessageID-" version ".tar.gz"))
1285 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1286 (build-system perl-build-system)
1287 (home-page "http://search.cpan.org/dist/Email-MessageID")
1288 (synopsis "Generate world unique message-ids")
1289 (description "Email::MessageID generates recommended message-ids to
1290 identify a message uniquely.")
1291 (license (package-license perl))))
1293 (define-public perl-email-mime
1295 (name "perl-email-mime")
1300 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1301 "Email-MIME-" version ".tar.gz"))
1304 "0s50i3nxi9dr81p4rn017nrarc40yrwz0qcw34q8k3pvdf46fr9n"))))
1305 (build-system perl-build-system)
1307 `(("perl-email-address" ,perl-email-address)
1308 ("perl-email-messageid" ,perl-email-messageid)
1309 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1310 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1311 ("perl-email-simple" ,perl-email-simple)
1312 ("perl-mime-types" ,perl-mime-types)))
1313 (home-page "http://search.cpan.org/dist/Email-MIME")
1314 (synopsis "MIME message handling")
1315 (description "Email::MIME is an extension of the Email::Simple module, to
1316 handle MIME encoded messages. It takes a message as a string, splits it up
1317 into its constituent parts, and allows you access to various parts of the
1318 message. Headers are decoded from MIME encoding.")
1319 (license (package-license perl))))
1321 (define-public perl-email-mime-contenttype
1323 (name "perl-email-mime-contenttype")
1328 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1329 "Email-MIME-ContentType-" version ".tar.gz"))
1332 "1y8hpwm7p5a9y2azy0cgvlv2i2d0nj66ajfa0fj51wdq4w9cs23m"))))
1333 (build-system perl-build-system)
1335 `(("perl-capture-tiny" ,perl-capture-tiny)))
1336 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1337 (synopsis "Parse MIME Content-Type headers")
1338 (description "Email::MIME::ContentType parses a MIME Content-Type
1340 (license (package-license perl))))
1342 (define-public perl-email-mime-encodings
1344 (name "perl-email-mime-encodings")
1349 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1350 "Email-MIME-Encodings-" version ".tar.gz"))
1353 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1354 (build-system perl-build-system)
1356 `(("perl-capture-tiny" ,perl-capture-tiny)))
1357 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1358 (synopsis "Unified interface to MIME encoding and decoding")
1359 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1360 (license (package-license perl))))
1362 (define-public perl-email-sender
1364 (name "perl-email-sender")
1365 (version "1.300028")
1369 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1370 "Email-Sender-" version ".tar.gz"))
1373 "0c5dv1x9856nryj5mcbgb67a4irmadz80g0qnf4van3bd8wbj72a"))))
1374 (build-system perl-build-system)
1376 `(("perl-capture-tiny" ,perl-capture-tiny)))
1378 `(("perl-email-abstract" ,perl-email-abstract)
1379 ("perl-email-address" ,perl-email-address)
1380 ("perl-email-simple" ,perl-email-simple)
1381 ("perl-list-moreutils" ,perl-list-moreutils)
1382 ("perl-module-runtime" ,perl-module-runtime)
1383 ("perl-moo" ,perl-moo)
1384 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1385 ("perl-sub-exporter" ,perl-sub-exporter)
1386 ("perl-throwable" ,perl-throwable)
1387 ("perl-try-tiny" ,perl-try-tiny)))
1388 (home-page "http://search.cpan.org/dist/Email-Sender")
1389 (synopsis "Perl library for sending email")
1390 (description "Email::Sender replaces the old and sometimes problematic
1391 Email::Send library.")
1392 (license (package-license perl))))
1394 (define-public perl-email-simple
1396 (name "perl-email-simple")
1401 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1402 "Email-Simple-" version ".tar.gz"))
1405 "1if4a2wh4iwlcycqrd2fhkx04ngmd75q444gh43w0r9p15ym5f8w"))))
1406 (build-system perl-build-system)
1408 `(("perl-email-date-format" ,perl-email-date-format)))
1409 (home-page "http://search.cpan.org/dist/Email-Simple")
1410 (synopsis "Parsing of RFC 2822 messages")
1411 (description "Email::Simple provides simple parsing of RFC 2822 message
1412 format and headers.")
1413 (license (package-license perl))))
1415 (define-public libesmtp
1422 (uri (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1423 version ".tar.bz2"))
1426 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1427 (build-system gnu-build-system)
1429 `(("openssl" ,openssl)))
1430 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1431 (synopsis "Library for sending mail via remote hosts using SMTP")
1432 (description "libESMTP is an SMTP client which manages posting (or
1433 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1434 It may be used as part of a Mail User Agent (MUA) or other program that must
1435 be able to post electronic mail where mail functionality may not be that
1436 program's primary purpose.")
1437 (license (list lgpl2.1+ gpl2+))))
1439 (define-public esmtp
1447 (url "https://github.com/andywingo/esmtp.git")
1448 (commit "01bf9fc")))
1451 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1452 (file-name (string-append name "-" version "-checkout"))))
1454 `(#:phases (modify-phases %standard-phases
1456 'configure 'autoconf
1457 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1458 (build-system gnu-build-system)
1462 ("autoconf" ,autoconf)
1463 ("automake" ,automake)
1464 ("libtool" ,libtool)))
1466 `(("libesmtp" ,libesmtp)))
1467 (home-page "https://sourceforge.net/projects/esmtp/")
1468 (synopsis "Relay-only mail transfer agent (MTA)")
1469 (description "Esmtp is a simple relay-only mail transfer agent built using
1470 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1471 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1472 page for more on configuration. This package also provides minimal
1473 compatibility shims for the @command{sendmail}, @command{mailq}, and
1474 @command{newaliases} commands.")
1483 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1486 (file-name (string-append name "-" version ".tar.gz"))
1488 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1489 (build-system gnu-build-system)
1492 ("openssl" ,openssl)
1494 (home-page "https://github.com/nicm/fdm")
1495 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1496 (description "fdm is a program designed to fetch mail from POP3
1497 or IMAP servers, or receive local mail from stdin, and
1498 deliver it in various ways.")
1500 ;; Why point to a source file? Well, all the individual files have a
1501 ;; copy of this license in their headers, but there's no seprate file
1502 ;; with that information.
1503 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1506 (define-public procmail
1514 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1519 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1520 ;; The following patch fixes an ambiguous definition of
1521 ;; getline() in formail.c. The patch is provided by Debian as
1523 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1524 "procmail-CVE-2014-3618.patch"))))
1526 `(#:phases (modify-phases %standard-phases
1529 (substitute* "Makefile"
1533 (assoc-ref %outputs "out"))
1537 #:tests? #f)) ;; There are no tests indicating a successful
1538 ;; build. Some tests of basic locking mechanisms provided by the
1539 ;; file system are performed during 'make install'. However, these
1540 ;; are performed before the actual build process.
1541 (build-system gnu-build-system)
1542 (inputs `(("exim" ,exim)))
1543 (home-page "http://www.procmail.org/")
1544 (synopsis "Versatile mail delivery agent (MDA)")
1545 (description "Procmail is a mail delivery agent (MDA) featuring support
1546 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1547 can be sorted into separate files/directories and arbitrary commands can be
1548 executed on mail arrival. Procmail is considered stable, but is no longer
1550 (license gpl2+))) ;; procmail allows to choose the
1551 ;; nonfree Artistic License 1.0
1552 ;; as alternative to the GPL2+.
1553 ;; This option is not listed here.
1555 (define-public khard
1561 (uri (pypi-uri name version))
1564 "1v66khq5w17xdbkpb00pf9xbl84dlzx4lq286fvzskb949b3y4yn"))))
1565 (build-system python-build-system)
1568 (modify-phases %standard-phases
1569 (add-after 'install 'install-doc
1570 (lambda* (#:key outputs #:allow-other-keys)
1571 (let* ((out (assoc-ref outputs "out"))
1572 (doc (string-append out "/share/doc/khard")))
1573 (copy-recursively "misc/khard" doc)
1575 ;; FIXME: check phase fails with
1576 ;; "Config file /tmp/.config/khard/khard.conf not available"
1579 `(("python-vobject" ,python-vobject)
1580 ("python-pyyaml" ,python-pyyaml)
1581 ("python-atomicwrites" ,python-atomicwrites)
1582 ("python-configobj" ,python-configobj)))
1583 (synopsis "Console address book using CardDAV")
1584 (description "Khard is an address book for the console. It creates, reads,
1585 modifies and removes CardDAV address book entries at your local machine. For
1586 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1587 Khard can also be used from within the email client @command{mutt}.")
1588 (home-page "https://github.com/scheibler/khard")
1591 (define-public perl-mail-spf
1593 (name "perl-mail-spf")
1599 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1604 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1605 (build-system perl-build-system)
1607 `(("perl-module-build" ,perl-module-build)
1608 ("perl-net-dns-resolver-programmable"
1609 ,perl-net-dns-resolver-programmable)))
1611 `(#:phases (modify-phases %standard-phases
1612 (add-before 'configure 'modify-Build.PL
1613 (lambda* (#:key outputs #:allow-other-keys)
1614 (substitute* "Build.PL"
1615 (("'/usr/sbin'") (string-append "'"
1616 (assoc-ref outputs "out")
1620 `(("perl-error" ,perl-error)
1621 ("perl-net-dns" ,perl-net-dns)
1622 ("perl-netaddr-ip" ,perl-netaddr-ip)
1623 ("perl-uri" ,perl-uri)))
1625 "http://search.cpan.org/dist/Mail-SPF")
1627 "Perl implementation of Sender Policy Framework")
1628 (description "Mail::SPF is the Sender Policy Framework implemented
1632 (define-public mb2md
1639 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1643 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1644 (build-system trivial-build-system)
1646 '(#:modules ((guix build utils))
1649 (use-modules (guix build utils))
1650 (let* ((source (assoc-ref %build-inputs "source"))
1651 (out (assoc-ref %outputs "out"))
1652 (bin (string-append out "/bin"))
1653 (perl (assoc-ref %build-inputs "perl"))
1654 (gzip (assoc-ref %build-inputs "gzip"))
1655 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1656 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1658 (with-directory-excursion bin
1659 (copy-file source "mb2md.gz")
1660 (system* (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1661 (substitute* "mb2md"
1662 (("#!/usr/bin/perl")
1663 (string-append "#!/usr/bin/perl -I " perl5lib)))
1664 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1665 (chmod "mb2md" #o555))
1667 (native-inputs `(("gzip", gzip)))
1668 (inputs `(("perl" ,perl)
1669 ("perl-timedate" ,perl-timedate)))
1670 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1671 (synopsis "Mbox to maildir converter")
1673 "Mb2md is a Perl script that takes one or more mbox format files and
1674 converts them to maildir format directories.")
1675 (license public-domain)))
1684 (uri (string-append "mirror://sourceforge/mpop/mpop/" version
1685 "/mpop-" version ".tar.xz"))
1688 "0p1ix63jh64dibrlccch8q7gxl9nn18wd2qpyr5z1h4gs2fpmv4z"))))
1689 (build-system gnu-build-system)
1691 `(("gnutls" ,gnutls)
1692 ("libidn" ,libidn)))
1694 `(("pkg-config" ,pkg-config)))
1696 `(#:configure-flags (list "--with-tls=gnutls")))
1697 (home-page "http://mpop.sourceforge.net/")
1698 (synopsis "POP3 mail client")
1699 (description "mpop is a small and fast POP3 client suitable as a
1700 fetchmail replacement.
1702 mpop supports multiple accounts, header based mail filtering, delivery
1703 to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1704 TLS/SSL, several authentication methods, Internationalized Domain
1705 Names (IDN) and SOCKS proxies.")
1708 (define-public mhonarc
1715 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1719 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1720 (build-system perl-build-system)
1721 (home-page "https://www.mhonarc.org/")
1722 (synopsis "Create HTML archives of mail/news messages")
1724 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1725 provides HTML mail archiving with index, mail thread linking,
1726 etc; plus other capabilities including support for MIME and
1727 powerful user customization features.")
1731 (define-public sendmail
1739 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1743 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1744 (build-system gnu-build-system)
1747 (modify-phases %standard-phases
1748 (add-before 'build 'replace-/bin/sh
1752 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1753 "contrib/mmuegel" "devtools/bin/configure.sh")
1754 (find-files "." ".*\\.m4")
1755 (find-files "." ".*\\.cf"))
1756 (("/bin/sh") (which "sh")))
1758 (substitute* "devtools/bin/Build"
1759 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
1764 ;; Render harmless any attempts to chown or chgrp
1765 (substitute* "devtools/bin/install.sh"
1766 (("owner=\\$2") "owner=''")
1767 (("group=\\$2") "group=''"))
1769 (with-output-to-file "devtools/Site/site.config.m4"
1772 define(`confCC', `gcc')
1773 define(`confOPTIMIZE', `-g -O2')
1774 define(`confLIBS', `-lresolv')
1775 define(`confINSTALL', `~a/devtools/bin/install.sh')
1776 define(`confDEPEND_TYPE', `CC-M')
1777 define(`confINST_DEP', `')
1781 (and (zero? (system* "sh" "Build"))
1782 (with-directory-excursion "cf/cf"
1784 (copy-file "generic-linux.mc" "sendmail.mc")
1785 (zero? (system* "sh" "Build" "sendmail.cf")))))))
1786 (add-before 'install 'pre-install
1788 (let ((out (assoc-ref %outputs "out")))
1789 (mkdir-p (string-append out "/usr/bin"))
1790 (mkdir-p (string-append out "/usr/sbin"))
1791 (mkdir-p (string-append out "/etc/mail"))
1792 (setenv "DESTDIR" out)
1793 (with-directory-excursion "cf/cf"
1794 (zero? (system* "sh" "Build" "install-cf")))))))
1795 ;; There is no make check. There are some post installation tests, but those
1796 ;; require root privileges
1801 (home-page "http://sendmail.org")
1803 "Highly configurable Mail Transfer Agent (MTA)")
1805 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1806 Allman. It is highly configurable and supports many delivery methods and many
1807 transfer protocols.")
1808 (license (non-copyleft "file://LICENSE"
1809 "See LICENSE in the distribution."))))
1811 (define-public opensmtpd
1817 (uri (string-append "https://www.opensmtpd.org/archives/"
1818 name "-" version ".tar.gz"))
1821 "1b4h64w45hpmfq5721smhg4s0shs64gbcjqjpx3fbiw4hz8bdy9a"))))
1822 (build-system gnu-build-system)
1825 ("libressl" ,libressl)
1826 ("libevent" ,libevent)
1828 ("linux-pam" ,linux-pam)
1835 (list "--with-table-db" "--localstatedir=/var"
1836 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
1837 "--with-group-queue=smtpq"
1838 "--with-path-socket=/var/run"
1839 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
1841 (modify-phases %standard-phases
1842 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
1843 ;; the local submission subsystem. To accomodate systems that require
1844 ;; historical interfaces such as sendmail, newaliases or makemap, the
1845 ;; smtpctl utility can operate in compatibility mode if called with the
1847 (add-after 'install 'install-compabilitymode
1849 (let* ((out (assoc-ref %outputs "out"))
1850 (sbin (string-append out "/sbin/")))
1851 (for-each (lambda (cmd)
1852 (symlink "smtpctl" (string-append sbin cmd)))
1853 '("makemap" "sendmail" "send-mail"
1854 "newaliases" "mailq")))
1856 (synopsis "Lightweight SMTP daemon")
1858 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
1859 some additional standard extensions. It allows ordinary machines to exchange
1860 e-mails with other systems speaking the SMTP protocol.")
1861 (home-page "https://www.opensmtpd.org")
1862 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
1863 public-domain isc license:openssl))))
1865 (define-public opensmtpd-extras
1867 (name "opensmtpd-extras")
1871 (uri (string-append "https://www.opensmtpd.org/archives/"
1872 name "-" version ".tar.gz"))
1875 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
1876 (build-system gnu-build-system)
1878 `(("libressl" ,libressl)
1879 ("libevent" ,libevent)
1881 ("python-2" ,python-2)
1882 ("opensmtpd" ,opensmtpd)
1885 ("postgresql" ,postgresql)
1887 ("linux-pam" ,linux-pam)))
1890 ("pkg-config" ,pkg-config)
1892 ("automake" ,automake)
1893 ("autoconf" ,autoconf)))
1895 `(;; We have to configure it like this because the default checks for for example
1896 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
1897 #:configure-flags (list
1898 "--with-filter-clamav" "--with-filter-dkim-signer"
1899 "--with-filter-dnsbl" "--with-filter-lua"
1900 "--with-filter-monkey" "--with-filter-pause"
1901 "--with-filter-perl" "--with-filter-python"
1902 "--with-filter-regex" "--with-filter-spamassassin"
1903 "--with-filter-stub" "--with-filter-trace"
1904 "--with-filter-void"
1906 "--with-queue-null" "--with-queue-python"
1907 "--with-queue-ram" "--with-queue-stub"
1909 "--with-scheduler-python" "--with-scheduler-ram"
1910 "--with-scheduler-stub"
1912 "--with-table-ldap" ; "--with-table-mysql"
1913 "--with-table-passwd" "--with-table-postgres"
1914 "--with-table-python" "--with-table-socketmap"
1915 "--with-table-sqlite" "--with-table-stub"
1916 ;;"--with-table-redis" ; TODO: package hiredis
1918 "--with-user=smtpd" "--with-privsep-user=smtpd"
1919 "--localstatedir=/var" "--sysconfdir=/etc"
1920 "--with-lua-type=lua" ; can use lua or luajit
1922 (string-append "--with-python="
1923 (assoc-ref %build-inputs "python-2"))
1924 (string-append "--with-lua="
1925 (assoc-ref %build-inputs "lua")))))
1926 (license (list bsd-2 bsd-3 bsd-4
1927 public-domain isc license:openssl))
1928 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
1930 "This package provides extra tables, filters, and various other addons
1931 for OpenSMTPD to extend its functionality.")
1932 (home-page "https://www.opensmtpd.org")))
1934 (define-public python-mailmanclient
1936 (name "python-mailmanclient")
1941 (uri (pypi-uri "mailmanclient" version))
1944 "1cfjh45fgbsax5hjj2inq9nk33dhdvh63xhysc8dhnqidgqgm8c5"))))
1945 (build-system python-build-system)
1947 `(#:tests? #f)) ; Requires mailman running
1949 `(("python-six" ,python-six)
1950 ("python-httplib2" ,python-httplib2)))
1951 (home-page "https://launchpad.net/mailman.client")
1952 (synopsis "Python bindings for the Mailman 3 REST API")
1954 "The mailmanclient library provides official Python bindings for
1955 the GNU Mailman 3 REST API.")
1958 (define-public python2-mailmanclient
1959 (package-with-python2 python-mailmanclient))
1961 (define-public mlmmj
1964 (version "1.2.19.0")
1968 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
1969 version ".tar.bz2"))
1972 "1piwvcxkqadjwk5x8jicaiyz9nngmaj3w13ghdqgaki32xd7zk9v"))))
1973 (build-system gnu-build-system)
1975 `(("perl" ,perl))) ; For "contrib/web/"
1977 `(("pkg-config" ,pkg-config)))
1980 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
1981 ;; It opens the files control/mimedeny and control/mimestrip to get a list
1982 ;; of mimetypes for parts of multipart/mime messages that should be denied
1983 ;; or stripped. The parts then get stripped directly when the mail is
1984 ;; received. mlmmj-receive-strip also appends an extra header
1985 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
1987 (list "--enable-receive-strip")
1989 (modify-phases %standard-phases
1990 (add-before 'install 'install-contrib
1991 (lambda* (#:key outputs #:allow-other-keys)
1992 (let* ((out (assoc-ref outputs "out"))
1993 (share (string-append out "/share/mlmmj"))
1994 (contrib (string-append share "/contrib/web"))
1995 (texts (string-append share "/listtexts")))
1996 (copy-recursively "contrib/web/" contrib)
1997 (copy-recursively "listtexts" texts)
1998 (rename-file texts (string-append share "/texts"))
2000 (home-page "http://mlmmj.org")
2001 (synopsis "Mailing list managing made joyful")
2003 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2004 It works with many different Mail Transport Agents (MTAs) and is simple for a
2005 system adminstrator to install, configure and integrate with other software.
2006 As it uses very few resources, and requires no daemons, it is ideal for
2007 installation on systems where resources are limited. Its features include:
2009 @item Archive, Custom headers / footer,
2010 @item Fully automated bounce handling (similar to ezmlm),
2011 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
2012 @item Subscribers only posting, Regular expression access control,
2013 @item Functionality to retrieve old posts, Web interface, Digests,
2014 @item No-mail subscription, VERP support,
2015 @item Delivery Status Notification (RFC1891) support,
2016 @item Rich and customisable texts for automated operations.
2018 (license license:expat)))
2020 (define-public blists
2027 (uri (string-append "http://download.openwall.net/pub/projects/"
2028 "blists/blists-" version ".tar.gz"))
2031 "1gp51kmb8yv8d693wcpdslmwlbw5w2kgz4kxhrcaf7y89w8wy4qd"))))
2032 (build-system gnu-build-system)
2034 `(#:tests? #f ; No tests
2036 (modify-phases %standard-phases
2039 (lambda* (#:key outputs #:allow-other-keys)
2040 (let* ((out (assoc-ref outputs "out"))
2041 (bin (string-append out "/bin")))
2042 (install-file "bindex" bin)
2043 (install-file "bit" bin)
2045 (home-page "http://www.openwall.com/blists/")
2046 (synopsis "Web interface to mailing list archives")
2048 "Blists is a web interface to mailing list archives that works off
2049 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2050 @code{bindex} generates or updates the index file (incremental updates
2051 are supported). @code{bit} is a CGI/SSI program that generates web pages
2052 on the fly. Both programs are written in C and are very fast.")
2053 (license license:expat)))