gnu: glib: Upgrade to 2.40.0.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
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 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
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.
11 ;;;
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.
16 ;;;
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/>.
19
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 (gnu packages gdb)
48 #:use-module (gnu packages samba)
49 #:use-module ((guix licenses)
50 #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ lgpl3+))
51 #:use-module (guix packages)
52 #:use-module (guix download)
53 #:use-module (guix build-system gnu)
54 #:use-module (guix build-system python)
55 #:use-module (srfi srfi-1))
56
57 (define-public mailutils
58 (package
59 (name "mailutils")
60 (version "2.2")
61 (source (origin
62 (method url-fetch)
63 (uri (string-append "mirror://gnu/mailutils/mailutils-"
64 version ".tar.bz2"))
65 (sha256
66 (base32
67 "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65"))
68 (patches (list (search-patch "m4-gets-undeclared.patch")))))
69 (build-system gnu-build-system)
70 (arguments
71 '(;; TODO: Add `--with-sql'.
72 #:phases (alist-cons-before
73 'build 'pre-build
74 (lambda _
75 ;; Use Guile 2.0's public API.
76 (substitute* "libmu_scm/mu_message.c"
77 (("scm_i_string_length")
78 "scm_c_string_length"))
79
80 ;; This file should be generated to use the right
81 ;; value of $(libdir) et al.
82 (delete-file "libmu_scm/mailutils.scm")
83
84 ;; Use the right file name for `cat'.
85 (substitute* "testsuite/lib/mailutils.exp"
86 (("/bin/cat")
87 (which "cat"))))
88 %standard-phases)
89 #:parallel-tests? #f))
90 (inputs
91 `(("dejagnu" ,dejagnu)
92 ("m4" ,m4)
93 ("texinfo" ,texinfo)
94 ("guile" ,guile-2.0)
95 ("gnutls" ,gnutls)
96 ("ncurses" ,ncurses)
97
98 ;; With Readline 6.3, examples/pop3client.c fails to build because it
99 ;; uses the now undefined 'CPPFunction' type.
100 ("readline" ,readline-6.2)
101
102 ("linux-pam" ,linux-pam)
103 ("libtool" ,libtool)
104 ("gdbm" ,gdbm)))
105 (home-page "http://www.gnu.org/software/mailutils/")
106 (synopsis "Utilities and library for reading and serving mail")
107 (description
108 "GNU Mailutils is a collection of programs for managing, viewing and
109 processing electronic mail. It contains both utilities and server daemons
110 and all operate in a protocol-agnostic way. The underlying libraries are
111 also available, simplifying the addition of mail capabilities to new
112 software.")
113 (license
114 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
115 (list gpl3+ lgpl3+))))
116
117 (define-public fetchmail
118 (package
119 (name "fetchmail")
120 (version "6.3.26")
121 (source (origin
122 (method url-fetch)
123 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
124 version ".tar.xz"))
125 (sha256
126 (base32
127 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
128 (build-system gnu-build-system)
129 (inputs
130 `(("openssl" ,openssl)))
131 (arguments
132 `(#:configure-flags (list (string-append "--with-ssl="
133 (assoc-ref %build-inputs "openssl")))))
134 (home-page "http://fetchmail.berlios.de/")
135 (synopsis "Remote-mailr etrieval and forwarding utility")
136 (description
137 "Fetchmail is a full-featured, robust, well-documented remote-mail
138 retrieval and forwarding utility intended to be used over on-demand
139 TCP/IP links (such as SLIP or PPP connections). It supports every
140 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
141 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
142 and IPSEC.
143
144 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
145 so it can then be read by normal mail user agents such as mutt, elm
146 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
147 aliasing facilities to work just as they would on normal mail.")
148 (license gpl2+))) ; most files are actually public domain or x11
149
150 (define-public mutt
151 (package
152 (name "mutt")
153 (version "1.5.23")
154 (source (origin
155 (method url-fetch)
156 (uri (list ;; Temporarily put bitbucket first, because
157 ;; ftp.mutt.org has been down for a while.
158 (string-append "https://bitbucket.org/mutt/mutt/downloads/mutt-"
159 version ".tar.gz")
160 (string-append "ftp://ftp.mutt.org/mutt/devel/mutt-"
161 version ".tar.gz")))
162 (sha256
163 (base32
164 "0dzx4qk50pjfsb6cs5jahng96a52k12f7pm0sc78iqdrawg71w1s"))))
165 (build-system gnu-build-system)
166 (inputs
167 `(("cyrus-sasl" ,cyrus-sasl)
168 ("gpgme" ,gpgme)
169 ("ncurses" ,ncurses)
170 ("openssl" ,openssl)
171 ("perl" ,perl)))
172 (arguments
173 `(#:configure-flags '("--enable-smtp"
174 "--enable-imap"
175 "--enable-pop"
176 "--enable-gpgme"
177 "--with-ssl"
178 "--with-sasl"
179 ;; so that mutt does not check whether the path
180 ;; exists, which it does not in the chroot
181 "--with-mailpath=/var/mail")))
182 (home-page "http://www.mutt.org/")
183 (synopsis "Mail client")
184 (description
185 "Mutt is a small but very powerful text-based mail client for Unix
186 operating systems.")
187 (license gpl2+)))
188
189 (define-public gmime
190 (package
191 (name "gmime")
192 (version "2.6.19")
193 (source (origin
194 (method url-fetch)
195 (uri (string-append "mirror://gnome/sources/gmime/"
196 (string-join (take (string-split version #\.)
197 2)
198 ".")
199 "/gmime-" version ".tar.xz"))
200 (sha256
201 (base32
202 "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg"))))
203 (build-system gnu-build-system)
204 (native-inputs
205 `(("pkg-config" ,pkg-config)
206 ("gnupg" ,gnupg))) ; for tests only
207 (inputs `(("glib" ,glib)
208 ("gpgme" ,gpgme)
209 ("zlib" ,zlib)))
210 (arguments
211 `(#:phases
212 (alist-cons-after
213 'unpack 'patch-paths-in-tests
214 (lambda _
215 ;; The test programs run several programs using 'system'
216 ;; with hard-coded paths. Here we patch them all. We also
217 ;; change "gpg" to "gpg2".
218 (substitute* (find-files "tests" "\\.c$")
219 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
220 (let* ((base (basename prog-path))
221 (prog (which (if (string=? base "gpg") "gpg2" base))))
222 (string-append pre (or prog (error "not found: " base)))))))
223 %standard-phases)))
224 (home-page "http://spruce.sourceforge.net/gmime/")
225 (synopsis "MIME message parser and creator library")
226 (description
227 "GMime provides a core library and set of utilities which may be used for
228 the creation and parsing of messages using the Multipurpose Internet Mail
229 Extension (MIME).")
230 (license (list lgpl2.1+ gpl2+ gpl3+))))
231
232 (define-public bogofilter
233 (package
234 (name "bogofilter")
235 (version "1.2.4")
236 (source (origin
237 (method url-fetch)
238 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
239 version "/bogofilter-"
240 version ".tar.bz2"))
241 (sha256
242 (base32
243 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
244 (build-system gnu-build-system)
245 (arguments
246 '(#:phases (alist-cons-before
247 'check 'pre-check
248 (lambda _
249 (substitute* "src/tests/t.frame"
250 (("GREP=/bin/grep")
251 (string-append "GREP=" (which "grep") "\n"))))
252 %standard-phases)))
253 (native-inputs `(("flex" ,flex)))
254 (inputs `(("bdb" ,bdb)))
255 (home-page "http://bogofilter.sourceforge.net/")
256 (synopsis "Mail classifier based on a Bayesian filter")
257 (description
258 "Bogofilter is a mail filter that classifies mail as spam or ham
259 (non-spam) by a statistical analysis of the message's header and
260 content (body). The program is able to learn from the user's classifications
261 and corrections. It is based on a Bayesian filter.")
262 (license gpl2)))
263
264 (define-public offlineimap
265 (package
266 (name "offlineimap")
267 (version "6.5.5")
268 (source (origin
269 (method url-fetch)
270 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
271 "archive/v" version ".tar.gz"))
272 (sha256
273 (base32
274 "00k84qagph3xnxss6rkxm61x07ngz8fvffx4z9jyw5baf3cdd32p"))))
275 (build-system python-build-system)
276 (native-inputs `(("python" ,python-2)))
277 (arguments
278 ;; The setup.py script expects python-2.
279 `(#:python ,python-2
280 ;; Tests require a modifiable IMAP account.
281 #:tests? #f))
282 (home-page "http://www.offlineimap.org")
283 (synopsis "Synch emails between two repositories")
284 (description
285 "OfflineImap synchronizes emails between two repositories, so that you
286 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
287 repository and Maildir/IMAP as LOCAL repository.")
288 (license gpl2+)))
289
290 (define-public mu
291 (package
292 (name "mu")
293 (version "0.9.9.5")
294 (source (origin
295 (method url-fetch)
296 (uri (string-append "https://mu0.googlecode.com/files/mu-"
297 version ".tar.gz"))
298 (sha256
299 (base32
300 "1hwkliyb8fjrz5sw9fcisssig0jkdxzhccw0ld0l9a10q1l9mqhp"))))
301 (build-system gnu-build-system)
302 (native-inputs
303 `(("pkg-config" ,pkg-config)
304 ("texinfo" ,texinfo)))
305 ;; TODO: Add webkit and gtk to build the mug GUI.
306 (inputs
307 `(("xapian" ,xapian)
308 ("emacs" ,emacs)
309 ("guile" ,guile-2.0)
310 ("glib" ,glib)
311 ("gmime" ,gmime)
312 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
313 (arguments
314 '(#:phases (alist-cons-before
315 'check 'check-tz-setup
316 (lambda* (#:key inputs #:allow-other-keys)
317 ;; For mu/test/test-mu-query.c
318 (setenv "TZDIR"
319 (string-append (assoc-ref inputs "tzdata")
320 "/share/zoneinfo")))
321 %standard-phases)))
322 (home-page "http://www.djcbsoftware.nl/code/mu/")
323 (synopsis "Quickly find emails")
324 (description
325 "Mu is a tool for dealing with e-mail messages stored in the
326 Maildir-format. Mu's purpose in life is to help you to quickly find the
327 messages you need; in addition, it allows you to view messages, extract
328 attachments, create new maildirs, and so on.")
329 (license gpl3+)))
330
331 (define-public notmuch
332 (package
333 (name "notmuch")
334 (version "0.18")
335 (source (origin
336 (method url-fetch)
337 (uri (string-append "http://notmuchmail.org/releases/notmuch-"
338 version ".tar.gz"))
339 (sha256
340 (base32
341 "1ia65iazz2hlp3ja57yn0chs27rzsky9kayw74njwmgi9faw3vh9"))))
342 (build-system gnu-build-system)
343 (arguments
344 '(#:tests? #f ;; FIXME: Test suite hangs and times out.
345 #:phases (alist-replace
346 'configure
347 (lambda* (#:key outputs #:allow-other-keys)
348 (setenv "CONFIG_SHELL" (which "sh"))
349 (let ((out (assoc-ref outputs "out")))
350 (zero? (system* "./configure"
351 (string-append "--prefix=" out)))))
352 %standard-phases)))
353 (native-inputs
354 `(("pkg-config" ,pkg-config)))
355 (inputs
356 `(("emacs" ,emacs)
357 ("glib" ,glib)
358 ("gmime" ,gmime)
359 ("talloc" ,talloc)
360 ("xapian" ,xapian)
361 ("zlib" ,zlib)))
362 (home-page "http://notmuchmail.org/")
363 (synopsis "Thread-based email index, search, and tagging")
364 (description
365 "Notmuch is a command-line based program for indexing, searching, read-
366 ing, and tagging large collections of email messages.")
367 (license gpl3+)))
368
369 ;;; mail.scm ends here