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