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