gnu: Add ola.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
CommitLineData
a661e420 1;;; GNU Guix --- Functional package management for GNU
05aa576b 2;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
722ec722 3;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
29a7c98a 4;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
98e9e22f 5;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
f58f767b 6;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu>
66cc3ab2 7;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
17dd4329 8;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
f6292baf 9;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
2e88d113 10;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
21565719 11;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
34dd26af 12;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
8a75c589 13;;; Copyright © 2016 Al McElrath <hello@yrns.org>
823e2ed4 14;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
e90819c4 15;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
99404fff 16;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
a2cb16b0 17;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
ae83dcf6 18;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
a661e420
LC
19;;;
20;;; This file is part of GNU Guix.
21;;;
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.
26;;;
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.
31;;;
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/>.
34
1fdd3ee2 35(define-module (gnu packages mail)
59a43334 36 #:use-module (gnu packages)
d983a14f 37 #:use-module (gnu packages autotools)
d2938d59 38 #:use-module (gnu packages base)
e8435c4d 39 #:use-module (gnu packages backup)
ee886454 40 #:use-module (gnu packages bash)
f8ae32a2 41 #:use-module (gnu packages bison)
f58f767b 42 #:use-module (gnu packages curl)
4fd6bf53 43 #:use-module (gnu packages cyrus-sasl)
81ce19f4 44 #:use-module (gnu packages databases)
d983a14f 45 #:use-module (gnu packages dejagnu)
d2938d59 46 #:use-module (gnu packages emacs)
e8435c4d 47 #:use-module (gnu packages enchant)
e8435c4d 48 #:use-module (gnu packages ghostscript)
d2938d59 49 #:use-module (gnu packages glib)
e8435c4d 50 #:use-module (gnu packages gnome)
524e1df6 51 #:use-module (gnu packages gnupg)
d6e941bc 52 #:use-module (gnu packages gsasl)
e8435c4d 53 #:use-module (gnu packages gtk)
1ffa7090 54 #:use-module (gnu packages guile)
f8ae32a2 55 #:use-module (gnu packages flex)
e8435c4d 56 #:use-module (gnu packages libcanberra)
d6e941bc 57 #:use-module (gnu packages libidn)
d983a14f
AE
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages m4)
1ffa7090 60 #:use-module (gnu packages ncurses)
66cc3ab2 61 #:use-module (gnu packages pcre)
13f04f48 62 #:use-module (gnu packages perl)
3919a31a 63 #:use-module (gnu packages python)
1ffa7090 64 #:use-module (gnu packages readline)
d2938d59 65 #:use-module (gnu packages search)
1ffa7090 66 #:use-module (gnu packages texinfo)
681a6588
MW
67 #:use-module (gnu packages compression)
68 #:use-module (gnu packages glib)
69 #:use-module (gnu packages pkg-config)
a7e59c50 70 #:use-module (gnu packages flex)
1bd3f849
DT
71 #:use-module (gnu packages gdb)
72 #:use-module (gnu packages samba)
a7fd7b68 73 #:use-module (gnu packages tls)
be0c5733
DM
74 #:use-module (gnu packages networking)
75 #:use-module (gnu packages web)
f58f767b 76 #:use-module (gnu packages xml)
e8435c4d 77 #:use-module (gnu packages xorg)
d983a14f 78 #:use-module ((guix licenses)
61c30e9d 79 #:select (gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
be0c5733 80 non-copyleft (expat . license:expat) bsd-3))
a661e420
LC
81 #:use-module (guix packages)
82 #:use-module (guix download)
f8ae32a2 83 #:use-module (guix git-download)
29a7c98a 84 #:use-module (guix utils)
681a6588 85 #:use-module (guix build-system gnu)
ebda902f 86 #:use-module (guix build-system perl)
29a7c98a 87 #:use-module (guix build-system python))
a661e420
LC
88
89(define-public mailutils
90 (package
91 (name "mailutils")
92 (version "2.2")
93 (source (origin
94 (method url-fetch)
95 (uri (string-append "mirror://gnu/mailutils/mailutils-"
96 version ".tar.bz2"))
97 (sha256
98 (base32
01eafd38 99 "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65"))
fc1adab1 100 (patches (search-patches "m4-gets-undeclared.patch"))))
a661e420
LC
101 (build-system gnu-build-system)
102 (arguments
103 '(;; TODO: Add `--with-sql'.
a661e420
LC
104 #:phases (alist-cons-before
105 'build 'pre-build
106 (lambda _
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"))
111
112 ;; This file should be generated to use the right
113 ;; value of $(libdir) et al.
114 (delete-file "libmu_scm/mailutils.scm")
115
116 ;; Use the right file name for `cat'.
117 (substitute* "testsuite/lib/mailutils.exp"
118 (("/bin/cat")
119 (which "cat"))))
120 %standard-phases)
121 #:parallel-tests? #f))
122 (inputs
123 `(("dejagnu" ,dejagnu)
124 ("m4" ,m4)
125 ("texinfo" ,texinfo)
126 ("guile" ,guile-2.0)
127 ("gnutls" ,gnutls)
128 ("ncurses" ,ncurses)
eb8cc645
MW
129
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)
133
a661e420 134 ("linux-pam" ,linux-pam)
3246cc91 135 ("libltdl" ,libltdl)
01eafd38 136 ("gdbm" ,gdbm)))
a661e420 137 (home-page "http://www.gnu.org/software/mailutils/")
f50d2669 138 (synopsis "Utilities and library for reading and serving mail")
a661e420 139 (description
79c311b8
LC
140 "GNU Mailutils is a collection of programs for managing, viewing and
141processing electronic mail. It contains both utilities and server daemons
142and all operate in a protocol-agnostic way. The underlying libraries are
143also available, simplifying the addition of mail capabilities to new
144software.")
a661e420
LC
145 (license
146 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
147 (list gpl3+ lgpl3+))))
d983a14f
AE
148
149(define-public fetchmail
150 (package
151 (name "fetchmail")
152 (version "6.3.26")
153 (source (origin
154 (method url-fetch)
155 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
156 version ".tar.xz"))
157 (sha256
158 (base32
159 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
160 (build-system gnu-build-system)
161 (inputs
162 `(("openssl" ,openssl)))
163 (arguments
164 `(#:configure-flags (list (string-append "--with-ssl="
165 (assoc-ref %build-inputs "openssl")))))
07af3e5e 166 (home-page "http://www.fetchmail.info/")
ae2189a9 167 (synopsis "Remote-mail retrieval and forwarding utility")
d983a14f
AE
168 (description
169 "Fetchmail is a full-featured, robust, well-documented remote-mail
170retrieval and forwarding utility intended to be used over on-demand
171TCP/IP links (such as SLIP or PPP connections). It supports every
172remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
173KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
174and IPSEC.
175
176Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
177so it can then be read by normal mail user agents such as mutt, elm
178or BSD Mail. It allows all your system MTA's filtering, forwarding, and
179aliasing facilities to work just as they would on normal mail.")
180 (license gpl2+))) ; most files are actually public domain or x11
13f04f48
AE
181
182(define-public mutt
183 (package
184 (name "mutt")
0323fe80 185 (version "1.7.0")
13f04f48
AE
186 (source (origin
187 (method url-fetch)
d82633d0
AE
188 (uri (string-append "ftp://ftp.mutt.org/pub/mutt/mutt-"
189 version ".tar.gz"))
13f04f48
AE
190 (sha256
191 (base32
0323fe80 192 "0idkamdiwj9fgqaz1vzkfg78cnmkzp74skv0ibw2xjfq6ds9hghx"))
fc1adab1 193 (patches (search-patches "mutt-store-references.patch"))))
13f04f48
AE
194 (build-system gnu-build-system)
195 (inputs
4fd6bf53 196 `(("cyrus-sasl" ,cyrus-sasl)
b0bb0136 197 ("gdbm" ,gdbm)
524e1df6 198 ("gpgme" ,gpgme)
4fd6bf53 199 ("ncurses" ,ncurses)
13f04f48
AE
200 ("openssl" ,openssl)
201 ("perl" ,perl)))
202 (arguments
203 `(#:configure-flags '("--enable-smtp"
204 "--enable-imap"
205 "--enable-pop"
524e1df6 206 "--enable-gpgme"
b0bb0136 207 "--enable-hcache" ; for header caching
0323fe80 208 "--enable-sidebar"
13f04f48 209 "--with-ssl"
4fd6bf53 210 "--with-sasl"
13f04f48
AE
211 ;; so that mutt does not check whether the path
212 ;; exists, which it does not in the chroot
213 "--with-mailpath=/var/mail")))
214 (home-page "http://www.mutt.org/")
215 (synopsis "Mail client")
216 (description
217 "Mutt is a small but very powerful text-based mail client for Unix
218operating systems.")
219 (license gpl2+)))
681a6588
MW
220
221(define-public gmime
222 (package
223 (name "gmime")
cc955356 224 (version "2.6.20")
681a6588
MW
225 (source (origin
226 (method url-fetch)
75630043 227 (uri (string-append "mirror://gnome/sources/gmime/"
29a7c98a 228 (version-major+minor version)
681a6588
MW
229 "/gmime-" version ".tar.xz"))
230 (sha256
231 (base32
cc955356 232 "0rfzbgsh8ira5p76kdghygl5i3fvmmx4wbw5rp7f8ajc4vxp18g0"))))
681a6588
MW
233 (build-system gnu-build-system)
234 (native-inputs
235 `(("pkg-config" ,pkg-config)
236 ("gnupg" ,gnupg))) ; for tests only
237 (inputs `(("glib" ,glib)
238 ("gpgme" ,gpgme)
239 ("zlib" ,zlib)))
240 (arguments
241 `(#:phases
cc955356
EF
242 (modify-phases %standard-phases
243 (add-after
244 'unpack 'patch-paths-in-tests
245 (lambda _
246 ;; The test programs run several programs using 'system' with
ae83dcf6 247 ;; hard-coded paths. Here we patch them all.
248 ;; We use ISO-8859-1 here because test-iconv.c contains
cc955356
EF
249 ;; raw byte sequences in several different encodings.
250 (with-fluids ((%default-port-encoding #f))
251 (substitute* (find-files "tests" "\\.c$")
252 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
253 (let* ((base (basename prog-path))
ae83dcf6 254 (prog (which base)))
cc955356
EF
255 (string-append pre
256 (or prog (error "not found: " base))))))))))))
681a6588
MW
257 (home-page "http://spruce.sourceforge.net/gmime/")
258 (synopsis "MIME message parser and creator library")
259 (description
260 "GMime provides a core library and set of utilities which may be used for
261the creation and parsing of messages using the Multipurpose Internet Mail
262Extension (MIME).")
263 (license (list lgpl2.1+ gpl2+ gpl3+))))
264
a7e59c50
LC
265(define-public bogofilter
266 (package
267 (name "bogofilter")
268 (version "1.2.4")
269 (source (origin
270 (method url-fetch)
271 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
272 version "/bogofilter-"
273 version ".tar.bz2"))
274 (sha256
275 (base32
276 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
277 (build-system gnu-build-system)
278 (arguments
279 '(#:phases (alist-cons-before
280 'check 'pre-check
281 (lambda _
282 (substitute* "src/tests/t.frame"
283 (("GREP=/bin/grep")
284 (string-append "GREP=" (which "grep") "\n"))))
285 %standard-phases)))
286 (native-inputs `(("flex" ,flex)))
287 (inputs `(("bdb" ,bdb)))
288 (home-page "http://bogofilter.sourceforge.net/")
289 (synopsis "Mail classifier based on a Bayesian filter")
290 (description
291 "Bogofilter is a mail filter that classifies mail as spam or ham
292 (non-spam) by a statistical analysis of the message's header and
293content (body). The program is able to learn from the user's classifications
294and corrections. It is based on a Bayesian filter.")
295 (license gpl2)))
296
3919a31a
EB
297(define-public offlineimap
298 (package
299 (name "offlineimap")
860fc8fc 300 (version "7.0.6")
3919a31a
EB
301 (source (origin
302 (method url-fetch)
303 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
304 "archive/v" version ".tar.gz"))
f586c877 305 (file-name (string-append name "-" version ".tar.gz"))
3919a31a
EB
306 (sha256
307 (base32
860fc8fc 308 "1msg0v5i3v4mvjm2c5alzz91dk5y20h4xdr60lcz3507fv80407m"))))
3919a31a 309 (build-system python-build-system)
a4ea25d3
EF
310 (inputs `(("python2-pysqlite" ,python2-pysqlite)
311 ("python2-six" ,python2-six)))
3919a31a
EB
312 (arguments
313 ;; The setup.py script expects python-2.
314 `(#:python ,python-2
315 ;; Tests require a modifiable IMAP account.
42aa73b3
EF
316 #:tests? #f
317 #:phases
318 (modify-phases %standard-phases
319 (add-after 'install 'wrap-binary
320 (lambda* (#:key inputs outputs #:allow-other-keys)
321 (let* ((out (assoc-ref outputs "out"))
322 (bin (string-append out "/bin/offlineimap")))
323 (wrap-program bin
324 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
325 #t))))))
3919a31a 326 (home-page "http://www.offlineimap.org")
31e98ca6 327 (synopsis "Sync emails between two repositories")
3919a31a
EB
328 (description
329 "OfflineImap synchronizes emails between two repositories, so that you
330can read the same mailbox from multiple computers. It supports IMAP as REMOTE
331repository and Maildir/IMAP as LOCAL repository.")
7886e23b 332 (license gpl2+)))
3919a31a 333
d2938d59
EB
334(define-public mu
335 (package
336 (name "mu")
47c96a57 337 (version "0.9.16")
d2938d59
EB
338 (source (origin
339 (method url-fetch)
922eaede 340 (uri (string-append "https://github.com/djcb/mu/archive/v"
d2938d59 341 version ".tar.gz"))
922eaede 342 (file-name (string-append "mu-" version ".tar.gz"))
d2938d59
EB
343 (sha256
344 (base32
47c96a57 345 "0p7hqri1r1x6750x138cc29mh81kdav2dcim26y58s8an206h25g"))))
d2938d59
EB
346 (build-system gnu-build-system)
347 (native-inputs
348 `(("pkg-config" ,pkg-config)
9fd571a2 349 ("glib" ,glib "bin") ; for gtester
922eaede
PW
350 ("autoconf" ,autoconf)
351 ("automake" ,automake)
b8fc3622 352 ("emacs" ,emacs-minimal)
922eaede 353 ("libtool" ,libtool)
d2938d59
EB
354 ("texinfo" ,texinfo)))
355 ;; TODO: Add webkit and gtk to build the mug GUI.
356 (inputs
357 `(("xapian" ,xapian)
d2938d59
EB
358 ("guile" ,guile-2.0)
359 ("glib" ,glib)
360 ("gmime" ,gmime)
361 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
362 (arguments
704f2196
AK
363 `(#:modules ((guix build gnu-build-system)
364 (guix build utils)
365 (guix build emacs-utils))
366 #:imported-modules (,@%gnu-build-system-modules
367 (guix build emacs-utils))
368 #:phases
99404fff 369 (modify-phases %standard-phases
789bda83
AK
370 (add-after 'unpack 'patch-configure.ac
371 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
372 ;; so our Emacs package can't find it. Setting "--with-lispdir"
373 ;; configure flag doesn't help because "mu4e" will be added to
374 ;; the lispdir anyway, so we have to modify "configure.ac".
375 (lambda _
376 (substitute* "configure.ac"
377 (("^ +lispdir=.*") ""))
378 #t))
379 (add-after 'patch-configure.ac 'autoreconf
99404fff
AK
380 (lambda _
381 (zero? (system* "autoreconf" "-vi"))))
382 (add-before 'check 'check-tz-setup
383 (lambda* (#:key inputs #:allow-other-keys)
384 ;; For mu/test/test-mu-query.c
385 (setenv "TZDIR"
386 (string-append (assoc-ref inputs "tzdata")
387 "/share/zoneinfo"))
704f2196
AK
388 #t))
389 (add-after 'install 'install-emacs-autoloads
390 (lambda* (#:key outputs #:allow-other-keys)
391 (emacs-generate-autoloads
392 "mu4e"
393 (string-append (assoc-ref outputs "out")
394 "/share/emacs/site-lisp"))
99404fff 395 #t)))))
d2938d59
EB
396 (home-page "http://www.djcbsoftware.nl/code/mu/")
397 (synopsis "Quickly find emails")
398 (description
399 "Mu is a tool for dealing with e-mail messages stored in the
400Maildir-format. Mu's purpose in life is to help you to quickly find the
401messages you need; in addition, it allows you to view messages, extract
402attachments, create new maildirs, and so on.")
403 (license gpl3+)))
404
a2cb16b0
TS
405(define-public alot
406 (package
407 (name "alot")
408 (version "0.3.7")
409 (source (origin
410 (method url-fetch)
1b94f182
TS
411 ;; package author intends on distributing via github rather
412 ;; than pypi:
413 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
a2cb16b0
TS
414 (uri (string-append "https://github.com/pazz/alot/archive/"
415 version ".tar.gz"))
416 (file-name (string-append "alot-" version ".tar.gz"))
417 (sha256
418 (base32
419 "09md9llg38r6xby8l0y0zf8nhlh91cr4xs0r15b294hhp8hl2bgx"))))
420 (build-system python-build-system)
421 (arguments
422 `(#:tests? #f ; no tests
1b94f182
TS
423 ;; python 3 is unsupported, more info:
424 ;; https://github.com/pazz/alot/blob/0.3.7/docs/source/faq.rst
a2cb16b0
TS
425 #:python ,python-2))
426 (inputs
427 `(("python2-magic" ,python2-magic)
428 ("python2-configobj" ,python2-configobj)
429 ("python2-twisted" ,python2-twisted)
430 ("python2-urwid" ,python2-urwid)
431 ("python2-urwidtrees" ,python2-urwidtrees)
432 ("python2-pygpgme" ,python2-pygpgme)
433 ("python2-notmuch" ,python2-notmuch)))
434 (home-page "https://github.com/pazz/alot")
435 (synopsis "Commandline MUA using notmuch")
436 (description
437 "Alot is an experimental terminal mail user agent (MUA) based on
438@code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
439 (license gpl3+)))
440
1bd3f849
DT
441(define-public notmuch
442 (package
443 (name "notmuch")
25a78dbc 444 (version "0.22.1")
1bd3f849
DT
445 (source (origin
446 (method url-fetch)
866fade9 447 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
1bd3f849
DT
448 version ".tar.gz"))
449 (sha256
450 (base32
25a78dbc 451 "0jwpda3q023dn3sp41n8648951i7iagfv8zzpriv7hpkjivlafg7"))))
1bd3f849
DT
452 (build-system gnu-build-system)
453 (arguments
25a78dbc
TS
454 '(#:tests? #f ; FIXME: 694 tests; 170 fail and 100 are skipped
455 ; with perl input: 50 fail and 100 are skipped
eb537f57
DT
456 #:phases (modify-phases %standard-phases
457 (replace 'configure
458 (lambda* (#:key outputs #:allow-other-keys)
459 (setenv "CC" "gcc")
460 (setenv "CONFIG_SHELL" (which "sh"))
ee886454 461
eb537f57
DT
462 (let ((out (assoc-ref outputs "out")))
463 (zero? (system* "./configure"
464 (string-append "--prefix=" out)))))))))
1bd3f849 465 (native-inputs
2c5b91dc
AK
466 `(("bash-completion" ,bash-completion)
467 ("emacs" ,emacs-minimal)
468 ("pkg-config" ,pkg-config)
ee886454 469 ("python" ,python-2)
eb537f57 470 ("python-docutils" ,python2-docutils)
2c5b91dc 471 ("python-sphinx" ,python2-sphinx)))
1bd3f849 472 (inputs
2c5b91dc 473 `(("glib" ,glib)
1bd3f849
DT
474 ("gmime" ,gmime)
475 ("talloc" ,talloc)
476 ("xapian" ,xapian)
477 ("zlib" ,zlib)))
478 (home-page "http://notmuchmail.org/")
479 (synopsis "Thread-based email index, search, and tagging")
480 (description
481 "Notmuch is a command-line based program for indexing, searching, read-
482ing, and tagging large collections of email messages.")
483 (license gpl3+)))
484
8a75c589
AM
485(define-public notmuch-addrlookup-c
486 (package
487 (name "notmuch-addrlookup-c")
488 (version "7")
489 (source (origin
490 (method url-fetch)
491 (uri (string-append
492 "https://github.com/aperezdc/" name "/archive/v"
493 version ".tar.gz"))
494 (file-name (string-append name "-" version ".tar.gz"))
495 (sha256
496 (base32
497 "0rslg2ifgyhl6asv3yr1f62m9xjfcinv7i6qb07h2k217jqlmrri"))))
498 (build-system gnu-build-system)
499 (arguments
500 '(#:tests? #f ; no tests
501 #:make-flags (list "CC=gcc"
502 (string-append "PREFIX="
503 (assoc-ref %outputs "out")))
504 #:phases (modify-phases %standard-phases
505 (delete 'configure)
506 ;; Remove vim code completion config, it's not needed to
507 ;; build (or be patched).
508 (add-before 'patch-source-shebangs 'delete-ycm-file
509 (lambda _ (delete-file ".ycm_extra_conf.py")))
510 (replace 'install
511 (lambda* (#:key outputs #:allow-other-keys)
512 (let ((bin (string-append
513 (assoc-ref outputs "out") "/bin")))
514 (install-file "notmuch-addrlookup" bin)))))))
515 (native-inputs
516 `(("pkg-config" ,pkg-config)))
517 (inputs
518 `(("glib" ,glib)
519 ("notmuch" ,notmuch)))
520 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
521 (synopsis "Address lookup tool for Notmuch")
522 (description "This is an address lookup tool using a Notmuch database,
523useful for email address completion.")
524 (license license:expat)))
525
4b6909bc
TS
526(define-public python-notmuch
527 (package
528 (name "python-notmuch")
529 (version "0.22.1")
530 ;; Notmuch python bindings are now unavailable on pypi. The
531 ;; bindings are distributed via the notmuch release tarball.
532 (source (package-source notmuch))
533 (build-system python-build-system)
534 (inputs `(("notmuch" ,notmuch)))
535 (arguments
536 `(#:tests? #f ; no "test" target
537 #:phases
538 (modify-phases %standard-phases
539 ;; This python package lives in a subdirectory of the notmuch source
540 ;; tree, so chdir into it before building.
541 (add-after 'unpack 'enter-python-dir
542 (lambda _ (chdir "bindings/python") #t))
543 ;; Make sure the correct notmuch shared library gets loaded.
544 (add-before 'build 'set-libnotmuch-file-name
545 (lambda* (#:key inputs #:allow-other-keys)
546 (let ((notmuch (assoc-ref inputs "notmuch")))
547 (substitute* "notmuch/globals.py"
548 (("libnotmuch\\.so\\.")
549 (string-append notmuch "/lib/libnotmuch.so.")))
550 #t))))))
551 (home-page "http://notmuchmail.org/")
552 (synopsis "Python bindings of the Notmuch mail indexing library")
553 (description
554 "This package provides Python bindings to use the Notmuch mail indexing
555and search library.")
556 (license gpl3+)))
557
1c74da21 558(define-public python2-notmuch
caa6fc89 559 (package-with-python2 python-notmuch))
1c74da21 560
98e9e22f
SB
561(define-public getmail
562 (package
563 (name "getmail")
1a5fd02a 564 (version "4.49.0")
98e9e22f
SB
565 (source
566 (origin
567 (method url-fetch)
568 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
569 name "-" version ".tar.gz"))
570 (sha256
571 (base32
1a5fd02a 572 "1m0yzxd05fklwbmjj1n2q4sx397c1j5qi9a0r5fv3h8pplz4lv0w"))))
98e9e22f
SB
573 (build-system python-build-system)
574 (arguments
575 `(#:tests? #f ; no tests
576 #:python ,python-2))
577 (home-page "http://pyropus.ca/software/getmail/")
578 (synopsis "Mail retriever")
579 (description
580 "A flexible, extensible mail retrieval system with support for
581POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
582arbitrary message filtering, single-user and domain-mailboxes, and many other
583useful features.")
584
585 ;; License is specified in file '__init__.py'.
586 (license gpl2)))
587
f58f767b
JL
588(define-public libetpan
589 (package
590 (name "libetpan")
c1748912 591 (version "1.7.2")
f58f767b
JL
592 (source (origin
593 (method url-fetch)
594 (uri (string-append "https://github.com/dinhviethoa/" name
595 "/archive/" version ".tar.gz"))
f586c877 596 (file-name (string-append name "-" version ".tar.gz"))
f58f767b 597 (sha256
c1748912 598 (base32 "081ixgj3skglq9i7v0jb835lmfx21zi4i5b7997igwr0lj174y9j"))))
f58f767b
JL
599 (build-system gnu-build-system)
600 (native-inputs `(("autoconf" ,(autoconf-wrapper))
601 ("automake" ,automake)
3246cc91 602 ("libtool" ,libtool)
f58f767b
JL
603 ("pkg-config" ,pkg-config)))
604 (propagated-inputs
605 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
606 ;; libraries need to be propagated.
607 `(("cyrus-sasl" ,cyrus-sasl)
608 ("openssl" ,openssl)))
609 (inputs
610 `(("curl" ,curl)
c1748912
EF
611 ("expat" ,expat)
612 ("zlib" ,zlib)))
f58f767b 613 (arguments
602460ea
EF
614 '(#:phases
615 (modify-phases %standard-phases
616 (add-after 'unpack 'autogen
617 (lambda _
618 (setenv "NOCONFIGURE" "true")
619 (zero? (system* "sh" "autogen.sh")))))
f58f767b
JL
620 #:configure-flags
621 '("--disable-static" "--disable-db")))
622 (home-page "http://www.etpan.org/libetpan.html")
623 (synopsis "Portable middleware for email access")
624 (description
625 "The purpose of this mail library is to provide a portable, efficient
626framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
627provides an API for C language. It's the low-level API used by MailCore and
628MailCore 2.")
166191b3 629 (license (non-copyleft "file://COPYING"))))
f58f767b 630
e8435c4d
JL
631(define-public claws-mail
632 (package
633 (name "claws-mail")
a9a023ad 634 (version "3.14.0")
e8435c4d
JL
635 (source (origin
636 (method url-fetch)
637 (uri (string-append
762b1971 638 "http://www.claws-mail.org/releases/" name "-" version
6ea4b094 639 ".tar.xz"))
e8435c4d 640 (sha256
ec92806a 641 (base32
a9a023ad 642 "0nfchgga3ir91s8rky0a0vnz8cgj2f6h716wh3cmb466a01xfss6"))))
e8435c4d
JL
643 (build-system gnu-build-system)
644 (native-inputs `(("pkg-config" ,pkg-config)))
645 (inputs `(("bogofilter" ,bogofilter)
646 ("curl" ,curl)
647 ("dbus-glib" ,dbus-glib)
e8435c4d
JL
648 ("enchant" ,enchant)
649 ("expat" ,expat)
650 ("ghostscript" ,ghostscript)
651 ("hicolor-icon-theme" ,hicolor-icon-theme)
652 ("gnupg" ,gnupg)
653 ("gnutls" ,gnutls)
654 ("gpgme" ,gpgme)
655 ("gtk" ,gtk+-2)
656 ("libarchive" ,libarchive)
657 ("libcanberra" ,libcanberra)
658 ("libetpan" ,libetpan)
659 ("libnotify" ,libnotify)
660 ("libsm" ,libsm)
661 ("libxml2" ,libxml2)
662 ("perl" ,perl)
f6292baf
EB
663 ("python-2" ,python-2)
664 ("mime-info" ,shared-mime-info)))
e8435c4d
JL
665 (arguments
666 '(#:configure-flags
f6292baf
EB
667 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
668 #:phases (modify-phases %standard-phases
669 (add-before 'build 'patch-mime
670 (lambda* (#:key inputs #:allow-other-keys)
671 (substitute* "src/procmime.c"
672 (("/usr/share/mime/globs")
673 (string-append (assoc-ref inputs "mime-info")
674 "/share/mime/globs"))))))))
e8435c4d
JL
675 (synopsis "GTK-based Email client")
676 (description
677 "Claws-Mail is an email client (and news reader) based on GTK+. The
678appearance and interface are designed to be familiar to new users coming from
679other popular email clients, as well as experienced users. Almost all commands
680are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
681which can add many functionalities to the base client.")
682 (home-page "http://www.claws-mail.org/")
683 (license gpl3+))) ; most files are actually public domain or x11
684
d6e941bc
685(define-public msmtp
686 (package
687 (name "msmtp")
d23d1ddf 688 (version "1.6.5")
d6e941bc
689 (source
690 (origin
691 (method url-fetch)
d23d1ddf
LF
692 (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
693 "/msmtp-" version ".tar.xz"))
694 (sha256
695 (base32
696 "01jh9ba49bih8zsh40myw6qq1ll210q1vw0jg865vrn7jc3dd83n"))))
d6e941bc
697 (build-system gnu-build-system)
698 (inputs
699 `(("libidn" ,libidn)
72d8b5ba 700 ("libsecret" ,libsecret)
d6e941bc
701 ("gnutls" ,gnutls)
702 ("zlib" ,zlib)
703 ("gsasl" ,gsasl)))
704 (native-inputs
705 `(("pkg-config" ,pkg-config)))
706 (home-page "http://msmtp.sourceforge.net/")
707 (arguments
708 `(#:configure-flags (list "--with-libgsasl"
709 "--with-libidn"
823e2ed4
LF
710 "--with-tls=gnutls")
711 #:phases
712 (modify-phases %standard-phases
713 (add-after 'install 'install-msmtpq
714 (lambda* (#:key outputs #:allow-other-keys)
715 (let* ((out (assoc-ref outputs "out"))
716 (bin (string-append out "/bin"))
717 (doc (string-append out "/share/doc/msmtp"))
718 (msmtpq (string-append "scripts/msmtpq")))
719 (install-file (string-append msmtpq "/msmtpq") bin)
720 (install-file (string-append msmtpq "/msmtp-queue") bin)
721 (install-file (string-append msmtpq "/README.msmtpq") doc)
722 #t))))))
d6e941bc
723 (synopsis
724 "Simple and easy to use SMTP client with decent sendmail compatibility")
725 (description
726 "msmtp is an SMTP client. In the default mode, it transmits a mail to
727an SMTP server (for example at a free mail provider) which takes care of further
728delivery.")
729 (license gpl3+)))
730
66cc3ab2
TUBK
731(define-public exim
732 (package
733 (name "exim")
cf316a59 734 (version "4.87")
66cc3ab2
TUBK
735 (source
736 (origin
737 (method url-fetch)
fc6fdc05
LF
738 (uri (list (string-append "ftp://ftp.exim.org/pub/exim/exim4/exim-"
739 version ".tar.bz2")
740 (string-append "ftp://ftp.exim.org/pub/exim/exim4/old/exim-"
741 version ".tar.bz2")))
66cc3ab2 742 (sha256
513f8ab4 743 (base32
cf316a59 744 "1jbxn13shq90kpn0s73qpjnx5xm8jrpwhcwwgqw5s6sdzw6iwsbl"))))
66cc3ab2
TUBK
745 (build-system gnu-build-system)
746 (inputs
747 `(("bdb" ,bdb)
748 ("gnutls" ,gnutls)
749 ("gzip" ,gzip)
750 ("bzip2" ,bzip2)
751 ("xz" ,xz)
66cc3ab2
TUBK
752 ("perl" ,perl)
753 ("libxt" ,libxt)
754 ("libxaw" ,libxaw)))
755 (native-inputs
42773138
EF
756 `(("pcre" ,pcre "bin")
757 ("perl" ,perl)))
66cc3ab2
TUBK
758 (arguments
759 '(#:phases
760 (alist-replace
761 'configure
762 ;; We'd use #:make-flags but the top-level Makefile calls others
763 ;; recursively, so just set all variables this way.
764 (lambda* (#:key outputs inputs #:allow-other-keys)
765 (substitute* '("Makefile" "OS/Makefile-Default")
766 (("(RM_COMMAND=).*" all var)
767 (string-append var "rm\n")))
768 (copy-file "src/EDITME" "Local/Makefile")
769 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
770 (let ((out (assoc-ref outputs "out"))
771 (gzip (assoc-ref inputs "gzip"))
772 (bzip2 (assoc-ref inputs "bzip2"))
773 (xz (assoc-ref inputs "xz")))
774 (substitute* '("Local/Makefile")
775 (("(BIN_DIRECTORY=).*" all var)
776 (string-append var out "/bin\n"))
777 (("(CONFIGURE_FILE=).*" all var)
778 (string-append var out "/etc/exim.conf\n"))
779 (("(EXIM_USER=).*" all var)
780 (string-append var "nobody\n"))
781 (("(FIXED_NEVER_USERS=).*" all var)
782 (string-append var "\n")) ;XXX no root in build environment
783 (("(COMPRESS_COMMAND=).*" all var)
784 (string-append var gzip "/bin/gzip\n"))
785 (("(ZCAT_COMMAND=).*" all var)
786 (string-append var gzip "/bin/zcat\n")))
787 ;; This file has hardcoded names for tools despite the zcat
788 ;; configuration above.
789 (substitute* '("src/exigrep.src")
790 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
791 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
792 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
793 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
794 (alist-cons-before
795 'build 'fix-sh-paths
796 (lambda* (#:key inputs #:allow-other-keys)
797 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
798 (("SHELL=/bin/sh") "SHELL=sh"))
799 (substitute* '("scripts/Configure-config.h")
800 (("\\| /bin/sh") "| sh"))
801 (let ((bash (assoc-ref inputs "bash")))
802 (substitute* '("scripts/Configure-eximon")
803 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
804 %standard-phases))
805 #:make-flags '("INSTALL_ARG=-no_chown")
806 ;; No 'check' target.
807 #:tests? #f))
808 (home-page "http://www.exim.org/")
809 (synopsis
810 "Message Transfer Agent (MTA) developed at the University of Cambridge")
811 (description
812 "Exim is a message transfer agent (MTA) developed at the University of
813Cambridge for use on Unix systems connected to the Internet. In style it is
814similar to Smail 3, but its facilities are more general. There is a great
815deal of flexibility in the way mail can be routed, and there are extensive
816facilities for checking incoming mail.")
817 (license gpl2+)))
818
7d2b784b
MW
819(define-public dovecot
820 (package
821 (name "dovecot")
873966e3 822 (version "2.2.25")
7d2b784b
MW
823 (source
824 (origin
825 (method url-fetch)
826 (uri (string-append "http://www.dovecot.org/releases/"
827 (version-major+minor version) "/"
828 name "-" version ".tar.gz"))
829 (sha256 (base32
873966e3 830 "0rwn5wc5b8j9fzqcjggdgpzmb77myrf4ra294z1gg5v3hhng7nfq"))))
7d2b784b
MW
831 (build-system gnu-build-system)
832 (native-inputs
833 `(("pkg-config" ,pkg-config)))
834 (inputs
835 `(("openssl" ,openssl)
836 ("zlib" ,zlib)
837 ("bzip2" ,bzip2)
fd5c70f8
AW
838 ("sqlite" ,sqlite)
839 ("linux-pam" ,linux-pam)))
7d2b784b
MW
840 (arguments
841 `(#:configure-flags '("--sysconfdir=/etc"
842 "--localstatedir=/var")
843 #:phases (modify-phases %standard-phases
844 (add-before
845 'configure 'pre-configure
846 (lambda _
847 ;; Simple hack to avoid installing in /etc
848 (substitute* '("doc/Makefile.in"
849 "doc/example-config/Makefile.in")
850 (("pkgsysconfdir = .*")
851 "pkgsysconfdir = /tmp/etc"))
852 #t)))))
853 (home-page "http://www.dovecot.org")
854 (synopsis "Secure POP3/IMAP server")
855 (description
856 "Dovecot is a mail server whose major goals are security and reliability.
857It supports mbox/Maildir and its own dbox/mdbox formats.")
858 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
859 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
860 ;; Unicode, Inc. License Agreement for Data Files and Software.
861 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
862
81ce19f4
863(define-public isync
864 (package
865 (name "isync")
2c3d13fe 866 (version "1.2.1")
81ce19f4
867 (source
868 (origin
869 (method url-fetch)
870 (uri (string-append "mirror://sourceforge/isync/isync/"
871 version "/isync-" version ".tar.gz"))
872 (sha256 (base32
2c3d13fe 873 "1bij6nm06ghkg98n2pdyacam2fyg5y8f7ajw0d5653m0r4ldw5p7"))))
81ce19f4
874 (build-system gnu-build-system)
875 (inputs
876 `(("bdb" ,bdb)
877 ("openssl" ,openssl)))
878 (home-page "http://isync.sourceforge.net/")
879 (synopsis "Mailbox synchronization program")
880 (description
881 "isync/mbsync is command line tool for two-way synchronization of
882mailboxes. Currently Maildir and IMAP are supported types.")
883 (license gpl2+)))
884
26b8de19
EB
885(define-public perl-email-abstract
886 (package
887 (name "perl-email-abstract")
888 (version "3.008")
889 (source
890 (origin
891 (method url-fetch)
892 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
893 "Email-Abstract-" version ".tar.gz"))
894 (sha256
895 (base32
896 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
897 (build-system perl-build-system)
898 (propagated-inputs
899 `(("perl-email-simple" ,perl-email-simple)
a2190ccc 900 ("perl-module-pluggable" ,perl-module-pluggable)
26b8de19
EB
901 ("perl-mro-compat" ,perl-mro-compat)))
902 (home-page "http://search.cpan.org/dist/Email-Abstract")
903 (synopsis "Interface to mail representations")
904 (description "Email::Abstract provides module writers with the ability to
905write simple, representation-independent mail handling code.")
906 (license (package-license perl))))
907
ebda902f
EB
908(define-public perl-email-address
909 (package
910 (name "perl-email-address")
911 (version "1.907")
912 (source
913 (origin
914 (method url-fetch)
915 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
916 "Email-Address-" version ".tar.gz"))
917 (sha256
918 (base32
919 "1ai4r149pzjv9dc2vddir8zylj0z1pii93rm4g591lx7avim71hx"))))
920 (build-system perl-build-system)
921 (home-page "http://search.cpan.org/dist/Email-Address")
922 (synopsis "Email address parsing and creation")
923 (description "Email::Address implements a regex-based RFC 2822 parser that
924locates email addresses in strings and returns a list of Email::Address
925objects found. Alternatively you may construct objects manually.")
926 (license (package-license perl))))
927
aa86a3be
EB
928(define-public perl-email-date-format
929 (package
930 (name "perl-email-date-format")
931 (version "1.005")
932 (source
933 (origin
934 (method url-fetch)
935 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
936 "Email-Date-Format-" version ".tar.gz"))
937 (sha256
938 (base32
939 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
940 (build-system perl-build-system)
941 (home-page "http://search.cpan.org/dist/Email-Date-Format")
942 (synopsis "Produce RFC 2822 date strings")
943 (description "Email::Date::Format provides a means for generating an RFC
9442822 compliant datetime string.")
945 (license (package-license perl))))
946
08bf7095
EB
947(define-public perl-email-messageid
948 (package
949 (name "perl-email-messageid")
950 (version "1.405")
951 (source
952 (origin
953 (method url-fetch)
954 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
955 "Email-MessageID-" version ".tar.gz"))
956 (sha256
957 (base32
958 "09216naz21x99ff33wdm3j3zq1zhdbxhrsmx8bvavjrw3gjsvrq3"))))
959 (build-system perl-build-system)
960 (home-page "http://search.cpan.org/dist/Email-MessageID")
961 (synopsis "Generate world unique message-ids")
962 (description "Email::MessageID generates recommended message-ids to
963identify a message uniquely.")
964 (license (package-license perl))))
965
0a4c49f6
EB
966(define-public perl-email-mime
967 (package
968 (name "perl-email-mime")
969 (version "1.929")
970 (source
971 (origin
972 (method url-fetch)
973 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
974 "Email-MIME-" version ".tar.gz"))
975 (sha256
976 (base32
977 "1sf7dldg4dvicyw6dl1vx6s1gjq3fcppi0103ikl0vi6v5xjdjdh"))))
978 (build-system perl-build-system)
979 (propagated-inputs
980 `(("perl-email-address" ,perl-email-address)
981 ("perl-email-messageid" ,perl-email-messageid)
982 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
983 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
984 ("perl-email-simple" ,perl-email-simple)
985 ("perl-mime-types" ,perl-mime-types)))
986 (home-page "http://search.cpan.org/dist/Email-MIME")
987 (synopsis "MIME message handling")
988 (description "Email::MIME is an extension of the Email::Simple module, to
989handle MIME encoded messages. It takes a message as a string, splits it up
990into its constituent parts, and allows you access to various parts of the
991message. Headers are decoded from MIME encoding.")
992 (license (package-license perl))))
993
55025bb5
EB
994(define-public perl-email-mime-contenttype
995 (package
996 (name "perl-email-mime-contenttype")
997 (version "1.017")
998 (source
999 (origin
1000 (method url-fetch)
1001 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1002 "Email-MIME-ContentType-" version ".tar.gz"))
1003 (sha256
1004 (base32
1005 "1cl1l97lg690dh7i704hqi7yhxalq1chy7ylld5yc5v38jqa6gcn"))))
1006 (build-system perl-build-system)
1007 (native-inputs
1008 `(("perl-capture-tiny" ,perl-capture-tiny)))
1009 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1010 (synopsis "Parse MIME Content-Type headers")
1011 (description "Email::MIME::ContentType parses a MIME Content-Type
1012header.")
1013 (license (package-license perl))))
1014
02e29936
EB
1015(define-public perl-email-mime-encodings
1016 (package
1017 (name "perl-email-mime-encodings")
1018 (version "1.315")
1019 (source
1020 (origin
1021 (method url-fetch)
1022 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1023 "Email-MIME-Encodings-" version ".tar.gz"))
1024 (sha256
1025 (base32
1026 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1027 (build-system perl-build-system)
1028 (native-inputs
1029 `(("perl-capture-tiny" ,perl-capture-tiny)))
1030 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1031 (synopsis "Unified interface to MIME encoding and decoding")
1032 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1033 (license (package-license perl))))
1034
a24c5420
EB
1035(define-public perl-email-sender
1036 (package
1037 (name "perl-email-sender")
1038 (version "1.300016")
1039 (source
1040 (origin
1041 (method url-fetch)
1042 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1043 "Email-Sender-" version ".tar.gz"))
1044 (sha256
1045 (base32
1046 "18x26fjh399q3s2g8dajb9r10633c46jrnbvycpnpclgnzhjs100"))))
1047 (build-system perl-build-system)
1048 (native-inputs
1049 `(("perl-capture-tiny" ,perl-capture-tiny)))
1050 (propagated-inputs
1051 `(("perl-email-abstract" ,perl-email-abstract)
1052 ("perl-email-address" ,perl-email-address)
1053 ("perl-email-simple" ,perl-email-simple)
1054 ("perl-list-moreutils" ,perl-list-moreutils)
1055 ("perl-module-runtime" ,perl-module-runtime)
1056 ("perl-moo" ,perl-moo)
1057 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1058 ("perl-sub-exporter" ,perl-sub-exporter)
1059 ("perl-throwable" ,perl-throwable)
1060 ("perl-try-tiny" ,perl-try-tiny)))
1061 (home-page "http://search.cpan.org/dist/Email-Sender")
1062 (synopsis "Perl library for sending email")
1063 (description "Email::Sender replaces the old and sometimes problematic
1064Email::Send library.")
1065 (license (package-license perl))))
1066
151ef3ed
EB
1067(define-public perl-email-simple
1068 (package
1069 (name "perl-email-simple")
1070 (version "2.206")
1071 (source
1072 (origin
1073 (method url-fetch)
1074 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1075 "Email-Simple-" version ".tar.gz"))
1076 (sha256
1077 (base32
1078 "19dpy3j5na2k9qw1jcpc8ia25038068r9j1bn34f9yyrisz7s522"))))
1079 (build-system perl-build-system)
1080 (propagated-inputs
1081 `(("perl-email-date-format" ,perl-email-date-format)))
1082 (home-page "http://search.cpan.org/dist/Email-Simple")
1083 (synopsis "Parsing of RFC 2822 messages")
1084 (description "Email::Simple provides simple parsing of RFC 2822 message
1085format and headers.")
1086 (license (package-license perl))))
1087
f5dceecb
AW
1088(define-public libesmtp
1089 (package
1090 (name "libesmtp")
1091 (version "1.0.6")
1092 (source
1093 (origin
1094 (method url-fetch)
1095 (uri (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1096 version ".tar.bz2"))
1097 (sha256
1098 (base32
1099 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1100 (build-system gnu-build-system)
1101 (propagated-inputs
1102 `(("openssl" ,openssl)))
1103 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1104 (synopsis "Library for sending mail via remote hosts using SMTP")
1105 (description "libESMTP is an SMTP client which manages posting (or
1106submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1107It may be used as part of a Mail User Agent (MUA) or other program that must
1108be able to post electronic mail where mail functionality may not be that
1109program's primary purpose.")
1110 (license (list lgpl2.1+ gpl2+))))
1111
f8ae32a2
AW
1112(define-public esmtp
1113 (package
1114 (name "esmtp")
1115 (version "1.2")
1116 (source
1117 (origin
1118 (method git-fetch)
1119 (uri (git-reference
1120 (url "https://github.com/andywingo/esmtp.git")
1121 (commit "01bf9fc")))
1122 (sha256
1123 (base32
1124 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1125 (file-name (string-append name "-" version "-checkout"))))
1126 (arguments
1127 `(#:phases (modify-phases %standard-phases
1128 (add-before
1129 'configure 'autoconf
1130 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1131 (build-system gnu-build-system)
1132 (native-inputs
1133 `(("bison" ,bison)
1134 ("flex" ,flex)
1135 ("autoconf" ,autoconf)
1136 ("automake" ,automake)
1137 ("libtool" ,libtool)))
1138 (inputs
718c5dd6 1139 `(("libesmtp" ,libesmtp)))
f8ae32a2
AW
1140 (home-page "http://sourceforge.net/projects/esmtp/")
1141 (synopsis "Relay-only mail transfer agent (MTA)")
1142 (description "Esmtp is a simple relay-only mail transfer agent built using
1143libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1144user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1145page for more on configuration. This package also provides minimal
1146compatibility shims for the @command{sendmail}, @command{mailq}, and
1147@command{newaliases} commands.")
1148 (license gpl2+)))
1149
34dd26af
CAW
1150(define-public fdm
1151 (package
1152 (name "fdm")
1153 (version "1.9")
1154 (source (origin
1155 (method url-fetch)
1156 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1157 version "/fdm-"
1158 version ".tar.gz"))
1159 (file-name (string-append name "-" version ".tar.gz"))
1160 (sha256
1161 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1162 (build-system gnu-build-system)
1163 (inputs
1164 `(("tdb" ,tdb)
1165 ("openssl" ,openssl)
1166 ("zlib" ,zlib)))
1167 (home-page "https://github.com/nicm/fdm")
1168 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1169 (description "fdm is a program designed to fetch mail from POP3
1170or IMAP servers, or receive local mail from stdin, and
1171deliver it in various ways.")
1172 (license
1173 ;; Why point to a source file? Well, all the individual files have a
1174 ;; copy of this license in their headers, but there's no seprate file
1175 ;; with that information.
16966d5b 1176 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
34dd26af 1177
e90819c4
LG
1178
1179(define-public procmail
1180 (package
1181 (name "procmail")
1182 (version "3.22")
1183 (source
1184 (origin
1185 (method url-fetch)
1186 (uri (string-append
1187 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1188 version
1189 ".tar.gz"))
1190 (sha256
1191 (base32
1192 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1193 ;; The following patch fixes an ambiguous definition of
1194 ;; getline() in formail.c. The patch is provided by Debian as
1195 ;; patch 24.
1d982d78
LF
1196 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1197 "procmail-CVE-2014-3618.patch"))))
e90819c4
LG
1198 (arguments
1199 `(#:phases (modify-phases %standard-phases
1200 (replace 'configure
1201 (lambda _
1202 (substitute* "Makefile"
1203 (("/bin/sh")
1204 (which "sh"))
1205 (("/usr")
1206 (assoc-ref %outputs "out"))
1207 (("/bin/rm")
1208 (which "rm")))
1209 #t)))
1210 #:tests? #f)) ;; There are no tests indicating a successful
1211 ;; build. Some tests of basic locking mechanisms provided by the
1212 ;; filesystem are performed during 'make install'. However, these
1213 ;; are performed before the actual build process.
1214 (build-system gnu-build-system)
05aa576b 1215 (inputs `(("exim" ,exim)))
e90819c4
LG
1216 (home-page "http://www.procmail.org/")
1217 (synopsis "Versatile mail delivery agent (MDA)")
1218 (description "Procmail is a mail delivery agent (MDA) featuring support
1219for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1220can be sorted into separate files/directories and arbitrary commands can be
1221executed on mail arrival. Procmail is considered stable, but is no longer
1222maintained.")
1223 (license gpl2+))) ;; procmail allows to choose the
1224 ;; nonfree Artistic License 1.0
1225 ;; as alternative to the GPL2+.
1226 ;; This option is not listed here.
e90819c4 1227
61c30e9d
LF
1228(define-public khard
1229 (package
1230 (name "khard")
d99f6ffb 1231 (version "0.9.0")
61c30e9d
LF
1232 (source (origin
1233 (method url-fetch)
1234 (uri (pypi-uri name version))
1235 (sha256
1236 (base32
d99f6ffb 1237 "0y83rji4f270hbb41m4jpr0z3yzvpvbsl32mpg9d38hlydw8fk1s"))))
61c30e9d
LF
1238 (build-system python-build-system)
1239 (arguments
1240 `(#:python ,python-2 ; only python-2 is supported.
1241 #:phases
1242 (modify-phases %standard-phases
1243 (add-before 'build 'disable-egg-compression
1244 ;; Do not compress the egg.
1245 (lambda _
1246 (let ((port (open-file "setup.cfg" "a")))
1247 (display "\n[easy_install]\nzip_ok = 0\n"
1248 port)
1249 (close-port port)
1250 #t)))
1251 (add-after 'install 'install-doc
1252 (lambda* (#:key outputs #:allow-other-keys)
1253 (let* ((out (assoc-ref outputs "out"))
1254 (doc (string-append out "/share/doc/khard")))
1255 (copy-recursively "misc/khard" doc)))))))
1256 (native-inputs
1257 `(("python2-setuptools" ,python2-setuptools)))
1258 (propagated-inputs
1259 `(("python2-vobject" ,python2-vobject)
1260 ("python2-pyyaml" ,python2-pyyaml)
1261 ("python2-atomicwrites" ,python2-atomicwrites)
1262 ("python2-configobj" ,python2-configobj)))
1263 (synopsis "Console address book using CardDAV")
1264 (description "Khard is an address book for the console. It creates, reads,
1265modifies and removes CardDAV address book entries at your local machine. For
1266synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1267Khard can also be used from within the email client @command{mutt}.")
1268 (home-page "https://github.com/scheibler/khard")
1269 (license gpl3+)))
be0c5733
DM
1270
1271(define-public perl-mail-spf
1272 (package
1273 (name "perl-mail-spf")
1274 (version "v2.9.0")
1275 (source
1276 (origin
1277 (method url-fetch)
1278 (uri (string-append
1279 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1280 version
1281 ".tar.gz"))
1282 (sha256
1283 (base32
1284 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1285 (build-system perl-build-system)
1286 (native-inputs
1287 `(("perl-module-build" ,perl-module-build)
1288 ("perl-net-dns-resolver-programmable"
1289 ,perl-net-dns-resolver-programmable)))
1290 (arguments
1291 `(#:phases (modify-phases %standard-phases
1292 (add-before 'configure 'modify-Build.PL
1293 (lambda* (#:key outputs #:allow-other-keys)
1294 (substitute* "Build.PL"
1295 (("'/usr/sbin'") (string-append "'"
1296 (assoc-ref outputs "out")
1297 "/sbin'")))
1298 #t)))))
1299 (inputs
1300 `(("perl-error" ,perl-error)
1301 ("perl-net-dns" ,perl-net-dns)
1302 ("perl-netaddr-ip" ,perl-netaddr-ip)
1303 ("perl-uri" ,perl-uri)))
1304 (home-page
1305 "http://search.cpan.org/dist/Mail-SPF")
1306 (synopsis
1307 "Perl implementation of Sender Policy Framework")
1308 (description "Mail::SPF is the Sender Policy Framework implemented
1309in Perl.")
1310 (license bsd-3)))