1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 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>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages mail)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages autotools)
26 #:use-module (gnu packages base)
27 #:use-module (gnu packages curl)
28 #:use-module (gnu packages cyrus-sasl)
29 #:use-module (gnu packages dejagnu)
30 #:use-module (gnu packages emacs)
31 #:use-module (gnu packages gdbm)
32 #:use-module (gnu packages glib)
33 #:use-module (gnu packages gnupg)
34 #:use-module (gnu packages gnutls)
35 #:use-module (gnu packages guile)
36 #:use-module (gnu packages linux)
37 #:use-module (gnu packages m4)
38 #:use-module (gnu packages databases)
39 #:use-module (gnu packages ncurses)
40 #:use-module (gnu packages openssl)
41 #:use-module (gnu packages perl)
42 #:use-module (gnu packages python)
43 #:use-module (gnu packages readline)
44 #:use-module (gnu packages search)
45 #:use-module (gnu packages texinfo)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages flex)
50 #:use-module (gnu packages gdb)
51 #:use-module (gnu packages samba)
52 #:use-module (gnu packages xml)
53 #:use-module ((guix licenses)
54 #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ lgpl3+ bsd-style))
55 #:use-module (guix packages)
56 #:use-module (guix download)
57 #:use-module (guix utils)
58 #:use-module (guix build-system gnu)
59 #:use-module (guix build-system python))
61 (define-public mailutils
67 (uri (string-append "mirror://gnu/mailutils/mailutils-"
71 "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65"))
72 (patches (list (search-patch "m4-gets-undeclared.patch")))))
73 (build-system gnu-build-system)
75 '(;; TODO: Add `--with-sql'.
76 #:phases (alist-cons-before
79 ;; Use Guile 2.0's public API.
80 (substitute* "libmu_scm/mu_message.c"
81 (("scm_i_string_length")
82 "scm_c_string_length"))
84 ;; This file should be generated to use the right
85 ;; value of $(libdir) et al.
86 (delete-file "libmu_scm/mailutils.scm")
88 ;; Use the right file name for `cat'.
89 (substitute* "testsuite/lib/mailutils.exp"
93 #:parallel-tests? #f))
95 `(("dejagnu" ,dejagnu)
102 ;; With Readline 6.3, examples/pop3client.c fails to build because it
103 ;; uses the now undefined 'CPPFunction' type.
104 ("readline" ,readline-6.2)
106 ("linux-pam" ,linux-pam)
109 (home-page "http://www.gnu.org/software/mailutils/")
110 (synopsis "Utilities and library for reading and serving mail")
112 "GNU Mailutils is a collection of programs for managing, viewing and
113 processing electronic mail. It contains both utilities and server daemons
114 and all operate in a protocol-agnostic way. The underlying libraries are
115 also available, simplifying the addition of mail capabilities to new
118 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
119 (list gpl3+ lgpl3+))))
121 (define-public fetchmail
127 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
131 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
132 (build-system gnu-build-system)
134 `(("openssl" ,openssl)))
136 `(#:configure-flags (list (string-append "--with-ssl="
137 (assoc-ref %build-inputs "openssl")))))
138 (home-page "http://fetchmail.berlios.de/")
139 (synopsis "Remote-mail retrieval and forwarding utility")
141 "Fetchmail is a full-featured, robust, well-documented remote-mail
142 retrieval and forwarding utility intended to be used over on-demand
143 TCP/IP links (such as SLIP or PPP connections). It supports every
144 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
145 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
148 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
149 so it can then be read by normal mail user agents such as mutt, elm
150 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
151 aliasing facilities to work just as they would on normal mail.")
152 (license gpl2+))) ; most files are actually public domain or x11
160 (uri (list ;; Temporarily put bitbucket first, because
161 ;; ftp.mutt.org has been down for a while.
162 (string-append "https://bitbucket.org/mutt/mutt/downloads/mutt-"
164 (string-append "ftp://ftp.mutt.org/mutt/devel/mutt-"
168 "0dzx4qk50pjfsb6cs5jahng96a52k12f7pm0sc78iqdrawg71w1s"))))
169 (build-system gnu-build-system)
171 `(("cyrus-sasl" ,cyrus-sasl)
177 `(#:configure-flags '("--enable-smtp"
183 ;; so that mutt does not check whether the path
184 ;; exists, which it does not in the chroot
185 "--with-mailpath=/var/mail")))
186 (home-page "http://www.mutt.org/")
187 (synopsis "Mail client")
189 "Mutt is a small but very powerful text-based mail client for Unix
199 (uri (string-append "mirror://gnome/sources/gmime/"
200 (version-major+minor version)
201 "/gmime-" version ".tar.xz"))
204 "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg"))))
205 (build-system gnu-build-system)
207 `(("pkg-config" ,pkg-config)
208 ("gnupg" ,gnupg))) ; for tests only
209 (inputs `(("glib" ,glib)
215 'unpack 'patch-paths-in-tests
217 ;; The test programs run several programs using 'system'
218 ;; with hard-coded paths. Here we patch them all. We also
219 ;; change "gpg" to "gpg2".
220 (substitute* (find-files "tests" "\\.c$")
221 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
222 (let* ((base (basename prog-path))
223 (prog (which (if (string=? base "gpg") "gpg2" base))))
224 (string-append pre (or prog (error "not found: " base)))))))
226 (home-page "http://spruce.sourceforge.net/gmime/")
227 (synopsis "MIME message parser and creator library")
229 "GMime provides a core library and set of utilities which may be used for
230 the creation and parsing of messages using the Multipurpose Internet Mail
232 (license (list lgpl2.1+ gpl2+ gpl3+))))
234 (define-public bogofilter
240 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
241 version "/bogofilter-"
245 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
246 (build-system gnu-build-system)
248 '(#:phases (alist-cons-before
251 (substitute* "src/tests/t.frame"
253 (string-append "GREP=" (which "grep") "\n"))))
255 (native-inputs `(("flex" ,flex)))
256 (inputs `(("bdb" ,bdb)))
257 (home-page "http://bogofilter.sourceforge.net/")
258 (synopsis "Mail classifier based on a Bayesian filter")
260 "Bogofilter is a mail filter that classifies mail as spam or ham
261 (non-spam) by a statistical analysis of the message's header and
262 content (body). The program is able to learn from the user's classifications
263 and corrections. It is based on a Bayesian filter.")
266 (define-public offlineimap
272 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
273 "archive/v" version ".tar.gz"))
276 "00k84qagph3xnxss6rkxm61x07ngz8fvffx4z9jyw5baf3cdd32p"))))
277 (build-system python-build-system)
278 (native-inputs `(("python" ,python-2)))
280 ;; The setup.py script expects python-2.
282 ;; Tests require a modifiable IMAP account.
284 (home-page "http://www.offlineimap.org")
285 (synopsis "Synch emails between two repositories")
287 "OfflineImap synchronizes emails between two repositories, so that you
288 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
289 repository and Maildir/IMAP as LOCAL repository.")
298 (uri (string-append "https://mu0.googlecode.com/files/mu-"
302 "1hwkliyb8fjrz5sw9fcisssig0jkdxzhccw0ld0l9a10q1l9mqhp"))))
303 (build-system gnu-build-system)
305 `(("pkg-config" ,pkg-config)
306 ("glib" ,glib "bin") ; for gtester
307 ("texinfo" ,texinfo)))
308 ;; TODO: Add webkit and gtk to build the mug GUI.
315 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
317 '(#:phases (alist-cons-before
318 'check 'check-tz-setup
319 (lambda* (#:key inputs #:allow-other-keys)
320 ;; For mu/test/test-mu-query.c
322 (string-append (assoc-ref inputs "tzdata")
325 (home-page "http://www.djcbsoftware.nl/code/mu/")
326 (synopsis "Quickly find emails")
328 "Mu is a tool for dealing with e-mail messages stored in the
329 Maildir-format. Mu's purpose in life is to help you to quickly find the
330 messages you need; in addition, it allows you to view messages, extract
331 attachments, create new maildirs, and so on.")
334 (define-public notmuch
340 (uri (string-append "http://notmuchmail.org/releases/notmuch-"
344 "1pdp9l7yv71d3fjb30qyccva8h03hvg88q4a00yi50v2j70kvmgj"))))
345 (build-system gnu-build-system)
347 '(#:tests? #f ;; FIXME: Test suite hangs and times out.
348 #:phases (alist-replace
350 (lambda* (#:key outputs #:allow-other-keys)
351 (setenv "CONFIG_SHELL" (which "sh"))
352 (let ((out (assoc-ref outputs "out")))
353 (zero? (system* "./configure"
354 (string-append "--prefix=" out)))))
357 `(("pkg-config" ,pkg-config)))
365 (home-page "http://notmuchmail.org/")
366 (synopsis "Thread-based email index, search, and tagging")
368 "Notmuch is a command-line based program for indexing, searching, read-
369 ing, and tagging large collections of email messages.")
372 (define-public getmail
379 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
380 name "-" version ".tar.gz"))
383 "15rqmm25pq6ll8aaqh8h6pfdkpqs7y6yismb3h3w1bz8j292c8zl"))))
384 (build-system python-build-system)
386 `(#:tests? #f ; no tests
388 (home-page "http://pyropus.ca/software/getmail/")
389 (synopsis "Mail retriever")
391 "A flexible, extensible mail retrieval system with support for
392 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
393 arbitrary message filtering, single-user and domain-mailboxes, and many other
396 ;; License is specified in file '__init__.py'.
399 (define-public libetpan
405 (uri (string-append "https://github.com/dinhviethoa/" name
406 "/archive/" version ".tar.gz"))
408 (base32 "05qyqx2c1ppb1jnrs3m52i60f9xlxfxdmb9dnwg4vqjv8kwv2qkr"))))
409 (build-system gnu-build-system)
410 (native-inputs `(("autoconf" ,(autoconf-wrapper))
411 ("automake" ,automake)
412 ("libtool" ,libtool "bin")
413 ("pkg-config" ,pkg-config)))
415 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
416 ;; libraries need to be propagated.
417 `(("cyrus-sasl" ,cyrus-sasl)
418 ("openssl" ,openssl)))
423 '(#:phases (alist-cons-before
426 (system* "./autogen.sh")) ;; Note: this fails because the
427 ;; generated configure script uses /bin/sh. It is
428 ;; replaced in the configure phase by the correct
429 ;; value. TODO: replace the configure phase by the
430 ;; autogen phase and have the SHELL variable be replaced
433 '("--disable-static" "--disable-db")))
434 (home-page "http://www.etpan.org/libetpan.html")
435 (synopsis "Portable middleware for email access")
437 "The purpose of this mail library is to provide a portable, efficient
438 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
439 provides an API for C language. It's the low-level API used by MailCore and
441 (license (bsd-style "file://COPYING"))))
443 ;;; mail.scm ends here