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