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