1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015 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 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 ng0 <ng0@we.make.ritual.n0.is>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages mail)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages backup)
40 #:use-module (gnu packages bash)
41 #:use-module (gnu packages bison)
42 #:use-module (gnu packages curl)
43 #:use-module (gnu packages cyrus-sasl)
44 #:use-module (gnu packages databases)
45 #:use-module (gnu packages dejagnu)
46 #:use-module (gnu packages emacs)
47 #:use-module (gnu packages enchant)
48 #:use-module (gnu packages ghostscript)
49 #:use-module (gnu packages glib)
50 #:use-module (gnu packages gnome)
51 #:use-module (gnu packages gnupg)
52 #:use-module (gnu packages gsasl)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages guile)
55 #:use-module (gnu packages flex)
56 #:use-module (gnu packages libcanberra)
57 #:use-module (gnu packages libidn)
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages m4)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages pcre)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages readline)
65 #:use-module (gnu packages search)
66 #:use-module (gnu packages texinfo)
67 #:use-module (gnu packages compression)
68 #:use-module (gnu packages glib)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages flex)
71 #:use-module (gnu packages gdb)
72 #:use-module (gnu packages samba)
73 #:use-module (gnu packages tls)
74 #:use-module (gnu packages networking)
75 #:use-module (gnu packages web)
76 #:use-module (gnu packages xml)
77 #:use-module (gnu packages xorg)
78 #:use-module ((guix licenses)
79 #:select (gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
80 non-copyleft (expat . license:expat) bsd-3))
81 #:use-module (guix packages)
82 #:use-module (guix download)
83 #:use-module (guix git-download)
84 #:use-module (guix utils)
85 #:use-module (guix build-system gnu)
86 #:use-module (guix build-system perl)
87 #:use-module (guix build-system python))
89 (define-public mailutils
95 (uri (string-append "mirror://gnu/mailutils/mailutils-"
99 "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65"))
100 (patches (search-patches "m4-gets-undeclared.patch"))))
101 (build-system gnu-build-system)
103 '(;; TODO: Add `--with-sql'.
104 #:phases (alist-cons-before
107 ;; Use Guile 2.0's public API.
108 (substitute* "libmu_scm/mu_message.c"
109 (("scm_i_string_length")
110 "scm_c_string_length"))
112 ;; This file should be generated to use the right
113 ;; value of $(libdir) et al.
114 (delete-file "libmu_scm/mailutils.scm")
116 ;; Use the right file name for `cat'.
117 (substitute* "testsuite/lib/mailutils.exp"
121 #:parallel-tests? #f))
123 `(("dejagnu" ,dejagnu)
130 ;; With Readline 6.3, examples/pop3client.c fails to build because it
131 ;; uses the now undefined 'CPPFunction' type.
132 ("readline" ,readline-6.2)
134 ("linux-pam" ,linux-pam)
137 (home-page "http://www.gnu.org/software/mailutils/")
138 (synopsis "Utilities and library for reading and serving mail")
140 "GNU Mailutils is a collection of programs for managing, viewing and
141 processing electronic mail. It contains both utilities and server daemons
142 and all operate in a protocol-agnostic way. The underlying libraries are
143 also available, simplifying the addition of mail capabilities to new
146 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
147 (list gpl3+ lgpl3+))))
149 (define-public fetchmail
155 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
159 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
160 (build-system gnu-build-system)
162 `(("openssl" ,openssl)))
164 `(#:configure-flags (list (string-append "--with-ssl="
165 (assoc-ref %build-inputs "openssl")))))
166 (home-page "http://www.fetchmail.info/")
167 (synopsis "Remote-mail retrieval and forwarding utility")
169 "Fetchmail is a full-featured, robust, well-documented remote-mail
170 retrieval and forwarding utility intended to be used over on-demand
171 TCP/IP links (such as SLIP or PPP connections). It supports every
172 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
173 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
176 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
177 so it can then be read by normal mail user agents such as mutt, elm
178 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
179 aliasing facilities to work just as they would on normal mail.")
180 (license gpl2+))) ; most files are actually public domain or x11
188 (uri (string-append "ftp://ftp.mutt.org/pub/mutt/mutt-"
192 "13hxmji7v9m2agmvzrs7gzx8s3c9jiwrv7pbkr7z1kc6ckq2xl65"))
193 (patches (search-patches "mutt-store-references.patch"))))
194 (build-system gnu-build-system)
196 `(("cyrus-sasl" ,cyrus-sasl)
203 `(#:configure-flags '("--enable-smtp"
207 "--enable-hcache" ; for header caching
210 ;; so that mutt does not check whether the path
211 ;; exists, which it does not in the chroot
212 "--with-mailpath=/var/mail")))
213 (home-page "http://www.mutt.org/")
214 (synopsis "Mail client")
216 "Mutt is a small but very powerful text-based mail client for Unix
226 (uri (string-append "mirror://gnome/sources/gmime/"
227 (version-major+minor version)
228 "/gmime-" version ".tar.xz"))
231 "0rfzbgsh8ira5p76kdghygl5i3fvmmx4wbw5rp7f8ajc4vxp18g0"))))
232 (build-system gnu-build-system)
234 `(("pkg-config" ,pkg-config)
235 ("gnupg" ,gnupg))) ; for tests only
236 (inputs `(("glib" ,glib)
241 (modify-phases %standard-phases
243 'unpack 'patch-paths-in-tests
245 ;; The test programs run several programs using 'system' with
246 ;; hard-coded paths. Here we patch them all.
247 ;; We use ISO-8859-1 here because test-iconv.c contains
248 ;; raw byte sequences in several different encodings.
249 (with-fluids ((%default-port-encoding #f))
250 (substitute* (find-files "tests" "\\.c$")
251 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
252 (let* ((base (basename prog-path))
255 (or prog (error "not found: " base))))))))))))
256 (home-page "http://spruce.sourceforge.net/gmime/")
257 (synopsis "MIME message parser and creator library")
259 "GMime provides a core library and set of utilities which may be used for
260 the creation and parsing of messages using the Multipurpose Internet Mail
262 (license (list lgpl2.1+ gpl2+ gpl3+))))
264 (define-public bogofilter
270 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
271 version "/bogofilter-"
275 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
276 (build-system gnu-build-system)
278 '(#:phases (alist-cons-before
281 (substitute* "src/tests/t.frame"
283 (string-append "GREP=" (which "grep") "\n"))))
285 (native-inputs `(("flex" ,flex)))
286 (inputs `(("bdb" ,bdb)))
287 (home-page "http://bogofilter.sourceforge.net/")
288 (synopsis "Mail classifier based on a Bayesian filter")
290 "Bogofilter is a mail filter that classifies mail as spam or ham
291 (non-spam) by a statistical analysis of the message's header and
292 content (body). The program is able to learn from the user's classifications
293 and corrections. It is based on a Bayesian filter.")
296 (define-public offlineimap
302 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
303 "archive/v" version ".tar.gz"))
304 (file-name (string-append name "-" version ".tar.gz"))
307 "1g1ylvz214iydskvanzyac7kgmz61s5bqmpzz5hm11mrllkq111z"))))
308 (build-system python-build-system)
309 (inputs `(("python2-pysqlite" ,python2-pysqlite)
310 ("python2-six" ,python2-six)))
312 ;; The setup.py script expects python-2.
314 ;; Tests require a modifiable IMAP account.
317 (modify-phases %standard-phases
318 (add-after 'install 'wrap-binary
319 (lambda* (#:key inputs outputs #:allow-other-keys)
320 (let* ((out (assoc-ref outputs "out"))
321 (bin (string-append out "/bin/offlineimap")))
323 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
325 (home-page "http://www.offlineimap.org")
326 (synopsis "Sync emails between two repositories")
328 "OfflineImap synchronizes emails between two repositories, so that you
329 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
330 repository and Maildir/IMAP as LOCAL repository.")
339 (uri (string-append "https://github.com/djcb/mu/archive/v"
341 (file-name (string-append "mu-" version ".tar.gz"))
344 "0p7hqri1r1x6750x138cc29mh81kdav2dcim26y58s8an206h25g"))))
345 (build-system gnu-build-system)
347 `(("pkg-config" ,pkg-config)
348 ("glib" ,glib "bin") ; for gtester
349 ("autoconf" ,autoconf)
350 ("automake" ,automake)
351 ("emacs" ,emacs-minimal)
353 ("texinfo" ,texinfo)))
354 ;; TODO: Add webkit and gtk to build the mug GUI.
360 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
362 `(#:modules ((guix build gnu-build-system)
364 (guix build emacs-utils))
365 #:imported-modules (,@%gnu-build-system-modules
366 (guix build emacs-utils))
368 (modify-phases %standard-phases
369 (add-after 'unpack 'patch-configure.ac
370 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
371 ;; so our Emacs package can't find it. Setting "--with-lispdir"
372 ;; configure flag doesn't help because "mu4e" will be added to
373 ;; the lispdir anyway, so we have to modify "configure.ac".
375 (substitute* "configure.ac"
376 (("^ +lispdir=.*") ""))
378 (add-after 'patch-configure.ac 'autoreconf
380 (zero? (system* "autoreconf" "-vi"))))
381 (add-before 'check 'check-tz-setup
382 (lambda* (#:key inputs #:allow-other-keys)
383 ;; For mu/test/test-mu-query.c
385 (string-append (assoc-ref inputs "tzdata")
388 (add-after 'install 'install-emacs-autoloads
389 (lambda* (#:key outputs #:allow-other-keys)
390 (emacs-generate-autoloads
392 (string-append (assoc-ref outputs "out")
393 "/share/emacs/site-lisp"))
395 (home-page "http://www.djcbsoftware.nl/code/mu/")
396 (synopsis "Quickly find emails")
398 "Mu is a tool for dealing with e-mail messages stored in the
399 Maildir-format. Mu's purpose in life is to help you to quickly find the
400 messages you need; in addition, it allows you to view messages, extract
401 attachments, create new maildirs, and so on.")
410 ; v0.3.7 not on PyPi yet, so use github instead
411 (uri (string-append "https://github.com/pazz/alot/archive/"
413 (file-name (string-append "alot-" version ".tar.gz"))
416 "09md9llg38r6xby8l0y0zf8nhlh91cr4xs0r15b294hhp8hl2bgx"))))
417 (build-system python-build-system)
419 `(#:tests? #f ; no tests
420 ; python 3 is unsupported, more info:
421 ; https://github.com/pazz/alot/blob/0.3.7/docs/source/faq.rst
424 `(("python2-magic" ,python2-magic)
425 ("python2-configobj" ,python2-configobj)
426 ("python2-twisted" ,python2-twisted)
427 ("python2-urwid" ,python2-urwid)
428 ("python2-urwidtrees" ,python2-urwidtrees)
429 ("python2-pygpgme" ,python2-pygpgme)
430 ("python2-notmuch" ,python2-notmuch)))
431 (home-page "https://github.com/pazz/alot")
432 (synopsis "Commandline MUA using notmuch")
434 "Alot is an experimental terminal mail user agent (MUA) based on
435 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
438 (define-public notmuch
444 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
448 "0jwpda3q023dn3sp41n8648951i7iagfv8zzpriv7hpkjivlafg7"))))
449 (build-system gnu-build-system)
451 '(#:tests? #f ; FIXME: 694 tests; 170 fail and 100 are skipped
452 ; with perl input: 50 fail and 100 are skipped
453 #:phases (modify-phases %standard-phases
455 (lambda* (#:key outputs #:allow-other-keys)
457 (setenv "CONFIG_SHELL" (which "sh"))
459 (let ((out (assoc-ref outputs "out")))
460 (zero? (system* "./configure"
461 (string-append "--prefix=" out)))))))))
463 `(("bash-completion" ,bash-completion)
464 ("emacs" ,emacs-minimal)
465 ("pkg-config" ,pkg-config)
467 ("python-docutils" ,python2-docutils)
468 ("python-sphinx" ,python2-sphinx)))
475 (home-page "http://notmuchmail.org/")
476 (synopsis "Thread-based email index, search, and tagging")
478 "Notmuch is a command-line based program for indexing, searching, read-
479 ing, and tagging large collections of email messages.")
482 (define-public notmuch-addrlookup-c
484 (name "notmuch-addrlookup-c")
489 "https://github.com/aperezdc/" name "/archive/v"
491 (file-name (string-append name "-" version ".tar.gz"))
494 "0rslg2ifgyhl6asv3yr1f62m9xjfcinv7i6qb07h2k217jqlmrri"))))
495 (build-system gnu-build-system)
497 '(#:tests? #f ; no tests
498 #:make-flags (list "CC=gcc"
499 (string-append "PREFIX="
500 (assoc-ref %outputs "out")))
501 #:phases (modify-phases %standard-phases
503 ;; Remove vim code completion config, it's not needed to
504 ;; build (or be patched).
505 (add-before 'patch-source-shebangs 'delete-ycm-file
506 (lambda _ (delete-file ".ycm_extra_conf.py")))
508 (lambda* (#:key outputs #:allow-other-keys)
509 (let ((bin (string-append
510 (assoc-ref outputs "out") "/bin")))
511 (install-file "notmuch-addrlookup" bin)))))))
513 `(("pkg-config" ,pkg-config)))
516 ("notmuch" ,notmuch)))
517 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
518 (synopsis "Address lookup tool for Notmuch")
519 (description "This is an address lookup tool using a Notmuch database,
520 useful for email address completion.")
521 (license license:expat)))
523 (define-public python-notmuch
525 (name "python-notmuch")
527 ;; Notmuch python bindings are now unavailable on pypi. The
528 ;; bindings are distributed via the notmuch release tarball.
529 (source (package-source notmuch))
530 (build-system python-build-system)
531 (inputs `(("notmuch" ,notmuch)))
533 `(#:tests? #f ; no "test" target
535 (modify-phases %standard-phases
536 ;; This python package lives in a subdirectory of the notmuch source
537 ;; tree, so chdir into it before building.
538 (add-after 'unpack 'enter-python-dir
539 (lambda _ (chdir "bindings/python") #t))
540 ;; Make sure the correct notmuch shared library gets loaded.
541 (add-before 'build 'set-libnotmuch-file-name
542 (lambda* (#:key inputs #:allow-other-keys)
543 (let ((notmuch (assoc-ref inputs "notmuch")))
544 (substitute* "notmuch/globals.py"
545 (("libnotmuch\\.so\\.")
546 (string-append notmuch "/lib/libnotmuch.so.")))
548 (home-page "http://notmuchmail.org/")
549 (synopsis "Python bindings of the Notmuch mail indexing library")
551 "This package provides Python bindings to use the Notmuch mail indexing
552 and search library.")
555 (define-public python2-notmuch
557 (name "python2-notmuch")
562 "https://pypi.python.org/packages/source/n/notmuch/notmuch-"
567 "18g8701ibr153ngsz258kgcd42wqnbf9ifpqig1bijy6b0zx9xn5"))))
568 (build-system python-build-system)
569 (inputs `(("notmuch" ,notmuch)))
572 #:phases (modify-phases %standard-phases
574 'build 'set-libnotmuch-file-name
575 (lambda* (#:key inputs #:allow-other-keys)
576 (let ((notmuch (assoc-ref inputs "notmuch")))
577 (substitute* "notmuch/globals.py"
578 (("libnotmuch\\.so\\.[0-9]")
579 (string-append notmuch "/lib/libnotmuch.so.4")))
581 #:tests? #f)) ;no "test" target
582 (home-page "http://notmuchmail.org/")
583 (synopsis "Python bindings of the Notmuch mail indexing library")
585 "This package provides Python bindings to use the Notmuch mail indexing
586 and search library.")
589 (define-public getmail
596 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
597 name "-" version ".tar.gz"))
600 "1m0yzxd05fklwbmjj1n2q4sx397c1j5qi9a0r5fv3h8pplz4lv0w"))))
601 (build-system python-build-system)
603 `(#:tests? #f ; no tests
605 (home-page "http://pyropus.ca/software/getmail/")
606 (synopsis "Mail retriever")
608 "A flexible, extensible mail retrieval system with support for
609 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
610 arbitrary message filtering, single-user and domain-mailboxes, and many other
613 ;; License is specified in file '__init__.py'.
616 (define-public libetpan
622 (uri (string-append "https://github.com/dinhviethoa/" name
623 "/archive/" version ".tar.gz"))
624 (file-name (string-append name "-" version ".tar.gz"))
626 (base32 "081ixgj3skglq9i7v0jb835lmfx21zi4i5b7997igwr0lj174y9j"))))
627 (build-system gnu-build-system)
628 (native-inputs `(("autoconf" ,(autoconf-wrapper))
629 ("automake" ,automake)
631 ("pkg-config" ,pkg-config)))
633 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
634 ;; libraries need to be propagated.
635 `(("cyrus-sasl" ,cyrus-sasl)
636 ("openssl" ,openssl)))
642 '(#:phases (alist-cons-after
645 (setenv "NOCONFIGURE" "true")
646 (zero? (system* "sh" "autogen.sh")))
649 '("--disable-static" "--disable-db")))
650 (home-page "http://www.etpan.org/libetpan.html")
651 (synopsis "Portable middleware for email access")
653 "The purpose of this mail library is to provide a portable, efficient
654 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
655 provides an API for C language. It's the low-level API used by MailCore and
657 (license (non-copyleft "file://COPYING"))))
659 (define-public claws-mail
666 "http://www.claws-mail.org/releases/" name "-" version
670 "1l8ankx0qpq1ix1an8viphcf11ksh53jsrm1xjmq8cjbh5910wva"))))
671 (build-system gnu-build-system)
672 (native-inputs `(("pkg-config" ,pkg-config)))
673 (inputs `(("bogofilter" ,bogofilter)
675 ("dbus-glib" ,dbus-glib)
678 ("ghostscript" ,ghostscript)
679 ("hicolor-icon-theme" ,hicolor-icon-theme)
684 ("libarchive" ,libarchive)
685 ("libcanberra" ,libcanberra)
686 ("libetpan" ,libetpan)
687 ("libnotify" ,libnotify)
691 ("python-2" ,python-2)
692 ("mime-info" ,shared-mime-info)))
695 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
696 #:phases (modify-phases %standard-phases
697 (add-before 'build 'patch-mime
698 (lambda* (#:key inputs #:allow-other-keys)
699 (substitute* "src/procmime.c"
700 (("/usr/share/mime/globs")
701 (string-append (assoc-ref inputs "mime-info")
702 "/share/mime/globs"))))))))
703 (synopsis "GTK-based Email client")
705 "Claws-Mail is an email client (and news reader) based on GTK+. The
706 appearance and interface are designed to be familiar to new users coming from
707 other popular email clients, as well as experienced users. Almost all commands
708 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
709 which can add many functionalities to the base client.")
710 (home-page "http://www.claws-mail.org/")
711 (license gpl3+))) ; most files are actually public domain or x11
720 (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
721 "/msmtp-" version ".tar.xz"))
724 "01jh9ba49bih8zsh40myw6qq1ll210q1vw0jg865vrn7jc3dd83n"))))
725 (build-system gnu-build-system)
728 ("libsecret" ,libsecret)
733 `(("pkg-config" ,pkg-config)))
734 (home-page "http://msmtp.sourceforge.net/")
736 `(#:configure-flags (list "--with-libgsasl"
740 (modify-phases %standard-phases
741 (add-after 'install 'install-msmtpq
742 (lambda* (#:key outputs #:allow-other-keys)
743 (let* ((out (assoc-ref outputs "out"))
744 (bin (string-append out "/bin"))
745 (doc (string-append out "/share/doc/msmtp"))
746 (msmtpq (string-append "scripts/msmtpq")))
747 (install-file (string-append msmtpq "/msmtpq") bin)
748 (install-file (string-append msmtpq "/msmtp-queue") bin)
749 (install-file (string-append msmtpq "/README.msmtpq") doc)
752 "Simple and easy to use SMTP client with decent sendmail compatibility")
754 "msmtp is an SMTP client. In the default mode, it transmits a mail to
755 an SMTP server (for example at a free mail provider) which takes care of further
766 (uri (list (string-append "ftp://ftp.exim.org/pub/exim/exim4/exim-"
768 (string-append "ftp://ftp.exim.org/pub/exim/exim4/old/exim-"
769 version ".tar.bz2")))
772 "1jbxn13shq90kpn0s73qpjnx5xm8jrpwhcwwgqw5s6sdzw6iwsbl"))))
773 (build-system gnu-build-system)
784 `(("pcre" ,pcre "bin")
790 ;; We'd use #:make-flags but the top-level Makefile calls others
791 ;; recursively, so just set all variables this way.
792 (lambda* (#:key outputs inputs #:allow-other-keys)
793 (substitute* '("Makefile" "OS/Makefile-Default")
794 (("(RM_COMMAND=).*" all var)
795 (string-append var "rm\n")))
796 (copy-file "src/EDITME" "Local/Makefile")
797 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
798 (let ((out (assoc-ref outputs "out"))
799 (gzip (assoc-ref inputs "gzip"))
800 (bzip2 (assoc-ref inputs "bzip2"))
801 (xz (assoc-ref inputs "xz")))
802 (substitute* '("Local/Makefile")
803 (("(BIN_DIRECTORY=).*" all var)
804 (string-append var out "/bin\n"))
805 (("(CONFIGURE_FILE=).*" all var)
806 (string-append var out "/etc/exim.conf\n"))
807 (("(EXIM_USER=).*" all var)
808 (string-append var "nobody\n"))
809 (("(FIXED_NEVER_USERS=).*" all var)
810 (string-append var "\n")) ;XXX no root in build environment
811 (("(COMPRESS_COMMAND=).*" all var)
812 (string-append var gzip "/bin/gzip\n"))
813 (("(ZCAT_COMMAND=).*" all var)
814 (string-append var gzip "/bin/zcat\n")))
815 ;; This file has hardcoded names for tools despite the zcat
816 ;; configuration above.
817 (substitute* '("src/exigrep.src")
818 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
819 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
820 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
821 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
824 (lambda* (#:key inputs #:allow-other-keys)
825 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
826 (("SHELL=/bin/sh") "SHELL=sh"))
827 (substitute* '("scripts/Configure-config.h")
828 (("\\| /bin/sh") "| sh"))
829 (let ((bash (assoc-ref inputs "bash")))
830 (substitute* '("scripts/Configure-eximon")
831 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
833 #:make-flags '("INSTALL_ARG=-no_chown")
834 ;; No 'check' target.
836 (home-page "http://www.exim.org/")
838 "Message Transfer Agent (MTA) developed at the University of Cambridge")
840 "Exim is a message transfer agent (MTA) developed at the University of
841 Cambridge for use on Unix systems connected to the Internet. In style it is
842 similar to Smail 3, but its facilities are more general. There is a great
843 deal of flexibility in the way mail can be routed, and there are extensive
844 facilities for checking incoming mail.")
847 (define-public dovecot
854 (uri (string-append "http://www.dovecot.org/releases/"
855 (version-major+minor version) "/"
856 name "-" version ".tar.gz"))
858 "0rwn5wc5b8j9fzqcjggdgpzmb77myrf4ra294z1gg5v3hhng7nfq"))))
859 (build-system gnu-build-system)
861 `(("pkg-config" ,pkg-config)))
863 `(("openssl" ,openssl)
867 ("linux-pam" ,linux-pam)))
869 `(#:configure-flags '("--sysconfdir=/etc"
870 "--localstatedir=/var")
871 #:phases (modify-phases %standard-phases
873 'configure 'pre-configure
875 ;; Simple hack to avoid installing in /etc
876 (substitute* '("doc/Makefile.in"
877 "doc/example-config/Makefile.in")
878 (("pkgsysconfdir = .*")
879 "pkgsysconfdir = /tmp/etc"))
881 (home-page "http://www.dovecot.org")
882 (synopsis "Secure POP3/IMAP server")
884 "Dovecot is a mail server whose major goals are security and reliability.
885 It supports mbox/Maildir and its own dbox/mdbox formats.")
886 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
887 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
888 ;; Unicode, Inc. License Agreement for Data Files and Software.
889 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
898 (uri (string-append "mirror://sourceforge/isync/isync/"
899 version "/isync-" version ".tar.gz"))
901 "1bij6nm06ghkg98n2pdyacam2fyg5y8f7ajw0d5653m0r4ldw5p7"))))
902 (build-system gnu-build-system)
905 ("openssl" ,openssl)))
906 (home-page "http://isync.sourceforge.net/")
907 (synopsis "Mailbox synchronization program")
909 "isync/mbsync is command line tool for two-way synchronization of
910 mailboxes. Currently Maildir and IMAP are supported types.")
913 (define-public perl-email-abstract
915 (name "perl-email-abstract")
920 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
921 "Email-Abstract-" version ".tar.gz"))
924 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
925 (build-system perl-build-system)
927 `(("perl-email-simple" ,perl-email-simple)
928 ("perl-module-pluggable" ,perl-module-pluggable)
929 ("perl-mro-compat" ,perl-mro-compat)))
930 (home-page "http://search.cpan.org/dist/Email-Abstract")
931 (synopsis "Interface to mail representations")
932 (description "Email::Abstract provides module writers with the ability to
933 write simple, representation-independent mail handling code.")
934 (license (package-license perl))))
936 (define-public perl-email-address
938 (name "perl-email-address")
943 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
944 "Email-Address-" version ".tar.gz"))
947 "1ai4r149pzjv9dc2vddir8zylj0z1pii93rm4g591lx7avim71hx"))))
948 (build-system perl-build-system)
949 (home-page "http://search.cpan.org/dist/Email-Address")
950 (synopsis "Email address parsing and creation")
951 (description "Email::Address implements a regex-based RFC 2822 parser that
952 locates email addresses in strings and returns a list of Email::Address
953 objects found. Alternatively you may construct objects manually.")
954 (license (package-license perl))))
956 (define-public perl-email-date-format
958 (name "perl-email-date-format")
963 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
964 "Email-Date-Format-" version ".tar.gz"))
967 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
968 (build-system perl-build-system)
969 (home-page "http://search.cpan.org/dist/Email-Date-Format")
970 (synopsis "Produce RFC 2822 date strings")
971 (description "Email::Date::Format provides a means for generating an RFC
972 2822 compliant datetime string.")
973 (license (package-license perl))))
975 (define-public perl-email-messageid
977 (name "perl-email-messageid")
982 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
983 "Email-MessageID-" version ".tar.gz"))
986 "09216naz21x99ff33wdm3j3zq1zhdbxhrsmx8bvavjrw3gjsvrq3"))))
987 (build-system perl-build-system)
988 (home-page "http://search.cpan.org/dist/Email-MessageID")
989 (synopsis "Generate world unique message-ids")
990 (description "Email::MessageID generates recommended message-ids to
991 identify a message uniquely.")
992 (license (package-license perl))))
994 (define-public perl-email-mime
996 (name "perl-email-mime")
1001 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1002 "Email-MIME-" version ".tar.gz"))
1005 "1sf7dldg4dvicyw6dl1vx6s1gjq3fcppi0103ikl0vi6v5xjdjdh"))))
1006 (build-system perl-build-system)
1008 `(("perl-email-address" ,perl-email-address)
1009 ("perl-email-messageid" ,perl-email-messageid)
1010 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1011 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1012 ("perl-email-simple" ,perl-email-simple)
1013 ("perl-mime-types" ,perl-mime-types)))
1014 (home-page "http://search.cpan.org/dist/Email-MIME")
1015 (synopsis "MIME message handling")
1016 (description "Email::MIME is an extension of the Email::Simple module, to
1017 handle MIME encoded messages. It takes a message as a string, splits it up
1018 into its constituent parts, and allows you access to various parts of the
1019 message. Headers are decoded from MIME encoding.")
1020 (license (package-license perl))))
1022 (define-public perl-email-mime-contenttype
1024 (name "perl-email-mime-contenttype")
1029 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1030 "Email-MIME-ContentType-" version ".tar.gz"))
1033 "1cl1l97lg690dh7i704hqi7yhxalq1chy7ylld5yc5v38jqa6gcn"))))
1034 (build-system perl-build-system)
1036 `(("perl-capture-tiny" ,perl-capture-tiny)))
1037 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1038 (synopsis "Parse MIME Content-Type headers")
1039 (description "Email::MIME::ContentType parses a MIME Content-Type
1041 (license (package-license perl))))
1043 (define-public perl-email-mime-encodings
1045 (name "perl-email-mime-encodings")
1050 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1051 "Email-MIME-Encodings-" version ".tar.gz"))
1054 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1055 (build-system perl-build-system)
1057 `(("perl-capture-tiny" ,perl-capture-tiny)))
1058 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1059 (synopsis "Unified interface to MIME encoding and decoding")
1060 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1061 (license (package-license perl))))
1063 (define-public perl-email-sender
1065 (name "perl-email-sender")
1066 (version "1.300016")
1070 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1071 "Email-Sender-" version ".tar.gz"))
1074 "18x26fjh399q3s2g8dajb9r10633c46jrnbvycpnpclgnzhjs100"))))
1075 (build-system perl-build-system)
1077 `(("perl-capture-tiny" ,perl-capture-tiny)))
1079 `(("perl-email-abstract" ,perl-email-abstract)
1080 ("perl-email-address" ,perl-email-address)
1081 ("perl-email-simple" ,perl-email-simple)
1082 ("perl-list-moreutils" ,perl-list-moreutils)
1083 ("perl-module-runtime" ,perl-module-runtime)
1084 ("perl-moo" ,perl-moo)
1085 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1086 ("perl-sub-exporter" ,perl-sub-exporter)
1087 ("perl-throwable" ,perl-throwable)
1088 ("perl-try-tiny" ,perl-try-tiny)))
1089 (home-page "http://search.cpan.org/dist/Email-Sender")
1090 (synopsis "Perl library for sending email")
1091 (description "Email::Sender replaces the old and sometimes problematic
1092 Email::Send library.")
1093 (license (package-license perl))))
1095 (define-public perl-email-simple
1097 (name "perl-email-simple")
1102 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1103 "Email-Simple-" version ".tar.gz"))
1106 "19dpy3j5na2k9qw1jcpc8ia25038068r9j1bn34f9yyrisz7s522"))))
1107 (build-system perl-build-system)
1109 `(("perl-email-date-format" ,perl-email-date-format)))
1110 (home-page "http://search.cpan.org/dist/Email-Simple")
1111 (synopsis "Parsing of RFC 2822 messages")
1112 (description "Email::Simple provides simple parsing of RFC 2822 message
1113 format and headers.")
1114 (license (package-license perl))))
1116 (define-public libesmtp
1123 (uri (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1124 version ".tar.bz2"))
1127 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1128 (build-system gnu-build-system)
1130 `(("openssl" ,openssl)))
1131 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1132 (synopsis "Library for sending mail via remote hosts using SMTP")
1133 (description "libESMTP is an SMTP client which manages posting (or
1134 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1135 It may be used as part of a Mail User Agent (MUA) or other program that must
1136 be able to post electronic mail where mail functionality may not be that
1137 program's primary purpose.")
1138 (license (list lgpl2.1+ gpl2+))))
1140 (define-public esmtp
1148 (url "https://github.com/andywingo/esmtp.git")
1149 (commit "01bf9fc")))
1152 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1153 (file-name (string-append name "-" version "-checkout"))))
1155 `(#:phases (modify-phases %standard-phases
1157 'configure 'autoconf
1158 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1159 (build-system gnu-build-system)
1163 ("autoconf" ,autoconf)
1164 ("automake" ,automake)
1165 ("libtool" ,libtool)))
1167 `(("libesmtp" ,libesmtp)))
1168 (home-page "http://sourceforge.net/projects/esmtp/")
1169 (synopsis "Relay-only mail transfer agent (MTA)")
1170 (description "Esmtp is a simple relay-only mail transfer agent built using
1171 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1172 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1173 page for more on configuration. This package also provides minimal
1174 compatibility shims for the @command{sendmail}, @command{mailq}, and
1175 @command{newaliases} commands.")
1184 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1187 (file-name (string-append name "-" version ".tar.gz"))
1189 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1190 (build-system gnu-build-system)
1193 ("openssl" ,openssl)
1195 (home-page "https://github.com/nicm/fdm")
1196 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1197 (description "fdm is a program designed to fetch mail from POP3
1198 or IMAP servers, or receive local mail from stdin, and
1199 deliver it in various ways.")
1201 ;; Why point to a source file? Well, all the individual files have a
1202 ;; copy of this license in their headers, but there's no seprate file
1203 ;; with that information.
1204 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1207 (define-public procmail
1215 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1220 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1221 ;; The following patch fixes an ambiguous definition of
1222 ;; getline() in formail.c. The patch is provided by Debian as
1224 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1225 "procmail-CVE-2014-3618.patch"))))
1227 `(#:phases (modify-phases %standard-phases
1230 (substitute* "Makefile"
1234 (assoc-ref %outputs "out"))
1238 #:tests? #f)) ;; There are no tests indicating a successful
1239 ;; build. Some tests of basic locking mechanisms provided by the
1240 ;; filesystem are performed during 'make install'. However, these
1241 ;; are performed before the actual build process.
1242 (build-system gnu-build-system)
1243 (inputs `(("exim" ,exim)))
1244 (home-page "http://www.procmail.org/")
1245 (synopsis "Versatile mail delivery agent (MDA)")
1246 (description "Procmail is a mail delivery agent (MDA) featuring support
1247 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1248 can be sorted into separate files/directories and arbitrary commands can be
1249 executed on mail arrival. Procmail is considered stable, but is no longer
1251 (license gpl2+))) ;; procmail allows to choose the
1252 ;; nonfree Artistic License 1.0
1253 ;; as alternative to the GPL2+.
1254 ;; This option is not listed here.
1256 (define-public khard
1262 (uri (pypi-uri name version))
1265 "0y83rji4f270hbb41m4jpr0z3yzvpvbsl32mpg9d38hlydw8fk1s"))))
1266 (build-system python-build-system)
1268 `(#:python ,python-2 ; only python-2 is supported.
1270 (modify-phases %standard-phases
1271 (add-before 'build 'disable-egg-compression
1272 ;; Do not compress the egg.
1274 (let ((port (open-file "setup.cfg" "a")))
1275 (display "\n[easy_install]\nzip_ok = 0\n"
1279 (add-after 'install 'install-doc
1280 (lambda* (#:key outputs #:allow-other-keys)
1281 (let* ((out (assoc-ref outputs "out"))
1282 (doc (string-append out "/share/doc/khard")))
1283 (copy-recursively "misc/khard" doc)))))))
1285 `(("python2-setuptools" ,python2-setuptools)))
1287 `(("python2-vobject" ,python2-vobject)
1288 ("python2-pyyaml" ,python2-pyyaml)
1289 ("python2-atomicwrites" ,python2-atomicwrites)
1290 ("python2-configobj" ,python2-configobj)))
1291 (synopsis "Console address book using CardDAV")
1292 (description "Khard is an address book for the console. It creates, reads,
1293 modifies and removes CardDAV address book entries at your local machine. For
1294 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1295 Khard can also be used from within the email client @command{mutt}.")
1296 (home-page "https://github.com/scheibler/khard")
1299 (define-public perl-mail-spf
1301 (name "perl-mail-spf")
1307 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1312 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1313 (build-system perl-build-system)
1315 `(("perl-module-build" ,perl-module-build)
1316 ("perl-net-dns-resolver-programmable"
1317 ,perl-net-dns-resolver-programmable)))
1319 `(#:phases (modify-phases %standard-phases
1320 (add-before 'configure 'modify-Build.PL
1321 (lambda* (#:key outputs #:allow-other-keys)
1322 (substitute* "Build.PL"
1323 (("'/usr/sbin'") (string-append "'"
1324 (assoc-ref outputs "out")
1328 `(("perl-error" ,perl-error)
1329 ("perl-net-dns" ,perl-net-dns)
1330 ("perl-netaddr-ip" ,perl-netaddr-ip)
1331 ("perl-uri" ,perl-uri)))
1333 "http://search.cpan.org/dist/Mail-SPF")
1335 "Perl implementation of Sender Policy Framework")
1336 (description "Mail::SPF is the Sender Policy Framework implemented