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