doc: Add xrefs to the lsh manual.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
CommitLineData
a661e420 1;;; GNU Guix --- Functional package management for GNU
a7e59c50 2;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
681a6588 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
29a7c98a 4;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
a661e420
LC
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
1fdd3ee2 21(define-module (gnu packages mail)
59a43334 22 #:use-module (gnu packages)
d983a14f 23 #:use-module (gnu packages autotools)
d2938d59 24 #:use-module (gnu packages base)
4fd6bf53 25 #:use-module (gnu packages cyrus-sasl)
d983a14f 26 #:use-module (gnu packages dejagnu)
d2938d59 27 #:use-module (gnu packages emacs)
1ffa7090 28 #:use-module (gnu packages gdbm)
d2938d59 29 #:use-module (gnu packages glib)
524e1df6 30 #:use-module (gnu packages gnupg)
d983a14f 31 #:use-module (gnu packages gnutls)
1ffa7090 32 #:use-module (gnu packages guile)
d983a14f
AE
33 #:use-module (gnu packages linux)
34 #:use-module (gnu packages m4)
5f96f303 35 #:use-module (gnu packages databases)
1ffa7090 36 #:use-module (gnu packages ncurses)
d983a14f 37 #:use-module (gnu packages openssl)
13f04f48 38 #:use-module (gnu packages perl)
3919a31a 39 #:use-module (gnu packages python)
1ffa7090 40 #:use-module (gnu packages readline)
d2938d59 41 #:use-module (gnu packages search)
1ffa7090 42 #:use-module (gnu packages texinfo)
681a6588
MW
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages pkg-config)
a7e59c50 46 #:use-module (gnu packages flex)
1bd3f849
DT
47 #:use-module (gnu packages gdb)
48 #:use-module (gnu packages samba)
d983a14f 49 #:use-module ((guix licenses)
a7e59c50 50 #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ lgpl3+))
a661e420
LC
51 #:use-module (guix packages)
52 #:use-module (guix download)
29a7c98a 53 #:use-module (guix utils)
681a6588 54 #:use-module (guix build-system gnu)
29a7c98a 55 #:use-module (guix build-system python))
a661e420
LC
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
01eafd38
LC
67 "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65"))
68 (patches (list (search-patch "m4-gets-undeclared.patch")))))
a661e420
LC
69 (build-system gnu-build-system)
70 (arguments
71 '(;; TODO: Add `--with-sql'.
a661e420
LC
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)
eb8cc645
MW
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
a661e420
LC
102 ("linux-pam" ,linux-pam)
103 ("libtool" ,libtool)
01eafd38 104 ("gdbm" ,gdbm)))
a661e420 105 (home-page "http://www.gnu.org/software/mailutils/")
f50d2669 106 (synopsis "Utilities and library for reading and serving mail")
a661e420 107 (description
79c311b8
LC
108 "GNU Mailutils is a collection of programs for managing, viewing and
109processing electronic mail. It contains both utilities and server daemons
110and all operate in a protocol-agnostic way. The underlying libraries are
111also available, simplifying the addition of mail capabilities to new
112software.")
a661e420
LC
113 (license
114 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
115 (list gpl3+ lgpl3+))))
d983a14f
AE
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/")
ae2189a9 135 (synopsis "Remote-mail retrieval and forwarding utility")
d983a14f
AE
136 (description
137 "Fetchmail is a full-featured, robust, well-documented remote-mail
138retrieval and forwarding utility intended to be used over on-demand
139TCP/IP links (such as SLIP or PPP connections). It supports every
140remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
141KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
142and IPSEC.
143
144Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
145so it can then be read by normal mail user agents such as mutt, elm
146or BSD Mail. It allows all your system MTA's filtering, forwarding, and
147aliasing facilities to work just as they would on normal mail.")
148 (license gpl2+))) ; most files are actually public domain or x11
13f04f48
AE
149
150(define-public mutt
151 (package
152 (name "mutt")
fb9c3acc 153 (version "1.5.23")
13f04f48
AE
154 (source (origin
155 (method url-fetch)
fb9c3acc
MW
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")))
13f04f48
AE
162 (sha256
163 (base32
fb9c3acc 164 "0dzx4qk50pjfsb6cs5jahng96a52k12f7pm0sc78iqdrawg71w1s"))))
13f04f48
AE
165 (build-system gnu-build-system)
166 (inputs
4fd6bf53 167 `(("cyrus-sasl" ,cyrus-sasl)
524e1df6 168 ("gpgme" ,gpgme)
4fd6bf53 169 ("ncurses" ,ncurses)
13f04f48
AE
170 ("openssl" ,openssl)
171 ("perl" ,perl)))
172 (arguments
173 `(#:configure-flags '("--enable-smtp"
174 "--enable-imap"
175 "--enable-pop"
524e1df6 176 "--enable-gpgme"
13f04f48 177 "--with-ssl"
4fd6bf53 178 "--with-sasl"
13f04f48
AE
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
186operating systems.")
187 (license gpl2+)))
681a6588
MW
188
189(define-public gmime
190 (package
191 (name "gmime")
192 (version "2.6.19")
193 (source (origin
194 (method url-fetch)
75630043 195 (uri (string-append "mirror://gnome/sources/gmime/"
29a7c98a 196 (version-major+minor version)
681a6588
MW
197 "/gmime-" version ".tar.xz"))
198 (sha256
199 (base32
200 "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg"))))
201 (build-system gnu-build-system)
202 (native-inputs
203 `(("pkg-config" ,pkg-config)
204 ("gnupg" ,gnupg))) ; for tests only
205 (inputs `(("glib" ,glib)
206 ("gpgme" ,gpgme)
207 ("zlib" ,zlib)))
208 (arguments
209 `(#:phases
210 (alist-cons-after
211 'unpack 'patch-paths-in-tests
212 (lambda _
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)))))))
221 %standard-phases)))
222 (home-page "http://spruce.sourceforge.net/gmime/")
223 (synopsis "MIME message parser and creator library")
224 (description
225 "GMime provides a core library and set of utilities which may be used for
226the creation and parsing of messages using the Multipurpose Internet Mail
227Extension (MIME).")
228 (license (list lgpl2.1+ gpl2+ gpl3+))))
229
a7e59c50
LC
230(define-public bogofilter
231 (package
232 (name "bogofilter")
233 (version "1.2.4")
234 (source (origin
235 (method url-fetch)
236 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
237 version "/bogofilter-"
238 version ".tar.bz2"))
239 (sha256
240 (base32
241 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
242 (build-system gnu-build-system)
243 (arguments
244 '(#:phases (alist-cons-before
245 'check 'pre-check
246 (lambda _
247 (substitute* "src/tests/t.frame"
248 (("GREP=/bin/grep")
249 (string-append "GREP=" (which "grep") "\n"))))
250 %standard-phases)))
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")
255 (description
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
258content (body). The program is able to learn from the user's classifications
259and corrections. It is based on a Bayesian filter.")
260 (license gpl2)))
261
3919a31a
EB
262(define-public offlineimap
263 (package
264 (name "offlineimap")
265 (version "6.5.5")
266 (source (origin
267 (method url-fetch)
268 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
269 "archive/v" version ".tar.gz"))
270 (sha256
271 (base32
272 "00k84qagph3xnxss6rkxm61x07ngz8fvffx4z9jyw5baf3cdd32p"))))
273 (build-system python-build-system)
274 (native-inputs `(("python" ,python-2)))
275 (arguments
276 ;; The setup.py script expects python-2.
277 `(#:python ,python-2
278 ;; Tests require a modifiable IMAP account.
279 #:tests? #f))
280 (home-page "http://www.offlineimap.org")
281 (synopsis "Synch emails between two repositories")
282 (description
283 "OfflineImap synchronizes emails between two repositories, so that you
284can read the same mailbox from multiple computers. It supports IMAP as REMOTE
285repository and Maildir/IMAP as LOCAL repository.")
7886e23b 286 (license gpl2+)))
3919a31a 287
d2938d59
EB
288(define-public mu
289 (package
290 (name "mu")
291 (version "0.9.9.5")
292 (source (origin
293 (method url-fetch)
294 (uri (string-append "https://mu0.googlecode.com/files/mu-"
295 version ".tar.gz"))
296 (sha256
297 (base32
298 "1hwkliyb8fjrz5sw9fcisssig0jkdxzhccw0ld0l9a10q1l9mqhp"))))
299 (build-system gnu-build-system)
300 (native-inputs
301 `(("pkg-config" ,pkg-config)
9fd571a2 302 ("glib" ,glib "bin") ; for gtester
d2938d59
EB
303 ("texinfo" ,texinfo)))
304 ;; TODO: Add webkit and gtk to build the mug GUI.
305 (inputs
306 `(("xapian" ,xapian)
307 ("emacs" ,emacs)
308 ("guile" ,guile-2.0)
309 ("glib" ,glib)
310 ("gmime" ,gmime)
311 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
312 (arguments
313 '(#:phases (alist-cons-before
314 'check 'check-tz-setup
315 (lambda* (#:key inputs #:allow-other-keys)
316 ;; For mu/test/test-mu-query.c
317 (setenv "TZDIR"
318 (string-append (assoc-ref inputs "tzdata")
319 "/share/zoneinfo")))
320 %standard-phases)))
321 (home-page "http://www.djcbsoftware.nl/code/mu/")
322 (synopsis "Quickly find emails")
323 (description
324 "Mu is a tool for dealing with e-mail messages stored in the
325Maildir-format. Mu's purpose in life is to help you to quickly find the
326messages you need; in addition, it allows you to view messages, extract
327attachments, create new maildirs, and so on.")
328 (license gpl3+)))
329
1bd3f849
DT
330(define-public notmuch
331 (package
332 (name "notmuch")
7f767bcc 333 (version "0.18.1")
1bd3f849
DT
334 (source (origin
335 (method url-fetch)
336 (uri (string-append "http://notmuchmail.org/releases/notmuch-"
337 version ".tar.gz"))
338 (sha256
339 (base32
7f767bcc 340 "1pdp9l7yv71d3fjb30qyccva8h03hvg88q4a00yi50v2j70kvmgj"))))
1bd3f849
DT
341 (build-system gnu-build-system)
342 (arguments
343 '(#:tests? #f ;; FIXME: Test suite hangs and times out.
344 #:phases (alist-replace
345 'configure
346 (lambda* (#:key outputs #:allow-other-keys)
347 (setenv "CONFIG_SHELL" (which "sh"))
348 (let ((out (assoc-ref outputs "out")))
349 (zero? (system* "./configure"
350 (string-append "--prefix=" out)))))
351 %standard-phases)))
352 (native-inputs
353 `(("pkg-config" ,pkg-config)))
354 (inputs
355 `(("emacs" ,emacs)
356 ("glib" ,glib)
357 ("gmime" ,gmime)
358 ("talloc" ,talloc)
359 ("xapian" ,xapian)
360 ("zlib" ,zlib)))
361 (home-page "http://notmuchmail.org/")
362 (synopsis "Thread-based email index, search, and tagging")
363 (description
364 "Notmuch is a command-line based program for indexing, searching, read-
365ing, and tagging large collections of email messages.")
366 (license gpl3+)))
367
681a6588 368;;; mail.scm ends here