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