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>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages mail)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages autotools)
23 #:use-module (gnu packages base)
24 #:use-module (gnu packages cyrus-sasl)
25 #:use-module (gnu packages dejagnu)
26 #:use-module (gnu packages emacs)
27 #:use-module (gnu packages gdbm)
28 #:use-module (gnu packages glib)
29 #:use-module (gnu packages gnupg)
30 #:use-module (gnu packages gnutls)
31 #:use-module (gnu packages guile)
32 #:use-module (gnu packages linux)
33 #:use-module (gnu packages m4)
34 #:use-module (gnu packages mysql)
35 #:use-module (gnu packages ncurses)
36 #:use-module (gnu packages openssl)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages readline)
40 #:use-module (gnu packages search)
41 #:use-module (gnu packages texinfo)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages flex)
46 #:use-module (gnu packages bdb)
47 #:use-module ((guix licenses)
48 #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ lgpl3+))
49 #:use-module (guix packages)
50 #:use-module (guix download)
51 #:use-module (guix build-system gnu)
52 #:use-module (guix build-system python)
53 #:use-module (srfi srfi-1))
55 (define-public mailutils
61 (uri (string-append "mirror://gnu/mailutils/mailutils-"
65 "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65"))
66 (patches (list (search-patch "m4-gets-undeclared.patch")))))
67 (build-system gnu-build-system)
69 '(;; TODO: Add `--with-sql'.
70 #:phases (alist-cons-before
73 ;; Use Guile 2.0's public API.
74 (substitute* "libmu_scm/mu_message.c"
75 (("scm_i_string_length")
76 "scm_c_string_length"))
78 ;; This file should be generated to use the right
79 ;; value of $(libdir) et al.
80 (delete-file "libmu_scm/mailutils.scm")
82 ;; Use the right file name for `cat'.
83 (substitute* "testsuite/lib/mailutils.exp"
87 #:parallel-tests? #f))
89 `(("dejagnu" ,dejagnu)
96 ;; With Readline 6.3, examples/pop3client.c fails to build because it
97 ;; uses the now undefined 'CPPFunction' type.
98 ("readline" ,readline-6.2)
100 ("linux-pam" ,linux-pam)
103 (home-page "http://www.gnu.org/software/mailutils/")
104 (synopsis "Utilities and library for reading and serving mail")
106 "GNU Mailutils is a collection of programs for managing, viewing and
107 processing electronic mail. It contains both utilities and server daemons
108 and all operate in a protocol-agnostic way. The underlying libraries are
109 also available, simplifying the addition of mail capabilities to new
112 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
113 (list gpl3+ lgpl3+))))
115 (define-public fetchmail
121 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
125 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
126 (build-system gnu-build-system)
128 `(("openssl" ,openssl)))
130 `(#:configure-flags (list (string-append "--with-ssl="
131 (assoc-ref %build-inputs "openssl")))))
132 (home-page "http://fetchmail.berlios.de/")
133 (synopsis "Remote-mailr etrieval and forwarding utility")
135 "Fetchmail is a full-featured, robust, well-documented remote-mail
136 retrieval and forwarding utility intended to be used over on-demand
137 TCP/IP links (such as SLIP or PPP connections). It supports every
138 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
139 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
142 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
143 so it can then be read by normal mail user agents such as mutt, elm
144 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
145 aliasing facilities to work just as they would on normal mail.")
146 (license gpl2+))) ; most files are actually public domain or x11
154 (uri (list ;; Temporarily put bitbucket first, because
155 ;; ftp.mutt.org has been down for a while.
156 (string-append "https://bitbucket.org/mutt/mutt/downloads/mutt-"
158 (string-append "ftp://ftp.mutt.org/mutt/devel/mutt-"
162 "0dzx4qk50pjfsb6cs5jahng96a52k12f7pm0sc78iqdrawg71w1s"))))
163 (build-system gnu-build-system)
165 `(("cyrus-sasl" ,cyrus-sasl)
171 `(#:configure-flags '("--enable-smtp"
177 ;; so that mutt does not check whether the path
178 ;; exists, which it does not in the chroot
179 "--with-mailpath=/var/mail")))
180 (home-page "http://www.mutt.org/")
181 (synopsis "Mail client")
183 "Mutt is a small but very powerful text-based mail client for Unix
193 (uri (string-append "mirror://gnome/sources/gmime/"
194 (string-join (take (string-split version #\.)
197 "/gmime-" version ".tar.xz"))
200 "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg"))))
201 (build-system gnu-build-system)
203 `(("pkg-config" ,pkg-config)
204 ("gnupg" ,gnupg))) ; for tests only
205 (inputs `(("glib" ,glib)
211 'unpack 'patch-paths-in-tests
213 ;; The test programs run several programs using 'system'
214 ;; with hard-coded paths. Here we patch them all. We also
215 ;; change "gpg" to "gpg2".
216 (substitute* (find-files "tests" "\\.c$")
217 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
218 (let* ((base (basename prog-path))
219 (prog (which (if (string=? base "gpg") "gpg2" base))))
220 (string-append pre (or prog (error "not found: " base)))))))
222 (home-page "http://spruce.sourceforge.net/gmime/")
223 (synopsis "MIME message parser and creator library")
225 "GMime provides a core library and set of utilities which may be used for
226 the creation and parsing of messages using the Multipurpose Internet Mail
228 (license (list lgpl2.1+ gpl2+ gpl3+))))
230 (define-public bogofilter
236 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
237 version "/bogofilter-"
241 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
242 (build-system gnu-build-system)
244 '(#:phases (alist-cons-before
247 (substitute* "src/tests/t.frame"
249 (string-append "GREP=" (which "grep") "\n"))))
251 (native-inputs `(("flex" ,flex)))
252 (inputs `(("bdb" ,bdb)))
253 (home-page "http://bogofilter.sourceforge.net/")
254 (synopsis "Mail classifier based on a Bayesian filter")
256 "Bogofilter is a mail filter that classifies mail as spam or ham
257 (non-spam) by a statistical analysis of the message's header and
258 content (body). The program is able to learn from the user's classifications
259 and corrections. It is based on a Bayesian filter.")
262 (define-public offlineimap
268 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
269 "archive/v" version ".tar.gz"))
272 "00k84qagph3xnxss6rkxm61x07ngz8fvffx4z9jyw5baf3cdd32p"))))
273 (build-system python-build-system)
274 (native-inputs `(("python" ,python-2)))
276 ;; The setup.py script expects python-2.
278 ;; Tests require a modifiable IMAP account.
280 (home-page "http://www.offlineimap.org")
281 (synopsis "Synch emails between two repositories")
283 "OfflineImap synchronizes emails between two repositories, so that you
284 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
285 repository and Maildir/IMAP as LOCAL repository.")
294 (uri (string-append "https://mu0.googlecode.com/files/mu-"
298 "1hwkliyb8fjrz5sw9fcisssig0jkdxzhccw0ld0l9a10q1l9mqhp"))))
299 (build-system gnu-build-system)
301 `(("pkg-config" ,pkg-config)
302 ("texinfo" ,texinfo)))
303 ;; TODO: Add webkit and gtk to build the mug GUI.
310 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
312 '(#:phases (alist-cons-before
313 'check 'check-tz-setup
314 (lambda* (#:key inputs #:allow-other-keys)
315 ;; For mu/test/test-mu-query.c
317 (string-append (assoc-ref inputs "tzdata")
320 (home-page "http://www.djcbsoftware.nl/code/mu/")
321 (synopsis "Quickly find emails")
323 "Mu is a tool for dealing with e-mail messages stored in the
324 Maildir-format. Mu's purpose in life is to help you to quickly find the
325 messages you need; in addition, it allows you to view messages, extract
326 attachments, create new maildirs, and so on.")
329 ;;; mail.scm ends here